欢迎光临,流星雨博客!!!
  • 117 Vue.directive 自定义指令

    // 注册一个全局自定义指令 `v-focus`
    Vue.directive('focus', {
    // 当被绑定的元素插入到 DOM 中时……
    inserted: function (el) {
    // 聚焦元素
    el.focus()
    }
    })

  • 119 Vue.set() 修改对象属性

    Vue.set(outData,'count',4);

  • 131 Vue.component 注册全局组件

    Vue.component('lxy-body',{
    template:` div style="color:red;" 全局化注册的lxy-body标签 div `
    })

  • 141 vm.$destroy() 卸载

  • 142 vm.$nextTick() 更新数据

  • 143 vm.$forceUpdate() Vue 实例重新渲染

  • 145 $once 监听一个自定义事件,但是只触发一次,在第一次触发之后移除监听器

    app.$once('lxy',() => {})

  • 146 $off 移除自定义事件监听器

    app.$off('lxy')