v-bind和v-model的区别

DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>V-bind的详解title>
head>

<body>

    
    
    <div id="app">
        v-bind: <input type="text" name="" id="" :value="name">
        v-model: <input type="text" name="" id="" v-model="name">
    div>
body>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js">script>
<script>
    new Vue({
        el: '#app',
        data() {
            return {}
        },
        mounted() {},
        methods: {}
    })
script>

html>

你可能感兴趣的:(前端,javascript,vue.js)