cloud-web-corejs 1.1.0-dev.19 → 1.1.0-dev.20

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.
Files changed (18) hide show
  1. package/package.json +1 -1
  2. package/src/components/baseInputExport/mixins.js +0 -6
  3. package/src/components/xform/docs/2026-09 /345/212/250/346/200/201/345/255/227/346/256/265/350/247/204/345/210/231/344/270/216/346/265/201/347/250/213/346/216/247/345/210/266/346/211/247/350/241/214/351/241/272/345/272/217/350/220/275/345/234/260/346/226/271/346/241/210.md" +409 -0
  4. package/src/components/xform/form-designer/designer.js +2101 -2084
  5. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +34 -0
  6. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +13 -1
  7. package/src/components/xform/form-designer/setting-panel/form-dynamicField-setting.vue +660 -602
  8. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +8 -0
  9. package/src/components/xform/form-render/container-item/data-table-mixin.js +6306 -6285
  10. package/src/components/xform/form-render/container-item/dynamicFieldMixin.js +54 -0
  11. package/src/components/xform/form-render/container-item/tab-item.vue +138 -129
  12. package/src/components/xform/form-render/fieldControlEngine.js +200 -0
  13. package/src/components/xform/form-render/fieldControlMixin.js +524 -0
  14. package/src/components/xform/form-render/formDynamicFieldMixin.js +2 -0
  15. package/src/components/xform/form-render/index.vue +161 -153
  16. package/src/components/xform/form-render/indexMixin.js +5404 -5331
  17. package/src/components/xform/mixins/defaultHandle.js +713 -707
  18. package/src/components/xform/utils/util.js +1711 -1708
@@ -1,153 +1,161 @@
1
- <!--
2
- /**
3
- * author: vformAdmin
4
- * email: vdpadmin@163.com
5
- * website: https://www.vform666.com
6
- * date: 2021.08.18
7
- * remark: 如果要分发VForm源码,需在本文件顶部保留此文件头信息!!
8
- */
9
- -->
10
-
11
- <template>
12
- <div>
13
- <el-form
14
- :label-position="labelPosition"
15
- :size="size"
16
- :class="[customClass, h5RootClass]"
17
- class="render-form"
18
- :label-width="labelWidth"
19
- :validate-on-rule-change="false"
20
- :model="formDataModel"
21
- ref="renderForm"
22
- @submit.native.prevent
23
- >
24
- <template v-if="showFormContent">
25
- <template v-for="(widget, index) in widgetList">
26
- <template v-if="'container' === widget.category">
27
- <component
28
- :is="getContainerWidgetName(widget)"
29
- :widget="widget"
30
- :field="widget"
31
- :key="widget.id"
32
- :parent-list="widgetList"
33
- :index-of-parent-list="index"
34
- :parent-widget="null"
35
- >
36
- <!-- 递归传递插槽!!! -->
37
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
38
- <slot :name="slot" v-bind="scope" />
39
- </template>
40
- </component>
41
- </template>
42
- <template v-else>
43
- <component
44
- :is="getWidgetName(widget)"
45
- :field="widget"
46
- :form-model="formDataModel"
47
- :designer="null"
48
- :key="widget.id"
49
- :parent-list="widgetList"
50
- :index-of-parent-list="index"
51
- :parent-widget="null"
52
- >
53
- <!-- 递归传递插槽!!! -->
54
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
55
- <slot :name="slot" v-bind="scope" />
56
- </template>
57
- </component>
58
- </template>
59
- </template>
60
- </template>
61
- </el-form>
62
- <searchFormDialog
63
- v-if="showSearchDialog"
64
- :visiable.sync="showSearchDialog"
65
- ref="searchFormDialog"
66
- :option="searchDialogOption"
67
- ></searchFormDialog>
68
- <formDialog
69
- v-if="showFormDialog"
70
- :visiable.sync="showFormDialog"
71
- ref="formDialog"
72
- :option="formDialogOption"
73
- ></formDialog>
74
- <importDialog
75
- v-if="showImportDialog"
76
- :visiable.sync="showImportDialog"
77
- :param="importDialogOption"
78
- :parentTarget="_self"
79
- ></importDialog>
80
- <fileReferenceDialog
81
- v-if="showFileReferenceDialog"
82
- :visiable.sync="showFileReferenceDialog"
83
- :option="fileReferenceDialogOption"
84
- ></fileReferenceDialog>
85
- <formulaDialog
86
- v-if="formulaDialogVisible"
87
- :visiable.sync="formulaDialogVisible"
88
- :option="formulaDialogOption"
89
- ></formulaDialog>
90
- <baseFormulaDialog
91
- v-if="baseFormulaDialogVisible"
92
- :visiable.sync="baseFormulaDialogVisible"
93
- :option="baseFormulaDialogOption"
94
- ></baseFormulaDialog>
95
- <template v-if="showQrCanvas">
96
- <canvas ref="qrCanvas" v-show="false" :width="qrWidth" :height="qrHeight"></canvas>
97
- </template>
98
- <univerDialog
99
- v-if="showUniverDialog"
100
- :visiable.sync="showUniverDialog"
101
- :option="univerDialogOption"
102
- ></univerDialog>
103
- <compareDelList
104
- v-if="showCompareDelList"
105
- :visiable.sync="showCompareDelList"
106
- :option="compareDelListOption"
107
- ></compareDelList>
108
- </div>
109
- </template>
110
-
111
- <script>
112
- //import ElForm from 'element-ui/packages/form/src/form.vue' /* 用于源码调试Element UI */
113
- import "./container-item/index";
114
- import FieldComponents from "../../../components/xform/form-designer/form-widget/field-widget/index";
115
- import indexMixin from "../../../components/xform/form-render/indexMixin";
116
- import formDynamicFieldMixin from "../../../components/xform/form-render/formDynamicFieldMixin";
117
-
118
- export default {
119
- name: "VFormRender",
120
- components: {
121
- ...FieldComponents,
122
- searchFormDialog: () =>
123
- import(
124
- "../../../components/xform/form-designer/form-widget/dialog/searchFormDialog.vue"
125
- ),
126
- formDialog: () =>
127
- import("../../../components/xform/form-designer/form-widget/dialog/formDialog.vue"),
128
- importDialog: () =>
129
- import(
130
- "../../../components/xform/form-designer/form-widget/dialog/importDialog.vue"
131
- ),
132
- fileReferenceDialog: () =>
133
- import(
134
- "../../../components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue"
135
- ),
136
- compareDelList: () =>
137
- import("../../../components/xform/form-render/compareDelList.vue"),
138
- },
139
- mixins: [indexMixin, formDynamicFieldMixin],
140
- };
141
- </script>
142
-
143
- <style lang="scss" scoped>
144
- .el-form ::v-deep .el-row {
145
- // padding: 8px;
146
- }
147
- </style>
148
-
149
- <!-- H5 版式样式基线:必须非 scoped,要穿透到各 field-widget 内部的 el-form-item。
150
- 全部规则收在 .xform-h5 下(由上面 el-form 的 h5RootClass 输出),PC 版式不生效。 -->
151
- <style lang="scss">
152
- @import "../styles/h5.scss";
153
- </style>
1
+ <!--
2
+ /**
3
+ * author: vformAdmin
4
+ * email: vdpadmin@163.com
5
+ * website: https://www.vform666.com
6
+ * date: 2021.08.18
7
+ * remark: 如果要分发VForm源码,需在本文件顶部保留此文件头信息!!
8
+ */
9
+ -->
10
+
11
+ <template>
12
+ <div>
13
+ <el-alert v-if="isFieldControlV2() && fieldControlError" :title="fieldControlError" type="error" :closable="false" show-icon>
14
+ <el-button type="text" @click="retryFieldControl">重新计算字段规则</el-button>
15
+ </el-alert>
16
+ <div v-if="fieldControlBlocked" role="status">正在准备表单,请稍候…</div>
17
+ <el-form
18
+ :label-position="labelPosition"
19
+ :size="size"
20
+ :class="[customClass, h5RootClass]"
21
+ class="render-form"
22
+ :style="fieldControlBlocked ? { visibility: 'hidden' } : null"
23
+ :aria-busy="fieldControlBlocked ? 'true' : 'false'"
24
+ :label-width="labelWidth"
25
+ :validate-on-rule-change="false"
26
+ :model="formDataModel"
27
+ ref="renderForm"
28
+ @submit.native.prevent
29
+ >
30
+ <template v-if="showFormContent">
31
+ <template v-for="(widget, index) in widgetList">
32
+ <template v-if="'container' === widget.category">
33
+ <component
34
+ :is="getContainerWidgetName(widget)"
35
+ :widget="widget"
36
+ :field="widget"
37
+ :key="widget.id"
38
+ :parent-list="widgetList"
39
+ :index-of-parent-list="index"
40
+ :parent-widget="null"
41
+ >
42
+ <!-- 递归传递插槽!!! -->
43
+ <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
44
+ <slot :name="slot" v-bind="scope" />
45
+ </template>
46
+ </component>
47
+ </template>
48
+ <template v-else>
49
+ <component
50
+ :is="getWidgetName(widget)"
51
+ :field="widget"
52
+ :form-model="formDataModel"
53
+ :designer="null"
54
+ :key="widget.id"
55
+ :parent-list="widgetList"
56
+ :index-of-parent-list="index"
57
+ :parent-widget="null"
58
+ >
59
+ <!-- 递归传递插槽!!! -->
60
+ <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
61
+ <slot :name="slot" v-bind="scope" />
62
+ </template>
63
+ </component>
64
+ </template>
65
+ </template>
66
+ </template>
67
+ </el-form>
68
+ <searchFormDialog
69
+ v-if="showSearchDialog"
70
+ :visiable.sync="showSearchDialog"
71
+ ref="searchFormDialog"
72
+ :option="searchDialogOption"
73
+ ></searchFormDialog>
74
+ <formDialog
75
+ v-if="showFormDialog"
76
+ :visiable.sync="showFormDialog"
77
+ ref="formDialog"
78
+ :option="formDialogOption"
79
+ ></formDialog>
80
+ <importDialog
81
+ v-if="showImportDialog"
82
+ :visiable.sync="showImportDialog"
83
+ :param="importDialogOption"
84
+ :parentTarget="_self"
85
+ ></importDialog>
86
+ <fileReferenceDialog
87
+ v-if="showFileReferenceDialog"
88
+ :visiable.sync="showFileReferenceDialog"
89
+ :option="fileReferenceDialogOption"
90
+ ></fileReferenceDialog>
91
+ <formulaDialog
92
+ v-if="formulaDialogVisible"
93
+ :visiable.sync="formulaDialogVisible"
94
+ :option="formulaDialogOption"
95
+ ></formulaDialog>
96
+ <baseFormulaDialog
97
+ v-if="baseFormulaDialogVisible"
98
+ :visiable.sync="baseFormulaDialogVisible"
99
+ :option="baseFormulaDialogOption"
100
+ ></baseFormulaDialog>
101
+ <template v-if="showQrCanvas">
102
+ <canvas ref="qrCanvas" v-show="false" :width="qrWidth" :height="qrHeight"></canvas>
103
+ </template>
104
+ <univerDialog
105
+ v-if="showUniverDialog"
106
+ :visiable.sync="showUniverDialog"
107
+ :option="univerDialogOption"
108
+ ></univerDialog>
109
+ <compareDelList
110
+ v-if="showCompareDelList"
111
+ :visiable.sync="showCompareDelList"
112
+ :option="compareDelListOption"
113
+ ></compareDelList>
114
+ </div>
115
+ </template>
116
+
117
+ <script>
118
+ //import ElForm from 'element-ui/packages/form/src/form.vue' /* 用于源码调试Element UI */
119
+ import "./container-item/index";
120
+ import FieldComponents from "../../../components/xform/form-designer/form-widget/field-widget/index";
121
+ import indexMixin from "../../../components/xform/form-render/indexMixin";
122
+ import formDynamicFieldMixin from "../../../components/xform/form-render/formDynamicFieldMixin";
123
+
124
+ import fieldControlMixin from "@base/components/xform/form-render/fieldControlMixin";
125
+
126
+ export default {
127
+ name: "VFormRender",
128
+ components: {
129
+ ...FieldComponents,
130
+ searchFormDialog: () =>
131
+ import(
132
+ "../../../components/xform/form-designer/form-widget/dialog/searchFormDialog.vue"
133
+ ),
134
+ formDialog: () =>
135
+ import("../../../components/xform/form-designer/form-widget/dialog/formDialog.vue"),
136
+ importDialog: () =>
137
+ import(
138
+ "../../../components/xform/form-designer/form-widget/dialog/importDialog.vue"
139
+ ),
140
+ fileReferenceDialog: () =>
141
+ import(
142
+ "../../../components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue"
143
+ ),
144
+ compareDelList: () =>
145
+ import("../../../components/xform/form-render/compareDelList.vue"),
146
+ },
147
+ mixins: [indexMixin, formDynamicFieldMixin, fieldControlMixin],
148
+ };
149
+ </script>
150
+
151
+ <style lang="scss" scoped>
152
+ .el-form ::v-deep .el-row {
153
+ // padding: 8px;
154
+ }
155
+ </style>
156
+
157
+ <!-- H5 版式样式基线:必须非 scoped,要穿透到各 field-widget 内部的 el-form-item。
158
+ 全部规则收在 .xform-h5 下(由上面 el-form 的 h5RootClass 输出),PC 版式不生效。 -->
159
+ <style lang="scss">
160
+ @import "../styles/h5.scss";
161
+ </style>