@fecp/mobile 1.0.25 → 1.0.26

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/mobile.css CHANGED
@@ -28,6 +28,12 @@
28
28
  .van-checkbox-group--horizontal{display:flex;flex-wrap:wrap}
29
29
  :root,:host{--van-checkbox-size: 20px;--van-checkbox-border-color: var(--van-gray-5);--van-checkbox-duration: var(--van-duration-fast);--van-checkbox-label-margin: var(--van-padding-xs);--van-checkbox-label-color: var(--van-text-color);--van-checkbox-checked-icon-color: var(--van-primary-color);--van-checkbox-disabled-icon-color: var(--van-gray-5);--van-checkbox-disabled-label-color: var(--van-text-color-3);--van-checkbox-disabled-background: var(--van-border-color)}.van-checkbox{display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none}.van-checkbox--disabled{cursor:not-allowed}.van-checkbox--label-disabled{cursor:default}.van-checkbox--horizontal{margin-right:var(--van-padding-sm)}.van-checkbox__icon{flex:none;height:1em;font-size:var(--van-checkbox-size);line-height:1em;cursor:pointer}.van-checkbox__icon .van-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:1px solid var(--van-checkbox-border-color);transition-duration:var(--van-checkbox-duration);transition-property:color,border-color,background-color}.van-checkbox__icon--round .van-icon{border-radius:100%}.van-checkbox__icon--indeterminate .van-icon{display:flex;align-items:center;justify-content:center;color:var(--van-white);border-color:var(--van-checkbox-checked-icon-color);background-color:var(--van-checkbox-checked-icon-color)}.van-checkbox__icon--checked .van-icon{color:var(--van-white);background-color:var(--van-checkbox-checked-icon-color);border-color:var(--van-checkbox-checked-icon-color)}.van-checkbox__icon--disabled{cursor:not-allowed}.van-checkbox__icon--disabled .van-icon{background-color:var(--van-checkbox-disabled-background);border-color:var(--van-checkbox-disabled-icon-color)}.van-checkbox__icon--disabled.van-checkbox__icon--checked .van-icon{color:var(--van-checkbox-disabled-icon-color)}.van-checkbox__label{margin-left:var(--van-checkbox-label-margin);color:var(--van-checkbox-label-color);line-height:var(--van-checkbox-size)}.van-checkbox__label--left{margin:0 var(--van-checkbox-label-margin) 0 0}.van-checkbox__label--disabled{color:var(--van-checkbox-disabled-label-color)}
30
30
  :root,:host{--van-field-label-width: 6.2em;--van-field-label-color: var(--van-text-color);--van-field-label-margin-right: var(--van-padding-sm);--van-field-input-text-color: var(--van-text-color);--van-field-input-error-text-color: var(--van-danger-color);--van-field-input-disabled-text-color: var(--van-text-color-3);--van-field-placeholder-text-color: var(--van-text-color-3);--van-field-icon-size: 18px;--van-field-clear-icon-size: 18px;--van-field-clear-icon-color: var(--van-gray-5);--van-field-right-icon-color: var(--van-gray-6);--van-field-error-message-color: var(--van-danger-color);--van-field-error-message-font-size: 12px;--van-field-text-area-min-height: 60px;--van-field-word-limit-color: var(--van-gray-7);--van-field-word-limit-font-size: var(--van-font-size-sm);--van-field-word-limit-line-height: 16px;--van-field-disabled-text-color: var(--van-text-color-3);--van-field-required-mark-color: var(--van-red)}.van-field{flex-wrap:wrap}.van-field__label{flex:none;box-sizing:border-box;width:var(--van-field-label-width);margin-right:var(--van-field-label-margin-right);color:var(--van-field-label-color);text-align:left;word-wrap:break-word}.van-field__label--center{text-align:center}.van-field__label--right{text-align:right}.van-field__label--top{display:flex;width:100%;text-align:left;margin-bottom:var(--van-padding-base);overflow-wrap:break-word}.van-field__label--required:before{margin-right:2px;color:var(--van-field-required-mark-color);content:"*"}.van-field--disabled .van-field__label{color:var(--van-field-disabled-text-color)}.van-field__value{overflow:visible}.van-field__body{display:flex;align-items:center}.van-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:var(--van-field-input-text-color);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none;-webkit-user-select:auto;user-select:auto}.van-field__control::-webkit-input-placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control::placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control:read-only{cursor:default}.van-field__control:disabled{color:var(--van-field-input-disabled-text-color);cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--van-field-input-disabled-text-color)}.van-field__control--center{justify-content:center;text-align:center}.van-field__control--right{justify-content:flex-end;text-align:right}.van-field__control--custom{display:flex;align-items:center;min-height:var(--van-cell-line-height)}.van-field__control--error::-webkit-input-placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--error,.van-field__control--error::placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--min-height{min-height:var(--van-field-text-area-min-height)}.van-field__control[type=date],.van-field__control[type=time],.van-field__control[type=datetime-local]{min-height:var(--van-cell-line-height)}.van-field__control[type=search]{-webkit-appearance:none}.van-field__clear,.van-field__icon,.van-field__button,.van-field__right-icon{flex-shrink:0}.van-field__clear,.van-field__right-icon{margin-right:calc(var(--van-padding-xs) * -1);padding:0 var(--van-padding-xs);line-height:inherit}.van-field__clear{color:var(--van-field-clear-icon-color);font-size:var(--van-field-clear-icon-size);cursor:pointer}.van-field__left-icon .van-icon,.van-field__right-icon .van-icon{display:block;font-size:var(--van-field-icon-size);line-height:inherit}.van-field__left-icon{margin-right:var(--van-padding-base)}.van-field__right-icon{color:var(--van-field-right-icon-color)}.van-field__button{padding-left:var(--van-padding-xs)}.van-field__error-message{color:var(--van-field-error-message-color);font-size:var(--van-field-error-message-font-size);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{margin-top:var(--van-padding-base);color:var(--van-field-word-limit-color);font-size:var(--van-field-word-limit-font-size);line-height:var(--van-field-word-limit-line-height);text-align:right}
31
+
32
+ .custom-close-icon {
33
+ color: var(--van-field-clear-icon-color);
34
+ font-size: var(--van-field-clear-icon-size);
35
+ cursor: pointer;
36
+ }
31
37
  :root,:host{--van-sticky-z-index: 99}.van-sticky--fixed{position:fixed;z-index:var(--van-sticky-z-index)}
32
38
  :root,:host{--van-tab-text-color: var(--van-gray-7);--van-tab-active-text-color: var(--van-text-color);--van-tab-disabled-text-color: var(--van-text-color-3);--van-tab-font-size: var(--van-font-size-md);--van-tab-line-height: var(--van-line-height-md);--van-tabs-default-color: var(--van-primary-color);--van-tabs-line-height: 44px;--van-tabs-card-height: 30px;--van-tabs-nav-background: var(--van-background-2);--van-tabs-bottom-bar-width: 40px;--van-tabs-bottom-bar-height: 3px;--van-tabs-bottom-bar-color: var(--van-primary-color)}.van-tab{position:relative;display:flex;flex:1;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--van-padding-base);color:var(--van-tab-text-color);font-size:var(--van-tab-font-size);line-height:var(--van-tab-line-height);cursor:pointer}.van-tab--active{color:var(--van-tab-active-text-color);font-weight:var(--van-font-bold)}.van-tab--disabled{color:var(--van-tab-disabled-text-color);cursor:not-allowed}.van-tab--grow{flex:1 0 auto;padding:0 var(--van-padding-sm)}.van-tab--shrink{flex:none;padding:0 var(--van-padding-xs)}.van-tab--card{color:var(--van-tabs-default-color);border-right:var(--van-border-width) solid var(--van-tabs-default-color)}.van-tab--card:last-child{border-right:none}.van-tab--card.van-tab--active{color:var(--van-white);background-color:var(--van-tabs-default-color)}.van-tab--card.van-tab--disabled{color:var(--van-tab-disabled-text-color)}.van-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.van-tabs{position:relative}.van-tabs__wrap{overflow:hidden}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__nav{position:relative;display:flex;background:var(--van-tabs-nav-background);-webkit-user-select:none;user-select:none}.van-tabs__nav--complete{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.van-tabs__nav--complete::-webkit-scrollbar{display:none}.van-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:15px}.van-tabs__nav--line.van-tabs__nav--shrink,.van-tabs__nav--line.van-tabs__nav--complete{padding-right:var(--van-padding-xs);padding-left:var(--van-padding-xs)}.van-tabs__nav--card{box-sizing:border-box;height:var(--van-tabs-card-height);margin:0 var(--van-padding-md);border:var(--van-border-width) solid var(--van-tabs-default-color);border-radius:var(--van-radius-sm)}.van-tabs__nav--card.van-tabs__nav--shrink{display:inline-flex}.van-tabs__line{position:absolute;bottom:15px;left:0;z-index:1;width:var(--van-tabs-bottom-bar-width);height:var(--van-tabs-bottom-bar-height);background:var(--van-tabs-bottom-bar-color);border-radius:var(--van-tabs-bottom-bar-height)}.van-tabs__track{position:relative;display:flex;width:100%;height:100%;will-change:left}.van-tabs__content--animated{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:var(--van-tabs-line-height)}.van-tabs--card>.van-tabs__wrap{height:var(--van-tabs-card-height)}
33
39
  .van-tab__panel,.van-tab__panel-wrapper{flex-shrink:0;box-sizing:border-box;width:100%}.van-tab__panel-wrapper--inactive{height:0;overflow:visible}
@@ -3,14 +3,18 @@
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
6
- import { createElementBlock, openBlock, Fragment, createVNode, renderSlot, normalizeProps, guardReactiveProps, createSlots, renderList, withCtx } from "vue";
6
+ import { createElementBlock, openBlock, Fragment, createVNode, renderSlot, mergeProps, createSlots, renderList, withCtx } from "vue";
7
+ /* empty css */
7
8
  import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
8
9
  import { Field } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/field/index.mjs";
9
10
  const _sfc_main = {};
10
11
  function _sfc_render(_ctx, _cache) {
11
12
  const _component_van_field = Field;
12
13
  return openBlock(), createElementBlock(Fragment, null, [
13
- createVNode(_component_van_field, normalizeProps(guardReactiveProps(_ctx.$attrs)), createSlots({ _: 2 }, [
14
+ createVNode(_component_van_field, mergeProps(_ctx.$attrs, {
15
+ clearable: "",
16
+ "clear-trigger": "always"
17
+ }), createSlots({ _: 2 }, [
14
18
  renderList(_ctx.$slots, (item, key) => {
15
19
  return {
16
20
  name: key,
@@ -14,10 +14,11 @@
14
14
  /* empty css */
15
15
  /* empty css */
16
16
  /* empty css */
17
- import { ref, computed, watch, createBlock, openBlock, unref, mergeProps, isRef, withCtx, createVNode } from "vue";
17
+ import { ref, computed, watch, createBlock, openBlock, unref, mergeProps, isRef, createSlots, withCtx, createVNode, withModifiers } from "vue";
18
18
  import { MobileField } from "../field/index.mjs";
19
19
  import hooks from "../../../../../../node_modules/.pnpm/moment@2.30.1/node_modules/moment/dist/moment.mjs";
20
20
  import { Calendar } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/calendar/index.mjs";
21
+ import { Icon } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/icon/index.mjs";
21
22
  const _sfc_main = {
22
23
  __name: "FieldCalendarPicker",
23
24
  props: {
@@ -87,6 +88,7 @@ const _sfc_main = {
87
88
  () => props.modelValue,
88
89
  (value) => {
89
90
  if (!value) {
91
+ fieldTextValue.value = "";
90
92
  return;
91
93
  }
92
94
  if (props.calendarType == "single") {
@@ -123,18 +125,19 @@ const _sfc_main = {
123
125
  showCalendar.value = false;
124
126
  };
125
127
  return (_ctx, _cache) => {
128
+ const _component_van_icon = Icon;
126
129
  const _component_van_calendar = Calendar;
127
130
  return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, {
128
131
  modelValue: unref(fieldTextValue),
129
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
132
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
130
133
  "is-link": "",
131
134
  readonly: "",
132
- onClick: _cache[2] || (_cache[2] = ($event) => showCalendar.value = true)
133
- }), {
135
+ onClick: _cache[3] || (_cache[3] = ($event) => showCalendar.value = true)
136
+ }), createSlots({
134
137
  default: withCtx(() => [
135
138
  createVNode(_component_van_calendar, mergeProps(_ctx.$attrs, {
136
139
  show: unref(showCalendar),
137
- "onUpdate:show": _cache[0] || (_cache[0] = ($event) => isRef(showCalendar) ? showCalendar.value = $event : null),
140
+ "onUpdate:show": _cache[1] || (_cache[1] = ($event) => isRef(showCalendar) ? showCalendar.value = $event : null),
138
141
  "default-date": unref(defaultDate),
139
142
  title: __props.title,
140
143
  type: __props.calendarType,
@@ -143,8 +146,20 @@ const _sfc_main = {
143
146
  onConfirm
144
147
  }), null, 16, ["show", "default-date", "title", "type"])
145
148
  ]),
146
- _: 1
147
- }, 16, ["modelValue"]);
149
+ _: 2
150
+ }, [
151
+ unref(fieldTextValue) ? {
152
+ name: "right-icon",
153
+ fn: withCtx(() => [
154
+ createVNode(_component_van_icon, {
155
+ name: "clear",
156
+ class: "custom-close-icon",
157
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => defaultDate.value = null, ["stop"]))
158
+ })
159
+ ]),
160
+ key: "0"
161
+ } : void 0
162
+ ]), 1040, ["modelValue"]);
148
163
  };
149
164
  }
150
165
  };
@@ -9,10 +9,11 @@
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
- import { ref, computed, watch, createBlock, openBlock, unref, mergeProps, isRef, withCtx, createVNode } from "vue";
12
+ import { ref, computed, watch, createBlock, openBlock, unref, mergeProps, isRef, createSlots, withCtx, createVNode, withModifiers } from "vue";
13
13
  import { MobileField } from "../field/index.mjs";
14
14
  import { Cascader } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/cascader/index.mjs";
15
15
  import { Popup } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.mjs";
16
+ import { Icon } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/icon/index.mjs";
16
17
  const _sfc_main = {
17
18
  __name: "fieldCascaderPicker",
18
19
  props: {
@@ -79,6 +80,10 @@ const _sfc_main = {
79
80
  watch(
80
81
  () => props.modelValue,
81
82
  (value) => {
83
+ if (!value) {
84
+ fieldTextValue.value = "";
85
+ return;
86
+ }
82
87
  fieldTextValue.value = getDisplayValue(
83
88
  props.treeOptions,
84
89
  props.treeOptionsFieldNames,
@@ -92,38 +97,51 @@ const _sfc_main = {
92
97
  showPicker.value = false;
93
98
  };
94
99
  return (_ctx, _cache) => {
100
+ const _component_van_icon = Icon;
95
101
  const _component_van_cascader = Cascader;
96
102
  const _component_van_popup = Popup;
97
103
  return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, {
98
104
  modelValue: unref(fieldTextValue),
99
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
105
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
100
106
  "is-link": "",
101
107
  readonly: "",
102
- onClick: _cache[4] || (_cache[4] = ($event) => showPicker.value = true)
103
- }), {
108
+ onClick: _cache[5] || (_cache[5] = ($event) => showPicker.value = true)
109
+ }), createSlots({
104
110
  default: withCtx(() => [
105
111
  createVNode(_component_van_popup, {
106
112
  show: unref(showPicker),
107
- "onUpdate:show": _cache[2] || (_cache[2] = ($event) => isRef(showPicker) ? showPicker.value = $event : null),
113
+ "onUpdate:show": _cache[3] || (_cache[3] = ($event) => isRef(showPicker) ? showPicker.value = $event : null),
108
114
  "destroy-on-close": "",
109
115
  position: "bottom"
110
116
  }, {
111
117
  default: withCtx(() => [
112
118
  createVNode(_component_van_cascader, mergeProps(_ctx.$attrs, {
113
119
  modelValue: unref(pickerValue),
114
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(pickerValue) ? pickerValue.value = $event : null),
120
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(pickerValue) ? pickerValue.value = $event : null),
115
121
  options: __props.treeOptions,
116
122
  "field-names": __props.treeOptionsFieldNames,
117
123
  placeholder: "请选择",
118
124
  onFinish,
119
- onClose: _cache[1] || (_cache[1] = ($event) => showPicker.value = false)
125
+ onClose: _cache[2] || (_cache[2] = ($event) => showPicker.value = false)
120
126
  }), null, 16, ["modelValue", "options", "field-names"])
121
127
  ]),
122
128
  _: 1
123
129
  }, 8, ["show"])
124
130
  ]),
125
- _: 1
126
- }, 16, ["modelValue"]);
131
+ _: 2
132
+ }, [
133
+ unref(fieldTextValue) ? {
134
+ name: "right-icon",
135
+ fn: withCtx(() => [
136
+ createVNode(_component_van_icon, {
137
+ name: "clear",
138
+ class: "custom-close-icon",
139
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => pickerValue.value = null, ["stop"]))
140
+ })
141
+ ]),
142
+ key: "0"
143
+ } : void 0
144
+ ]), 1040, ["modelValue"]);
127
145
  };
128
146
  }
129
147
  };
@@ -1,4 +1,4 @@
1
- import { computed, createBlock, openBlock, unref, mergeProps, withCtx, createVNode, isRef } from "vue";
1
+ import { computed, createBlock, openBlock, unref, mergeProps, isRef, withCtx, createVNode } from "vue";
2
2
  import { MobileField } from "../field/index.mjs";
3
3
  import { MobileCheckboxGroup } from "../checkboxGroup/index.mjs";
4
4
  const _sfc_main = {
@@ -29,8 +29,19 @@ const _sfc_main = {
29
29
  emit("update:modelValue", val.join(","));
30
30
  }
31
31
  });
32
+ const inputValue = computed({
33
+ get: () => {
34
+ return compValue.value.join(",");
35
+ },
36
+ set: (val) => {
37
+ emit("update:modelValue", val);
38
+ }
39
+ });
32
40
  return (_ctx, _cache) => {
33
- return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, { modelValue: "" }), {
41
+ return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, {
42
+ modelValue: unref(inputValue),
43
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(inputValue) ? inputValue.value = $event : null)
44
+ }), {
34
45
  input: withCtx(() => [
35
46
  createVNode(unref(MobileCheckboxGroup), mergeProps(_ctx.$attrs, {
36
47
  modelValue: unref(compValue),
@@ -38,7 +49,7 @@ const _sfc_main = {
38
49
  }), null, 16, ["modelValue"])
39
50
  ]),
40
51
  _: 1
41
- }, 16);
52
+ }, 16, ["modelValue"]);
42
53
  };
43
54
  }
44
55
  };
@@ -11,12 +11,13 @@
11
11
  /* empty css */
12
12
  /* empty css */
13
13
  /* empty css */
14
- import { ref, computed, watch, createBlock, openBlock, unref, mergeProps, isRef, withCtx, createVNode } from "vue";
14
+ import { ref, computed, watch, 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/.pnpm/moment@2.30.1/node_modules/moment/dist/moment.mjs";
17
17
  import { parseDateFormatter } from "../../../utils/dateUtil.mjs";
18
18
  import { DatePicker } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/date-picker/index.mjs";
19
19
  import { Popup } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.mjs";
20
+ import { Icon } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/icon/index.mjs";
20
21
  const _sfc_main = {
21
22
  __name: "FieldDatePicker",
22
23
  props: {
@@ -93,6 +94,7 @@ const _sfc_main = {
93
94
  () => props.modelValue,
94
95
  (value) => {
95
96
  if (!value) {
97
+ fieldTextValue.value = "";
96
98
  return;
97
99
  }
98
100
  fieldTextValue.value = hooks(value, valueFormat).format(textFormat);
@@ -108,38 +110,51 @@ const _sfc_main = {
108
110
  showPicker.value = false;
109
111
  };
110
112
  return (_ctx, _cache) => {
113
+ const _component_van_icon = Icon;
111
114
  const _component_van_date_picker = DatePicker;
112
115
  const _component_van_popup = Popup;
113
116
  return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, {
114
117
  modelValue: unref(fieldTextValue),
115
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
118
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
116
119
  "is-link": "",
117
120
  readonly: "",
118
- onClick: _cache[4] || (_cache[4] = ($event) => showPicker.value = true)
119
- }), {
121
+ onClick: _cache[5] || (_cache[5] = ($event) => showPicker.value = true)
122
+ }), createSlots({
120
123
  default: withCtx(() => [
121
124
  createVNode(_component_van_popup, {
122
125
  show: unref(showPicker),
123
- "onUpdate:show": _cache[2] || (_cache[2] = ($event) => isRef(showPicker) ? showPicker.value = $event : null),
126
+ "onUpdate:show": _cache[3] || (_cache[3] = ($event) => isRef(showPicker) ? showPicker.value = $event : null),
124
127
  "destroy-on-close": "",
125
128
  position: "bottom"
126
129
  }, {
127
130
  default: withCtx(() => [
128
131
  createVNode(_component_van_date_picker, mergeProps(_ctx.$attrs, {
129
132
  modelValue: unref(pickerValue),
130
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(pickerValue) ? pickerValue.value = $event : null),
133
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(pickerValue) ? pickerValue.value = $event : null),
131
134
  readonly: false,
132
135
  onConfirm,
133
136
  columnsType: unref(columnsType),
134
137
  formatter,
135
- onCancel: _cache[1] || (_cache[1] = ($event) => showPicker.value = false)
138
+ onCancel: _cache[2] || (_cache[2] = ($event) => showPicker.value = false)
136
139
  }), null, 16, ["modelValue", "columnsType"])
137
140
  ]),
138
141
  _: 1
139
142
  }, 8, ["show"])
140
143
  ]),
141
- _: 1
142
- }, 16, ["modelValue"]);
144
+ _: 2
145
+ }, [
146
+ unref(fieldTextValue) ? {
147
+ name: "right-icon",
148
+ fn: withCtx(() => [
149
+ createVNode(_component_van_icon, {
150
+ name: "clear",
151
+ class: "custom-close-icon",
152
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => emit("update:modelValue", null), ["stop"]))
153
+ })
154
+ ]),
155
+ key: "0"
156
+ } : void 0
157
+ ]), 1040, ["modelValue"]);
143
158
  };
144
159
  }
145
160
  };
@@ -11,9 +11,10 @@
11
11
  /* empty css */
12
12
  /* empty css */
13
13
  /* empty css */
14
- import { ref, computed, watch, createBlock, openBlock, unref, mergeProps, isRef, withCtx, createVNode } from "vue";
14
+ import { ref, computed, watch, createBlock, openBlock, unref, mergeProps, isRef, createSlots, withCtx, createVNode, withModifiers } from "vue";
15
15
  import { MobileField } from "../field/index.mjs";
16
16
  import { Picker } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/picker/index.mjs";
17
+ import { Icon } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/icon/index.mjs";
17
18
  import { Popup } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.mjs";
18
19
  const _sfc_main = {
19
20
  __name: "FieldPicker",
@@ -55,6 +56,7 @@ const _sfc_main = {
55
56
  () => props.modelValue,
56
57
  (value) => {
57
58
  if (!value) {
59
+ fieldTextValue.value = "";
58
60
  return;
59
61
  }
60
62
  const optionItem = props.pickerOptions.find(
@@ -69,19 +71,20 @@ const _sfc_main = {
69
71
  showPicker.value = false;
70
72
  };
71
73
  return (_ctx, _cache) => {
74
+ const _component_van_icon = Icon;
72
75
  const _component_van_picker = Picker;
73
76
  const _component_van_popup = Popup;
74
77
  return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, {
75
78
  modelValue: unref(fieldTextValue),
76
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
79
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
77
80
  "is-link": "",
78
81
  readonly: "",
79
- onClick: _cache[3] || (_cache[3] = ($event) => showPicker.value = true)
80
- }), {
82
+ onClick: _cache[4] || (_cache[4] = ($event) => showPicker.value = true)
83
+ }), createSlots({
81
84
  default: withCtx(() => [
82
85
  createVNode(_component_van_popup, {
83
86
  show: unref(showPicker),
84
- "onUpdate:show": _cache[1] || (_cache[1] = ($event) => isRef(showPicker) ? showPicker.value = $event : null),
87
+ "onUpdate:show": _cache[2] || (_cache[2] = ($event) => isRef(showPicker) ? showPicker.value = $event : null),
85
88
  "destroy-on-close": "",
86
89
  position: "bottom"
87
90
  }, {
@@ -92,14 +95,26 @@ const _sfc_main = {
92
95
  "model-value": unref(pickerValue),
93
96
  readonly: false,
94
97
  onConfirm,
95
- onCancel: _cache[0] || (_cache[0] = ($event) => showPicker.value = false)
98
+ onCancel: _cache[1] || (_cache[1] = ($event) => showPicker.value = false)
96
99
  }), null, 16, ["columns", "columns-field-names", "model-value"])
97
100
  ]),
98
101
  _: 1
99
102
  }, 8, ["show"])
100
103
  ]),
101
- _: 1
102
- }, 16, ["modelValue"]);
104
+ _: 2
105
+ }, [
106
+ unref(fieldTextValue) ? {
107
+ name: "right-icon",
108
+ fn: withCtx(() => [
109
+ createVNode(_component_van_icon, {
110
+ name: "clear",
111
+ class: "custom-close-icon",
112
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => pickerValue.value = null, ["stop"]))
113
+ })
114
+ ]),
115
+ key: "0"
116
+ } : void 0
117
+ ]), 1040, ["modelValue"]);
103
118
  };
104
119
  }
105
120
  };
@@ -11,12 +11,13 @@
11
11
  /* empty css */
12
12
  /* empty css */
13
13
  /* empty css */
14
- import { ref, computed, watch, createBlock, openBlock, unref, mergeProps, isRef, withCtx, createVNode } from "vue";
14
+ import { ref, computed, watch, 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/.pnpm/moment@2.30.1/node_modules/moment/dist/moment.mjs";
17
17
  import { parseTimeFormatter } from "../../../utils/dateUtil.mjs";
18
18
  import { TimePicker } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/time-picker/index.mjs";
19
19
  import { Popup } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.mjs";
20
+ import { Icon } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/icon/index.mjs";
20
21
  const _sfc_main = {
21
22
  __name: "FieldTimePicker",
22
23
  props: {
@@ -95,6 +96,7 @@ const _sfc_main = {
95
96
  () => props.modelValue,
96
97
  (value) => {
97
98
  if (!value) {
99
+ fieldTextValue.value = "";
98
100
  return;
99
101
  }
100
102
  fieldTextValue.value = hooks(value, valueFormat).format(textFormat);
@@ -110,38 +112,51 @@ const _sfc_main = {
110
112
  showPicker.value = false;
111
113
  };
112
114
  return (_ctx, _cache) => {
115
+ const _component_van_icon = Icon;
113
116
  const _component_van_time_picker = TimePicker;
114
117
  const _component_van_popup = Popup;
115
118
  return openBlock(), createBlock(unref(MobileField), mergeProps(_ctx.$attrs, {
116
119
  modelValue: unref(fieldTextValue),
117
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
120
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
118
121
  "is-link": "",
119
122
  readonly: "",
120
- onClick: _cache[4] || (_cache[4] = ($event) => showPicker.value = true)
121
- }), {
123
+ onClick: _cache[5] || (_cache[5] = ($event) => showPicker.value = true)
124
+ }), createSlots({
122
125
  default: withCtx(() => [
123
126
  createVNode(_component_van_popup, {
124
127
  show: unref(showPicker),
125
- "onUpdate:show": _cache[2] || (_cache[2] = ($event) => isRef(showPicker) ? showPicker.value = $event : null),
128
+ "onUpdate:show": _cache[3] || (_cache[3] = ($event) => isRef(showPicker) ? showPicker.value = $event : null),
126
129
  "destroy-on-close": "",
127
130
  position: "bottom"
128
131
  }, {
129
132
  default: withCtx(() => [
130
133
  createVNode(_component_van_time_picker, mergeProps(_ctx.$attrs, {
131
134
  modelValue: unref(pickerValue),
132
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(pickerValue) ? pickerValue.value = $event : null),
135
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(pickerValue) ? pickerValue.value = $event : null),
133
136
  readonly: false,
134
137
  columnsType: unref(columnsType),
135
138
  formatter,
136
139
  onConfirm,
137
- onCancel: _cache[1] || (_cache[1] = ($event) => showPicker.value = false)
140
+ onCancel: _cache[2] || (_cache[2] = ($event) => showPicker.value = false)
138
141
  }), null, 16, ["modelValue", "columnsType"])
139
142
  ]),
140
143
  _: 1
141
144
  }, 8, ["show"])
142
145
  ]),
143
- _: 1
144
- }, 16, ["modelValue"]);
146
+ _: 2
147
+ }, [
148
+ unref(fieldTextValue) ? {
149
+ name: "right-icon",
150
+ fn: withCtx(() => [
151
+ createVNode(_component_van_icon, {
152
+ name: "clear",
153
+ class: "custom-close-icon",
154
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => emit("update:modelValue", null), ["stop"]))
155
+ })
156
+ ]),
157
+ key: "0"
158
+ } : void 0
159
+ ]), 1040, ["modelValue"]);
145
160
  };
146
161
  }
147
162
  };
package/lib/mobile.css CHANGED
@@ -28,6 +28,12 @@
28
28
  .van-checkbox-group--horizontal{display:flex;flex-wrap:wrap}
29
29
  :root,:host{--van-checkbox-size: 20px;--van-checkbox-border-color: var(--van-gray-5);--van-checkbox-duration: var(--van-duration-fast);--van-checkbox-label-margin: var(--van-padding-xs);--van-checkbox-label-color: var(--van-text-color);--van-checkbox-checked-icon-color: var(--van-primary-color);--van-checkbox-disabled-icon-color: var(--van-gray-5);--van-checkbox-disabled-label-color: var(--van-text-color-3);--van-checkbox-disabled-background: var(--van-border-color)}.van-checkbox{display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none}.van-checkbox--disabled{cursor:not-allowed}.van-checkbox--label-disabled{cursor:default}.van-checkbox--horizontal{margin-right:var(--van-padding-sm)}.van-checkbox__icon{flex:none;height:1em;font-size:var(--van-checkbox-size);line-height:1em;cursor:pointer}.van-checkbox__icon .van-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:1px solid var(--van-checkbox-border-color);transition-duration:var(--van-checkbox-duration);transition-property:color,border-color,background-color}.van-checkbox__icon--round .van-icon{border-radius:100%}.van-checkbox__icon--indeterminate .van-icon{display:flex;align-items:center;justify-content:center;color:var(--van-white);border-color:var(--van-checkbox-checked-icon-color);background-color:var(--van-checkbox-checked-icon-color)}.van-checkbox__icon--checked .van-icon{color:var(--van-white);background-color:var(--van-checkbox-checked-icon-color);border-color:var(--van-checkbox-checked-icon-color)}.van-checkbox__icon--disabled{cursor:not-allowed}.van-checkbox__icon--disabled .van-icon{background-color:var(--van-checkbox-disabled-background);border-color:var(--van-checkbox-disabled-icon-color)}.van-checkbox__icon--disabled.van-checkbox__icon--checked .van-icon{color:var(--van-checkbox-disabled-icon-color)}.van-checkbox__label{margin-left:var(--van-checkbox-label-margin);color:var(--van-checkbox-label-color);line-height:var(--van-checkbox-size)}.van-checkbox__label--left{margin:0 var(--van-checkbox-label-margin) 0 0}.van-checkbox__label--disabled{color:var(--van-checkbox-disabled-label-color)}
30
30
  :root,:host{--van-field-label-width: 6.2em;--van-field-label-color: var(--van-text-color);--van-field-label-margin-right: var(--van-padding-sm);--van-field-input-text-color: var(--van-text-color);--van-field-input-error-text-color: var(--van-danger-color);--van-field-input-disabled-text-color: var(--van-text-color-3);--van-field-placeholder-text-color: var(--van-text-color-3);--van-field-icon-size: 18px;--van-field-clear-icon-size: 18px;--van-field-clear-icon-color: var(--van-gray-5);--van-field-right-icon-color: var(--van-gray-6);--van-field-error-message-color: var(--van-danger-color);--van-field-error-message-font-size: 12px;--van-field-text-area-min-height: 60px;--van-field-word-limit-color: var(--van-gray-7);--van-field-word-limit-font-size: var(--van-font-size-sm);--van-field-word-limit-line-height: 16px;--van-field-disabled-text-color: var(--van-text-color-3);--van-field-required-mark-color: var(--van-red)}.van-field{flex-wrap:wrap}.van-field__label{flex:none;box-sizing:border-box;width:var(--van-field-label-width);margin-right:var(--van-field-label-margin-right);color:var(--van-field-label-color);text-align:left;word-wrap:break-word}.van-field__label--center{text-align:center}.van-field__label--right{text-align:right}.van-field__label--top{display:flex;width:100%;text-align:left;margin-bottom:var(--van-padding-base);overflow-wrap:break-word}.van-field__label--required:before{margin-right:2px;color:var(--van-field-required-mark-color);content:"*"}.van-field--disabled .van-field__label{color:var(--van-field-disabled-text-color)}.van-field__value{overflow:visible}.van-field__body{display:flex;align-items:center}.van-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:var(--van-field-input-text-color);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none;-webkit-user-select:auto;user-select:auto}.van-field__control::-webkit-input-placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control::placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control:read-only{cursor:default}.van-field__control:disabled{color:var(--van-field-input-disabled-text-color);cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--van-field-input-disabled-text-color)}.van-field__control--center{justify-content:center;text-align:center}.van-field__control--right{justify-content:flex-end;text-align:right}.van-field__control--custom{display:flex;align-items:center;min-height:var(--van-cell-line-height)}.van-field__control--error::-webkit-input-placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--error,.van-field__control--error::placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--min-height{min-height:var(--van-field-text-area-min-height)}.van-field__control[type=date],.van-field__control[type=time],.van-field__control[type=datetime-local]{min-height:var(--van-cell-line-height)}.van-field__control[type=search]{-webkit-appearance:none}.van-field__clear,.van-field__icon,.van-field__button,.van-field__right-icon{flex-shrink:0}.van-field__clear,.van-field__right-icon{margin-right:calc(var(--van-padding-xs) * -1);padding:0 var(--van-padding-xs);line-height:inherit}.van-field__clear{color:var(--van-field-clear-icon-color);font-size:var(--van-field-clear-icon-size);cursor:pointer}.van-field__left-icon .van-icon,.van-field__right-icon .van-icon{display:block;font-size:var(--van-field-icon-size);line-height:inherit}.van-field__left-icon{margin-right:var(--van-padding-base)}.van-field__right-icon{color:var(--van-field-right-icon-color)}.van-field__button{padding-left:var(--van-padding-xs)}.van-field__error-message{color:var(--van-field-error-message-color);font-size:var(--van-field-error-message-font-size);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{margin-top:var(--van-padding-base);color:var(--van-field-word-limit-color);font-size:var(--van-field-word-limit-font-size);line-height:var(--van-field-word-limit-line-height);text-align:right}
31
+
32
+ .custom-close-icon {
33
+ color: var(--van-field-clear-icon-color);
34
+ font-size: var(--van-field-clear-icon-size);
35
+ cursor: pointer;
36
+ }
31
37
  :root,:host{--van-sticky-z-index: 99}.van-sticky--fixed{position:fixed;z-index:var(--van-sticky-z-index)}
32
38
  :root,:host{--van-tab-text-color: var(--van-gray-7);--van-tab-active-text-color: var(--van-text-color);--van-tab-disabled-text-color: var(--van-text-color-3);--van-tab-font-size: var(--van-font-size-md);--van-tab-line-height: var(--van-line-height-md);--van-tabs-default-color: var(--van-primary-color);--van-tabs-line-height: 44px;--van-tabs-card-height: 30px;--van-tabs-nav-background: var(--van-background-2);--van-tabs-bottom-bar-width: 40px;--van-tabs-bottom-bar-height: 3px;--van-tabs-bottom-bar-color: var(--van-primary-color)}.van-tab{position:relative;display:flex;flex:1;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--van-padding-base);color:var(--van-tab-text-color);font-size:var(--van-tab-font-size);line-height:var(--van-tab-line-height);cursor:pointer}.van-tab--active{color:var(--van-tab-active-text-color);font-weight:var(--van-font-bold)}.van-tab--disabled{color:var(--van-tab-disabled-text-color);cursor:not-allowed}.van-tab--grow{flex:1 0 auto;padding:0 var(--van-padding-sm)}.van-tab--shrink{flex:none;padding:0 var(--van-padding-xs)}.van-tab--card{color:var(--van-tabs-default-color);border-right:var(--van-border-width) solid var(--van-tabs-default-color)}.van-tab--card:last-child{border-right:none}.van-tab--card.van-tab--active{color:var(--van-white);background-color:var(--van-tabs-default-color)}.van-tab--card.van-tab--disabled{color:var(--van-tab-disabled-text-color)}.van-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.van-tabs{position:relative}.van-tabs__wrap{overflow:hidden}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__nav{position:relative;display:flex;background:var(--van-tabs-nav-background);-webkit-user-select:none;user-select:none}.van-tabs__nav--complete{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.van-tabs__nav--complete::-webkit-scrollbar{display:none}.van-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:15px}.van-tabs__nav--line.van-tabs__nav--shrink,.van-tabs__nav--line.van-tabs__nav--complete{padding-right:var(--van-padding-xs);padding-left:var(--van-padding-xs)}.van-tabs__nav--card{box-sizing:border-box;height:var(--van-tabs-card-height);margin:0 var(--van-padding-md);border:var(--van-border-width) solid var(--van-tabs-default-color);border-radius:var(--van-radius-sm)}.van-tabs__nav--card.van-tabs__nav--shrink{display:inline-flex}.van-tabs__line{position:absolute;bottom:15px;left:0;z-index:1;width:var(--van-tabs-bottom-bar-width);height:var(--van-tabs-bottom-bar-height);background:var(--van-tabs-bottom-bar-color);border-radius:var(--van-tabs-bottom-bar-height)}.van-tabs__track{position:relative;display:flex;width:100%;height:100%;will-change:left}.van-tabs__content--animated{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:var(--van-tabs-line-height)}.van-tabs--card>.van-tabs__wrap{height:var(--van-tabs-card-height)}
33
39
  .van-tab__panel,.van-tab__panel-wrapper{flex-shrink:0;box-sizing:border-box;width:100%}.van-tab__panel-wrapper--inactive{height:0;overflow:visible}
@@ -6,13 +6,17 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
6
6
  ;/* empty css */
7
7
  ;/* empty css */
8
8
  const vue = require("vue");
9
+ ;/* empty css */
9
10
  const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
10
11
  const index = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/field/index.js");
11
12
  const _sfc_main = {};
12
13
  function _sfc_render(_ctx, _cache) {
13
14
  const _component_van_field = index.Field;
14
15
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
15
- vue.createVNode(_component_van_field, vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)), vue.createSlots({ _: 2 }, [
16
+ vue.createVNode(_component_van_field, vue.mergeProps(_ctx.$attrs, {
17
+ clearable: "",
18
+ "clear-trigger": "always"
19
+ }), vue.createSlots({ _: 2 }, [
16
20
  vue.renderList(_ctx.$slots, (item, key) => {
17
21
  return {
18
22
  name: key,
@@ -20,6 +20,7 @@ const vue = require("vue");
20
20
  const index = require("../field/index.js");
21
21
  const moment = require("../../../../../../node_modules/.pnpm/moment@2.30.1/node_modules/moment/dist/moment.js");
22
22
  const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/calendar/index.js");
23
+ const index$2 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/icon/index.js");
23
24
  const _sfc_main = {
24
25
  __name: "FieldCalendarPicker",
25
26
  props: {
@@ -89,6 +90,7 @@ const _sfc_main = {
89
90
  () => props.modelValue,
90
91
  (value) => {
91
92
  if (!value) {
93
+ fieldTextValue.value = "";
92
94
  return;
93
95
  }
94
96
  if (props.calendarType == "single") {
@@ -125,18 +127,19 @@ const _sfc_main = {
125
127
  showCalendar.value = false;
126
128
  };
127
129
  return (_ctx, _cache) => {
130
+ const _component_van_icon = index$2.Icon;
128
131
  const _component_van_calendar = index$1.Calendar;
129
132
  return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.mergeProps(_ctx.$attrs, {
130
133
  modelValue: vue.unref(fieldTextValue),
131
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
134
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
132
135
  "is-link": "",
133
136
  readonly: "",
134
- onClick: _cache[2] || (_cache[2] = ($event) => showCalendar.value = true)
135
- }), {
137
+ onClick: _cache[3] || (_cache[3] = ($event) => showCalendar.value = true)
138
+ }), vue.createSlots({
136
139
  default: vue.withCtx(() => [
137
140
  vue.createVNode(_component_van_calendar, vue.mergeProps(_ctx.$attrs, {
138
141
  show: vue.unref(showCalendar),
139
- "onUpdate:show": _cache[0] || (_cache[0] = ($event) => vue.isRef(showCalendar) ? showCalendar.value = $event : null),
142
+ "onUpdate:show": _cache[1] || (_cache[1] = ($event) => vue.isRef(showCalendar) ? showCalendar.value = $event : null),
140
143
  "default-date": vue.unref(defaultDate),
141
144
  title: __props.title,
142
145
  type: __props.calendarType,
@@ -145,8 +148,20 @@ const _sfc_main = {
145
148
  onConfirm
146
149
  }), null, 16, ["show", "default-date", "title", "type"])
147
150
  ]),
148
- _: 1
149
- }, 16, ["modelValue"]);
151
+ _: 2
152
+ }, [
153
+ vue.unref(fieldTextValue) ? {
154
+ name: "right-icon",
155
+ fn: vue.withCtx(() => [
156
+ vue.createVNode(_component_van_icon, {
157
+ name: "clear",
158
+ class: "custom-close-icon",
159
+ onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => defaultDate.value = null, ["stop"]))
160
+ })
161
+ ]),
162
+ key: "0"
163
+ } : void 0
164
+ ]), 1040, ["modelValue"]);
150
165
  };
151
166
  }
152
167
  };
@@ -15,6 +15,7 @@ const vue = require("vue");
15
15
  const index = require("../field/index.js");
16
16
  const index$2 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/cascader/index.js");
17
17
  const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.js");
18
+ const index$3 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/icon/index.js");
18
19
  const _sfc_main = {
19
20
  __name: "fieldCascaderPicker",
20
21
  props: {
@@ -81,6 +82,10 @@ const _sfc_main = {
81
82
  vue.watch(
82
83
  () => props.modelValue,
83
84
  (value) => {
85
+ if (!value) {
86
+ fieldTextValue.value = "";
87
+ return;
88
+ }
84
89
  fieldTextValue.value = getDisplayValue(
85
90
  props.treeOptions,
86
91
  props.treeOptionsFieldNames,
@@ -94,38 +99,51 @@ const _sfc_main = {
94
99
  showPicker.value = false;
95
100
  };
96
101
  return (_ctx, _cache) => {
102
+ const _component_van_icon = index$3.Icon;
97
103
  const _component_van_cascader = index$2.Cascader;
98
104
  const _component_van_popup = index$1.Popup;
99
105
  return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.mergeProps(_ctx.$attrs, {
100
106
  modelValue: vue.unref(fieldTextValue),
101
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
107
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
102
108
  "is-link": "",
103
109
  readonly: "",
104
- onClick: _cache[4] || (_cache[4] = ($event) => showPicker.value = true)
105
- }), {
110
+ onClick: _cache[5] || (_cache[5] = ($event) => showPicker.value = true)
111
+ }), vue.createSlots({
106
112
  default: vue.withCtx(() => [
107
113
  vue.createVNode(_component_van_popup, {
108
114
  show: vue.unref(showPicker),
109
- "onUpdate:show": _cache[2] || (_cache[2] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
115
+ "onUpdate:show": _cache[3] || (_cache[3] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
110
116
  "destroy-on-close": "",
111
117
  position: "bottom"
112
118
  }, {
113
119
  default: vue.withCtx(() => [
114
120
  vue.createVNode(_component_van_cascader, vue.mergeProps(_ctx.$attrs, {
115
121
  modelValue: vue.unref(pickerValue),
116
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
122
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
117
123
  options: __props.treeOptions,
118
124
  "field-names": __props.treeOptionsFieldNames,
119
125
  placeholder: "请选择",
120
126
  onFinish,
121
- onClose: _cache[1] || (_cache[1] = ($event) => showPicker.value = false)
127
+ onClose: _cache[2] || (_cache[2] = ($event) => showPicker.value = false)
122
128
  }), null, 16, ["modelValue", "options", "field-names"])
123
129
  ]),
124
130
  _: 1
125
131
  }, 8, ["show"])
126
132
  ]),
127
- _: 1
128
- }, 16, ["modelValue"]);
133
+ _: 2
134
+ }, [
135
+ vue.unref(fieldTextValue) ? {
136
+ name: "right-icon",
137
+ fn: vue.withCtx(() => [
138
+ vue.createVNode(_component_van_icon, {
139
+ name: "clear",
140
+ class: "custom-close-icon",
141
+ onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => pickerValue.value = null, ["stop"]))
142
+ })
143
+ ]),
144
+ key: "0"
145
+ } : void 0
146
+ ]), 1040, ["modelValue"]);
129
147
  };
130
148
  }
131
149
  };
@@ -31,8 +31,19 @@ const _sfc_main = {
31
31
  emit("update:modelValue", val.join(","));
32
32
  }
33
33
  });
34
+ const inputValue = vue.computed({
35
+ get: () => {
36
+ return compValue.value.join(",");
37
+ },
38
+ set: (val) => {
39
+ emit("update:modelValue", val);
40
+ }
41
+ });
34
42
  return (_ctx, _cache) => {
35
- return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.mergeProps(_ctx.$attrs, { modelValue: "" }), {
43
+ return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.mergeProps(_ctx.$attrs, {
44
+ modelValue: vue.unref(inputValue),
45
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(inputValue) ? inputValue.value = $event : null)
46
+ }), {
36
47
  input: vue.withCtx(() => [
37
48
  vue.createVNode(vue.unref(index$1.MobileCheckboxGroup), vue.mergeProps(_ctx.$attrs, {
38
49
  modelValue: vue.unref(compValue),
@@ -40,7 +51,7 @@ const _sfc_main = {
40
51
  }), null, 16, ["modelValue"])
41
52
  ]),
42
53
  _: 1
43
- }, 16);
54
+ }, 16, ["modelValue"]);
44
55
  };
45
56
  }
46
57
  };
@@ -19,6 +19,7 @@ const moment = require("../../../../../../node_modules/.pnpm/moment@2.30.1/node_
19
19
  const dateUtil = require("../../../utils/dateUtil.js");
20
20
  const index$2 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/date-picker/index.js");
21
21
  const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.js");
22
+ const index$3 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/icon/index.js");
22
23
  const _sfc_main = {
23
24
  __name: "FieldDatePicker",
24
25
  props: {
@@ -95,6 +96,7 @@ const _sfc_main = {
95
96
  () => props.modelValue,
96
97
  (value) => {
97
98
  if (!value) {
99
+ fieldTextValue.value = "";
98
100
  return;
99
101
  }
100
102
  fieldTextValue.value = moment.default(value, valueFormat).format(textFormat);
@@ -110,38 +112,51 @@ const _sfc_main = {
110
112
  showPicker.value = false;
111
113
  };
112
114
  return (_ctx, _cache) => {
115
+ const _component_van_icon = index$3.Icon;
113
116
  const _component_van_date_picker = index$2.DatePicker;
114
117
  const _component_van_popup = index$1.Popup;
115
118
  return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.mergeProps(_ctx.$attrs, {
116
119
  modelValue: vue.unref(fieldTextValue),
117
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
120
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
118
121
  "is-link": "",
119
122
  readonly: "",
120
- onClick: _cache[4] || (_cache[4] = ($event) => showPicker.value = true)
121
- }), {
123
+ onClick: _cache[5] || (_cache[5] = ($event) => showPicker.value = true)
124
+ }), vue.createSlots({
122
125
  default: vue.withCtx(() => [
123
126
  vue.createVNode(_component_van_popup, {
124
127
  show: vue.unref(showPicker),
125
- "onUpdate:show": _cache[2] || (_cache[2] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
128
+ "onUpdate:show": _cache[3] || (_cache[3] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
126
129
  "destroy-on-close": "",
127
130
  position: "bottom"
128
131
  }, {
129
132
  default: vue.withCtx(() => [
130
133
  vue.createVNode(_component_van_date_picker, vue.mergeProps(_ctx.$attrs, {
131
134
  modelValue: vue.unref(pickerValue),
132
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
135
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
133
136
  readonly: false,
134
137
  onConfirm,
135
138
  columnsType: vue.unref(columnsType),
136
139
  formatter,
137
- onCancel: _cache[1] || (_cache[1] = ($event) => showPicker.value = false)
140
+ onCancel: _cache[2] || (_cache[2] = ($event) => showPicker.value = false)
138
141
  }), null, 16, ["modelValue", "columnsType"])
139
142
  ]),
140
143
  _: 1
141
144
  }, 8, ["show"])
142
145
  ]),
143
- _: 1
144
- }, 16, ["modelValue"]);
146
+ _: 2
147
+ }, [
148
+ vue.unref(fieldTextValue) ? {
149
+ name: "right-icon",
150
+ fn: vue.withCtx(() => [
151
+ vue.createVNode(_component_van_icon, {
152
+ name: "clear",
153
+ class: "custom-close-icon",
154
+ onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => emit("update:modelValue", null), ["stop"]))
155
+ })
156
+ ]),
157
+ key: "0"
158
+ } : void 0
159
+ ]), 1040, ["modelValue"]);
145
160
  };
146
161
  }
147
162
  };
@@ -16,6 +16,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
16
16
  const vue = require("vue");
17
17
  const index = require("../field/index.js");
18
18
  const index$2 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/picker/index.js");
19
+ const index$3 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/icon/index.js");
19
20
  const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.js");
20
21
  const _sfc_main = {
21
22
  __name: "FieldPicker",
@@ -57,6 +58,7 @@ const _sfc_main = {
57
58
  () => props.modelValue,
58
59
  (value) => {
59
60
  if (!value) {
61
+ fieldTextValue.value = "";
60
62
  return;
61
63
  }
62
64
  const optionItem = props.pickerOptions.find(
@@ -71,19 +73,20 @@ const _sfc_main = {
71
73
  showPicker.value = false;
72
74
  };
73
75
  return (_ctx, _cache) => {
76
+ const _component_van_icon = index$3.Icon;
74
77
  const _component_van_picker = index$2.Picker;
75
78
  const _component_van_popup = index$1.Popup;
76
79
  return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.mergeProps(_ctx.$attrs, {
77
80
  modelValue: vue.unref(fieldTextValue),
78
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
81
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
79
82
  "is-link": "",
80
83
  readonly: "",
81
- onClick: _cache[3] || (_cache[3] = ($event) => showPicker.value = true)
82
- }), {
84
+ onClick: _cache[4] || (_cache[4] = ($event) => showPicker.value = true)
85
+ }), vue.createSlots({
83
86
  default: vue.withCtx(() => [
84
87
  vue.createVNode(_component_van_popup, {
85
88
  show: vue.unref(showPicker),
86
- "onUpdate:show": _cache[1] || (_cache[1] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
89
+ "onUpdate:show": _cache[2] || (_cache[2] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
87
90
  "destroy-on-close": "",
88
91
  position: "bottom"
89
92
  }, {
@@ -94,14 +97,26 @@ const _sfc_main = {
94
97
  "model-value": vue.unref(pickerValue),
95
98
  readonly: false,
96
99
  onConfirm,
97
- onCancel: _cache[0] || (_cache[0] = ($event) => showPicker.value = false)
100
+ onCancel: _cache[1] || (_cache[1] = ($event) => showPicker.value = false)
98
101
  }), null, 16, ["columns", "columns-field-names", "model-value"])
99
102
  ]),
100
103
  _: 1
101
104
  }, 8, ["show"])
102
105
  ]),
103
- _: 1
104
- }, 16, ["modelValue"]);
106
+ _: 2
107
+ }, [
108
+ vue.unref(fieldTextValue) ? {
109
+ name: "right-icon",
110
+ fn: vue.withCtx(() => [
111
+ vue.createVNode(_component_van_icon, {
112
+ name: "clear",
113
+ class: "custom-close-icon",
114
+ onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => pickerValue.value = null, ["stop"]))
115
+ })
116
+ ]),
117
+ key: "0"
118
+ } : void 0
119
+ ]), 1040, ["modelValue"]);
105
120
  };
106
121
  }
107
122
  };
@@ -19,6 +19,7 @@ const moment = require("../../../../../../node_modules/.pnpm/moment@2.30.1/node_
19
19
  const dateUtil = require("../../../utils/dateUtil.js");
20
20
  const index$2 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/time-picker/index.js");
21
21
  const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.js");
22
+ const index$3 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/icon/index.js");
22
23
  const _sfc_main = {
23
24
  __name: "FieldTimePicker",
24
25
  props: {
@@ -97,6 +98,7 @@ const _sfc_main = {
97
98
  () => props.modelValue,
98
99
  (value) => {
99
100
  if (!value) {
101
+ fieldTextValue.value = "";
100
102
  return;
101
103
  }
102
104
  fieldTextValue.value = moment.default(value, valueFormat).format(textFormat);
@@ -112,38 +114,51 @@ const _sfc_main = {
112
114
  showPicker.value = false;
113
115
  };
114
116
  return (_ctx, _cache) => {
117
+ const _component_van_icon = index$3.Icon;
115
118
  const _component_van_time_picker = index$2.TimePicker;
116
119
  const _component_van_popup = index$1.Popup;
117
120
  return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.mergeProps(_ctx.$attrs, {
118
121
  modelValue: vue.unref(fieldTextValue),
119
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
122
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
120
123
  "is-link": "",
121
124
  readonly: "",
122
- onClick: _cache[4] || (_cache[4] = ($event) => showPicker.value = true)
123
- }), {
125
+ onClick: _cache[5] || (_cache[5] = ($event) => showPicker.value = true)
126
+ }), vue.createSlots({
124
127
  default: vue.withCtx(() => [
125
128
  vue.createVNode(_component_van_popup, {
126
129
  show: vue.unref(showPicker),
127
- "onUpdate:show": _cache[2] || (_cache[2] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
130
+ "onUpdate:show": _cache[3] || (_cache[3] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
128
131
  "destroy-on-close": "",
129
132
  position: "bottom"
130
133
  }, {
131
134
  default: vue.withCtx(() => [
132
135
  vue.createVNode(_component_van_time_picker, vue.mergeProps(_ctx.$attrs, {
133
136
  modelValue: vue.unref(pickerValue),
134
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
137
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
135
138
  readonly: false,
136
139
  columnsType: vue.unref(columnsType),
137
140
  formatter,
138
141
  onConfirm,
139
- onCancel: _cache[1] || (_cache[1] = ($event) => showPicker.value = false)
142
+ onCancel: _cache[2] || (_cache[2] = ($event) => showPicker.value = false)
140
143
  }), null, 16, ["modelValue", "columnsType"])
141
144
  ]),
142
145
  _: 1
143
146
  }, 8, ["show"])
144
147
  ]),
145
- _: 1
146
- }, 16, ["modelValue"]);
148
+ _: 2
149
+ }, [
150
+ vue.unref(fieldTextValue) ? {
151
+ name: "right-icon",
152
+ fn: vue.withCtx(() => [
153
+ vue.createVNode(_component_van_icon, {
154
+ name: "clear",
155
+ class: "custom-close-icon",
156
+ onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => emit("update:modelValue", null), ["stop"]))
157
+ })
158
+ ]),
159
+ key: "0"
160
+ } : void 0
161
+ ]), 1040, ["modelValue"]);
147
162
  };
148
163
  }
149
164
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fecp/mobile",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "main": "lib/packages/mobile/index.js",
5
5
  "module": "es/packages/mobile/index.mjs",
6
6
  "files": [