完成v-model学习

main
RogerWork 1 year ago
parent 9ca3a3a47d
commit 3b0e605625
  1. 8
      demo/v-model.html

@ -5,13 +5,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css"/> <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css"/>
<script src="https://unpkg.com/vue@3.2.24/dist/vue.global.js"></script> <script src="https://unpkg.com/vue@3.2.24/dist/vue.global.js"></script>
<!-- 引入element plus样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css"/>
<script src="https://unpkg.com/element-plus"></script>
<title>v-model</title> <title>v-model</title>
</head> </head>
<body> <body>
<div id="app"> <div id="app">
<input type="text" v-model="tips"> <input type="text" v-model="tips">
<h2>{{ tips }}</h2> <h2>{{ tips }}</h2>
<input type="button" value="修改" @click="change_tips"> <!-- <input type="button" value="修改" @click="change_tips">-->
<el-button type="primary" @click="change_tips">修改</el-button>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
const App = { const App = {
@ -27,7 +31,7 @@
} }
} }
} }
Vue.createApp(App).mount("#app") Vue.createApp(App).use(ElementPlus).mount("#app")
</script> </script>
</body> </body>
</html> </html>

Loading…
Cancel
Save