UNPKG

@jdlinker/ui

Version:

jdLinker UI库,基于ant-design-vue封装

28 lines (25 loc) 741 B
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; } } } };