| | |
| | | } else { |
| | | this.ComponentUrl = this.customClass; // 不存在 '?' 整条路径就是 parts |
| | | } |
| | | if(validatenull(this.ComponentUrl) || ['UI', 'ui'].includes(this.ComponentUrl)){ |
| | | this.ComponentUrl='base/UIContentViewerInDialog'; |
| | | }else { |
| | | this.ComponentUrl='custom-ui/'+this.ComponentUrl; |
| | | if(validatenull(this.ComponentUrl) || ['ui', 'UI', 'base','bs'].includes(this.ComponentUrl)){ |
| | | this.ComponentUrl='views/base/UIContentViewerInDialog'; |
| | | }else if(this.ComponentUrl.indexOf('views/')===-1){ |
| | | this.ComponentUrl='views/custom-ui/'+this.ComponentUrl; |
| | | } |
| | | |
| | | if (this.ComponentUrl=='base/UIContentViewerInDialog' && (!urlParams.type || !urlParams.context)) { |
| | | this.isError = true; |
| | | return; |
| | |
| | | methods: { |
| | | loadCompoent(){ |
| | | // 动态导入组件 |
| | | import(`@/views/${this.ComponentUrl}.vue`).then((module) => { |
| | | import(`@/${this.ComponentUrl}.vue`).then((module) => { |
| | | // 成功导入后,将组件注册到Vue实例中 |
| | | this.currentComponent = module.default; |
| | | }).catch((error) => { |