@kp-ui/lowcode 2.15.0-beta.8 → 2.16.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/install.js +17 -15
- package/install.js.map +1 -1
- package/package.json +3 -2
- package/src/components/FormRender/FormContainer.vue.js +55 -0
- package/src/components/FormRender/FormContainer.vue.js.map +1 -0
- package/src/components/FormRender/FormContainer.vue2.js +5 -0
- package/src/components/FormRender/FormContainer.vue2.js.map +1 -0
- package/src/components/FormRender/index.vue.js +2 -2
- package/src/components/FormRender/index.vue2.js +28 -30
- package/src/components/FormRender/index.vue2.js.map +1 -1
- package/src/components/FormRender/useFormContext.js +119 -112
- package/src/components/FormRender/useFormContext.js.map +1 -1
- package/src/components/form-designer/form-widget/container-widget/useTableWidget.js +143 -138
- package/src/components/form-designer/form-widget/container-widget/useTableWidget.js.map +1 -1
- package/src/components/form-designer/form-widget/container-widget/vf-dialog-widget.vue.js +2 -2
- package/src/components/form-designer/form-widget/container-widget/vf-dialog-widget.vue2.js +22 -16
- package/src/components/form-designer/form-widget/container-widget/vf-dialog-widget.vue2.js.map +1 -1
- package/src/components/form-designer/form-widget/field-widget/form-item-wrapper.vue.js +1 -1
- package/src/components/form-designer/form-widget/field-widget/form-item-wrapper.vue2.js +65 -53
- package/src/components/form-designer/form-widget/field-widget/form-item-wrapper.vue2.js.map +1 -1
- package/src/components/form-designer/form-widget/field-widget/rich-editor-widget.vue2.js.map +1 -1
- package/src/components/form-designer/form-widget/field-widget/useField.js +33 -33
- package/src/components/form-designer/form-widget/field-widget/useField.js.map +1 -1
- package/src/components/form-designer/setting-panel/form-setting.vue.js +2 -2
- package/src/components/form-designer/setting-panel/form-setting.vue2.js +100 -126
- package/src/components/form-designer/setting-panel/form-setting.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue2.js +45 -39
- package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-showButtonsColumn-editor.vue.js +2 -2
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-showButtonsColumn-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/cancelButtonLabel-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/left-editor.vue.js +5 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/left-editor.vue.js.map +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/left-editor.vue2.js +38 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/left-editor.vue2.js.map +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/top-editor.vue.js +5 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/top-editor.vue.js.map +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/top-editor.vue2.js +38 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/top-editor.vue2.js.map +1 -0
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/width-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onTableChange-editor.vue2.js +4 -4
- package/src/components/form-designer/setting-panel/property-editor/event-handler/onTableChange-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/index.js +158 -156
- package/src/components/form-designer/setting-panel/property-editor/index.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/labelIconClass-editor.vue2.js +29 -18
- package/src/components/form-designer/setting-panel/property-editor/labelIconClass-editor.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/propertyRegister.js +2 -0
- package/src/components/form-designer/setting-panel/propertyRegister.js.map +1 -1
- package/src/components/form-designer/widget-panel/basicFields/input.js +4 -2
- package/src/components/form-designer/widget-panel/basicFields/input.js.map +1 -1
- package/src/components/form-designer/widget-panel/containers/vf-dialog.js +34 -10
- package/src/components/form-designer/widget-panel/containers/vf-dialog.js.map +1 -1
- package/src/components/form-render/container-items/data-table-widget.vue.js +3 -3
- package/src/components/form-render/container-items/data-table-widget.vue2.js +65 -64
- package/src/components/form-render/container-items/data-table-widget.vue2.js.map +1 -1
- package/src/components/form-render/dynamic-dialog.vue.js +79 -82
- package/src/components/form-render/dynamic-dialog.vue.js.map +1 -1
- package/src/components/public/ActionButtonListDialog.vue.js +2 -2
- package/src/components/public/ActionButtonListDialog.vue2.js +117 -96
- package/src/components/public/ActionButtonListDialog.vue2.js.map +1 -1
- package/src/components/public/ActionButtonListRender.vue.js +17 -15
- package/src/components/public/ActionButtonListRender.vue.js.map +1 -1
- package/src/components/public/ActionButtonListRender.vue2.js +48 -38
- package/src/components/public/ActionButtonListRender.vue2.js.map +1 -1
- package/src/components/public/ConfigView/CustomPageRender.vue.js +58 -0
- package/src/components/public/ConfigView/CustomPageRender.vue.js.map +1 -0
- package/src/components/public/ConfigView/CustomPageRender.vue2.js +5 -0
- package/src/components/public/ConfigView/CustomPageRender.vue2.js.map +1 -0
- package/src/components/public/CustomerModal/CustomerModal.vue2.js +63 -56
- package/src/components/public/CustomerModal/CustomerModal.vue2.js.map +1 -1
- package/src/constants/EditorTypeEnum.js +1 -1
- package/src/constants/EditorTypeEnum.js.map +1 -1
- package/src/hooks/useDataHttp.js +8 -7
- package/src/hooks/useDataHttp.js.map +1 -1
- package/src/hooks/useLowcode.js.map +1 -1
- package/src/lang/en-US.js +2 -0
- package/src/lang/en-US.js.map +1 -1
- package/src/lang/zh-CN.js +2 -0
- package/src/lang/zh-CN.js.map +1 -1
- package/src/utils/util.js +25 -34
- package/src/utils/util.js.map +1 -1
- package/stats.html +1 -1
- package/styles/style.css +1 -1
- package/src/components/FormRender/FormContainer.js +0 -52
- package/src/components/FormRender/FormContainer.js.map +0 -1
- package/src/components/form-render/SubmitButtonRender.vue.js +0 -92
- package/src/components/form-render/SubmitButtonRender.vue.js.map +0 -1
- package/src/components/form-render/SubmitButtonRender.vue2.js +0 -5
- package/src/components/form-render/SubmitButtonRender.vue2.js.map +0 -1
package/install.js
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
import "./_virtual/virtual_svg-icons-register.js";
|
|
3
|
-
import
|
|
4
|
-
import { getLocat as s } from "@kp-ui/tool";
|
|
3
|
+
import p from "dayjs";
|
|
4
|
+
import { getLocat as i, getUserInfo as s } from "@kp-ui/tool";
|
|
5
5
|
import { VxeTooltip as a } from "vxe-pc-ui";
|
|
6
|
-
import { basicFieldsEnums as
|
|
7
|
-
import { default as
|
|
6
|
+
import { basicFieldsEnums as L } from "./src/components/form-designer/widget-panel/basicFieldsEnums.js";
|
|
7
|
+
import { default as $ } from "./src/components/form-designer/index.vue.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import { openCustomerModal as
|
|
10
|
-
import { default as C } from "./src/components/
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
9
|
+
import { openCustomerModal as m } from "./src/components/public/CustomerModal/useCustomerModal.js";
|
|
10
|
+
import { default as C } from "./src/components/public/ActionButtonListRender.vue.js";
|
|
11
|
+
import { default as F } from "./src/components/public/ConfigView/CustomPageRender.vue.js";
|
|
12
|
+
import { useLowcode as w } from "./src/hooks/useLowcode.js";
|
|
13
|
+
import { default as M } from "./src/components/FormRender/index.vue.js";
|
|
13
14
|
const x = (e) => {
|
|
14
|
-
const { app: o,
|
|
15
|
-
o.config.globalProperties.$getLocat =
|
|
15
|
+
const { app: o, factoryRender: r } = e;
|
|
16
|
+
o.config.globalProperties.$getLocat = i, o.config.globalProperties.$dayjs = p, o.config.globalProperties.$getUserInfo = s, o.config.globalProperties.$factoryRender = r, o.config.globalProperties.$openCustomerModal = (t) => m(t, o), o.component("VxeTooltip", a);
|
|
16
17
|
};
|
|
17
18
|
export {
|
|
18
|
-
C as
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
C as ActionButtonListRender,
|
|
20
|
+
F as CustomPageRender,
|
|
21
|
+
$ as VFormDesigner,
|
|
22
|
+
M as VFormRender,
|
|
23
|
+
L as basicFieldsEnums,
|
|
22
24
|
x as registerLowcodeCore,
|
|
23
|
-
|
|
25
|
+
w as useLowcode
|
|
24
26
|
};
|
|
25
27
|
//# sourceMappingURL=install.js.map
|
package/install.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sources":["../install.ts"],"sourcesContent":["// 导出基础组件\nimport '@/styles/global.less';\nimport 'virtual:svg-icons-register';\nimport dayjs from 'dayjs';\nimport { getLocat } from '@kp-ui/tool';\nimport { VxeTooltip } from 'vxe-pc-ui';\
|
|
1
|
+
{"version":3,"file":"install.js","sources":["../install.ts"],"sourcesContent":["// 导出基础组件\nimport '@/styles/global.less';\nimport 'virtual:svg-icons-register';\nimport dayjs from 'dayjs';\nimport { getLocat } from '@kp-ui/tool';\nimport { VxeTooltip } from 'vxe-pc-ui';\nimport { getUserInfo } from '@kp-ui/tool';\nexport { basicFieldsEnums } from '@/components/form-designer/widget-panel/basicFieldsEnums';\n\nexport { default as VFormDesigner } from '@/components/form-designer/index.vue';\n\nimport { openCustomerModal } from '@/components/public/CustomerModal/useCustomerModal';\nimport type { App } from 'vue';\n\nexport { default as ActionButtonListRender } from '@/components/public/ActionButtonListRender.vue';\n\nexport { default as CustomPageRender } from '@/components/public/ConfigView/CustomPageRender.vue';\n\nexport { useLowcode, VFormRender } from '@/hooks/useLowcode';\nexport type { ActionButton } from '@/types/button';\n\ninterface RegisterLowcodeCoreParams {\n app: App;\n factoryRender: (name: any, props: any, ...args: any[]) => any;\n}\n\n// 注册 HTTP\nexport const registerLowcodeCore = (params: RegisterLowcodeCoreParams) => {\n const { app, factoryRender } = params;\n app.config.globalProperties.$getLocat = getLocat;\n app.config.globalProperties.$dayjs = dayjs;\n app.config.globalProperties.$getUserInfo = getUserInfo;\n app.config.globalProperties.$factoryRender = factoryRender;\n app.config.globalProperties.$openCustomerModal = ops => openCustomerModal(ops, app);\n app.component('VxeTooltip', VxeTooltip);\n};\n"],"names":["registerLowcodeCore","params","app","factoryRender","getLocat","dayjs","getUserInfo","ops","openCustomerModal","VxeTooltip"],"mappings":";;;;;;;;;;;;;AA2BO,MAAMA,IAAsB,CAACC,MAAsC;AACtE,QAAM,EAAE,KAAAC,GAAK,eAAAC,EAAA,IAAkBF;AAC/B,EAAAC,EAAI,OAAO,iBAAiB,YAAYE,GACxCF,EAAI,OAAO,iBAAiB,SAASG,GACrCH,EAAI,OAAO,iBAAiB,eAAeI,GAC3CJ,EAAI,OAAO,iBAAiB,iBAAiBC,GAC7CD,EAAI,OAAO,iBAAiB,qBAAqB,CAAAK,MAAOC,EAAkBD,GAAKL,CAAG,GAClFA,EAAI,UAAU,cAAcO,CAAU;AAC1C;"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kp-ui/lowcode",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.0-alpha.10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"module": "install.js",
|
|
8
8
|
"dependencies": {
|
|
9
|
+
"@kp-ui/lowcode": "link:./",
|
|
9
10
|
"animate.css": "^4.1.1",
|
|
10
11
|
"ant-design-vue": "4.2.6",
|
|
11
12
|
"axios": "^1.3.5",
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
"sortablejs": "1.14.0",
|
|
24
25
|
"tailwindcss": "3.4.9",
|
|
25
26
|
"vite": "6.3.3",
|
|
26
|
-
"vite-plugin-lazy-import": "
|
|
27
|
+
"vite-plugin-lazy-import": "1.0.7",
|
|
27
28
|
"vue": "3.5.17",
|
|
28
29
|
"vue-router": "4.2.4"
|
|
29
30
|
},
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { defineComponent as _, ref as C, computed as t, onMounted as M, createBlock as y, openBlock as F, unref as w, withKeys as D, normalizeClass as b, withCtx as E, createVNode as L } from "vue";
|
|
2
|
+
import { Form as $ } from "ant-design-vue";
|
|
3
|
+
import h from "../form-render/RenderWigetList.vue.js";
|
|
4
|
+
import { useEmitter as k } from "../../utils/useEmitter.js";
|
|
5
|
+
const j = /* @__PURE__ */ _({
|
|
6
|
+
__name: "FormContainer",
|
|
7
|
+
props: {
|
|
8
|
+
context: {
|
|
9
|
+
type: Object,
|
|
10
|
+
required: !0
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
emits: ["form-submit", "form-cancel"],
|
|
14
|
+
setup(l, { expose: s, emit: K }) {
|
|
15
|
+
const e = l, a = C(), { emit$: m, on$: i, off$: u } = k(), r = t({
|
|
16
|
+
get: () => e.context.formDataModel.value,
|
|
17
|
+
set: (o) => {
|
|
18
|
+
e.context.formDataModel.value = o;
|
|
19
|
+
}
|
|
20
|
+
}), c = t(() => e.context.readModeFlag.value), d = t(() => e.context.formConfig.value), f = t(() => e.context.widgetList.value), p = t(() => e.context.labelPosition.value), v = t(() => e.context.customClass.value), x = () => {
|
|
21
|
+
var o;
|
|
22
|
+
((o = d.value) == null ? void 0 : o.isEnterSubmit) === 1 && e.context.onFormUpdate();
|
|
23
|
+
};
|
|
24
|
+
return M(() => {
|
|
25
|
+
}), s({
|
|
26
|
+
renderForm: a,
|
|
27
|
+
off$: u,
|
|
28
|
+
on$: i,
|
|
29
|
+
emit$: m
|
|
30
|
+
}), (o, n) => (F(), y(w($), {
|
|
31
|
+
ref_key: "renderForm",
|
|
32
|
+
ref: a,
|
|
33
|
+
layout: p.value,
|
|
34
|
+
class: b(["render-form", "tpf-form", v.value, c.value ? "readonly-mode-form" : ""]),
|
|
35
|
+
scrollToFirstError: !0,
|
|
36
|
+
validateOnRuleChange: !1,
|
|
37
|
+
model: r.value,
|
|
38
|
+
onKeydown: D(x, ["enter"])
|
|
39
|
+
}, {
|
|
40
|
+
default: E(() => [
|
|
41
|
+
L(h, {
|
|
42
|
+
parentWidget: null,
|
|
43
|
+
widgetList: f.value,
|
|
44
|
+
formDataModel: r.value,
|
|
45
|
+
"onUpdate:formDataModel": n[0] || (n[0] = (g) => r.value = g)
|
|
46
|
+
}, null, 8, ["widgetList", "formDataModel"])
|
|
47
|
+
]),
|
|
48
|
+
_: 1
|
|
49
|
+
}, 8, ["layout", "class", "model"]));
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export {
|
|
53
|
+
j as default
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=FormContainer.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormContainer.vue.js","sources":["../../../../src/components/FormRender/FormContainer.vue"],"sourcesContent":["<template>\n <Form\n ref=\"renderForm\"\n :layout=\"labelPosition\"\n :class=\"['render-form', 'tpf-form', customClass, readModeFlag ? 'readonly-mode-form' : '']\"\n :scrollToFirstError=\"true\"\n :validateOnRuleChange=\"false\"\n :model=\"formDataModel\"\n @keydown.enter=\"handleEnterKey\"\n >\n <RenderWigetList\n :parentWidget=\"null\"\n :widgetList=\"widgetList\"\n v-model:formDataModel=\"formDataModel\"\n />\n </Form>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, ref, onMounted, type PropType } from 'vue';\n import { Form } from 'ant-design-vue';\n import RenderWigetList from '@/components/form-render/RenderWigetList.vue';\n import { useEmitter } from '@/utils/useEmitter';\n\n /**\n * 表单容器组件\n * 负责渲染表单及其子组件\n */\n\n const props = defineProps({\n context: {\n type: Object as PropType<any>,\n required: true\n }\n });\n\n const emit = defineEmits(['form-submit', 'form-cancel']);\n\n // 组件引用\n const renderForm = ref();\n const { emit$, on$, off$ } = useEmitter();\n\n // 从上下文中获取数据\n const formDataModel = computed({\n get: () => props.context.formDataModel.value,\n set: val => {\n props.context.formDataModel.value = val;\n }\n });\n const readModeFlag = computed(() => props.context.readModeFlag.value);\n const formConfig = computed(() => props.context.formConfig.value);\n const widgetList = computed(() => props.context.widgetList.value);\n const labelPosition = computed(() => props.context.labelPosition.value);\n const customClass = computed(() => props.context.customClass.value);\n\n /**\n * 处理回车键事件\n */\n const handleEnterKey = () => {\n if (formConfig.value?.isEnterSubmit === 1) {\n props.context.onFormUpdate();\n }\n };\n\n onMounted(() => {});\n\n // 暴露方法\n defineExpose({\n renderForm,\n off$,\n on$,\n emit$\n });\n</script>\n"],"names":["props","__props","renderForm","ref","emit$","on$","off$","useEmitter","formDataModel","computed","val","readModeFlag","formConfig","widgetList","labelPosition","customClass","handleEnterKey","_a","onMounted","__expose","_createBlock","_unref","Form","_normalizeClass","_createVNode","RenderWigetList","$event"],"mappings":";;;;;;;;;;;;;;AA6BI,UAAMA,IAAQC,GAURC,IAAaC,EAAA,GACb,EAAE,OAAAC,GAAO,KAAAC,GAAK,MAAAC,EAAA,IAASC,EAAA,GAGvBC,IAAgBC,EAAS;AAAA,MAC3B,KAAK,MAAMT,EAAM,QAAQ,cAAc;AAAA,MACvC,KAAK,CAAAU,MAAO;AACR,QAAAV,EAAM,QAAQ,cAAc,QAAQU;AAAA,MACxC;AAAA,IAAA,CACH,GACKC,IAAeF,EAAS,MAAMT,EAAM,QAAQ,aAAa,KAAK,GAC9DY,IAAaH,EAAS,MAAMT,EAAM,QAAQ,WAAW,KAAK,GAC1Da,IAAaJ,EAAS,MAAMT,EAAM,QAAQ,WAAW,KAAK,GAC1Dc,IAAgBL,EAAS,MAAMT,EAAM,QAAQ,cAAc,KAAK,GAChEe,IAAcN,EAAS,MAAMT,EAAM,QAAQ,YAAY,KAAK,GAK5DgB,IAAiB,MAAM;;AACzB,QAAIC,IAAAL,EAAW,UAAX,gBAAAK,EAAkB,mBAAkB,KACpCjB,EAAM,QAAQ,aAAA;AAAA,IAEtB;AAEA,WAAAkB,EAAU,MAAM;AAAA,IAAC,CAAC,GAGlBC,EAAa;AAAA,MACT,YAAAjB;AAAA,MACA,MAAAI;AAAA,MACA,KAAAD;AAAA,MACA,OAAAD;AAAA,IAAA,CACH,mBAvEDgB,EAcOC,EAAAC,CAAA,GAAA;AAAA,eAbC;AAAA,MAAJ,KAAIpB;AAAA,MACH,QAAQY,EAAA;AAAA,MACR,OAAKS,EAAA,CAAA,eAAA,YAA8BR,EAAA,OAAaJ,EAAA,QAAY,uBAAA,EAAA,CAAA;AAAA,MAC5D,oBAAoB;AAAA,MACpB,sBAAsB;AAAA,MACtB,OAAOH,EAAA;AAAA,MACP,aAAeQ,GAAc,CAAA,OAAA,CAAA;AAAA,IAAA;iBAE9B,MAIE;AAAA,QAJFQ,EAIEC,GAAA;AAAA,UAHG,cAAc;AAAA,UACd,YAAYZ,EAAA;AAAA,UACL,eAAeL,EAAA;AAAA,2DAAAA,EAAa,QAAAkB;AAAA,QAAA;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormContainer.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import o from "./index.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-97ab4c5a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index.vue.js.map
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Skeleton as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as D, computed as c, ref as L, useTemplateRef as V, onMounted as h, watch as w, createElementBlock as u, openBlock as n, Fragment as J, createElementVNode as S, createBlock as T, createCommentVNode as p, createVNode as a, unref as e, mergeProps as E } from "vue";
|
|
2
|
+
import { Skeleton as I } from "ant-design-vue";
|
|
3
|
+
import M from "../form-render/dynamic-dialog.vue.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
import { useFormContext as
|
|
5
|
+
import P from "./FormContainer.vue.js";
|
|
6
|
+
import { useFormContext as $ } from "./useFormContext.js";
|
|
7
7
|
import { useI18n as z } from "../../utils/i18n.js";
|
|
8
8
|
import { storeToRefs as A } from "pinia";
|
|
9
9
|
import { useLocaleStore as U } from "@kp-ui/i18n";
|
|
10
10
|
import { getLocat as W } from "@kp-ui/tool";
|
|
11
|
-
import
|
|
12
|
-
import { useComRef as j } from "tmgc2-share";
|
|
11
|
+
import j from "./Debugger.vue.js";
|
|
13
12
|
const q = { class: "form-render-wrapper" }, G = {
|
|
14
13
|
key: 0,
|
|
15
14
|
class: "loading-wrapper"
|
|
16
|
-
},
|
|
15
|
+
}, ae = /* @__PURE__ */ D({
|
|
17
16
|
name: "VFormRender",
|
|
18
17
|
componentName: "VFormRender",
|
|
19
18
|
inheritAttrs: !1,
|
|
@@ -31,55 +30,54 @@ const q = { class: "form-render-wrapper" }, G = {
|
|
|
31
30
|
debug: { type: Boolean }
|
|
32
31
|
},
|
|
33
32
|
emits: ["form-submit", "form-cancel"],
|
|
34
|
-
setup(
|
|
35
|
-
const { initLocale:
|
|
33
|
+
setup(g, { expose: v, emit: H }) {
|
|
34
|
+
const { initLocale: _ } = z(), b = U(), { locale: m } = A(b), C = c(() => W().debug === "1"), i = L(!1), l = g, o = V("formContainer"), s = c(() => {
|
|
36
35
|
var r;
|
|
37
36
|
return (r = o.value) == null ? void 0 : r.renderForm;
|
|
38
|
-
}), t =
|
|
37
|
+
}), t = $({
|
|
39
38
|
props: l,
|
|
40
39
|
renderForm: s
|
|
41
|
-
}),
|
|
40
|
+
}), x = () => o.value, { dynamicDialgRef: y, dialogProps: k, emitter: F, isLoading: f, registerToRefList: N, formWidgetId: R } = t;
|
|
42
41
|
return h(() => {
|
|
43
|
-
R
|
|
42
|
+
N(R);
|
|
44
43
|
}), w(
|
|
45
44
|
m,
|
|
46
45
|
() => {
|
|
47
|
-
|
|
46
|
+
_(m.value);
|
|
48
47
|
},
|
|
49
48
|
{
|
|
50
49
|
immediate: !0
|
|
51
50
|
}
|
|
52
|
-
),
|
|
53
|
-
...
|
|
54
|
-
...t,
|
|
55
|
-
|
|
56
|
-
getNativeForm: F,
|
|
51
|
+
), v({
|
|
52
|
+
...F,
|
|
53
|
+
...t.expose,
|
|
54
|
+
getNativeForm: x,
|
|
57
55
|
formJson: l.formJson,
|
|
58
56
|
renderForm: s
|
|
59
|
-
}), (r,
|
|
57
|
+
}), (r, d) => (n(), u(J, null, [
|
|
60
58
|
S("div", q, [
|
|
61
|
-
e(
|
|
62
|
-
a(e(
|
|
63
|
-
])) :
|
|
64
|
-
a(
|
|
59
|
+
e(f) ? (n(), u("div", G, [
|
|
60
|
+
a(e(I), { active: e(f) }, null, 8, ["active"])
|
|
61
|
+
])) : p("", !0),
|
|
62
|
+
a(P, {
|
|
65
63
|
ref_key: "formContainer",
|
|
66
64
|
ref: o,
|
|
67
65
|
context: e(t)
|
|
68
66
|
}, null, 8, ["context"]),
|
|
69
|
-
a(
|
|
67
|
+
a(M, E(e(k), {
|
|
70
68
|
ref_key: "dynamicDialgRef",
|
|
71
|
-
ref:
|
|
69
|
+
ref: y
|
|
72
70
|
}), null, 16)
|
|
73
71
|
]),
|
|
74
|
-
|
|
72
|
+
C.value ? (n(), T(j, {
|
|
75
73
|
key: 0,
|
|
76
74
|
visible: i.value,
|
|
77
|
-
"onUpdate:visible":
|
|
78
|
-
}, null, 8, ["visible"])) :
|
|
75
|
+
"onUpdate:visible": d[0] || (d[0] = (B) => i.value = B)
|
|
76
|
+
}, null, 8, ["visible"])) : p("", !0)
|
|
79
77
|
], 64));
|
|
80
78
|
}
|
|
81
79
|
});
|
|
82
80
|
export {
|
|
83
|
-
|
|
81
|
+
ae as default
|
|
84
82
|
};
|
|
85
83
|
//# sourceMappingURL=index.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue2.js","sources":["../../../../src/components/FormRender/index.vue"],"sourcesContent":["<template>\n <div class=\"form-render-wrapper\">\n <div class=\"loading-wrapper\" v-if=\"isLoading\">\n <Skeleton :active=\"isLoading\" />\n </div>\n <FormContainer ref=\"formContainer\" :context=\"formContext\" />\n <DynamicDialog v-bind=\"dialogProps\" ref=\"dynamicDialgRef\" />\n </div>\n <Debugger v-if=\"debug\" v-model:visible=\"debugVisible\" />\n</template>\n\n<script lang=\"ts\" setup>\n import { onMounted, ref, watch, computed } from 'vue';\n import { Skeleton } from 'ant-design-vue';\n import DynamicDialog from '@/components/form-render/dynamic-dialog.vue';\n import FormContainer from './FormContainer';\n import { type FormRenderProps, useFormContext } from './useFormContext';\n import { useI18n } from '@/utils/i18n';\n import { storeToRefs } from 'pinia';\n import { useLocaleStore } from '@kp-ui/i18n';\n import { getLocat } from '@kp-ui/tool';\n import Debugger from './Debugger.vue';\n
|
|
1
|
+
{"version":3,"file":"index.vue2.js","sources":["../../../../src/components/FormRender/index.vue"],"sourcesContent":["<template>\n <div class=\"form-render-wrapper\">\n <div class=\"loading-wrapper\" v-if=\"isLoading\">\n <Skeleton :active=\"isLoading\" />\n </div>\n <FormContainer ref=\"formContainer\" :context=\"formContext\" />\n <DynamicDialog v-bind=\"dialogProps\" ref=\"dynamicDialgRef\" />\n </div>\n <Debugger v-if=\"debug\" v-model:visible=\"debugVisible\" />\n</template>\n\n<script lang=\"ts\" setup>\n import { onMounted, ref, watch, computed, useTemplateRef } from 'vue';\n import { Skeleton } from 'ant-design-vue';\n import DynamicDialog from '@/components/form-render/dynamic-dialog.vue';\n import FormContainer from './FormContainer.vue';\n import { type FormRenderProps, useFormContext } from './useFormContext';\n import { useI18n } from '@/utils/i18n';\n import { storeToRefs } from 'pinia';\n import { useLocaleStore } from '@kp-ui/i18n';\n import { getLocat } from '@kp-ui/tool';\n import Debugger from './Debugger.vue';\n\n const { initLocale } = useI18n();\n defineOptions({\n name: 'VFormRender',\n componentName: 'VFormRender',\n inheritAttrs: false\n });\n const localeStore = useLocaleStore();\n const { locale } = storeToRefs(localeStore);\n\n const debug = computed(() => getLocat().debug === '1');\n const debugVisible = ref(false);\n\n const props = withDefaults(defineProps<FormRenderProps>(), {\n vfCtx: () => ({}),\n formJson: () => ({ widgetList: [], formConfig: {} }),\n formData: () => ({}),\n optionData: () => ({}),\n disabledMode: false,\n renderConfig: () => ({ languageName: 'zh-CN' }),\n globalDsv: () => ({}),\n parentForm: null,\n dynamicCreation: false\n });\n\n // 组件引用\n const formContainer = useTemplateRef('formContainer');\n\n const renderForm = computed(() => formContainer.value?.renderForm);\n\n // 组件事件\n const emit = defineEmits<{\n (e: 'form-submit', formData: any): void;\n (e: 'form-cancel'): void;\n }>();\n\n // 创建表单上下文\n const formContext = useFormContext({\n props,\n renderForm\n });\n\n //获取原生form引用\n const getNativeForm = () => {\n return formContainer.value;\n };\n const { dynamicDialgRef, dialogProps, emitter, isLoading, registerToRefList, formWidgetId } =\n formContext;\n\n // 生命周期钩子\n onMounted(() => {\n registerToRefList(formWidgetId);\n });\n\n watch(\n locale,\n () => {\n initLocale(locale.value);\n },\n {\n immediate: true\n }\n );\n\n // 暴露方法\n defineExpose({\n ...emitter,\n ...formContext.expose,\n getNativeForm,\n formJson: props.formJson,\n renderForm\n });\n</script>\n\n<style lang=\"less\" scoped>\n .loading-wrapper {\n min-height: 300px;\n padding: 20px;\n }\n .ant-form .ant-form-item-explain.ant-form-item-explain-connected {\n display: none;\n }\n</style>\n"],"names":["initLocale","useI18n","localeStore","useLocaleStore","locale","storeToRefs","debug","computed","getLocat","debugVisible","ref","props","__props","formContainer","useTemplateRef","renderForm","_a","formContext","useFormContext","getNativeForm","dynamicDialgRef","dialogProps","emitter","isLoading","registerToRefList","formWidgetId","onMounted","watch","__expose","_createElementVNode","_hoisted_1","_unref","_openBlock","_createElementBlock","_hoisted_2","_createVNode","Skeleton","FormContainer","DynamicDialog","_mergeProps","_createBlock","Debugger","$event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBI,UAAM,EAAE,YAAAA,EAAA,IAAeC,EAAA,GAMjBC,IAAcC,EAAA,GACd,EAAE,QAAAC,EAAA,IAAWC,EAAYH,CAAW,GAEpCI,IAAQC,EAAS,MAAMC,EAAA,EAAW,UAAU,GAAG,GAC/CC,IAAeC,EAAI,EAAK,GAExBC,IAAQC,GAaRC,IAAgBC,EAAe,eAAe,GAE9CC,IAAaR,EAAS,MAAA;;AAAM,cAAAS,IAAAH,EAAc,UAAd,gBAAAG,EAAqB;AAAA,KAAU,GAS3DC,IAAcC,EAAe;AAAA,MAC/B,OAAAP;AAAA,MACA,YAAAI;AAAA,IAAA,CACH,GAGKI,IAAgB,MACXN,EAAc,OAEnB,EAAE,iBAAAO,GAAiB,aAAAC,GAAa,SAAAC,GAAS,WAAAC,GAAW,mBAAAC,GAAmB,cAAAC,MACzER;AAGJ,WAAAS,EAAU,MAAM;AACZ,MAAAF,EAAkBC,CAAY;AAAA,IAClC,CAAC,GAEDE;AAAA,MACIvB;AAAA,MACA,MAAM;AACF,QAAAJ,EAAWI,EAAO,KAAK;AAAA,MAC3B;AAAA,MACA;AAAA,QACI,WAAW;AAAA,MAAA;AAAA,IACf,GAIJwB,EAAa;AAAA,MACT,GAAGN;AAAA,MACH,GAAGL,EAAY;AAAA,MACf,eAAAE;AAAA,MACA,UAAUR,EAAM;AAAA,MAChB,YAAAI;AAAA,IAAA,CACH;MA5FDc,EAMM,OANNC,GAMM;AAAA,QALiCC,EAAAR,CAAA,KAAnCS,KAAAC,EAEM,OAFNC,GAEM;AAAA,UADFC,EAAgCJ,EAAAK,CAAA,GAAA,EAArB,QAAQL,EAAAR,CAAA,KAAS,MAAA,GAAA,CAAA,QAAA,CAAA;AAAA,QAAA;QAEhCY,EAA4DE,GAAA;AAAA,mBAAzC;AAAA,UAAJ,KAAIxB;AAAA,UAAiB,SAASkB,EAAAd,CAAA;AAAA,QAAA;QAC7CkB,EAA4DG,GAA5DC,EAA4DR,EAAAV,CAAA,GAA1B;AAAA,mBAAM;AAAA,UAAJ,KAAID;AAAA,QAAA;;MAE5Bd,EAAA,cAAhBkC,EAAwDC,GAAA;AAAA;QAAzB,SAAShC,EAAA;AAAA,mDAAAA,EAAY,QAAAiC;AAAA,MAAA;;;;"}
|
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
import { ref as l, provide as
|
|
2
|
-
import { useFormValidation as
|
|
3
|
-
import { insertCustomCssToHead as
|
|
4
|
-
import { set as
|
|
5
|
-
import { message as
|
|
6
|
-
import { useI18n as
|
|
7
|
-
import { getUuidKey as
|
|
8
|
-
import { useComRef as
|
|
9
|
-
import
|
|
1
|
+
import { ref as l, provide as c, computed as m, watchEffect as ue, onMounted as me, nextTick as de } from "vue";
|
|
2
|
+
import { useFormValidation as B } from "./formValidation.js";
|
|
3
|
+
import { insertCustomCssToHead as ve, insertGlobalFunctionsToHtml as ge, getContainerWidgetByName as H, cloneFormConfigWithoutEventHandler as pe, generateId as Ce } from "../../utils/util.js";
|
|
4
|
+
import { set as Fe, cloneDeep as we } from "lodash-es";
|
|
5
|
+
import { message as J } from "ant-design-vue";
|
|
6
|
+
import { useI18n as he } from "../../utils/i18n.js";
|
|
7
|
+
import { getUuidKey as xe } from "@kp-ui/tool";
|
|
8
|
+
import { useComRef as De, useRef as Re, useExecFunction as Le } from "tmgc2-share";
|
|
9
|
+
import be from "../form-render/dynamic-dialog.vue.js";
|
|
10
10
|
/* empty css */
|
|
11
|
-
import { useEmitter as
|
|
12
|
-
import { useAppRef as
|
|
13
|
-
const
|
|
14
|
-
const { formJson:
|
|
15
|
-
|
|
16
|
-
const
|
|
11
|
+
import { useEmitter as ye } from "../../utils/useEmitter.js";
|
|
12
|
+
import { useAppRef as Me } from "../form-designer/useAppRef.js";
|
|
13
|
+
const _e = ({ renderForm: x, props: a }) => {
|
|
14
|
+
const { formJson: D } = a, p = De(be), { i18nt: d } = he(), [R, P] = Re(!1), C = ye(), v = l(), s = l({}), L = l(!1), F = l(/* @__PURE__ */ new Map()), b = l({}), T = l(), w = Symbol("formWidget");
|
|
15
|
+
c("refList", F), c("getFormConfig", () => o.value), c("formData", s), c("getReadMode", () => R.value), c("designState", !1);
|
|
16
|
+
const y = l(), { executeFunction: $, context: g, execHttpFunction: M } = Le(), { getFormRef: h, getWidgetRef: U, registerToRefList: _ } = Me(F, w), o = m(() => {
|
|
17
17
|
var e;
|
|
18
18
|
return ((e = v.value) == null ? void 0 : e.formConfig) || {};
|
|
19
19
|
});
|
|
20
|
-
|
|
21
|
-
const
|
|
20
|
+
c("formConfig", o), c("formWidgetId", w);
|
|
21
|
+
const W = m(() => {
|
|
22
22
|
var e;
|
|
23
23
|
return ((e = v.value) == null ? void 0 : e.widgetList) || [];
|
|
24
|
-
}),
|
|
24
|
+
}), j = m(() => {
|
|
25
25
|
var e;
|
|
26
26
|
return ((e = o.value) == null ? void 0 : e.labelPosition) || "horizontal";
|
|
27
|
-
}),
|
|
28
|
-
|
|
29
|
-
},
|
|
27
|
+
}), q = (e) => {
|
|
28
|
+
T.value = e;
|
|
29
|
+
}, S = m(() => {
|
|
30
30
|
var e;
|
|
31
31
|
return (e = o.value) != null && e.labelWidth ? `${o.value.labelWidth}px` : "80px";
|
|
32
|
-
}),
|
|
32
|
+
}), k = m(() => {
|
|
33
33
|
var e;
|
|
34
34
|
return ((e = o.value) == null ? void 0 : e.customClass) || "";
|
|
35
35
|
});
|
|
36
|
-
let
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
let f = B(x);
|
|
37
|
+
ue(() => {
|
|
38
|
+
f = B(x);
|
|
39
39
|
});
|
|
40
|
-
const
|
|
41
|
-
console.log({ json: e }), v.value = e || { widgetList: [], formConfig: {} },
|
|
42
|
-
},
|
|
40
|
+
const V = async (e) => {
|
|
41
|
+
console.log({ json: e }), v.value = e || { widgetList: [], formConfig: {} }, s.value = {}, await de(), re();
|
|
42
|
+
}, z = () => s.value || {}, A = (e) => {
|
|
43
43
|
e && Object.keys(e).forEach((t) => {
|
|
44
|
-
Object.prototype.hasOwnProperty.call(
|
|
44
|
+
t === "processingDescribe" && console.log(e[t]), Object.prototype.hasOwnProperty.call(s.value, t) && (s.value[t] = e[t]);
|
|
45
45
|
});
|
|
46
|
-
},
|
|
46
|
+
}, G = (e) => {
|
|
47
47
|
L.value = e;
|
|
48
|
-
}, G = () => {
|
|
49
|
-
c.resetValidation();
|
|
50
48
|
}, K = () => {
|
|
51
|
-
|
|
52
|
-
}, Q = (
|
|
53
|
-
|
|
54
|
-
}, X = () => {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
49
|
+
f.resetValidation();
|
|
50
|
+
}, Q = () => {
|
|
51
|
+
f.clearValidate();
|
|
52
|
+
}, X = (e) => {
|
|
53
|
+
y.value = e;
|
|
54
|
+
}, Y = () => {
|
|
55
|
+
if (!a.parentForm)
|
|
56
|
+
return h();
|
|
57
|
+
let e = a.parentForm;
|
|
58
58
|
for (; e.parentForm; )
|
|
59
59
|
e = e.parentForm;
|
|
60
60
|
return e;
|
|
61
|
-
},
|
|
61
|
+
}, Z = (e, t = {}, r = {}) => {
|
|
62
62
|
var I, O;
|
|
63
|
-
const n =
|
|
64
|
-
if (
|
|
65
|
-
|
|
63
|
+
const n = Y(), i = H((n == null ? void 0 : n.widgetList) || [], e) || H(W.value || [], e);
|
|
64
|
+
if (i === null) {
|
|
65
|
+
J.error(d("render.hint.refNotFound") + e);
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
-
if (!e ||
|
|
69
|
-
|
|
68
|
+
if (!e || i.type !== "vf-dialog") {
|
|
69
|
+
J.error(d("render.hint.refNotFound") + e);
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
72
|
const u = {
|
|
73
|
-
widgetList:
|
|
74
|
-
formConfig:
|
|
75
|
-
},
|
|
73
|
+
widgetList: we((i == null ? void 0 : i.widgetList) || []),
|
|
74
|
+
formConfig: pe(((I = n == null ? void 0 : n.formConfig) == null ? void 0 : I.value) || {})
|
|
75
|
+
}, fe = xe();
|
|
76
76
|
b.value = {
|
|
77
|
-
options:
|
|
77
|
+
options: i.options,
|
|
78
78
|
formJson: u,
|
|
79
79
|
formData: { ...t },
|
|
80
80
|
optionData: n.optionData,
|
|
81
81
|
globalDsv: n.globalDsv,
|
|
82
82
|
parentFormRef: g.value,
|
|
83
83
|
extraData: r,
|
|
84
|
-
wrapperId:
|
|
84
|
+
wrapperId: fe,
|
|
85
85
|
vfCtx: { ...t }
|
|
86
|
-
}, (O =
|
|
87
|
-
},
|
|
86
|
+
}, (O = p.value) == null || O.show();
|
|
87
|
+
}, N = () => a.parentForm, ee = () => {
|
|
88
88
|
var e;
|
|
89
|
-
return (e =
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
typeof e < "u" && typeof t < "u" &&
|
|
89
|
+
return (e = p.value) == null ? void 0 : e.getFormRef();
|
|
90
|
+
}, te = () => {
|
|
91
|
+
C.off$("fieldChange"), C.on$("fieldChange", ({ fieldName: e, value: t }) => {
|
|
92
|
+
typeof e < "u" && typeof t < "u" && Fe(s.value, e, t);
|
|
93
93
|
});
|
|
94
|
-
},
|
|
95
|
-
const e = o.value.serveList, t = await
|
|
96
|
-
vfCtx:
|
|
94
|
+
}, oe = async () => {
|
|
95
|
+
const e = o.value.serveList, t = await M(e.vformDetail, {
|
|
96
|
+
vfCtx: a.vfCtx
|
|
97
97
|
});
|
|
98
98
|
return console.log("res: ", t), t;
|
|
99
|
-
},
|
|
100
|
-
if (!await
|
|
101
|
-
const t = o.value.serveList, r = await
|
|
102
|
-
data:
|
|
103
|
-
vfCtx:
|
|
99
|
+
}, ne = async () => {
|
|
100
|
+
if (!await f.validate()) throw new Error(d("表单验证失败"));
|
|
101
|
+
const t = o.value.serveList, r = await M(t.vformUpdate, {
|
|
102
|
+
data: s.value,
|
|
103
|
+
vfCtx: a.vfCtx
|
|
104
104
|
});
|
|
105
105
|
return console.log("res: ", r), r;
|
|
106
|
-
},
|
|
106
|
+
}, re = () => {
|
|
107
107
|
var e, t;
|
|
108
|
-
(e = o.value) != null && e.onFormMounted && (console.log("onFormMounted: "),
|
|
108
|
+
(e = o.value) != null && e.onFormMounted && (console.log("onFormMounted: "), $({
|
|
109
109
|
functionBody: (t = o.value) == null ? void 0 : t.onFormMounted
|
|
110
110
|
}));
|
|
111
|
-
}, re = () => {
|
|
112
|
-
const e = "vfRender" + ve(), { cssCode: t, functions: r } = o.value;
|
|
113
|
-
t && ue(t, e || ""), r && me(r, e || "");
|
|
114
111
|
}, se = () => {
|
|
112
|
+
const e = "vfRender" + Ce(), { cssCode: t, functions: r } = o.value;
|
|
113
|
+
t && ve(t, e || ""), r && ge(r, e || "");
|
|
114
|
+
}, ie = () => {
|
|
115
115
|
var t;
|
|
116
116
|
const e = (t = g.value) == null ? void 0 : t.$router;
|
|
117
117
|
e == null || e.replace({
|
|
@@ -121,62 +121,69 @@ const Te = ({ renderForm: D, props: i }) => {
|
|
|
121
121
|
}
|
|
122
122
|
});
|
|
123
123
|
}, ae = (e, t) => {
|
|
124
|
-
var n,
|
|
125
|
-
const r = (n =
|
|
124
|
+
var n, i;
|
|
125
|
+
const r = (n = h().vfCtx) == null ? void 0 : n.goBack;
|
|
126
126
|
if (typeof r == "function")
|
|
127
127
|
r(e, t);
|
|
128
128
|
else {
|
|
129
|
-
const u = (
|
|
129
|
+
const u = (i = g.value) == null ? void 0 : i.$router;
|
|
130
130
|
u == null || u.go(-1);
|
|
131
131
|
}
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
})
|
|
132
|
+
}, le = (e) => s.value[e], ce = () => a.vfCtx;
|
|
133
|
+
me(() => {
|
|
134
|
+
D && V(D), te(), se();
|
|
135
|
+
});
|
|
136
|
+
const E = {
|
|
137
|
+
context: g,
|
|
136
138
|
i18nt: d,
|
|
137
139
|
goBack: ae,
|
|
138
|
-
reload:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
getFormData: S,
|
|
157
|
-
getChildFormRef: N,
|
|
158
|
-
// 状态
|
|
159
|
-
formJsonObj: v,
|
|
160
|
-
formDataModel: a,
|
|
140
|
+
reload: ie,
|
|
141
|
+
getFieldValue: le,
|
|
142
|
+
resetValidation: K,
|
|
143
|
+
clearValidate: Q,
|
|
144
|
+
getVfCtx: ce,
|
|
145
|
+
getParentFormRef: N,
|
|
146
|
+
getFormRef: h,
|
|
147
|
+
getWidgetRef: U,
|
|
148
|
+
showDialog: Z,
|
|
149
|
+
getFormData: z,
|
|
150
|
+
getChildFormRef: ee,
|
|
151
|
+
setFormData: A,
|
|
152
|
+
setReadMode: P,
|
|
153
|
+
setFormJson: V,
|
|
154
|
+
setLoading: G,
|
|
155
|
+
onFormDetail: oe,
|
|
156
|
+
onFormUpdate: ne,
|
|
157
|
+
formDataModel: s,
|
|
161
158
|
isLoading: L,
|
|
162
|
-
|
|
163
|
-
// 引用
|
|
164
|
-
widgetRefList: w,
|
|
165
|
-
formValidator: c,
|
|
159
|
+
vfCtx: a.vfCtx,
|
|
166
160
|
// 计算属性
|
|
167
161
|
formConfig: o,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
162
|
+
dynamicDialgRef: p,
|
|
163
|
+
setChildFormRef: q,
|
|
164
|
+
setDialogOrDrawerRef: X
|
|
165
|
+
};
|
|
166
|
+
return {
|
|
167
|
+
formWidgetId: w,
|
|
168
|
+
registerToRefList: _,
|
|
169
|
+
dialogOrDrawerRef: y,
|
|
170
|
+
emitter: C,
|
|
171
|
+
// 状态
|
|
172
|
+
formJsonObj: v,
|
|
173
|
+
readModeFlag: R,
|
|
174
|
+
// 引用
|
|
175
|
+
widgetRefList: F,
|
|
176
|
+
formValidator: f,
|
|
177
|
+
widgetList: W,
|
|
178
|
+
labelPosition: j,
|
|
179
|
+
labelWidth: S,
|
|
180
|
+
customClass: k,
|
|
173
181
|
dialogProps: b,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
clearValidate: K
|
|
182
|
+
expose: E,
|
|
183
|
+
...E
|
|
177
184
|
};
|
|
178
185
|
};
|
|
179
186
|
export {
|
|
180
|
-
|
|
187
|
+
_e as useFormContext
|
|
181
188
|
};
|
|
182
189
|
//# sourceMappingURL=useFormContext.js.map
|