@芥末的糖-----v-model实现原理
作者:
芥末的糖 | 来源:发表于
2018-12-18 23:17 被阅读0次<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Vue.js-class-style</title>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>
<body>
<div id="root">
<input type="text" @input='text = $event.target.value'>
{{text}}
</div>
<script>
Vue.config.productionTip = false
let vm = new Vue({
el: '#root',
data: {
text:'',
}
})
</script>
</body>
</html>
本文标题:@芥末的糖-----v-model实现原理
本文链接:https://www.haomeiwen.com/subject/atnrkqtx.html
网友评论