@fecp/designer 5.5.120 → 5.5.121

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