SOURCE

console 命令行工具 X clear

                    
>
console
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=, initial-scale=">
	<meta http-equiv="X-UA-Compatible" content="">
	<title>Vue模板</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/3.2.36/vue.global.min.js"></script>
</head>
<body>
	<div id="App">
        <span v-if="seen">现在看到我2了</span>
        <ol>
            <todo-item v-for="item in todos" v-bind:todo="item.text" v-bind:key="item.text"></todo-item>
        </ol>
    </div>
    <script>

        const TodoItem = {
            props: ['todo'],
            template: '<li>this is a todo</li>'
        }

        const App =  {
            components: { TodoItem },
            data () {
                return {
                    seen: true,
                    todos: [
                        {text: 'apple'},
                        {text: 'mac'},
                        {text: 'iphone'},
                    ]
                }
            },
         
        }

        Vue.createApp(App).mount('#App')
    </script>
</body>
</html>