摘要: 1、说明 在异步函数中更新数据的时候,必须手动调用 $apply 方法。 2、代码和效果 // html <button type="primary" plain="true">{{fruit}}</button> // js data = { fruit: '苹果' } onShow(){ set 阅读全文
posted @ 2019-11-14 17:56 徐林俊 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 一、props 1、静态传值 —— 父组件向子组件传递常量数据 // 父组件 <coma fruitName="橘子"></coma> // 子组件 // html <button type="primary" plain="true">{{fruitName}}</button> // js pr 阅读全文
posted @ 2019-11-14 16:32 徐林俊 阅读(654) 评论(0) 推荐(0) 编辑