摘要: setup 函数 对比Vue2.0 setup在beforeCreate之前调用,在created之后调用结束; 在setup中没有this; 返回对象中的属性刻在模板中使用; setup(props,context) props参数用于接收组件传值 context参数可以访问this中的方法 例如 阅读全文
posted @ 2021-08-26 16:54 Hekiss 阅读(111) 评论(0) 推荐(0) 编辑