修复两个小bug:

1. 清空画布时未清空组件引用,导致组件重名判断出错;
2. 库模式打包后无法通过CDN的方式引入使用。
This commit is contained in:
vdpAdmin 2022-11-24 14:40:19 +08:00
parent 5f561c3782
commit b2dd6d6054
4 changed files with 9 additions and 0 deletions

View File

@ -173,6 +173,12 @@
return this.getWidgetRef(wName)
},
clearWidgetRefList() {
Object.keys(this.widgetRefList).forEach(key => {
delete this.widgetRefList[key]
})
},
}
}
</script>

View File

@ -298,6 +298,7 @@
clearDesigner() {
this.$refs.toolbarRef.clearFormWidget()
this.$refs.formRef.clearWidgetRefList()
},

View File

@ -62,6 +62,7 @@ export default defineConfig({
// 确保外部化处理那些你不想打包进库的依赖
external: ['vue', 'element-plus'],
output: {
exports: 'default', //要支持CDN引入必须设置此参数
// 在 UMD 构建模式下为这些外部化的依赖提供一个全局变量
globals: {
vue: 'Vue',

View File

@ -61,6 +61,7 @@ export default defineConfig({
// 确保外部化处理那些你不想打包进库的依赖
external: ['vue', 'element-plus'],
output: {
exports: 'default', //要支持CDN引入必须设置此参数
// 在 UMD 构建模式下为这些外部化的依赖提供一个全局变量
globals: {
vue: 'Vue',