@fecp/designer 5.5.120 → 5.6.1
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/package.json.mjs +1 -1
- package/es/designer/src/assets/logo.png.mjs +1 -1
- package/es/designer/src/components/EventConfigButton.vue.mjs +2 -2
- package/es/designer/src/packages/dataSource/index.vue.mjs +3 -3
- package/es/designer/src/packages/dialog/index.vue2.mjs +15 -15
- package/es/designer/src/packages/dialogGlobal/index.vue2.mjs +15 -16
- package/es/designer/src/packages/event/pageEvent.vue.mjs +1 -1
- package/es/designer/src/packages/form/index.vue.mjs +2 -2
- package/es/designer/src/packages/form/property/contract.vue.mjs +15 -1
- package/es/designer/src/packages/form/property/pageFooterBtn.vue.mjs +2 -2
- package/es/designer/src/packages/form/property/pageHeaderBtn.vue.mjs +2 -2
- package/es/designer/src/packages/form/property/widgets.vue.mjs +4 -4
- package/es/designer/src/packages/table/property/customBtn.vue.mjs +2 -2
- package/es/designer/src/packages/table/property/optBtn.vue.mjs +2 -2
- package/es/designer/src/packages/table/property/widgets.vue.mjs +2 -2
- package/es/designer.css +611 -520
- package/es/logo.ico +0 -0
- package/es/packages/mobile/index.mjs +2 -0
- package/es/packages/mobile/src/api/index.mjs +1 -1
- package/es/packages/mobile/src/assets/images/baseRate.png.mjs +1 -1
- package/es/packages/mobile/src/assets/images/home-bg.png.mjs +1 -1
- package/es/packages/mobile/src/assets/images/rentCalc.png.mjs +1 -1
- package/es/packages/mobile/src/assets/images/user.png.mjs +4 -0
- package/es/packages/mobile/src/components/all.mjs +2 -0
- package/es/packages/mobile/src/components/custom/appDetail/AppDetail.vue.mjs +63 -44
- package/es/packages/mobile/src/components/custom/appTimeLine/AppTimeLine.vue.mjs +9 -5
- package/es/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.mjs +134 -71
- package/es/packages/mobile/src/components/custom/approvalList/ApprovalCard.vue.mjs +3 -3
- package/es/packages/mobile/src/components/custom/approvalList/ApprovalList.vue.mjs +36 -26
- package/es/packages/mobile/src/components/custom/customCode/CustomCode.vue.mjs +60 -0
- package/es/packages/mobile/src/components/custom/customCode/index.mjs +10 -0
- package/es/packages/mobile/src/components/custom/document/Document.vue.mjs +3 -3
- package/es/packages/mobile/src/components/custom/userSelect/UserSelect.vue.mjs +3 -3
- package/es/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.mjs +189 -8
- package/es/packages/mobile/src/components/dataDisplay/dataStat/DataStat.vue.mjs +109 -47
- package/es/packages/mobile/src/components/dataDisplay/mine/Mine.vue.mjs +33 -9
- package/es/packages/mobile/src/components/dataDisplay/rentCalcResult/RentCalcResult.vue.mjs +39 -79
- package/es/packages/mobile/src/components/feedback/quickFilter/QuickFilter.vue.mjs +10 -2
- package/es/packages/mobile/src/components/form/field/Field.vue.mjs +167 -32
- package/es/packages/mobile/src/components/form/fieldArea/FieldArea.vue.mjs +3 -2
- package/es/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.mjs +13 -15
- package/es/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.mjs +10 -10
- package/es/packages/mobile/src/components/form/fieldCheckbox/FieldCheckbox.vue.mjs +7 -23
- package/es/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.mjs +14 -26
- package/es/packages/mobile/src/components/form/fieldDateTimePicker/FieldDateTimePicker.vue.mjs +14 -15
- package/es/packages/mobile/src/components/form/fieldIndustry/FieldIndustry.vue.mjs +6 -19
- package/es/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.mjs +9 -25
- package/es/packages/mobile/src/components/form/fieldRadio/FieldRadio.vue.mjs +8 -24
- package/es/packages/mobile/src/components/form/search/Search.vue.mjs +16 -7
- package/es/packages/mobile/src/components/form/uploader/Uploader.vue.mjs +2 -2
- package/es/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.mjs +13 -5
- package/es/packages/mobile/src/components/navigation/tabs/Tabs.vue.mjs +61 -26
- package/es/packages/mobile/src/index.vue.mjs +21 -4
- package/es/packages/mobile/src/page.vue.mjs +342 -138
- package/es/packages/mobile/src/utils/common.mjs +21 -0
- package/es/packages/mobile/src/utils/datasource.mjs +4 -4
- package/es/packages/mobile/src/utils/eventFlow/actionHandlers.mjs +35 -22
- package/es/packages/mobile/src/utils/formatterUtil.mjs +4 -24
- package/es/packages/mobile/src/utils/formulajs/calculate.mjs +11 -5
- package/es/packages/mobile/src/utils/optionUtil.mjs +4 -29
- package/es/packages/mobile/src/utils/pageHistory.mjs +16 -0
- package/es/packages/mobile/src/utils/validation.mjs +129 -0
- package/es/packages/vue/src/components/bus/contract/Contract.vue.mjs +12 -1
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +5 -2
- package/es/packages/vue/src/components/forms/number/Number.vue.mjs +3 -2
- package/es/packages/vue/src/components/forms/roleSelect/RoleSelect.vue.mjs +2 -2
- package/es/packages/vue/src/components/forms/subTable/SubTable.vue.mjs +20 -26
- package/es/packages/vue/src/components/forms/userSelect/UserSelect.vue.mjs +2 -2
- package/es/packages/vue/src/components/table/Table.vue.mjs +5 -2
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +10 -8
- package/es/packages/vue/src/directive/auth.mjs +2 -1
- package/es/packages/vue/src/utils/parseRouteParams.mjs +2 -2
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/assets/logo.png.js +1 -1
- package/lib/designer/src/components/EventConfigButton.vue.js +2 -2
- package/lib/designer/src/packages/dataSource/index.vue.js +3 -3
- package/lib/designer/src/packages/dialog/index.vue2.js +15 -15
- package/lib/designer/src/packages/dialogGlobal/index.vue2.js +15 -16
- package/lib/designer/src/packages/event/pageEvent.vue.js +1 -1
- package/lib/designer/src/packages/form/index.vue.js +2 -2
- package/lib/designer/src/packages/form/property/contract.vue.js +15 -1
- package/lib/designer.css +611 -520
- package/lib/logo.ico +0 -0
- package/lib/packages/mobile/index.js +4 -2
- package/lib/packages/mobile/src/api/index.js +1 -1
- package/lib/packages/mobile/src/assets/images/baseRate.png.js +1 -1
- package/lib/packages/mobile/src/assets/images/home-bg.png.js +1 -1
- package/lib/packages/mobile/src/assets/images/rentCalc.png.js +1 -1
- package/lib/packages/mobile/src/assets/images/user.png.js +4 -0
- package/lib/packages/mobile/src/components/all.js +2 -0
- package/lib/packages/mobile/src/components/custom/appDetail/AppDetail.vue.js +62 -43
- package/lib/packages/mobile/src/components/custom/appTimeLine/AppTimeLine.vue.js +9 -5
- package/lib/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.js +137 -74
- package/lib/packages/mobile/src/components/custom/approvalList/ApprovalCard.vue.js +3 -3
- package/lib/packages/mobile/src/components/custom/approvalList/ApprovalList.vue.js +36 -26
- package/lib/packages/mobile/src/components/custom/customCode/CustomCode.vue.js +60 -0
- package/lib/packages/mobile/src/components/custom/customCode/index.js +10 -0
- package/lib/packages/mobile/src/components/custom/document/Document.vue.js +3 -3
- package/lib/packages/mobile/src/components/custom/userSelect/UserSelect.vue.js +3 -3
- package/lib/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.js +189 -8
- package/lib/packages/mobile/src/components/dataDisplay/dataStat/DataStat.vue.js +109 -47
- package/lib/packages/mobile/src/components/dataDisplay/mine/Mine.vue.js +38 -14
- package/lib/packages/mobile/src/components/dataDisplay/rentCalcResult/RentCalcResult.vue.js +39 -79
- package/lib/packages/mobile/src/components/feedback/quickFilter/QuickFilter.vue.js +10 -2
- package/lib/packages/mobile/src/components/form/field/Field.vue.js +165 -30
- package/lib/packages/mobile/src/components/form/fieldArea/FieldArea.vue.js +3 -2
- package/lib/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.js +13 -15
- package/lib/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.js +9 -9
- package/lib/packages/mobile/src/components/form/fieldCheckbox/FieldCheckbox.vue.js +6 -22
- package/lib/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.js +13 -25
- package/lib/packages/mobile/src/components/form/fieldDateTimePicker/FieldDateTimePicker.vue.js +13 -14
- package/lib/packages/mobile/src/components/form/fieldIndustry/FieldIndustry.vue.js +6 -19
- package/lib/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.js +8 -24
- package/lib/packages/mobile/src/components/form/fieldRadio/FieldRadio.vue.js +7 -23
- package/lib/packages/mobile/src/components/form/search/Search.vue.js +16 -7
- package/lib/packages/mobile/src/components/form/uploader/Uploader.vue.js +2 -2
- package/lib/packages/mobile/src/components/navigation/tabbar/Tabbar.vue.js +13 -5
- package/lib/packages/mobile/src/components/navigation/tabs/Tabs.vue.js +64 -29
- package/lib/packages/mobile/src/index.vue.js +20 -3
- package/lib/packages/mobile/src/page.vue.js +341 -137
- package/lib/packages/mobile/src/utils/common.js +21 -0
- package/lib/packages/mobile/src/utils/datasource.js +4 -4
- package/lib/packages/mobile/src/utils/eventFlow/actionHandlers.js +35 -22
- package/lib/packages/mobile/src/utils/formatterUtil.js +3 -23
- package/lib/packages/mobile/src/utils/formulajs/calculate.js +11 -5
- package/lib/packages/mobile/src/utils/optionUtil.js +3 -28
- package/lib/packages/mobile/src/utils/pageHistory.js +16 -0
- package/lib/packages/mobile/src/utils/validation.js +129 -0
- package/lib/packages/vue/src/components/bus/contract/Contract.vue.js +12 -1
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +5 -2
- package/lib/packages/vue/src/components/forms/number/Number.vue.js +3 -2
- package/lib/packages/vue/src/components/forms/roleSelect/RoleSelect.vue.js +2 -2
- package/lib/packages/vue/src/components/forms/subTable/SubTable.vue.js +20 -26
- package/lib/packages/vue/src/components/forms/userSelect/UserSelect.vue.js +2 -2
- package/lib/packages/vue/src/components/table/Table.vue.js +5 -2
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +10 -8
- package/lib/packages/vue/src/directive/auth.js +2 -1
- package/lib/packages/vue/src/utils/parseRouteParams.js +2 -2
- package/package.json +1 -1
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
/* empty css */
|
|
4
6
|
/* empty css */
|
|
5
7
|
/* empty css */
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
8
|
+
/* empty css */
|
|
9
|
+
import { inject, getCurrentInstance, computed, ref, watch, createElementBlock, openBlock, Fragment, createVNode, withDirectives, renderSlot, mergeProps, unref, isRef, createSlots, withCtx, withModifiers, createTextVNode, toDisplayString, renderList, createElementVNode, vModelText, nextTick } from "vue";
|
|
10
|
+
import { getUnit, textFormatter, reverseTextFormatter } from "../../../utils/formatterUtil.mjs";
|
|
11
|
+
import XEUtils from "xe-utils";
|
|
9
12
|
/* empty css */
|
|
10
13
|
import { Field } from "../../../../../../node_modules/vant/es/field/index.mjs";
|
|
14
|
+
import { Icon } from "../../../../../../node_modules/vant/es/icon/index.mjs";
|
|
15
|
+
import { TextEllipsis } from "../../../../../../node_modules/vant/es/text-ellipsis/index.mjs";
|
|
16
|
+
import { Popup } from "../../../../../../node_modules/vant/es/popup/index.mjs";
|
|
17
|
+
const _hoisted_1 = { key: 1 };
|
|
18
|
+
const _hoisted_2 = { key: 0 };
|
|
19
|
+
const _hoisted_3 = { key: 1 };
|
|
20
|
+
const _hoisted_4 = { style: { padding: "16px" } };
|
|
11
21
|
const _sfc_main = {
|
|
12
22
|
__name: "Field",
|
|
13
23
|
props: {
|
|
@@ -34,19 +44,28 @@ const _sfc_main = {
|
|
|
34
44
|
type: String,
|
|
35
45
|
default: ""
|
|
36
46
|
},
|
|
37
|
-
showUnit: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: true
|
|
40
|
-
},
|
|
41
47
|
maxlength: {
|
|
42
48
|
type: Number,
|
|
43
49
|
default: 0
|
|
44
50
|
},
|
|
45
|
-
|
|
51
|
+
suffix: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: ""
|
|
54
|
+
},
|
|
55
|
+
formData: Object,
|
|
56
|
+
rules: {
|
|
57
|
+
type: Array,
|
|
58
|
+
default: []
|
|
59
|
+
},
|
|
60
|
+
compId: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: ""
|
|
63
|
+
}
|
|
46
64
|
},
|
|
47
65
|
emits: ["openPicker", "update:modelValue"],
|
|
48
66
|
setup(__props, { emit: __emit }) {
|
|
49
67
|
const props = __props;
|
|
68
|
+
const refreshGridLayoutItemHeight = inject("refreshGridLayoutItemHeight");
|
|
50
69
|
const instance = getCurrentInstance();
|
|
51
70
|
const ctx = instance.proxy;
|
|
52
71
|
const realMaxLength = computed(() => {
|
|
@@ -54,11 +73,14 @@ const _sfc_main = {
|
|
|
54
73
|
});
|
|
55
74
|
const unit = ref("");
|
|
56
75
|
const fieldInputRef = ref();
|
|
57
|
-
const [recordCursor, setCursor] = useCursor();
|
|
58
76
|
const emit = __emit;
|
|
77
|
+
const showTooltipPopup = ref(false);
|
|
59
78
|
const textValue = ref("");
|
|
60
79
|
const compValue = computed({
|
|
61
|
-
get: () =>
|
|
80
|
+
get: () => {
|
|
81
|
+
console.log("🚀 ~ props.modelValue:", props.modelValue);
|
|
82
|
+
return props.modelValue;
|
|
83
|
+
},
|
|
62
84
|
set: (val) => {
|
|
63
85
|
emit("update:modelValue", val);
|
|
64
86
|
}
|
|
@@ -68,13 +90,37 @@ const _sfc_main = {
|
|
|
68
90
|
(newVal) => {
|
|
69
91
|
unit.value = getUnit(props.dataFormatter);
|
|
70
92
|
if (!props.fieldType || props.fieldType === "text") {
|
|
71
|
-
textValue.value = textFormatter(newVal, props.dataFormatter);
|
|
93
|
+
textValue.value = props.disabled ? textFormatter(newVal, props.dataFormatter) : realToText(newVal, props.dataFormatter);
|
|
94
|
+
console.log("🚀 ~ textValue.value:", textValue.value);
|
|
72
95
|
} else {
|
|
73
96
|
textValue.value = newVal;
|
|
74
97
|
}
|
|
75
98
|
},
|
|
76
99
|
{ immediate: true, flush: "post" }
|
|
77
100
|
);
|
|
101
|
+
function realToText(value, dataFormatter) {
|
|
102
|
+
switch (dataFormatter) {
|
|
103
|
+
case "money(yuan)":
|
|
104
|
+
value = XEUtils.toNumber(value);
|
|
105
|
+
break;
|
|
106
|
+
case "money(wanyuan)":
|
|
107
|
+
value = XEUtils.divide(XEUtils.toNumber(value), 1e4);
|
|
108
|
+
break;
|
|
109
|
+
case "money(yi)":
|
|
110
|
+
value = XEUtils.divide(XEUtils.toNumber(value), 1e8);
|
|
111
|
+
break;
|
|
112
|
+
case "percent":
|
|
113
|
+
value = XEUtils.multiply(XEUtils.toNumber(value), 100);
|
|
114
|
+
break;
|
|
115
|
+
case "thousand":
|
|
116
|
+
value = XEUtils.multiply(XEUtils.toNumber(value), 1e3);
|
|
117
|
+
break;
|
|
118
|
+
case "tenThousand":
|
|
119
|
+
value = XEUtils.multiply(XEUtils.toNumber(value), 1e4);
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
return value;
|
|
123
|
+
}
|
|
78
124
|
const compClickable = computed(() => {
|
|
79
125
|
if (props.disabled || props.readonly) {
|
|
80
126
|
return false;
|
|
@@ -85,18 +131,44 @@ const _sfc_main = {
|
|
|
85
131
|
const handleInput = (e) => {
|
|
86
132
|
if (isComposing) return;
|
|
87
133
|
const inputElement = e.target;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
134
|
+
switch (props.dataFormatter) {
|
|
135
|
+
case "money(yuan)":
|
|
136
|
+
case "money(wanyuan)":
|
|
137
|
+
case "money(yi)":
|
|
138
|
+
inputElement.value = filterNumberDecimal(inputElement.value, 2);
|
|
139
|
+
break;
|
|
140
|
+
case "percent":
|
|
141
|
+
case "thousand":
|
|
142
|
+
case "tenThousand":
|
|
143
|
+
inputElement.value = filterNumberDecimal(inputElement.value, 6);
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
console.log("🚀 ~ handleInput ~ inputElement.value:", inputElement.value);
|
|
147
|
+
textValue.value = inputElement.value;
|
|
94
148
|
const unformattedValue = reverseTextFormatter(
|
|
95
149
|
inputElement.value,
|
|
96
150
|
props.dataFormatter
|
|
97
151
|
);
|
|
98
152
|
compValue.value = unformattedValue;
|
|
99
153
|
};
|
|
154
|
+
function filterNumberDecimal(value, decimalCount) {
|
|
155
|
+
if (!value) {
|
|
156
|
+
return value;
|
|
157
|
+
}
|
|
158
|
+
let str = String(value).replace(/[^\d.]/g, "");
|
|
159
|
+
const dotIndex = str.indexOf(".");
|
|
160
|
+
if (dotIndex > -1) {
|
|
161
|
+
const left = str.slice(0, dotIndex + 1);
|
|
162
|
+
const right = str.slice(dotIndex + 1).replace(/\./g, "");
|
|
163
|
+
str = left + right;
|
|
164
|
+
}
|
|
165
|
+
const arr = str.split(".");
|
|
166
|
+
arr[0] = arr[0].replace(/\D/g, "");
|
|
167
|
+
if (arr.length > 1 && decimalCount !== void 0) {
|
|
168
|
+
arr[1] = arr[1].slice(0, decimalCount);
|
|
169
|
+
}
|
|
170
|
+
return arr.join(".");
|
|
171
|
+
}
|
|
100
172
|
const handleCompositionStart = () => {
|
|
101
173
|
isComposing = true;
|
|
102
174
|
};
|
|
@@ -106,39 +178,78 @@ const _sfc_main = {
|
|
|
106
178
|
};
|
|
107
179
|
const doSomethingFunction = (e) => {
|
|
108
180
|
const inputElement = e.target;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
181
|
+
switch (props.dataFormatter) {
|
|
182
|
+
case "money(yuan)":
|
|
183
|
+
case "money(wanyuan)":
|
|
184
|
+
case "money(yi)":
|
|
185
|
+
inputElement.value = filterNumberDecimal(inputElement.value, 2);
|
|
186
|
+
break;
|
|
187
|
+
case "percent":
|
|
188
|
+
case "thousand":
|
|
189
|
+
case "tenThousand":
|
|
190
|
+
inputElement.value = filterNumberDecimal(inputElement.value, 6);
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
textValue.value = inputElement.value;
|
|
115
194
|
const unformattedValue = reverseTextFormatter(
|
|
116
195
|
inputElement.value,
|
|
117
196
|
props.dataFormatter
|
|
118
197
|
);
|
|
119
198
|
compValue.value = unformattedValue;
|
|
120
199
|
};
|
|
200
|
+
function clickEllipsis() {
|
|
201
|
+
nextTick(() => {
|
|
202
|
+
const dom = document.getElementById(props.compId);
|
|
203
|
+
const labelDom = dom == null ? void 0 : dom.querySelector(".fec-field-ellipsis");
|
|
204
|
+
if (labelDom) {
|
|
205
|
+
let height = labelDom.offsetHeight + 20;
|
|
206
|
+
refreshGridLayoutItemHeight(props.compId, height);
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
}
|
|
121
210
|
return (_ctx, _cache) => {
|
|
211
|
+
const _component_van_icon = Icon;
|
|
212
|
+
const _component_van_text_ellipsis = TextEllipsis;
|
|
122
213
|
const _component_van_field = Field;
|
|
214
|
+
const _component_van_popup = Popup;
|
|
123
215
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
124
216
|
createVNode(_component_van_field, mergeProps(_ctx.$attrs, {
|
|
125
217
|
type: _ctx.$attrs.type == "number" ? "text" : _ctx.$attrs.type,
|
|
218
|
+
placeholder: _ctx.$attrs.realPlaceholder,
|
|
126
219
|
modelValue: unref(textValue),
|
|
127
|
-
"onUpdate:modelValue": _cache[
|
|
220
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(textValue) ? textValue.value = $event : null),
|
|
128
221
|
maxlength: unref(realMaxLength),
|
|
129
222
|
disabled: __props.disabled,
|
|
130
223
|
readonly: __props.readonly,
|
|
131
224
|
clearable: "",
|
|
132
225
|
clickable: unref(compClickable),
|
|
133
226
|
"clear-trigger": "focus",
|
|
134
|
-
onClick: _cache[
|
|
227
|
+
onClick: _cache[2] || (_cache[2] = ($event) => !__props.disabled && emit("openPicker")),
|
|
135
228
|
ref_key: "fieldInputRef",
|
|
136
229
|
ref: fieldInputRef,
|
|
137
230
|
onInput: handleInput,
|
|
138
231
|
onCompositionstart: handleCompositionStart,
|
|
139
232
|
onCompositionend: handleCompositionEnd,
|
|
140
|
-
"input-align": "right"
|
|
141
|
-
|
|
233
|
+
"input-align": "right",
|
|
234
|
+
rules: __props.rules
|
|
235
|
+
}), createSlots({
|
|
236
|
+
label: withCtx(() => {
|
|
237
|
+
var _a;
|
|
238
|
+
return [
|
|
239
|
+
((_a = _ctx.$attrs.tooltip) == null ? void 0 : _a.trim()) ? (openBlock(), createElementBlock("span", {
|
|
240
|
+
key: 0,
|
|
241
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => showTooltipPopup.value = true, ["stop"]))
|
|
242
|
+
}, [
|
|
243
|
+
createTextVNode(toDisplayString(_ctx.$attrs.label) + " ", 1),
|
|
244
|
+
createVNode(_component_van_icon, {
|
|
245
|
+
name: "question-o",
|
|
246
|
+
class: "tooltip-icon"
|
|
247
|
+
})
|
|
248
|
+
])) : (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(_ctx.$attrs.label), 1))
|
|
249
|
+
];
|
|
250
|
+
}),
|
|
251
|
+
_: 2
|
|
252
|
+
}, [
|
|
142
253
|
renderList(_ctx.$slots, (item, key) => {
|
|
143
254
|
return {
|
|
144
255
|
name: key,
|
|
@@ -150,21 +261,45 @@ const _sfc_main = {
|
|
|
150
261
|
__props.disabled ? {
|
|
151
262
|
name: "input",
|
|
152
263
|
fn: withCtx(() => [
|
|
153
|
-
|
|
264
|
+
_ctx.$attrs.type == "textarea" ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
265
|
+
createVNode(_component_van_text_ellipsis, {
|
|
266
|
+
class: "fec-field-ellipsis",
|
|
267
|
+
rows: "4",
|
|
268
|
+
content: unref(textValue),
|
|
269
|
+
"expand-text": "展开",
|
|
270
|
+
"collapse-text": "收起",
|
|
271
|
+
onClickAction: clickEllipsis
|
|
272
|
+
}, null, 8, ["content"])
|
|
273
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_3, toDisplayString(unref(textValue)), 1))
|
|
154
274
|
]),
|
|
155
275
|
key: "0"
|
|
156
276
|
} : void 0,
|
|
157
|
-
__props.
|
|
277
|
+
__props.suffix || unref(unit) ? {
|
|
158
278
|
name: "button",
|
|
159
279
|
fn: withCtx(() => [
|
|
160
|
-
createTextVNode(toDisplayString(unref(unit)), 1)
|
|
280
|
+
createTextVNode(toDisplayString(__props.suffix || unref(unit)), 1)
|
|
161
281
|
]),
|
|
162
282
|
key: "1"
|
|
163
283
|
} : void 0
|
|
164
|
-
]), 1040, ["type", "modelValue", "maxlength", "disabled", "readonly", "clickable"]),
|
|
284
|
+
]), 1040, ["type", "placeholder", "modelValue", "maxlength", "disabled", "readonly", "clickable", "rules"]),
|
|
285
|
+
createVNode(_component_van_popup, {
|
|
286
|
+
show: unref(showTooltipPopup),
|
|
287
|
+
"onUpdate:show": _cache[3] || (_cache[3] = ($event) => isRef(showTooltipPopup) ? showTooltipPopup.value = $event : null),
|
|
288
|
+
position: "bottom",
|
|
289
|
+
round: "",
|
|
290
|
+
style: { minHeight: "100px" }
|
|
291
|
+
}, {
|
|
292
|
+
default: withCtx(() => {
|
|
293
|
+
var _a;
|
|
294
|
+
return [
|
|
295
|
+
createElementVNode("div", _hoisted_4, toDisplayString((_a = _ctx.$attrs.tooltip) == null ? void 0 : _a.trim()), 1)
|
|
296
|
+
];
|
|
297
|
+
}),
|
|
298
|
+
_: 1
|
|
299
|
+
}, 8, ["show"]),
|
|
165
300
|
withDirectives(createElementVNode("input", {
|
|
166
301
|
type: "hidden",
|
|
167
|
-
"onUpdate:modelValue": _cache[
|
|
302
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(compValue) ? compValue.value = $event : null)
|
|
168
303
|
}, null, 512), [
|
|
169
304
|
[vModelText, unref(compValue)]
|
|
170
305
|
]),
|
|
@@ -81,12 +81,13 @@ const _sfc_main = {
|
|
|
81
81
|
const showPicker = ref(false);
|
|
82
82
|
const emit = __emit;
|
|
83
83
|
const pickerValue = computed(() => {
|
|
84
|
-
|
|
84
|
+
var _a;
|
|
85
|
+
const value = ((_a = props.modelValue) == null ? void 0 : _a.split("/")) || [];
|
|
85
86
|
return value[value.length - 1];
|
|
86
87
|
});
|
|
87
88
|
function getDisplayValue(options, fieldNames, modelValue) {
|
|
88
89
|
const { text, value, children } = fieldNames;
|
|
89
|
-
const values = modelValue.split("/");
|
|
90
|
+
const values = (modelValue == null ? void 0 : modelValue.split("/")) || [];
|
|
90
91
|
const displayValues = [];
|
|
91
92
|
function findValueInOptions(currentOptions, targetValue) {
|
|
92
93
|
for (const option of currentOptions) {
|
package/es/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.mjs
CHANGED
|
@@ -60,6 +60,7 @@ const _sfc_main = {
|
|
|
60
60
|
const emit = __emit;
|
|
61
61
|
const defaultDate = computed({
|
|
62
62
|
get: () => {
|
|
63
|
+
var _a, _b;
|
|
63
64
|
if (!props.modelValue) {
|
|
64
65
|
return null;
|
|
65
66
|
}
|
|
@@ -71,23 +72,22 @@ const _sfc_main = {
|
|
|
71
72
|
}
|
|
72
73
|
} else if (props.calendarType == "multiple") {
|
|
73
74
|
try {
|
|
74
|
-
return props.modelValue.map(
|
|
75
|
-
(value) => hooks(value, props.valueFormat).toDate()
|
|
76
|
-
);
|
|
75
|
+
return (_a = props.modelValue) == null ? void 0 : _a.split(",").map((value) => hooks(value, props.valueFormat).toDate());
|
|
77
76
|
} catch (error) {
|
|
78
77
|
return [/* @__PURE__ */ new Date()];
|
|
79
78
|
}
|
|
80
79
|
} else if (props.calendarType == "range") {
|
|
81
80
|
try {
|
|
82
|
-
return props.modelValue.map(
|
|
83
|
-
(value) => hooks(value, props.valueFormat).toDate()
|
|
84
|
-
);
|
|
81
|
+
return (_b = props.modelValue) == null ? void 0 : _b.split(",").map((value) => hooks(value, props.valueFormat).toDate());
|
|
85
82
|
} catch (error) {
|
|
86
83
|
return [];
|
|
87
84
|
}
|
|
88
85
|
}
|
|
89
86
|
},
|
|
90
87
|
set: (val) => {
|
|
88
|
+
if (Array.isArray(val)) {
|
|
89
|
+
val = val.join(",");
|
|
90
|
+
}
|
|
91
91
|
emit("update:modelValue", val);
|
|
92
92
|
}
|
|
93
93
|
});
|
|
@@ -103,16 +103,14 @@ const _sfc_main = {
|
|
|
103
103
|
props.textFormat
|
|
104
104
|
);
|
|
105
105
|
} else if (props.calendarType == "multiple") {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
106
|
+
value = (value == null ? void 0 : value.split(",")) || [];
|
|
107
|
+
fieldTextValue.value = `选择了 ${value.length} 个日期`;
|
|
109
108
|
} else if (props.calendarType == "range") {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
109
|
+
value = (value == null ? void 0 : value.split(",")) || [];
|
|
110
|
+
const [start, end] = value;
|
|
111
|
+
fieldTextValue.value = `${hooks(start, props.valueFormat).format(
|
|
112
|
+
props.textFormat
|
|
113
|
+
)} 至 ${hooks(end, props.valueFormat).format(props.textFormat)}`;
|
|
116
114
|
}
|
|
117
115
|
},
|
|
118
116
|
{ immediate: true }
|
package/es/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.mjs
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
11
|
/* empty css */
|
|
12
|
-
import { useAttrs,
|
|
12
|
+
import { useAttrs, computed, ref, watch, createBlock, openBlock, unref, mergeProps, isRef, createSlots, withCtx, createVNode, withModifiers } from "vue";
|
|
13
13
|
import { MobileField } from "../field/index.mjs";
|
|
14
|
-
import
|
|
14
|
+
import "../../../utils/optionUtil.mjs";
|
|
15
15
|
import { Cascader } from "../../../../../../node_modules/vant/es/cascader/index.mjs";
|
|
16
16
|
import { Popup } from "../../../../../../node_modules/vant/es/popup/index.mjs";
|
|
17
17
|
import { Icon } from "../../../../../../node_modules/vant/es/icon/index.mjs";
|
|
@@ -47,14 +47,14 @@ const _sfc_main = {
|
|
|
47
47
|
emits: ["update:modelValue"],
|
|
48
48
|
setup(__props, { emit: __emit }) {
|
|
49
49
|
const props = __props;
|
|
50
|
-
|
|
51
|
-
const finalOptions =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
useAttrs();
|
|
51
|
+
const finalOptions = computed(() => {
|
|
52
|
+
if (!props.optionConfig) return [];
|
|
53
|
+
const optionList = props.optionConfig.options || [];
|
|
54
|
+
if (optionList.length > 0) {
|
|
55
|
+
return clearEmptyChildren(optionList);
|
|
56
|
+
}
|
|
57
|
+
return optionList;
|
|
58
58
|
});
|
|
59
59
|
function clearEmptyChildren(data) {
|
|
60
60
|
if (typeof data === "object" && data !== null) {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { getCurrentInstance, useAttrs,
|
|
1
|
+
import { getCurrentInstance, useAttrs, computed, createBlock, openBlock, unref, mergeProps, isRef, withCtx, createElementBlock, toDisplayString } from "vue";
|
|
2
2
|
import { MobileField } from "../field/index.mjs";
|
|
3
|
-
import
|
|
3
|
+
import "../../../utils/optionUtil.mjs";
|
|
4
4
|
import { MobileCheckboxGroup } from "../checkboxGroup/index.mjs";
|
|
5
|
-
import { cloneDeep } from "../../../utils/common.mjs";
|
|
6
5
|
const _hoisted_1 = { key: 1 };
|
|
7
6
|
const _sfc_main = {
|
|
8
7
|
__name: "FieldCheckbox",
|
|
@@ -36,28 +35,13 @@ const _sfc_main = {
|
|
|
36
35
|
emits: ["update:modelValue"],
|
|
37
36
|
setup(__props, { emit: __emit }) {
|
|
38
37
|
const currentInstance = getCurrentInstance();
|
|
39
|
-
|
|
38
|
+
currentInstance.proxy;
|
|
40
39
|
const props = __props;
|
|
41
40
|
useAttrs();
|
|
42
|
-
const finalOptions =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
getOptions({
|
|
47
|
-
ctx,
|
|
48
|
-
dataSources: props.dataSources,
|
|
49
|
-
formData: props.formData,
|
|
50
|
-
fields: props.fields,
|
|
51
|
-
...props.optionConfig
|
|
52
|
-
}).then((data) => {
|
|
53
|
-
finalOptions.value = data;
|
|
54
|
-
});
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
deep: true,
|
|
58
|
-
immediate: true
|
|
59
|
-
}
|
|
60
|
-
);
|
|
41
|
+
const finalOptions = computed(() => {
|
|
42
|
+
if (!props.optionConfig) return [];
|
|
43
|
+
return props.optionConfig.options || [];
|
|
44
|
+
});
|
|
61
45
|
const emit = __emit;
|
|
62
46
|
const compValue = computed({
|
|
63
47
|
get: () => {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
/* empty css */
|
|
12
12
|
/* empty css */
|
|
13
13
|
/* empty css */
|
|
14
|
-
import { ref, computed,
|
|
14
|
+
import { ref, computed, createBlock, openBlock, unref, mergeProps, isRef, createSlots, withCtx, createVNode, withModifiers } from "vue";
|
|
15
15
|
import { MobileField } from "../field/index.mjs";
|
|
16
16
|
import hooks from "../../../../../../node_modules/moment/dist/moment.mjs";
|
|
17
17
|
import { parseDateFormatter } from "../../../utils/dateUtil.mjs";
|
|
@@ -25,14 +25,6 @@ const _sfc_main = {
|
|
|
25
25
|
type: String,
|
|
26
26
|
default: ""
|
|
27
27
|
},
|
|
28
|
-
// textFormat: {
|
|
29
|
-
// type: String,
|
|
30
|
-
// default: "YYYY-MM-DD",
|
|
31
|
-
// },
|
|
32
|
-
// valueFormat: {
|
|
33
|
-
// type: String,
|
|
34
|
-
// default: "YYYYMMDD",
|
|
35
|
-
// },
|
|
36
28
|
dateColumnsType: {
|
|
37
29
|
type: String,
|
|
38
30
|
default: "year,month,day"
|
|
@@ -55,19 +47,14 @@ const _sfc_main = {
|
|
|
55
47
|
emits: ["update:modelValue"],
|
|
56
48
|
setup(__props, { emit: __emit }) {
|
|
57
49
|
const props = __props;
|
|
58
|
-
const fieldTextValue = ref("");
|
|
59
50
|
const showPicker = ref(false);
|
|
60
51
|
const emit = __emit;
|
|
61
|
-
let textFormat = parseDateFormatter(
|
|
62
|
-
props.dateTextFormat,
|
|
63
|
-
props.dateColumnsType
|
|
64
|
-
);
|
|
65
|
-
let valueFormat = parseDateFormatter("0", props.dateColumnsType);
|
|
66
52
|
const pickerValue = computed(() => {
|
|
67
53
|
let date;
|
|
68
54
|
if (!props.modelValue) {
|
|
69
55
|
date = hooks();
|
|
70
56
|
} else {
|
|
57
|
+
let valueFormat = parseDateFormatter("0", props.dateColumnsType);
|
|
71
58
|
date = hooks(props.modelValue, valueFormat);
|
|
72
59
|
}
|
|
73
60
|
const year = date.year();
|
|
@@ -97,18 +84,19 @@ const _sfc_main = {
|
|
|
97
84
|
}
|
|
98
85
|
return option;
|
|
99
86
|
};
|
|
100
|
-
|
|
101
|
-
(
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
);
|
|
87
|
+
const fieldTextValue = computed(() => {
|
|
88
|
+
if (!props.modelValue) {
|
|
89
|
+
return "";
|
|
90
|
+
}
|
|
91
|
+
let textFormat = parseDateFormatter(
|
|
92
|
+
props.dateTextFormat,
|
|
93
|
+
props.dateColumnsType
|
|
94
|
+
);
|
|
95
|
+
let valueFormat = parseDateFormatter("0", props.dateColumnsType);
|
|
96
|
+
return hooks(props.modelValue, valueFormat).format(textFormat);
|
|
97
|
+
});
|
|
111
98
|
const onConfirm = ({ selectedValues, selectedOptions, selectedIndexes }) => {
|
|
99
|
+
let valueFormat = parseDateFormatter("0", props.dateColumnsType);
|
|
112
100
|
const val = hooks(
|
|
113
101
|
`${selectedValues[0]}${selectedValues[1]}${selectedValues[2]}`,
|
|
114
102
|
"YYYYMMDD"
|
package/es/packages/mobile/src/components/form/fieldDateTimePicker/FieldDateTimePicker.vue.mjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
/* empty css */
|
|
12
12
|
/* empty css */
|
|
13
13
|
/* empty css */
|
|
14
|
-
import { ref, computed,
|
|
14
|
+
import { ref, computed, createBlock, openBlock, unref, mergeProps, isRef, createSlots, withCtx, createVNode, withModifiers } from "vue";
|
|
15
15
|
import { MobileField } from "../field/index.mjs";
|
|
16
16
|
import hooks from "../../../../../../node_modules/moment/dist/moment.mjs";
|
|
17
17
|
import { parseDateFormatter } from "../../../utils/dateUtil.mjs";
|
|
@@ -50,12 +50,10 @@ const _sfc_main = {
|
|
|
50
50
|
emits: ["update:modelValue"],
|
|
51
51
|
setup(__props, { emit: __emit }) {
|
|
52
52
|
const props = __props;
|
|
53
|
-
const fieldTextValue = ref("");
|
|
54
53
|
const showPicker = ref(false);
|
|
55
54
|
const emit = __emit;
|
|
56
|
-
let textFormat = parseDateFormatter(props.dateTimeTextFormat, dateColumnsType);
|
|
57
|
-
let valueFormat = parseDateFormatter("0", dateColumnsType);
|
|
58
55
|
const currentDateTime = computed(() => {
|
|
56
|
+
let valueFormat = parseDateFormatter("0", dateColumnsType);
|
|
59
57
|
let date;
|
|
60
58
|
if (!props.modelValue) {
|
|
61
59
|
date = hooks();
|
|
@@ -92,18 +90,19 @@ const _sfc_main = {
|
|
|
92
90
|
}
|
|
93
91
|
return option;
|
|
94
92
|
};
|
|
95
|
-
|
|
96
|
-
(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
);
|
|
93
|
+
const fieldTextValue = computed(() => {
|
|
94
|
+
if (!props.modelValue) {
|
|
95
|
+
return "";
|
|
96
|
+
}
|
|
97
|
+
let textFormat = parseDateFormatter(
|
|
98
|
+
props.dateTimeTextFormat,
|
|
99
|
+
dateColumnsType
|
|
100
|
+
);
|
|
101
|
+
let valueFormat = parseDateFormatter("0", dateColumnsType);
|
|
102
|
+
return hooks(props.modelValue, valueFormat).format(textFormat);
|
|
103
|
+
});
|
|
106
104
|
const onConfirm = () => {
|
|
105
|
+
let valueFormat = parseDateFormatter("0", dateColumnsType);
|
|
107
106
|
const date = currentDateTime.value.dateValue;
|
|
108
107
|
const time = currentDateTime.value.timeValue;
|
|
109
108
|
const val = hooks(
|
|
@@ -81,16 +81,13 @@ const _sfc_main = {
|
|
|
81
81
|
const showPicker = ref(false);
|
|
82
82
|
const emit = __emit;
|
|
83
83
|
const pickerValue = computed(() => {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return val.substring(1);
|
|
88
|
-
}
|
|
89
|
-
return val;
|
|
84
|
+
var _a;
|
|
85
|
+
const value = ((_a = props.modelValue) == null ? void 0 : _a.split(",")) || [];
|
|
86
|
+
return value[value.length - 1];
|
|
90
87
|
});
|
|
91
88
|
function getDisplayValue(options, fieldNames, modelValue) {
|
|
92
89
|
const { text, value, children } = fieldNames;
|
|
93
|
-
const values = modelValue;
|
|
90
|
+
const values = modelValue || [];
|
|
94
91
|
const displayValues = [];
|
|
95
92
|
function findValueInOptions(currentOptions, targetValue) {
|
|
96
93
|
for (const option of currentOptions) {
|
|
@@ -126,18 +123,8 @@ const _sfc_main = {
|
|
|
126
123
|
);
|
|
127
124
|
});
|
|
128
125
|
const onFinish = ({ selectedOptions }) => {
|
|
129
|
-
const value = selectedOptions.map(
|
|
130
|
-
|
|
131
|
-
);
|
|
132
|
-
const realValue = [];
|
|
133
|
-
for (let i = 0; i < value.length; i++) {
|
|
134
|
-
if (i > 0) {
|
|
135
|
-
realValue.push(value[0] + value[i]);
|
|
136
|
-
} else {
|
|
137
|
-
realValue.push(value[i]);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
emit("update:modelValue", realValue);
|
|
126
|
+
const value = selectedOptions.map((option) => option[props.treeOptionsFieldNames.value]).join(",");
|
|
127
|
+
emit("update:modelValue", value);
|
|
141
128
|
showPicker.value = false;
|
|
142
129
|
};
|
|
143
130
|
return (_ctx, _cache) => {
|