提交 79700e8b 编写于 作者: RedPig97's avatar RedPig97

fix: 修复打包报错

上级 705edc70
...@@ -44,6 +44,6 @@ ...@@ -44,6 +44,6 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -26,6 +26,6 @@ ...@@ -26,6 +26,6 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -12,6 +12,6 @@ ...@@ -12,6 +12,6 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
:context="state.context" :context="state.context"
:viewParams="state.viewParams"/> :viewParams="state.viewParams"/>
\ No newline at end of file
...@@ -30,6 +30,6 @@ ...@@ -30,6 +30,6 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
\ No newline at end of file
...@@ -57,6 +57,6 @@ ...@@ -57,6 +57,6 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
\ No newline at end of file
...@@ -51,6 +51,6 @@ ...@@ -51,6 +51,6 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -33,6 +33,6 @@ ...@@ -33,6 +33,6 @@
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
:data="record" :data="record"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -42,6 +42,6 @@ ...@@ -42,6 +42,6 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -42,6 +42,6 @@ ...@@ -42,6 +42,6 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -26,6 +26,6 @@ ...@@ -26,6 +26,6 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
\ No newline at end of file
...@@ -18,6 +18,6 @@ ...@@ -18,6 +18,6 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -16,6 +16,6 @@ ...@@ -16,6 +16,6 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -25,6 +25,6 @@ ...@@ -25,6 +25,6 @@
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
:data="record" :data="record"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -22,6 +22,6 @@ ...@@ -22,6 +22,6 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -24,6 +24,6 @@ ...@@ -24,6 +24,6 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -15,6 +15,6 @@ ...@@ -15,6 +15,6 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -35,6 +35,6 @@ ...@@ -35,6 +35,6 @@
{{/if}} {{/if}}
{{#eq ctrlType 'grid'}} {{#eq ctrlType 'grid'}}
:value="record.{{item.psEditor.name}}" :value="record.{{item.psEditor.name}}"
@editorEvent="($event) => onEditorEvent(index,$event)" @editorEvent="($event: IActionParam) => onEditorEvent(index,$event)"
{{/eq}} {{/eq}}
/> />
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
mode="link" mode="link"
name="{{lowerCase item.codeName}}" name="{{lowerCase item.codeName}}"
:actionModel="record.{{lowerCase item.codeName}}" :actionModel="record.{{lowerCase item.codeName}}"
@toolbarEvent="($event) => handleToolbarEvent(record, $event)"/> @onToolbarEvent="($event: IActionParam) => onToolbarEvent(record, $event)"/>
{{/if}} {{/if}}
</div> </div>
{{/unless}} {{/unless}}
......
...@@ -55,16 +55,16 @@ export class GridControl extends MDControl { ...@@ -55,16 +55,16 @@ export class GridControl extends MDControl {
if (!rowEditState) { if (!rowEditState) {
selectedRowKeys.value = [record.srfkey]; selectedRowKeys.value = [record.srfkey];
if (!record.children) { if (!record.children) {
this.emit("ctrlevent", { tag: controlName, action: "selectionChange", data: [deepCopy(record)] }) this.emit("onCtrlEvent", { tag: controlName, action: "selectionChange", data: [deepCopy(record)] })
if (Object.is(rowActiveMode, 1)) { if (Object.is(rowActiveMode, 1)) {
this.emit("ctrlevent", { tag: controlName, action: "rowClick", data: [deepCopy(record)] }) this.emit("onCtrlEvent", { tag: controlName, action: "rowClick", data: [deepCopy(record)] })
} }
} }
} }
}, },
onDblclick: () => { onDblclick: () => {
if (!record.children && Object.is(rowActiveMode, 2)) { if (!record.children && Object.is(rowActiveMode, 2)) {
this.emit("ctrlevent", { tag: controlName, action: "rowDbClick", data: [deepCopy(record)] }) this.emit("onCtrlEvent", { tag: controlName, action: "rowDbClick", data: [deepCopy(record)] })
} }
} }
}; };
...@@ -86,7 +86,7 @@ export class GridControl extends MDControl { ...@@ -86,7 +86,7 @@ export class GridControl extends MDControl {
selection.push(select); selection.push(select);
} }
}) })
this.emit("ctrlevent", { tag: controlName, action: "selectionChange", data: selection }) this.emit("onCtrlEvent", { tag: controlName, action: "selectionChange", data: selection })
}, },
}; };
}); });
...@@ -179,7 +179,7 @@ export class GridControl extends MDControl { ...@@ -179,7 +179,7 @@ export class GridControl extends MDControl {
selectedRowKeys.value = _selectedRowKeys; selectedRowKeys.value = _selectedRowKeys;
} else if (isSelectDefault) { } else if (isSelectDefault) {
if (items && items.length > 0) { if (items && items.length > 0) {
this.emit("ctrlevent", { this.emit("onCtrlEvent", {
tag: controlName, tag: controlName,
action: "selectionChange", action: "selectionChange",
data: [deepCopy(items[0])], data: [deepCopy(items[0])],
...@@ -431,7 +431,8 @@ export class GridControl extends MDControl { ...@@ -431,7 +431,8 @@ export class GridControl extends MDControl {
const superParams = super.moduleInstall(); const superParams = super.moduleInstall();
return { return {
...superParams, ...superParams,
useCustom: this.useCustom() useCustom: this.useCustom(),
onEditorEvent: this.onEditorEvent.bind(this),
}; };
} }
} }
...@@ -44,7 +44,7 @@ const { state, cancel, confirm,handleCtrlEvent } = new PickupView(viewState, pro ...@@ -44,7 +44,7 @@ const { state, cancel, confirm,handleCtrlEvent } = new PickupView(viewState, pro
mode="button" mode="button"
name="{{lowerCase codeName}}" name="{{lowerCase codeName}}"
:actionModel="state.viewToolbarModel" :actionModel="state.viewToolbarModel"
@toolbarEvent="handleToolbarEvent"/> @onToolbarEvent="onToolbarEvent"/>
</template> </template>
{{/eq}} {{/eq}}
{{#eq controlType "PICKUPVIEWPANEL"}} {{#eq controlType "PICKUPVIEWPANEL"}}
......
...@@ -25,7 +25,7 @@ interface ViewEmit { ...@@ -25,7 +25,7 @@ interface ViewEmit {
const emit = defineEmits<ViewEmit>(); const emit = defineEmits<ViewEmit>();
// 安装功能模块 // 安装功能模块
const { state, handleCtrlEvent, handleToolbarEvent } = new TreeExpView(viewState, props, emit).moduleInstall(); const { state, handleCtrlEvent, onToolbarEvent } = new TreeExpView(viewState, props, emit).moduleInstall();
</script> </script>
<template> <template>
...@@ -40,7 +40,7 @@ const { state, handleCtrlEvent, handleToolbarEvent } = new TreeExpView(viewState ...@@ -40,7 +40,7 @@ const { state, handleCtrlEvent, handleToolbarEvent } = new TreeExpView(viewState
mode="button" mode="button"
name="{{lowerCase codeName}}" name="{{lowerCase codeName}}"
:actionModel="state.toolbar" :actionModel="state.toolbar"
@toolbarEvent="handleToolbarEvent"/> @onToolbarEvent="onToolbarEvent"/>
</template> </template>
{{/eq}} {{/eq}}
{{#eq controlType "TREEEXPBAR"}} {{#eq controlType "TREEEXPBAR"}}
......
...@@ -6,14 +6,14 @@ import { GridControl, IActionParam, IParam, IContext, ControlAction, deepCopy } ...@@ -6,14 +6,14 @@ import { GridControl, IActionParam, IParam, IContext, ControlAction, deepCopy }
interface Props { interface Props {
context: IContext; context: IContext;
isMultiple: boolean; viewParams: IParam;
multiple: boolean;
rowEditState: boolean; rowEditState: boolean;
rowActiveMode: 0 | 1 | 2; rowActiveMode: 0 | 1 | 2;
selectedData: IParam[]; selectedData?: IParam[];
isSelectDefault: boolean; isSelectDefault?: boolean;
viewParams?: IParam;
controlAction: ControlAction; controlAction: ControlAction;
showBusyIndicator?: boolean; showBusyIndicator: boolean;
viewSubject: Subject<IActionParam>; viewSubject: Subject<IActionParam>;
} }
...@@ -30,7 +30,7 @@ const props = withDefaults(defineProps < Props > (), { ...@@ -30,7 +30,7 @@ const props = withDefaults(defineProps < Props > (), {
const emit = defineEmits<{(event: 'onCtrlevent', value: IActionParam): void;}>(); const emit = defineEmits<{(event: 'onCtrlevent', value: IActionParam): void;}>();
// 安装功能模块,提供状态和能力 // 安装功能模块,提供状态和能力
const { state, useCustom } = new GridControl(ctrlState, props, emit).moduleInstall(); const { state, useCustom, onEditorEvent, onToolbarEvent } = new GridControl(ctrlState, props, emit).moduleInstall();
const { useScrollOption, useRowKey, useRowClassName, useCustomRow, useRowSelectionOption, onResizeColumn, onGridChange } = useCustom; const { useScrollOption, useRowKey, useRowClassName, useCustomRow, useRowSelectionOption, onResizeColumn, onGridChange } = useCustom;
// 暴露内部状态及能力 // 暴露内部状态及能力
...@@ -49,8 +49,8 @@ defineExpose({ state, name: '{{ctrl.name}}' }); ...@@ -49,8 +49,8 @@ defineExpose({ state, name: '{{ctrl.name}}' });
:row-selection="rowSelectionOption" :row-selection="rowSelectionOption"
:columns="state.columnsModel" :columns="state.columnsModel"
:pagination="state.mdCtrlPaging.pagination" :pagination="state.mdCtrlPaging.pagination"
:customRow="customRow" :customRow="useCustomRow"
:rowClassName="rowClassName" :rowClassName="useRowClassName"
@change="onGridChange" @change="onGridChange"
@resizeColumn="onResizeColumn" @resizeColumn="onResizeColumn"
> >
......
...@@ -61,7 +61,6 @@ const { state, onEditorEvent, onComponentEvent, onSearch, loadDraft, onSaveHisto ...@@ -61,7 +61,6 @@ const { state, onEditorEvent, onComponentEvent, onSearch, loadDraft, onSaveHisto
class="search-form-history" class="search-form-history"
v-show="state.historyItems.length > 0" v-show="state.historyItems.length > 0"
v-model:Value="state.selectHistoryItem" v-model:Value="state.selectHistoryItem"
@change="handleChange"
> >
<a-select-option class="search-form-history-option" v-for="(item,index) in state.historyItems" :key="index" :value="item.value">\{{item.name}} <close-outlined @click="() => onRemoveHistoryItem(item)" /></a-select-option> <a-select-option class="search-form-history-option" v-for="(item,index) in state.historyItems" :key="index" :value="item.value">\{{item.name}} <close-outlined @click="() => onRemoveHistoryItem(item)" /></a-select-option>
</a-select> </a-select>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册