v-bind 例子
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="app">
<img src="./imgs/10-02.png" alt="" title="hello 波仔">
<img v-bind:src="imgUrl" alt="" v-bind:title="msg">
<img :src="imgUrl" alt="" :title="msg">
<img src="./imgs/10-02.png" alt="">
</div>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.14/vue.js"></script>
<script>
const app = new Vue({
el: '#app',
data: {
imgUrl: './imgs/10-02.png',
msg: 'Hello 波仔'
},
})
</script>
</body>
</html>
演示