【issues/860】生成的一对多代码,热更新之后点击新增卡死
This commit is contained in:
parent
348a8a3f6a
commit
3c0f15bb6e
|
@ -18,8 +18,13 @@ import JVxeTextareaCell from './components/cells/JVxeTextareaCell.vue';
|
||||||
// import JVxeDepartSelectCell from './components/cells/JVxeDepartSelectCell.vue'
|
// import JVxeDepartSelectCell from './components/cells/JVxeDepartSelectCell.vue'
|
||||||
// import JVxeUserSelectCell from './components/cells/JVxeUserSelectCell.vue'
|
// import JVxeUserSelectCell from './components/cells/JVxeUserSelectCell.vue'
|
||||||
|
|
||||||
const componentMap = new Map<JVxeTypes | string, JVxeVueComponent>();
|
let componentMap = new Map<JVxeTypes | string, JVxeVueComponent>();
|
||||||
|
// update-begin--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
|
||||||
|
const JVxeComponents = 'JVxeComponents__';
|
||||||
|
if (import.meta.env.DEV && componentMap.size === 0 && window[JVxeComponents] && window[JVxeComponents].size > 0) {
|
||||||
|
componentMap = window[JVxeComponents];
|
||||||
|
}
|
||||||
|
// update-end--author:liaozhiyang---date:20231027---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
|
||||||
/** span 组件结尾 */
|
/** span 组件结尾 */
|
||||||
export const spanEnds: string = ':span';
|
export const spanEnds: string = ':span';
|
||||||
|
|
||||||
|
@ -50,11 +55,17 @@ export function addComponent(type: JVxeTypes, component: JVxeVueComponent, spanC
|
||||||
if (spanComponent) {
|
if (spanComponent) {
|
||||||
componentMap.set(type + spanEnds, spanComponent);
|
componentMap.set(type + spanEnds, spanComponent);
|
||||||
}
|
}
|
||||||
|
// update-begin--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
|
||||||
|
import.meta.env.DEV && (window[JVxeComponents] = componentMap);
|
||||||
|
// update-end--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
|
||||||
}
|
}
|
||||||
|
|
||||||
export function deleteComponent(type: JVxeTypes) {
|
export function deleteComponent(type: JVxeTypes) {
|
||||||
componentMap.delete(type);
|
componentMap.delete(type);
|
||||||
componentMap.delete(type + spanEnds);
|
componentMap.delete(type + spanEnds);
|
||||||
|
// update-begin--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
|
||||||
|
import.meta.env.DEV && (window[JVxeComponents] = componentMap);
|
||||||
|
// update-end--author:liaozhiyang---date:20231208---for:【issues/860】生成的一对多代码,热更新之后点击新增卡死[暂时先解决]
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 定义内置自定义组件 */
|
/** 定义内置自定义组件 */
|
||||||
|
|
Loading…
Reference in New Issue