摘要:
1注册全局指令 // 注册一个全局自定义指令 `v-focus` Vue.directive('focus', { // 当被绑定的元素插入到 DOM 中时…… inserted: function (el) { // 聚焦元素 el.focus() } }) 2注册局部指令 directives: 阅读全文
posted @ 2022-02-13 22:59
lijun12138
阅读(53)
评论(0)
推荐(0)
摘要:
vue中除了有template模板渲染还有render函数渲染,其实template中也是用的render函数渲染 render函数简单使用实例 1定义一个button.vue文件: <script> export default { props: { type: { type: String, d 阅读全文
posted @ 2022-02-13 21:38
lijun12138
阅读(276)
评论(0)
推荐(0)
摘要:
报错: 其实都不是错误,只是ESlint语法规则问题 去除ESlint校验, 在vue.config.js文件中加入 就可以了 阅读全文
posted @ 2022-02-13 21:24
lijun12138
阅读(184)
评论(0)
推荐(0)

浙公网安备 33010602011771号