fix: 产物更新 v1.3.1,修复编辑弹窗「点确定没反应」

对应源码仓库 commit 0692249。UmTableForm 的表单 vnode 改由 render() 创建
(删除 computed.formCom,新增 methods.buildForm),避免 Vue 3.5 在渲染外重算
computed 导致字符串 ref 失去 owner、$refs.formRef 为 null;并新增
getFormInstance() 兜底回捞 ElForm 实例。

消费方实测:旧产物点确定无反应,新产物弹窗正常关闭并提交成功。
This commit is contained in:
2026-09-24 12:06:34 +08:00
parent b8b2c793a7
commit 7da6a5f54b
7 changed files with 97 additions and 55 deletions
+3 -5
View File
@@ -31,6 +31,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
[x: string]: any;
}>;
setFormModel: (models: any) => void;
getFormInstance: () => any;
}, {
rules: Record<string, any>;
formItems: any[];
@@ -39,11 +40,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
showList: string[];
cascadeMap: Map<string, string[]>;
throttleRefreshForm: import("lodash").DebouncedFunc<(this: any, v: any, oldV: any, needFreshCascadeField: string[]) => Promise<void>>;
}, {
formCom(): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}> | null;
}, {
}, {}, {
refreshForm(v: any, oldV: any, needFreshCascadeField: string[]): Promise<void | undefined>;
onSubmit(): Promise<void>;
getRule(rule: IFormRule): {
@@ -104,6 +101,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
initRule(isBeforeMount?: boolean): void;
init(): Promise<void>;
initForm(fieldName: string, value: any): void;
buildForm(): any;
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("ok" | "cancel" | "formModelChange")[], "ok" | "cancel" | "formModelChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
onOk?: ((...args: any[]) => any) | undefined;
onCancel?: ((...args: any[]) => any) | undefined;