vue中watch的用法
摘要:在Vue中,用watch来响应数据的变化,示例代码如下, 第一种方式 <input type="text" v-model="userName"/> //监听当userName值发生变化时触发 watch: { userName (newName, oldName) { console.log(ne
阅读全文
posted @ 2021-07-31 19:48
posted @ 2021-07-31 19:48
posted @ 2021-07-31 10:11