mirror of
https://github.com/vform666/variant-form3-vite.git
synced 2025-01-11 00:29:13 +08:00
补充遗漏的refMixinDesign.js文件。
This commit is contained in:
parent
fba05b946d
commit
f9e4538f10
28
src/components/form-designer/refMixinDesign.js
Normal file
28
src/components/form-designer/refMixinDesign.js
Normal 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
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user