函数式组件能够提高渲染性能 ---40讲
函数式组件中没有this,如何把check在template中使用呢?
直接使用render(render是什么?),不使用template,从context中取出props,scopeSlots,不用区分是作用域插槽还是?

其实这个函数式编程,没有看太懂
在main.js中全局引入函数式编程的组件,注册全局组件,方便使用
这个不能使用use注册,因为使用use注册的组件都做了处理


使用指令写权限

;


使用vue.use的方式注册指令,属于插件式注册指令
但是指令式的权限有个弊端,不能动态改变,一旦removeChild后,后期就不能更改了,使用函数式组件就更灵活,可以动态改变
总结:1,使用render函数,编写函数式组件;2,注册全局组件 3,自定义指令,4,使用插件式注册自定义指令
网友评论