八个组件的props透传,事件向上暴露

This commit is contained in:
yaoyanan
2021-04-07 17:57:14 +08:00
parent 53a032bc97
commit 139fe266e1
12 changed files with 108 additions and 57 deletions
+4 -4
View File
@@ -281,13 +281,13 @@
return this.treeData
},
validateProp(){
let mycondition = this.condition
let myCondition = this.condition
return new Promise((resolve,reject)=>{
if(!mycondition){
if(!myCondition){
resolve();
}else{
try {
let test=JSON.parse(mycondition);
let test=JSON.parse(myCondition);
if(typeof test == 'object' && test){
resolve()
}else{
@@ -305,7 +305,7 @@
//2.2新增 在组件内定义 指定父组件调用时候的传值属性和事件类型
model: {
prop: 'value',
event: 'change'
event: 'select-change'
}
}
//递归整个树,判断是否是叶子节点----同步获取数据时用到