完成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">
<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>
<!-- 引入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>
</head>
<body>
<div id="app">
<input type="text" v-model="tips">
<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>
<script type="text/javascript">
const App = {
@ -27,7 +31,7 @@
}
}
}
Vue.createApp(App).mount("#app")
Vue.createApp(App).use(ElementPlus).mount("#app")
</script>
</body>
</html>

Loading…
Cancel
Save