saaf-common
Advanced tools
Comparing version 1.0.45 to 1.0.46
{ | ||
"name": "saaf-common", | ||
"version": "1.0.45", | ||
"version": "1.0.46", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,35 +5,35 @@ /* | ||
* @Last Modified by: zhengxiaowen | ||
* @Last Modified time: 2019-12-03 10:25:26 | ||
* @Last Modified time: 2019-12-03 14:07:46 | ||
*/ | ||
export default class btnGroupTool{ | ||
static formatFunctionList(val, currentRow, SaafDelModalV2){ | ||
let functionList = {} | ||
for(let key in val){ | ||
if((key == 'btnModify') && !val[key].disabled){ | ||
functionList[key] = { | ||
fun: val[key], | ||
disabled: ()=>{ return currentRow ? false : true }, | ||
...val[key] | ||
} | ||
}else if((key == 'btnDel') && !val[key].disabled){ | ||
let fun = null | ||
if(val[key] && val[key].fun){ | ||
fun = val[key].fun | ||
}else{ | ||
fun = val[key] | ||
} | ||
functionList[key] = { | ||
fun: ()=>{ | ||
SaafDelModalV2.open(()=>{fun(); currentRow=null;}) | ||
}, | ||
disabled: ()=>{ return currentRow ? false : true }, | ||
...val[key] | ||
} | ||
}else{ | ||
functionList[key] = val[key] | ||
} | ||
} | ||
return functionList | ||
} | ||
// static formatFunctionList(val, currentRow, SaafDelModalV2){ | ||
// let functionList = {} | ||
// for(let key in val){ | ||
// if((key == 'btnModify') && !val[key].disabled){ | ||
// functionList[key] = { | ||
// fun: val[key], | ||
// disabled: ()=>{ return currentRow ? false : true }, | ||
// ...val[key] | ||
// } | ||
// }else if((key == 'btnDel') && !val[key].disabled){ | ||
// let fun = null | ||
// if(val[key] && val[key].fun){ | ||
// fun = val[key].fun | ||
// }else{ | ||
// fun = val[key] | ||
// } | ||
// functionList[key] = { | ||
// fun: ()=>{ | ||
// SaafDelModalV2.open(()=>{fun(); currentRow=null;}) | ||
// }, | ||
// disabled: ()=>{ return currentRow ? false : true }, | ||
// ...val[key] | ||
// } | ||
// }else{ | ||
// functionList[key] = val[key] | ||
// } | ||
// } | ||
// return functionList | ||
// } | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1002747