7.动态属性绑定 v-bind 简写:
-- 未经授权禁止转载 --

html

<div id="app">
    <!-- :value -->
    <h3>value="dengruicode.com"</h3>
    <input type="text" value="dengruicode.com">

    <h3>v-bind:value="web.url"</h3>
    <input type="text" v-bind:value="web.url">

    <h3>简写 :value="web.url"</h3>
    <input type="text" :value="web.url">

    <!-- :src -->
    <h3>src="windows.jpg"</h3>
    <img src="windows.jpg">

    <h3>:src="web.img"</h3>
    <img :src="web.img">

    <!-- :class -->
    <h3>class="textColor"</h3>
    <b class="textColor">邓瑞编程</b>

    <h3>:class="{textColor:web.fontStatus}"</h3>
    <b :class="{textColor:web.fontStatus}">dengruicode.com</b>
</div>

js

<script type="module">
    import { createApp, reactive } from './vue.esm-browser.js'

    createApp({
        setup() {
            const web = reactive({
                url: "www.dengruicode.com",
                img: "windows.jpg",
                fontStatus: true
            })

            return {
                web
            }
        }
    }).mount("#app")
</script>