补充遗漏的refMixinDesign.js文件。

This commit is contained in:
vdpAdmin 2022-04-12 18:21:50 +08:00
parent fba05b946d
commit f9e4538f10

View File

@ -0,0 +1,28 @@
export default {
methods: {
initRefList() {
if ((this.refList !== null) && !!this.widget.options.name) {
this.refList[this.widget.options.name] = this
}
},
getWidgetRef(widgetName, showError) {
let foundRef = this.refList[widgetName]
if (!foundRef && !!showError) {
this.$message.error(this.i18nt('render.hint.refNotFound') + widgetName)
}
return foundRef
},
/* 该方法用于组件重名检查!! */
registerToRefList(oldRefName) {
if ((this.refList !== null) && !!this.widget.options.name) {
if (!!oldRefName) {
delete this.refList[oldRefName]
}
this.refList[this.widget.options.name] = this
}
},
}
}