@fecp/designer 5.3.8 → 5.3.9
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/es/designer.css +16 -16
- package/es/packages/designer/package.json.mjs +1 -1
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +7 -4
- package/es/packages/vue/src/components/forms/subForm/SubForm.vue.mjs +11 -2
- package/es/packages/vue/src/components/table/Table.vue.mjs +2 -2
- package/lib/designer.css +16 -16
- package/lib/packages/designer/package.json.js +1 -1
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +7 -4
- package/lib/packages/vue/src/components/forms/subForm/SubForm.vue.js +11 -2
- package/lib/packages/vue/src/components/table/Table.vue.js +2 -2
- package/package.json +1 -1
package/es/designer.css
CHANGED
|
@@ -5527,27 +5527,27 @@ body,
|
|
|
5527
5527
|
width: 80px;
|
|
5528
5528
|
font-size: var(--el-font-size-extra-small);
|
|
5529
5529
|
}
|
|
5530
|
-
.fec-form[data-v-
|
|
5530
|
+
.fec-form[data-v-bf77b845] {
|
|
5531
5531
|
height: 100%;
|
|
5532
5532
|
}
|
|
5533
|
-
[data-v-
|
|
5533
|
+
[data-v-bf77b845] .vgl-item {
|
|
5534
5534
|
transition: none;
|
|
5535
5535
|
}
|
|
5536
|
-
[data-v-
|
|
5536
|
+
[data-v-bf77b845] .vgl-item > .el-form-item {
|
|
5537
5537
|
width: 100%;
|
|
5538
5538
|
padding: 12px 8px 0 8px;
|
|
5539
5539
|
height: calc(100% - 15px);
|
|
5540
5540
|
display: flex;
|
|
5541
5541
|
}
|
|
5542
|
-
[data-v-
|
|
5542
|
+
[data-v-bf77b845] .vgl-item > .el-form-item.el-form-item--label-top {
|
|
5543
5543
|
flex-direction: column;
|
|
5544
5544
|
}
|
|
5545
|
-
[data-v-
|
|
5545
|
+
[data-v-bf77b845] .vgl-item > .el-form-item .el-form-item__label {
|
|
5546
5546
|
line-height: 20px;
|
|
5547
5547
|
display: flex;
|
|
5548
5548
|
align-items: center;
|
|
5549
5549
|
}
|
|
5550
|
-
[data-v-
|
|
5550
|
+
[data-v-bf77b845] .vgl-item > .el-container {
|
|
5551
5551
|
height: auto !important;
|
|
5552
5552
|
}.cell-content .cell-text[data-v-2352d631] {
|
|
5553
5553
|
display: inline-block;
|
|
@@ -5836,11 +5836,11 @@ body,
|
|
|
5836
5836
|
}
|
|
5837
5837
|
[data-v-cc8f1fb6] .el-checkbox-group .el-checkbox-button__inner {
|
|
5838
5838
|
border-radius: 4px;
|
|
5839
|
-
}.fec-table[data-v-
|
|
5839
|
+
}.fec-table[data-v-be17662c] {
|
|
5840
5840
|
height: 100%;
|
|
5841
5841
|
flex-grow: 1;
|
|
5842
5842
|
}
|
|
5843
|
-
.fec-table-container[data-v-
|
|
5843
|
+
.fec-table-container[data-v-be17662c] {
|
|
5844
5844
|
width: 100%;
|
|
5845
5845
|
background: #fff;
|
|
5846
5846
|
box-sizing: border-box;
|
|
@@ -5850,30 +5850,30 @@ body,
|
|
|
5850
5850
|
overflow: hidden;
|
|
5851
5851
|
flex-grow: 1;
|
|
5852
5852
|
}
|
|
5853
|
-
.fec-table-container .fec-vxe-table[data-v-
|
|
5853
|
+
.fec-table-container .fec-vxe-table[data-v-be17662c] {
|
|
5854
5854
|
flex: 1;
|
|
5855
5855
|
min-height: 0;
|
|
5856
5856
|
overflow: hidden;
|
|
5857
5857
|
}
|
|
5858
|
-
.fec-table-container[data-v-
|
|
5858
|
+
.fec-table-container[data-v-be17662c] .vxe-table {
|
|
5859
5859
|
font-size: 14px;
|
|
5860
5860
|
}
|
|
5861
|
-
.fec-table-container[data-v-
|
|
5861
|
+
.fec-table-container[data-v-be17662c] .vxe-table .vxe-table--body-wrapper {
|
|
5862
5862
|
overflow: auto;
|
|
5863
5863
|
}
|
|
5864
|
-
.fec-table-container[data-v-
|
|
5864
|
+
.fec-table-container[data-v-be17662c] .vxe-table .vxe-header--column {
|
|
5865
5865
|
background-color: #f5f7fa;
|
|
5866
5866
|
}
|
|
5867
|
-
.fec-table-container[data-v-
|
|
5867
|
+
.fec-table-container[data-v-be17662c] .vxe-table .vxe-header--column .vxe-cell {
|
|
5868
5868
|
height: 40px !important;
|
|
5869
5869
|
min-height: 40px !important;
|
|
5870
5870
|
}
|
|
5871
|
-
.fec-table-container[data-v-
|
|
5871
|
+
.fec-table-container[data-v-be17662c] .vxe-table .vxe-body--column .vxe-cell {
|
|
5872
5872
|
padding: 6px !important;
|
|
5873
5873
|
min-height: 40px !important;
|
|
5874
5874
|
}
|
|
5875
|
-
.fec-table-container[data-v-
|
|
5876
|
-
.fec-table-container[data-v-
|
|
5875
|
+
.fec-table-container[data-v-be17662c] .vxe-table .vxe-body--column .c--tooltip,
|
|
5876
|
+
.fec-table-container[data-v-be17662c] .vxe-table .vxe-body--column .c--title {
|
|
5877
5877
|
height: 40px !important;
|
|
5878
5878
|
min-height: 40px !important;
|
|
5879
5879
|
}:root,:host{--van-black: #000;--van-white: #fff;--van-gray-1: #f7f8fa;--van-gray-2: #f2f3f5;--van-gray-3: #ebedf0;--van-gray-4: #dcdee0;--van-gray-5: #c8c9cc;--van-gray-6: #969799;--van-gray-7: #646566;--van-gray-8: #323233;--van-red: #ee0a24;--van-blue: #1989fa;--van-orange: #ff976a;--van-orange-dark: #ed6a0c;--van-orange-light: #fffbe8;--van-green: #07c160;--van-gradient-red: linear-gradient(to right, #ff6034, #ee0a24);--van-gradient-orange: linear-gradient(to right, #ffd01e, #ff8917);--van-primary-color: var(--van-blue);--van-success-color: var(--van-green);--van-danger-color: var(--van-red);--van-warning-color: var(--van-orange);--van-text-color: var(--van-gray-8);--van-text-color-2: var(--van-gray-6);--van-text-color-3: var(--van-gray-5);--van-active-color: var(--van-gray-2);--van-active-opacity: .6;--van-disabled-opacity: .5;--van-background: var(--van-gray-1);--van-background-2: var(--van-white);--van-background-3: var(--van-white);--van-padding-base: 4px;--van-padding-xs: 8px;--van-padding-sm: 12px;--van-padding-md: 16px;--van-padding-lg: 24px;--van-padding-xl: 32px;--van-font-bold: 600;--van-font-size-xs: 10px;--van-font-size-sm: 12px;--van-font-size-md: 14px;--van-font-size-lg: 16px;--van-line-height-xs: 14px;--van-line-height-sm: 18px;--van-line-height-md: 20px;--van-line-height-lg: 22px;--van-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--van-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--van-duration-base: .3s;--van-duration-fast: .2s;--van-ease-out: ease-out;--van-ease-in: ease-in;--van-border-color: var(--van-gray-3);--van-border-width: 1px;--van-radius-sm: 2px;--van-radius-md: 4px;--van-radius-lg: 8px;--van-radius-max: 999px}.van-theme-dark{--van-text-color: #f5f5f5;--van-text-color-2: #707070;--van-text-color-3: #4d4d4d;--van-border-color: #3a3a3c;--van-active-color: #3a3a3c;--van-background: #000;--van-background-2: #1c1c1e;--van-background-3: #37363b}html{-webkit-tap-highlight-color:transparent}body{margin:0;font-family:var(--van-base-font)}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=van-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes van-slide-up-enter{0%{transform:translate3d(0,100%,0)}}@keyframes van-slide-up-leave{to{transform:translate3d(0,100%,0)}}@keyframes van-slide-down-enter{0%{transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-leave{to{transform:translate3d(0,-100%,0)}}@keyframes van-slide-left-enter{0%{transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-leave{to{transform:translate3d(-100%,0,0)}}@keyframes van-slide-right-enter{0%{transform:translate3d(100%,0,0)}}@keyframes van-slide-right-leave{to{transform:translate3d(100%,0,0)}}@keyframes van-fade-in{0%{opacity:0}to{opacity:1}}@keyframes van-fade-out{0%{opacity:1}to{opacity:0}}@keyframes van-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.van-fade-enter-active{animation:var(--van-duration-base) van-fade-in both var(--van-ease-out)}.van-fade-leave-active{animation:var(--van-duration-base) van-fade-out both var(--van-ease-in)}.van-slide-up-enter-active{animation:van-slide-up-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-up-leave-active{animation:van-slide-up-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-down-enter-active{animation:van-slide-down-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-down-leave-active{animation:van-slide-down-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-left-enter-active{animation:van-slide-left-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-left-leave-active{animation:van-slide-left-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-right-enter-active{animation:van-slide-right-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-right-leave-active{animation:van-slide-right-leave var(--van-duration-base) both var(--van-ease-in)}.van-clearfix:after{display:table;clear:both;content:""}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;line-break:anywhere;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;line-break:anywhere;-webkit-box-orient:vertical}.van-safe-area-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.van-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-haptics-feedback{cursor:pointer}.van-haptics-feedback:active{opacity:var(--van-active-opacity)}[class*=van-hairline]:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--van-border-color);transform:scale(.5)}.van-hairline,.van-hairline--top,.van-hairline--left,.van-hairline--right,.van-hairline--bottom,.van-hairline--surround,.van-hairline--top-bottom{position:relative}.van-hairline--top:after{border-top-width:var(--van-border-width)}.van-hairline--left:after{border-left-width:var(--van-border-width)}.van-hairline--right:after{border-right-width:var(--van-border-width)}.van-hairline--bottom:after{border-bottom-width:var(--van-border-width)}.van-hairline--top-bottom:after,.van-hairline-unset--top-bottom:after{border-width:var(--van-border-width) 0}.van-hairline--surround:after{border-width:var(--van-border-width)}
|
|
@@ -207,7 +207,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
|
-
formData.value = { ...defaultData, ...props.modelValue };
|
|
210
|
+
formData.value = { ...defaultData, ...setFormData(props.modelValue, true) };
|
|
211
211
|
formRules.value = rules;
|
|
212
212
|
};
|
|
213
213
|
const loadFieldDataSources = async () => {
|
|
@@ -614,7 +614,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
614
614
|
}
|
|
615
615
|
return result;
|
|
616
616
|
};
|
|
617
|
-
const setFormData = (data) => {
|
|
617
|
+
const setFormData = (data, flag = false) => {
|
|
618
618
|
const processedData = { ...data };
|
|
619
619
|
const processField = (field) => {
|
|
620
620
|
const fieldName = field.fieldName;
|
|
@@ -659,6 +659,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
659
659
|
processField(field);
|
|
660
660
|
});
|
|
661
661
|
}
|
|
662
|
+
if (flag) {
|
|
663
|
+
return processedData;
|
|
664
|
+
}
|
|
662
665
|
Object.assign(formData.value, processedData);
|
|
663
666
|
};
|
|
664
667
|
onMounted(() => {
|
|
@@ -848,7 +851,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
848
851
|
applyLinkageEffectsForChangedFields(changedFields);
|
|
849
852
|
}
|
|
850
853
|
prevFormData.value = { ...newVal };
|
|
851
|
-
emit("update:modelValue",
|
|
854
|
+
emit("update:modelValue", getFormData());
|
|
852
855
|
},
|
|
853
856
|
{ deep: true }
|
|
854
857
|
);
|
|
@@ -968,7 +971,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
968
971
|
};
|
|
969
972
|
}
|
|
970
973
|
});
|
|
971
|
-
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
974
|
+
const _Form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bf77b845"]]);
|
|
972
975
|
export {
|
|
973
976
|
_Form as default
|
|
974
977
|
};
|
|
@@ -2,6 +2,7 @@ import { inject, computed, createElementBlock, openBlock, Fragment, createCommen
|
|
|
2
2
|
import { Form } from "../form/index.mjs";
|
|
3
3
|
import { SubTitle } from "../subTitle/index.mjs";
|
|
4
4
|
import { H2 } from "../h2/index.mjs";
|
|
5
|
+
import { cloneDeep } from "../../../utils/common.mjs";
|
|
5
6
|
const _hoisted_1 = {
|
|
6
7
|
key: 0,
|
|
7
8
|
style: { "height": "60px", "position": "relative" }
|
|
@@ -50,6 +51,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
50
51
|
inject("rowHeight");
|
|
51
52
|
inject("gridLayout");
|
|
52
53
|
const setFormItemHeight = inject("setFormItemHeight");
|
|
54
|
+
const subFormData = computed({
|
|
55
|
+
get: () => {
|
|
56
|
+
return cloneDeep(formData.value);
|
|
57
|
+
},
|
|
58
|
+
set: (val) => {
|
|
59
|
+
formData.value = { ...formData.value, ...val };
|
|
60
|
+
}
|
|
61
|
+
});
|
|
53
62
|
const templateKey = computed(() => {
|
|
54
63
|
if (props.config.formSource == "dynamic") {
|
|
55
64
|
const dynamicSubFormKey = props.config.dynamicSubFormKey;
|
|
@@ -111,8 +120,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
111
120
|
onLoaded: subFormLoaded,
|
|
112
121
|
canPageEvent: __props.config.triggerSubFormPageEvent,
|
|
113
122
|
initFormMode: __props.formMode,
|
|
114
|
-
modelValue: unref(
|
|
115
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(
|
|
123
|
+
modelValue: unref(subFormData),
|
|
124
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(subFormData) ? subFormData.value = $event : null)
|
|
116
125
|
}, null, 8, ["templateKey", "canPageEvent", "initFormMode", "modelValue"])
|
|
117
126
|
], 64);
|
|
118
127
|
};
|
|
@@ -117,7 +117,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
117
117
|
const configLoading = ref(true);
|
|
118
118
|
const localConfig = ref({});
|
|
119
119
|
const fieldsData = ref({});
|
|
120
|
-
const hiddenFormData =
|
|
120
|
+
const hiddenFormData = computed(() => props.initHiddenData);
|
|
121
121
|
const dataSourceOptions = ref({});
|
|
122
122
|
const dictionaryOptions = ref({});
|
|
123
123
|
const displayData = computed(() => {
|
|
@@ -645,7 +645,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
645
645
|
};
|
|
646
646
|
}
|
|
647
647
|
});
|
|
648
|
-
const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
648
|
+
const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-be17662c"]]);
|
|
649
649
|
export {
|
|
650
650
|
_Table as default
|
|
651
651
|
};
|
package/lib/designer.css
CHANGED
|
@@ -5527,27 +5527,27 @@ body,
|
|
|
5527
5527
|
width: 80px;
|
|
5528
5528
|
font-size: var(--el-font-size-extra-small);
|
|
5529
5529
|
}
|
|
5530
|
-
.fec-form[data-v-
|
|
5530
|
+
.fec-form[data-v-bf77b845] {
|
|
5531
5531
|
height: 100%;
|
|
5532
5532
|
}
|
|
5533
|
-
[data-v-
|
|
5533
|
+
[data-v-bf77b845] .vgl-item {
|
|
5534
5534
|
transition: none;
|
|
5535
5535
|
}
|
|
5536
|
-
[data-v-
|
|
5536
|
+
[data-v-bf77b845] .vgl-item > .el-form-item {
|
|
5537
5537
|
width: 100%;
|
|
5538
5538
|
padding: 12px 8px 0 8px;
|
|
5539
5539
|
height: calc(100% - 15px);
|
|
5540
5540
|
display: flex;
|
|
5541
5541
|
}
|
|
5542
|
-
[data-v-
|
|
5542
|
+
[data-v-bf77b845] .vgl-item > .el-form-item.el-form-item--label-top {
|
|
5543
5543
|
flex-direction: column;
|
|
5544
5544
|
}
|
|
5545
|
-
[data-v-
|
|
5545
|
+
[data-v-bf77b845] .vgl-item > .el-form-item .el-form-item__label {
|
|
5546
5546
|
line-height: 20px;
|
|
5547
5547
|
display: flex;
|
|
5548
5548
|
align-items: center;
|
|
5549
5549
|
}
|
|
5550
|
-
[data-v-
|
|
5550
|
+
[data-v-bf77b845] .vgl-item > .el-container {
|
|
5551
5551
|
height: auto !important;
|
|
5552
5552
|
}.cell-content .cell-text[data-v-2352d631] {
|
|
5553
5553
|
display: inline-block;
|
|
@@ -5836,11 +5836,11 @@ body,
|
|
|
5836
5836
|
}
|
|
5837
5837
|
[data-v-cc8f1fb6] .el-checkbox-group .el-checkbox-button__inner {
|
|
5838
5838
|
border-radius: 4px;
|
|
5839
|
-
}.fec-table[data-v-
|
|
5839
|
+
}.fec-table[data-v-be17662c] {
|
|
5840
5840
|
height: 100%;
|
|
5841
5841
|
flex-grow: 1;
|
|
5842
5842
|
}
|
|
5843
|
-
.fec-table-container[data-v-
|
|
5843
|
+
.fec-table-container[data-v-be17662c] {
|
|
5844
5844
|
width: 100%;
|
|
5845
5845
|
background: #fff;
|
|
5846
5846
|
box-sizing: border-box;
|
|
@@ -5850,30 +5850,30 @@ body,
|
|
|
5850
5850
|
overflow: hidden;
|
|
5851
5851
|
flex-grow: 1;
|
|
5852
5852
|
}
|
|
5853
|
-
.fec-table-container .fec-vxe-table[data-v-
|
|
5853
|
+
.fec-table-container .fec-vxe-table[data-v-be17662c] {
|
|
5854
5854
|
flex: 1;
|
|
5855
5855
|
min-height: 0;
|
|
5856
5856
|
overflow: hidden;
|
|
5857
5857
|
}
|
|
5858
|
-
.fec-table-container[data-v-
|
|
5858
|
+
.fec-table-container[data-v-be17662c] .vxe-table {
|
|
5859
5859
|
font-size: 14px;
|
|
5860
5860
|
}
|
|
5861
|
-
.fec-table-container[data-v-
|
|
5861
|
+
.fec-table-container[data-v-be17662c] .vxe-table .vxe-table--body-wrapper {
|
|
5862
5862
|
overflow: auto;
|
|
5863
5863
|
}
|
|
5864
|
-
.fec-table-container[data-v-
|
|
5864
|
+
.fec-table-container[data-v-be17662c] .vxe-table .vxe-header--column {
|
|
5865
5865
|
background-color: #f5f7fa;
|
|
5866
5866
|
}
|
|
5867
|
-
.fec-table-container[data-v-
|
|
5867
|
+
.fec-table-container[data-v-be17662c] .vxe-table .vxe-header--column .vxe-cell {
|
|
5868
5868
|
height: 40px !important;
|
|
5869
5869
|
min-height: 40px !important;
|
|
5870
5870
|
}
|
|
5871
|
-
.fec-table-container[data-v-
|
|
5871
|
+
.fec-table-container[data-v-be17662c] .vxe-table .vxe-body--column .vxe-cell {
|
|
5872
5872
|
padding: 6px !important;
|
|
5873
5873
|
min-height: 40px !important;
|
|
5874
5874
|
}
|
|
5875
|
-
.fec-table-container[data-v-
|
|
5876
|
-
.fec-table-container[data-v-
|
|
5875
|
+
.fec-table-container[data-v-be17662c] .vxe-table .vxe-body--column .c--tooltip,
|
|
5876
|
+
.fec-table-container[data-v-be17662c] .vxe-table .vxe-body--column .c--title {
|
|
5877
5877
|
height: 40px !important;
|
|
5878
5878
|
min-height: 40px !important;
|
|
5879
5879
|
}:root,:host{--van-black: #000;--van-white: #fff;--van-gray-1: #f7f8fa;--van-gray-2: #f2f3f5;--van-gray-3: #ebedf0;--van-gray-4: #dcdee0;--van-gray-5: #c8c9cc;--van-gray-6: #969799;--van-gray-7: #646566;--van-gray-8: #323233;--van-red: #ee0a24;--van-blue: #1989fa;--van-orange: #ff976a;--van-orange-dark: #ed6a0c;--van-orange-light: #fffbe8;--van-green: #07c160;--van-gradient-red: linear-gradient(to right, #ff6034, #ee0a24);--van-gradient-orange: linear-gradient(to right, #ffd01e, #ff8917);--van-primary-color: var(--van-blue);--van-success-color: var(--van-green);--van-danger-color: var(--van-red);--van-warning-color: var(--van-orange);--van-text-color: var(--van-gray-8);--van-text-color-2: var(--van-gray-6);--van-text-color-3: var(--van-gray-5);--van-active-color: var(--van-gray-2);--van-active-opacity: .6;--van-disabled-opacity: .5;--van-background: var(--van-gray-1);--van-background-2: var(--van-white);--van-background-3: var(--van-white);--van-padding-base: 4px;--van-padding-xs: 8px;--van-padding-sm: 12px;--van-padding-md: 16px;--van-padding-lg: 24px;--van-padding-xl: 32px;--van-font-bold: 600;--van-font-size-xs: 10px;--van-font-size-sm: 12px;--van-font-size-md: 14px;--van-font-size-lg: 16px;--van-line-height-xs: 14px;--van-line-height-sm: 18px;--van-line-height-md: 20px;--van-line-height-lg: 22px;--van-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--van-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--van-duration-base: .3s;--van-duration-fast: .2s;--van-ease-out: ease-out;--van-ease-in: ease-in;--van-border-color: var(--van-gray-3);--van-border-width: 1px;--van-radius-sm: 2px;--van-radius-md: 4px;--van-radius-lg: 8px;--van-radius-max: 999px}.van-theme-dark{--van-text-color: #f5f5f5;--van-text-color-2: #707070;--van-text-color-3: #4d4d4d;--van-border-color: #3a3a3c;--van-active-color: #3a3a3c;--van-background: #000;--van-background-2: #1c1c1e;--van-background-3: #37363b}html{-webkit-tap-highlight-color:transparent}body{margin:0;font-family:var(--van-base-font)}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=van-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes van-slide-up-enter{0%{transform:translate3d(0,100%,0)}}@keyframes van-slide-up-leave{to{transform:translate3d(0,100%,0)}}@keyframes van-slide-down-enter{0%{transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-leave{to{transform:translate3d(0,-100%,0)}}@keyframes van-slide-left-enter{0%{transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-leave{to{transform:translate3d(-100%,0,0)}}@keyframes van-slide-right-enter{0%{transform:translate3d(100%,0,0)}}@keyframes van-slide-right-leave{to{transform:translate3d(100%,0,0)}}@keyframes van-fade-in{0%{opacity:0}to{opacity:1}}@keyframes van-fade-out{0%{opacity:1}to{opacity:0}}@keyframes van-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.van-fade-enter-active{animation:var(--van-duration-base) van-fade-in both var(--van-ease-out)}.van-fade-leave-active{animation:var(--van-duration-base) van-fade-out both var(--van-ease-in)}.van-slide-up-enter-active{animation:van-slide-up-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-up-leave-active{animation:van-slide-up-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-down-enter-active{animation:van-slide-down-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-down-leave-active{animation:van-slide-down-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-left-enter-active{animation:van-slide-left-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-left-leave-active{animation:van-slide-left-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-right-enter-active{animation:van-slide-right-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-right-leave-active{animation:van-slide-right-leave var(--van-duration-base) both var(--van-ease-in)}.van-clearfix:after{display:table;clear:both;content:""}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;line-break:anywhere;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;line-break:anywhere;-webkit-box-orient:vertical}.van-safe-area-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.van-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-haptics-feedback{cursor:pointer}.van-haptics-feedback:active{opacity:var(--van-active-opacity)}[class*=van-hairline]:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--van-border-color);transform:scale(.5)}.van-hairline,.van-hairline--top,.van-hairline--left,.van-hairline--right,.van-hairline--bottom,.van-hairline--surround,.van-hairline--top-bottom{position:relative}.van-hairline--top:after{border-top-width:var(--van-border-width)}.van-hairline--left:after{border-left-width:var(--van-border-width)}.van-hairline--right:after{border-right-width:var(--van-border-width)}.van-hairline--bottom:after{border-bottom-width:var(--van-border-width)}.van-hairline--top-bottom:after,.van-hairline-unset--top-bottom:after{border-width:var(--van-border-width) 0}.van-hairline--surround:after{border-width:var(--van-border-width)}
|
|
@@ -209,7 +209,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
209
209
|
}
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
|
-
formData.value = { ...defaultData, ...props.modelValue };
|
|
212
|
+
formData.value = { ...defaultData, ...setFormData(props.modelValue, true) };
|
|
213
213
|
formRules.value = rules;
|
|
214
214
|
};
|
|
215
215
|
const loadFieldDataSources = async () => {
|
|
@@ -616,7 +616,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
616
616
|
}
|
|
617
617
|
return result;
|
|
618
618
|
};
|
|
619
|
-
const setFormData = (data) => {
|
|
619
|
+
const setFormData = (data, flag = false) => {
|
|
620
620
|
const processedData = { ...data };
|
|
621
621
|
const processField = (field) => {
|
|
622
622
|
const fieldName = field.fieldName;
|
|
@@ -661,6 +661,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
661
661
|
processField(field);
|
|
662
662
|
});
|
|
663
663
|
}
|
|
664
|
+
if (flag) {
|
|
665
|
+
return processedData;
|
|
666
|
+
}
|
|
664
667
|
Object.assign(formData.value, processedData);
|
|
665
668
|
};
|
|
666
669
|
vue.onMounted(() => {
|
|
@@ -850,7 +853,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
850
853
|
applyLinkageEffectsForChangedFields(changedFields);
|
|
851
854
|
}
|
|
852
855
|
prevFormData.value = { ...newVal };
|
|
853
|
-
emit("update:modelValue",
|
|
856
|
+
emit("update:modelValue", getFormData());
|
|
854
857
|
},
|
|
855
858
|
{ deep: true }
|
|
856
859
|
);
|
|
@@ -970,5 +973,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
970
973
|
};
|
|
971
974
|
}
|
|
972
975
|
});
|
|
973
|
-
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
976
|
+
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-bf77b845"]]);
|
|
974
977
|
exports.default = _Form;
|
|
@@ -4,6 +4,7 @@ const vue = require("vue");
|
|
|
4
4
|
const index$2 = require("../form/index.js");
|
|
5
5
|
const index$1 = require("../subTitle/index.js");
|
|
6
6
|
const index = require("../h2/index.js");
|
|
7
|
+
const common = require("../../../utils/common.js");
|
|
7
8
|
const _hoisted_1 = {
|
|
8
9
|
key: 0,
|
|
9
10
|
style: { "height": "60px", "position": "relative" }
|
|
@@ -52,6 +53,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
52
53
|
vue.inject("rowHeight");
|
|
53
54
|
vue.inject("gridLayout");
|
|
54
55
|
const setFormItemHeight = vue.inject("setFormItemHeight");
|
|
56
|
+
const subFormData = vue.computed({
|
|
57
|
+
get: () => {
|
|
58
|
+
return common.cloneDeep(formData.value);
|
|
59
|
+
},
|
|
60
|
+
set: (val) => {
|
|
61
|
+
formData.value = { ...formData.value, ...val };
|
|
62
|
+
}
|
|
63
|
+
});
|
|
55
64
|
const templateKey = vue.computed(() => {
|
|
56
65
|
if (props.config.formSource == "dynamic") {
|
|
57
66
|
const dynamicSubFormKey = props.config.dynamicSubFormKey;
|
|
@@ -113,8 +122,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
113
122
|
onLoaded: subFormLoaded,
|
|
114
123
|
canPageEvent: __props.config.triggerSubFormPageEvent,
|
|
115
124
|
initFormMode: __props.formMode,
|
|
116
|
-
modelValue: vue.unref(
|
|
117
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(
|
|
125
|
+
modelValue: vue.unref(subFormData),
|
|
126
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(subFormData) ? subFormData.value = $event : null)
|
|
118
127
|
}, null, 8, ["templateKey", "canPageEvent", "initFormMode", "modelValue"])
|
|
119
128
|
], 64);
|
|
120
129
|
};
|
|
@@ -119,7 +119,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
119
119
|
const configLoading = vue.ref(true);
|
|
120
120
|
const localConfig = vue.ref({});
|
|
121
121
|
const fieldsData = vue.ref({});
|
|
122
|
-
const hiddenFormData = vue.
|
|
122
|
+
const hiddenFormData = vue.computed(() => props.initHiddenData);
|
|
123
123
|
const dataSourceOptions = vue.ref({});
|
|
124
124
|
const dictionaryOptions = vue.ref({});
|
|
125
125
|
const displayData = vue.computed(() => {
|
|
@@ -647,5 +647,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
647
647
|
};
|
|
648
648
|
}
|
|
649
649
|
});
|
|
650
|
-
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
650
|
+
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-be17662c"]]);
|
|
651
651
|
exports.default = _Table;
|