<!DOCTYPE html>
<html lang="en">
<head>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <meta charset="UTF-8">
    <title>hello</title>
</head>
<body>
<h1>Hello</h1>
<div id="app">
    带参数显示
    <h3>{{ message }}</h3>
    <h4>{{count}}</h4>
    <label>
        <input v-model="count"/>
    </label>

    <button @click="add()">+1</button>
</div>
</body>
<script>
    const {createApp, ref} = Vue

    createApp({
        setup() {
            const message = ref('Hello vue!')
            const count = ref(1)

            function add() {
                count.value++
            }

            return {message, count, add}
        },
        mounted() {
            console.log(111)
        },
    }).mount('#app')
</script>
</html>