v-bindは、HTML属性(またはコンポーネントのprop)をJavaScriptの式に動的にバインドするため、データが変わるとその属性がリアクティブに更新されます。短縮形は単なる:です。
vue
<script setup>
import { ref } from "vue";
const imageUrl = ref("/photo.jpg");
const isDisabled = ref(true);
const id = ref("main");
</script>
<template>
<img v-bind:src="imageUrl" /> <!-- full syntax -->
<img :src="imageUrl" /> <!-- shorthand (idiomatic) -->
<button :disabled="isDisabled">Save</button>
<div :id="id" :data-index="5">...</div>
</template>
との違いは重要です。がなければリテラル文字列ですが、あれば Vue が式を評価します。
