<!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>Document</title>
</head>
<body>
<div id="app">
<p x-text="msg"></p>
<div x-text="eve"></div>
<button @click="handle">按钮</button>
</div>
<script>
const xgx = new Xgx({
el: '#app',
data: {
msg: 'haha',
eve: '你好'
},
methods: {
handle() {
this.eve = '呵呵'
}
}
})
function Xgx(option) {
this.el = option.el;
this.tmp = document.querySelector(this.el);
for(let key in opti
V-model底层原理(important)
最新推荐文章于 2023-12-12 08:30:00 发布