JVXETable提供更便捷的三级联动机制,解决联动展示与选择BUG #2867

This commit is contained in:
zhangdaiscott
2021-08-20 11:13:42 +08:00
parent 8ce40fa3d4
commit 92028a7e44
4 changed files with 409 additions and 121 deletions

View File

@ -102,7 +102,13 @@ export default {
// 判断是否启用翻译
if (this.renderType === JVXERenderType.spaner && this.enhanced.translate.enabled) {
this.innerValue = this.enhanced.translate.handler.call(this, value)
let res = this.enhanced.translate.handler.call(this, value)
// 异步翻译,目前仅【多级联动】使用
if (res instanceof Promise) {
res.then(value => this.innerValue = value)
} else {
this.innerValue = res
}
}
},
},