摘要: <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>自定义事件</title> <script src 阅读全文
posted @ 2021-01-28 10:27 HF10 阅读(167) 评论(0) 推荐(0)
摘要: <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <script 阅读全文
posted @ 2021-01-28 09:52 HF10 阅读(655) 评论(0) 推荐(0)
摘要: <div id="app"> <my-input v-model="num"></my-input> <h2>{{num}}</h2> </div> <script> let myInput = { template:`<p><input ref="input" :value="value" @in 阅读全文
posted @ 2021-01-28 09:36 HF10 阅读(97) 评论(0) 推荐(0)
摘要: 在子组件上加上.native即可使用子组件的原生点击事件,去掉.native点击事件无效 <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial 阅读全文
posted @ 2021-01-28 09:10 HF10 阅读(73) 评论(0) 推荐(0)
摘要: 父组件传给子组件 props 子组件传给父组件 this.$emit() <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1 阅读全文
posted @ 2021-01-28 00:08 HF10 阅读(72) 评论(0) 推荐(0)