vant 4.9.21 → 4.9.22
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/README.md +2 -2
- package/es/action-bar-button/index.css +1 -1
- package/es/action-sheet/ActionSheet.d.ts +1 -1
- package/es/action-sheet/index.d.ts +1 -1
- package/es/address-list/AddressListItem.d.ts +1 -1
- package/es/area/Area.d.ts +1 -1
- package/es/area/index.d.ts +1 -1
- package/es/calendar/index.css +1 -1
- package/es/composables/on-popup-reopen.mjs +1 -1
- package/es/composables/use-tab-status.mjs +2 -2
- package/es/composables/use-touch.mjs +4 -4
- package/es/date-picker/DatePicker.d.ts +1 -1
- package/es/date-picker/index.d.ts +1 -1
- package/es/dialog/Dialog.d.ts +1 -1
- package/es/dialog/index.css +1 -1
- package/es/dialog/index.d.ts +1 -1
- package/es/field/Field.d.ts +5 -5
- package/es/field/Field.mjs +3 -3
- package/es/field/index.d.ts +3 -3
- package/es/field/types.d.ts +1 -0
- package/es/floating-panel/FloatingPanel.d.ts +13 -0
- package/es/floating-panel/FloatingPanel.mjs +14 -2
- package/es/floating-panel/index.d.ts +9 -0
- package/es/grid/Grid.d.ts +1 -1
- package/es/grid/index.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/list/List.d.ts +13 -3
- package/es/list/List.mjs +5 -2
- package/es/list/index.d.ts +9 -2
- package/es/picker/Picker.d.ts +1 -1
- package/es/picker/index.d.ts +1 -1
- package/es/search/Search.d.ts +4 -4
- package/es/search/Search.mjs +1 -0
- package/es/search/index.d.ts +3 -3
- package/es/share-sheet/ShareSheet.d.ts +1 -1
- package/es/share-sheet/index.d.ts +1 -1
- package/es/stepper/Stepper.mjs +3 -0
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/index.d.ts +1 -1
- package/es/time-picker/TimePicker.d.ts +1 -1
- package/es/time-picker/TimePicker.mjs +1 -1
- package/es/time-picker/index.d.ts +1 -1
- package/es/utils/constant.mjs +1 -1
- package/lib/action-bar-button/index.css +1 -1
- package/lib/action-sheet/ActionSheet.d.ts +1 -1
- package/lib/action-sheet/index.d.ts +1 -1
- package/lib/address-list/AddressListItem.d.ts +1 -1
- package/lib/area/Area.d.ts +1 -1
- package/lib/area/index.d.ts +1 -1
- package/lib/calendar/index.css +1 -1
- package/lib/composables/on-popup-reopen.js +1 -1
- package/lib/composables/use-tab-status.js +2 -2
- package/lib/composables/use-touch.js +4 -4
- package/lib/date-picker/DatePicker.d.ts +1 -1
- package/lib/date-picker/index.d.ts +1 -1
- package/lib/dialog/Dialog.d.ts +1 -1
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.d.ts +1 -1
- package/lib/field/Field.d.ts +5 -5
- package/lib/field/Field.js +3 -3
- package/lib/field/index.d.ts +3 -3
- package/lib/field/types.d.ts +1 -0
- package/lib/floating-panel/FloatingPanel.d.ts +13 -0
- package/lib/floating-panel/FloatingPanel.js +14 -2
- package/lib/floating-panel/index.d.ts +9 -0
- package/lib/grid/Grid.d.ts +1 -1
- package/lib/grid/index.d.ts +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/list/List.d.ts +13 -3
- package/lib/list/List.js +5 -2
- package/lib/list/index.d.ts +9 -2
- package/lib/picker/Picker.d.ts +1 -1
- package/lib/picker/index.d.ts +1 -1
- package/lib/search/Search.d.ts +4 -4
- package/lib/search/Search.js +1 -0
- package/lib/search/index.d.ts +3 -3
- package/lib/share-sheet/ShareSheet.d.ts +1 -1
- package/lib/share-sheet/index.d.ts +1 -1
- package/lib/stepper/Stepper.js +3 -0
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/index.d.ts +1 -1
- package/lib/time-picker/TimePicker.d.ts +1 -1
- package/lib/time-picker/TimePicker.js +1 -1
- package/lib/time-picker/index.d.ts +1 -1
- package/lib/utils/constant.js +1 -1
- package/lib/vant.cjs.js +32 -13
- package/lib/vant.es.js +32 -13
- package/lib/vant.js +40 -21
- package/lib/vant.min.js +3 -3
- package/lib/web-types.json +1 -1
- package/package.json +14 -14
package/es/search/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
|
|
|
24
24
|
autocapitalize: StringConstructor;
|
|
25
25
|
autocorrect: StringConstructor;
|
|
26
26
|
errorMessage: StringConstructor;
|
|
27
|
-
enterkeyhint:
|
|
27
|
+
enterkeyhint: import("vue").PropType<import("..").FieldEnterKeyHint>;
|
|
28
28
|
clearTrigger: {
|
|
29
29
|
type: import("vue").PropType<import("..").FieldClearTrigger>;
|
|
30
30
|
default: import("..").FieldClearTrigger;
|
|
@@ -92,7 +92,7 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
|
|
|
92
92
|
autocapitalize: StringConstructor;
|
|
93
93
|
autocorrect: StringConstructor;
|
|
94
94
|
errorMessage: StringConstructor;
|
|
95
|
-
enterkeyhint:
|
|
95
|
+
enterkeyhint: import("vue").PropType<import("..").FieldEnterKeyHint>;
|
|
96
96
|
clearTrigger: {
|
|
97
97
|
type: import("vue").PropType<import("..").FieldClearTrigger>;
|
|
98
98
|
default: import("..").FieldClearTrigger;
|
|
@@ -138,12 +138,12 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
|
|
|
138
138
|
}>> & Readonly<{
|
|
139
139
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
140
140
|
onBlur?: ((...args: any[]) => any) | undefined;
|
|
141
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
141
142
|
onClear?: ((...args: any[]) => any) | undefined;
|
|
142
143
|
onClickInput?: ((...args: any[]) => any) | undefined;
|
|
143
144
|
onClickLeftIcon?: ((...args: any[]) => any) | undefined;
|
|
144
145
|
onClickRightIcon?: ((...args: any[]) => any) | undefined;
|
|
145
146
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
146
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
147
147
|
onSearch?: ((...args: any[]) => any) | undefined;
|
|
148
148
|
}>, {
|
|
149
149
|
autofocus: boolean;
|
|
@@ -148,8 +148,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
148
148
|
};
|
|
149
149
|
}>> & Readonly<{
|
|
150
150
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
151
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
152
151
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
152
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
153
153
|
}>, {
|
|
154
154
|
round: boolean;
|
|
155
155
|
overlay: boolean;
|
|
@@ -92,8 +92,8 @@ export declare const ShareSheet: import("../utils").WithInstall<import("vue").De
|
|
|
92
92
|
};
|
|
93
93
|
}>> & Readonly<{
|
|
94
94
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
95
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
96
95
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
96
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
97
97
|
}>, {
|
|
98
98
|
round: boolean;
|
|
99
99
|
overlay: boolean;
|
package/es/stepper/Stepper.mjs
CHANGED
|
@@ -46,6 +46,9 @@ var stdin_default = defineComponent({
|
|
|
46
46
|
if (allowEmpty && value === "") {
|
|
47
47
|
return value;
|
|
48
48
|
}
|
|
49
|
+
if (typeof value === "number" && String(value).includes("e")) {
|
|
50
|
+
value = value.toFixed(decimalLength ? +decimalLength : 17);
|
|
51
|
+
}
|
|
49
52
|
value = formatNumber(String(value), !props.integer);
|
|
50
53
|
value = value === "" ? 0 : +value;
|
|
51
54
|
value = Number.isNaN(value) ? +min : value;
|
package/es/tabs/Tabs.d.ts
CHANGED
|
@@ -150,8 +150,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
150
150
|
"onUpdate:active"?: ((...args: any[]) => any) | undefined;
|
|
151
151
|
}>, {
|
|
152
152
|
type: TabsType;
|
|
153
|
-
ellipsis: boolean;
|
|
154
153
|
sticky: boolean;
|
|
154
|
+
ellipsis: boolean;
|
|
155
155
|
border: boolean;
|
|
156
156
|
active: string | number;
|
|
157
157
|
duration: string | number;
|
package/es/tabs/index.d.ts
CHANGED
|
@@ -99,8 +99,8 @@ export declare const Tabs: import("../utils").WithInstall<import("vue").DefineCo
|
|
|
99
99
|
"onUpdate:active"?: ((...args: any[]) => any) | undefined;
|
|
100
100
|
}>, {
|
|
101
101
|
type: import("./types").TabsType;
|
|
102
|
-
ellipsis: boolean;
|
|
103
102
|
sticky: boolean;
|
|
103
|
+
ellipsis: boolean;
|
|
104
104
|
border: boolean;
|
|
105
105
|
active: string | number;
|
|
106
106
|
duration: string | number;
|
|
@@ -222,8 +222,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
222
222
|
};
|
|
223
223
|
}>> & Readonly<{
|
|
224
224
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
225
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
226
225
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
226
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
227
227
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
228
228
|
}>, {
|
|
229
229
|
formatter: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
|
@@ -95,7 +95,7 @@ var stdin_default = defineComponent({
|
|
|
95
95
|
return genOptions(+minSecond, +maxSecond, type, formatter, filter, currentValues.value);
|
|
96
96
|
default:
|
|
97
97
|
if (process.env.NODE_ENV !== "production") {
|
|
98
|
-
throw new Error(`[Vant]
|
|
98
|
+
throw new Error(`[Vant] TimePicker: unsupported columns type: ${type}`);
|
|
99
99
|
}
|
|
100
100
|
return [];
|
|
101
101
|
}
|
|
@@ -143,8 +143,8 @@ export declare const TimePicker: import("../utils").WithInstall<import("vue").De
|
|
|
143
143
|
};
|
|
144
144
|
}>> & Readonly<{
|
|
145
145
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
146
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
147
146
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
147
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
148
148
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
149
149
|
}>, {
|
|
150
150
|
formatter: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
|
package/es/utils/constant.mjs
CHANGED
|
@@ -7,7 +7,7 @@ const BORDER_SURROUND = `${BORDER}--surround`;
|
|
|
7
7
|
const BORDER_TOP_BOTTOM = `${BORDER}--top-bottom`;
|
|
8
8
|
const BORDER_UNSET_TOP_BOTTOM = `${BORDER}-unset--top-bottom`;
|
|
9
9
|
const HAPTICS_FEEDBACK = "van-haptics-feedback";
|
|
10
|
-
const FORM_KEY = Symbol("van-form");
|
|
10
|
+
const FORM_KEY = /* @__PURE__ */ Symbol("van-form");
|
|
11
11
|
const LONG_PRESS_START_TIME = 500;
|
|
12
12
|
const TAP_OFFSET = 5;
|
|
13
13
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root,:host{--van-action-bar-button-height: 40px;--van-action-bar-button-warning-color: var(--van-gradient-orange);--van-action-bar-button-danger-color: var(--van-gradient-red)}.van-action-bar-button{flex:1;height:var(--van-action-bar-button-height);font-weight:var(--van-font-bold);font-size:var(--van-font-size-md);border:none;border-radius:0}.van-action-bar-button--first{margin-left:5px;border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-action-bar-button--last{margin-right:5px;border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-action-bar-button--warning{background:var(--van-action-bar-button-warning-color)}.van-action-bar-button--danger{background:var(--van-action-bar-button-danger-color)}@media
|
|
1
|
+
:root,:host{--van-action-bar-button-height: 40px;--van-action-bar-button-warning-color: var(--van-gradient-orange);--van-action-bar-button-danger-color: var(--van-gradient-red)}.van-action-bar-button{flex:1;height:var(--van-action-bar-button-height);font-weight:var(--van-font-bold);font-size:var(--van-font-size-md);border:none;border-radius:0}.van-action-bar-button--first{margin-left:5px;border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-action-bar-button--last{margin-right:5px;border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-action-bar-button--warning{background:var(--van-action-bar-button-warning-color)}.van-action-bar-button--danger{background:var(--van-action-bar-button-danger-color)}@media(max-width:321px){.van-action-bar-button{font-size:13px}}
|
|
@@ -178,8 +178,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
178
178
|
};
|
|
179
179
|
}>> & Readonly<{
|
|
180
180
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
181
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
182
181
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
182
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
183
183
|
}>, {
|
|
184
184
|
round: boolean;
|
|
185
185
|
overlay: boolean;
|
|
@@ -110,8 +110,8 @@ export declare const ActionSheet: import("../utils").WithInstall<import("vue").D
|
|
|
110
110
|
};
|
|
111
111
|
}>> & Readonly<{
|
|
112
112
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
113
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
114
113
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
114
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
115
115
|
}>, {
|
|
116
116
|
round: boolean;
|
|
117
117
|
overlay: boolean;
|
|
@@ -34,8 +34,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
34
34
|
default: string;
|
|
35
35
|
};
|
|
36
36
|
}>> & Readonly<{
|
|
37
|
-
onClick?: ((...args: any[]) => any) | undefined;
|
|
38
37
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
38
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
39
39
|
onEdit?: ((...args: any[]) => any) | undefined;
|
|
40
40
|
}>, {
|
|
41
41
|
disabled: boolean;
|
package/lib/area/Area.d.ts
CHANGED
|
@@ -118,8 +118,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<import(".
|
|
|
118
118
|
};
|
|
119
119
|
}>> & Readonly<{
|
|
120
120
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
121
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
122
121
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
122
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
123
123
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
124
124
|
}>, {
|
|
125
125
|
readonly: boolean;
|
package/lib/area/index.d.ts
CHANGED
|
@@ -76,8 +76,8 @@ export declare const Area: import("../utils").WithInstall<import("vue").DefineCo
|
|
|
76
76
|
};
|
|
77
77
|
}>> & Readonly<{
|
|
78
78
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
79
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
80
79
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
80
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
81
81
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
82
82
|
}>, {
|
|
83
83
|
readonly: boolean;
|
package/lib/calendar/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root,:host{--van-calendar-background: var(--van-background-2);--van-calendar-popup-height: 80%;--van-calendar-header-shadow: 0 2px 10px rgba(125, 126, 128, .16);--van-calendar-header-title-height: 44px;--van-calendar-header-title-font-size: var(--van-font-size-lg);--van-calendar-header-subtitle-font-size: var(--van-font-size-md);--van-calendar-header-action-width: 28px;--van-calendar-header-action-color: var(--van-text-color);--van-calendar-header-action-disabled-color: var(--van-text-color-3);--van-calendar-weekdays-height: 30px;--van-calendar-weekdays-font-size: var(--van-font-size-sm);--van-calendar-month-title-font-size: var(--van-font-size-md);--van-calendar-month-mark-color: rgba(242, 243, 245, .8);--van-calendar-month-mark-font-size: 160px;--van-calendar-day-height: 64px;--van-calendar-day-font-size: var(--van-font-size-lg);--van-calendar-day-margin-bottom: 4px;--van-calendar-day-disabled-color: var(--van-text-color-3);--van-calendar-range-edge-color: var(--van-white);--van-calendar-range-edge-background: var(--van-primary-color);--van-calendar-range-middle-color: var(--van-primary-color);--van-calendar-range-middle-background-opacity: .1;--van-calendar-selected-day-size: 54px;--van-calendar-selected-day-color: var(--van-white);--van-calendar-selected-day-background: var(--van-primary-color);--van-calendar-info-font-size: var(--van-font-size-xs);--van-calendar-info-line-height: var(--van-line-height-xs);--van-calendar-confirm-button-height: 36px;--van-calendar-confirm-button-margin: 7px 0}.van-theme-dark{--van-calendar-month-mark-color: rgba(100, 101, 102, .2);--van-calendar-day-disabled-color: var(--van-gray-7)}.van-calendar{display:flex;flex-direction:column;height:100%;background:var(--van-calendar-background)}.van-calendar__popup.van-popup--top,.van-calendar__popup.van-popup--bottom{height:var(--van-calendar-popup-height)}.van-calendar__popup.van-popup--left,.van-calendar__popup.van-popup--right{height:100%}.van-calendar__popup .van-popup__close-icon{top:11px}.van-calendar__header{flex-shrink:0;box-shadow:var(--van-calendar-header-shadow)}.van-calendar__month-title,.van-calendar__header-title,.van-calendar__header-subtitle{color:var(--van-text-color);height:var(--van-calendar-header-title-height);font-weight:var(--van-font-bold);line-height:var(--van-calendar-header-title-height);text-align:center}.van-calendar__header-title{font-size:var(--van-calendar-header-title-font-size)}.van-calendar__header-subtitle{font-size:var(--van-calendar-header-subtitle-font-size)}.van-calendar__header-subtitle--with-switch{display:flex;align-items:center;padding:0 var(--van-padding-base)}.van-calendar__header-subtitle-text{flex:1}.van-calendar__header-action{display:flex;align-items:center;justify-content:center;min-width:var(--van-calendar-header-action-width);height:100%;color:var(--van-calendar-header-action-color);cursor:pointer}.van-calendar__header-action--disabled{color:var(--van-calendar-header-action-disabled-color);cursor:not-allowed}.van-calendar__month-title{font-size:var(--van-calendar-month-title-font-size)}.van-calendar__weekdays{display:flex}.van-calendar__weekday{flex:1;font-size:var(--van-calendar-weekdays-font-size);line-height:var(--van-calendar-weekdays-height);text-align:center}.van-calendar__body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__days{position:relative;display:flex;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;color:var(--van-calendar-month-mark-color);font-size:var(--van-calendar-month-mark-font-size);transform:translate(-50%,-50%);pointer-events:none}.van-calendar__day,.van-calendar__selected-day{display:flex;align-items:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:var(--van-calendar-day-height);font-size:var(--van-calendar-day-font-size);margin-bottom:var(--van-calendar-day-margin-bottom);cursor:pointer}.van-calendar__day--end,.van-calendar__day--start,.van-calendar__day--start-end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected{color:var(--van-calendar-range-edge-color);background:var(--van-calendar-range-edge-background)}.van-calendar__day--start{border-radius:var(--van-radius-md) 0 0 var(--van-radius-md)}.van-calendar__day--end{border-radius:0 var(--van-radius-md) var(--van-radius-md) 0}.van-calendar__day--start-end,.van-calendar__day--multiple-selected{border-radius:var(--van-radius-md)}.van-calendar__day--middle{color:var(--van-calendar-range-middle-color)}.van-calendar__day--middle:after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:var(--van-calendar-range-middle-background-opacity);content:""}.van-calendar__day--disabled{color:var(--van-calendar-day-disabled-color);cursor:default}.van-calendar__top-info,.van-calendar__bottom-info{position:absolute;right:0;left:0;font-size:var(--van-calendar-info-font-size);line-height:var(--van-calendar-info-line-height)}@media
|
|
1
|
+
:root,:host{--van-calendar-background: var(--van-background-2);--van-calendar-popup-height: 80%;--van-calendar-header-shadow: 0 2px 10px rgba(125, 126, 128, .16);--van-calendar-header-title-height: 44px;--van-calendar-header-title-font-size: var(--van-font-size-lg);--van-calendar-header-subtitle-font-size: var(--van-font-size-md);--van-calendar-header-action-width: 28px;--van-calendar-header-action-color: var(--van-text-color);--van-calendar-header-action-disabled-color: var(--van-text-color-3);--van-calendar-weekdays-height: 30px;--van-calendar-weekdays-font-size: var(--van-font-size-sm);--van-calendar-month-title-font-size: var(--van-font-size-md);--van-calendar-month-mark-color: rgba(242, 243, 245, .8);--van-calendar-month-mark-font-size: 160px;--van-calendar-day-height: 64px;--van-calendar-day-font-size: var(--van-font-size-lg);--van-calendar-day-margin-bottom: 4px;--van-calendar-day-disabled-color: var(--van-text-color-3);--van-calendar-range-edge-color: var(--van-white);--van-calendar-range-edge-background: var(--van-primary-color);--van-calendar-range-middle-color: var(--van-primary-color);--van-calendar-range-middle-background-opacity: .1;--van-calendar-selected-day-size: 54px;--van-calendar-selected-day-color: var(--van-white);--van-calendar-selected-day-background: var(--van-primary-color);--van-calendar-info-font-size: var(--van-font-size-xs);--van-calendar-info-line-height: var(--van-line-height-xs);--van-calendar-confirm-button-height: 36px;--van-calendar-confirm-button-margin: 7px 0}.van-theme-dark{--van-calendar-month-mark-color: rgba(100, 101, 102, .2);--van-calendar-day-disabled-color: var(--van-gray-7)}.van-calendar{display:flex;flex-direction:column;height:100%;background:var(--van-calendar-background)}.van-calendar__popup.van-popup--top,.van-calendar__popup.van-popup--bottom{height:var(--van-calendar-popup-height)}.van-calendar__popup.van-popup--left,.van-calendar__popup.van-popup--right{height:100%}.van-calendar__popup .van-popup__close-icon{top:11px}.van-calendar__header{flex-shrink:0;box-shadow:var(--van-calendar-header-shadow)}.van-calendar__month-title,.van-calendar__header-title,.van-calendar__header-subtitle{color:var(--van-text-color);height:var(--van-calendar-header-title-height);font-weight:var(--van-font-bold);line-height:var(--van-calendar-header-title-height);text-align:center}.van-calendar__header-title{font-size:var(--van-calendar-header-title-font-size)}.van-calendar__header-subtitle{font-size:var(--van-calendar-header-subtitle-font-size)}.van-calendar__header-subtitle--with-switch{display:flex;align-items:center;padding:0 var(--van-padding-base)}.van-calendar__header-subtitle-text{flex:1}.van-calendar__header-action{display:flex;align-items:center;justify-content:center;min-width:var(--van-calendar-header-action-width);height:100%;color:var(--van-calendar-header-action-color);cursor:pointer}.van-calendar__header-action--disabled{color:var(--van-calendar-header-action-disabled-color);cursor:not-allowed}.van-calendar__month-title{font-size:var(--van-calendar-month-title-font-size)}.van-calendar__weekdays{display:flex}.van-calendar__weekday{flex:1;font-size:var(--van-calendar-weekdays-font-size);line-height:var(--van-calendar-weekdays-height);text-align:center}.van-calendar__body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__days{position:relative;display:flex;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;color:var(--van-calendar-month-mark-color);font-size:var(--van-calendar-month-mark-font-size);transform:translate(-50%,-50%);pointer-events:none}.van-calendar__day,.van-calendar__selected-day{display:flex;align-items:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:var(--van-calendar-day-height);font-size:var(--van-calendar-day-font-size);margin-bottom:var(--van-calendar-day-margin-bottom);cursor:pointer}.van-calendar__day--end,.van-calendar__day--start,.van-calendar__day--start-end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected{color:var(--van-calendar-range-edge-color);background:var(--van-calendar-range-edge-background)}.van-calendar__day--start{border-radius:var(--van-radius-md) 0 0 var(--van-radius-md)}.van-calendar__day--end{border-radius:0 var(--van-radius-md) var(--van-radius-md) 0}.van-calendar__day--start-end,.van-calendar__day--multiple-selected{border-radius:var(--van-radius-md)}.van-calendar__day--middle{color:var(--van-calendar-range-middle-color)}.van-calendar__day--middle:after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:var(--van-calendar-range-middle-background-opacity);content:""}.van-calendar__day--disabled{color:var(--van-calendar-day-disabled-color);cursor:default}.van-calendar__top-info,.van-calendar__bottom-info{position:absolute;right:0;left:0;font-size:var(--van-calendar-info-font-size);line-height:var(--van-calendar-info-line-height)}@media(max-width:350px){.van-calendar__top-info,.van-calendar__bottom-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{width:var(--van-calendar-selected-day-size);height:var(--van-calendar-selected-day-size);color:var(--van-calendar-selected-day-color);background:var(--van-calendar-selected-day-background);border-radius:var(--van-radius-md)}.van-calendar__footer{flex-shrink:0;padding-left:var(--van-padding-md);padding-right:var(--van-padding-md)}.van-calendar__confirm{height:var(--van-calendar-confirm-button-height);margin:var(--van-calendar-confirm-button-margin)}
|
|
@@ -22,7 +22,7 @@ __export(stdin_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(stdin_exports);
|
|
24
24
|
var import_vue = require("vue");
|
|
25
|
-
const POPUP_TOGGLE_KEY = Symbol();
|
|
25
|
+
const POPUP_TOGGLE_KEY = /* @__PURE__ */ Symbol();
|
|
26
26
|
function onPopupReopen(callback) {
|
|
27
27
|
const popupToggleStatus = (0, import_vue.inject)(POPUP_TOGGLE_KEY, null);
|
|
28
28
|
if (popupToggleStatus) {
|
|
@@ -25,8 +25,8 @@ __export(stdin_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(stdin_exports);
|
|
27
27
|
var import_vue = require("vue");
|
|
28
|
-
const TAB_STATUS_KEY = Symbol();
|
|
29
|
-
const ALL_TAB_STATUS_KEY = Symbol();
|
|
28
|
+
const TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
|
|
29
|
+
const ALL_TAB_STATUS_KEY = /* @__PURE__ */ Symbol();
|
|
30
30
|
const useTabStatus = () => (0, import_vue.inject)(TAB_STATUS_KEY, null);
|
|
31
31
|
const useAllTabStatus = () => (0, import_vue.inject)(ALL_TAB_STATUS_KEY, null);
|
|
32
32
|
const useProvideTabStatus = (status) => {
|
|
@@ -50,12 +50,12 @@ function useTouch() {
|
|
|
50
50
|
direction.value = "";
|
|
51
51
|
isTap.value = true;
|
|
52
52
|
};
|
|
53
|
-
const start = (event) => {
|
|
53
|
+
const start = ((event) => {
|
|
54
54
|
reset();
|
|
55
55
|
startX.value = event.touches[0].clientX;
|
|
56
56
|
startY.value = event.touches[0].clientY;
|
|
57
|
-
};
|
|
58
|
-
const move = (event) => {
|
|
57
|
+
});
|
|
58
|
+
const move = ((event) => {
|
|
59
59
|
const touch = event.touches[0];
|
|
60
60
|
deltaX.value = (touch.clientX < 0 ? 0 : touch.clientX) - startX.value;
|
|
61
61
|
deltaY.value = touch.clientY - startY.value;
|
|
@@ -68,7 +68,7 @@ function useTouch() {
|
|
|
68
68
|
if (isTap.value && (offsetX.value > import_utils.TAP_OFFSET || offsetY.value > import_utils.TAP_OFFSET)) {
|
|
69
69
|
isTap.value = false;
|
|
70
70
|
}
|
|
71
|
-
};
|
|
71
|
+
});
|
|
72
72
|
return {
|
|
73
73
|
move,
|
|
74
74
|
start,
|
|
@@ -156,8 +156,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
156
156
|
};
|
|
157
157
|
}>> & Readonly<{
|
|
158
158
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
159
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
160
159
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
160
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
161
161
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
162
162
|
}>, {
|
|
163
163
|
formatter: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
|
@@ -99,8 +99,8 @@ export declare const DatePicker: import("../utils").WithInstall<import("vue").De
|
|
|
99
99
|
};
|
|
100
100
|
}>> & Readonly<{
|
|
101
101
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
102
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
103
102
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
103
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
104
104
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
105
105
|
}>, {
|
|
106
106
|
formatter: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
|
package/lib/dialog/Dialog.d.ts
CHANGED
|
@@ -184,8 +184,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
184
184
|
destroyOnClose: BooleanConstructor;
|
|
185
185
|
}>> & Readonly<{
|
|
186
186
|
onKeydown?: ((...args: any[]) => any) | undefined;
|
|
187
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
188
187
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
188
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
189
189
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
190
190
|
}>, {
|
|
191
191
|
overlay: boolean;
|
package/lib/dialog/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root,:host{--van-dialog-width: 320px;--van-dialog-small-screen-width: 90%;--van-dialog-font-size: var(--van-font-size-lg);--van-dialog-transition: var(--van-duration-base);--van-dialog-radius: 16px;--van-dialog-background: var(--van-background-2);--van-dialog-header-font-weight: var(--van-font-bold);--van-dialog-header-line-height: 24px;--van-dialog-header-padding-top: 26px;--van-dialog-header-isolated-padding: var(--van-padding-lg) 0;--van-dialog-message-padding: var(--van-padding-lg);--van-dialog-message-font-size: var(--van-font-size-md);--van-dialog-message-line-height: var(--van-line-height-md);--van-dialog-message-max-height: 60vh;--van-dialog-has-title-message-text-color: var(--van-gray-7);--van-dialog-has-title-message-padding-top: var(--van-padding-xs);--van-dialog-button-height: 48px;--van-dialog-round-button-height: 36px;--van-dialog-confirm-button-text-color: var(--van-primary-color)}.van-dialog{top:45%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background);border-radius:var(--van-dialog-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--van-dialog-transition);transition-property:transform,opacity}@media
|
|
1
|
+
:root,:host{--van-dialog-width: 320px;--van-dialog-small-screen-width: 90%;--van-dialog-font-size: var(--van-font-size-lg);--van-dialog-transition: var(--van-duration-base);--van-dialog-radius: 16px;--van-dialog-background: var(--van-background-2);--van-dialog-header-font-weight: var(--van-font-bold);--van-dialog-header-line-height: 24px;--van-dialog-header-padding-top: 26px;--van-dialog-header-isolated-padding: var(--van-padding-lg) 0;--van-dialog-message-padding: var(--van-padding-lg);--van-dialog-message-font-size: var(--van-font-size-md);--van-dialog-message-line-height: var(--van-line-height-md);--van-dialog-message-max-height: 60vh;--van-dialog-has-title-message-text-color: var(--van-gray-7);--van-dialog-has-title-message-padding-top: var(--van-padding-xs);--van-dialog-button-height: 48px;--van-dialog-round-button-height: 36px;--van-dialog-confirm-button-text-color: var(--van-primary-color)}.van-dialog{top:45%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background);border-radius:var(--van-dialog-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--van-dialog-transition);transition-property:transform,opacity}@media(max-width:321px){.van-dialog{width:var(--van-dialog-small-screen-width)}}.van-dialog__header{color:var(--van-text-color);padding-top:var(--van-dialog-header-padding-top);font-weight:var(--van-dialog-header-font-weight);line-height:var(--van-dialog-header-line-height);text-align:center}.van-dialog__header--isolated{padding:var(--van-dialog-header-isolated-padding)}.van-dialog__content--isolated{display:flex;align-items:center;min-height:104px}.van-dialog__message{color:var(--van-text-color);flex:1;max-height:var(--van-dialog-message-max-height);padding:26px var(--van-dialog-message-padding);overflow-y:auto;font-size:var(--van-dialog-message-font-size);line-height:var(--van-dialog-message-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:var(--van-dialog-has-title-message-padding-top);color:var(--van-dialog-has-title-message-text-color)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__message--justify{text-align:justify}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__confirm,.van-dialog__cancel{flex:1;height:var(--van-dialog-button-height);margin:0;border:0;border-radius:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog--round-button .van-action-bar-button--first{border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-dialog--round-button .van-action-bar-button--last{border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-dialog-bounce-enter-from{transform:translate3d(0,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate3d(0,-50%,0) scale(.9);opacity:0}
|
package/lib/dialog/index.d.ts
CHANGED
|
@@ -120,8 +120,8 @@ export declare const Dialog: import("../utils").WithInstall<import("vue").Define
|
|
|
120
120
|
destroyOnClose: BooleanConstructor;
|
|
121
121
|
}>> & Readonly<{
|
|
122
122
|
onKeydown?: ((...args: any[]) => any) | undefined;
|
|
123
|
-
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
124
123
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
124
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
125
125
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
126
126
|
}>, {
|
|
127
127
|
overlay: boolean;
|
package/lib/field/Field.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PropType, type ExtractPropTypes, type HTMLAttributes } from 'vue';
|
|
2
|
-
import type { FieldRule, FieldType, FieldTextAlign, FieldClearTrigger, FieldFormatTrigger, FieldAutosizeConfig } from './types';
|
|
2
|
+
import type { FieldRule, FieldType, FieldTextAlign, FieldClearTrigger, FieldFormatTrigger, FieldAutosizeConfig, FieldEnterKeyHint } from './types';
|
|
3
3
|
export declare const fieldSharedProps: {
|
|
4
4
|
id: StringConstructor;
|
|
5
5
|
name: StringConstructor;
|
|
@@ -25,7 +25,7 @@ export declare const fieldSharedProps: {
|
|
|
25
25
|
autocapitalize: StringConstructor;
|
|
26
26
|
autocorrect: StringConstructor;
|
|
27
27
|
errorMessage: StringConstructor;
|
|
28
|
-
enterkeyhint:
|
|
28
|
+
enterkeyhint: PropType<FieldEnterKeyHint>;
|
|
29
29
|
clearTrigger: {
|
|
30
30
|
type: PropType<FieldClearTrigger>;
|
|
31
31
|
default: FieldClearTrigger;
|
|
@@ -107,7 +107,7 @@ export declare const fieldProps: {
|
|
|
107
107
|
autocapitalize: StringConstructor;
|
|
108
108
|
autocorrect: StringConstructor;
|
|
109
109
|
errorMessage: StringConstructor;
|
|
110
|
-
enterkeyhint:
|
|
110
|
+
enterkeyhint: PropType<FieldEnterKeyHint>;
|
|
111
111
|
clearTrigger: {
|
|
112
112
|
type: PropType<FieldClearTrigger>;
|
|
113
113
|
default: FieldClearTrigger;
|
|
@@ -207,7 +207,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
207
207
|
autocapitalize: StringConstructor;
|
|
208
208
|
autocorrect: StringConstructor;
|
|
209
209
|
errorMessage: StringConstructor;
|
|
210
|
-
enterkeyhint:
|
|
210
|
+
enterkeyhint: PropType<FieldEnterKeyHint>;
|
|
211
211
|
clearTrigger: {
|
|
212
212
|
type: PropType<FieldClearTrigger>;
|
|
213
213
|
default: FieldClearTrigger;
|
|
@@ -305,7 +305,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
305
305
|
autocapitalize: StringConstructor;
|
|
306
306
|
autocorrect: StringConstructor;
|
|
307
307
|
errorMessage: StringConstructor;
|
|
308
|
-
enterkeyhint:
|
|
308
|
+
enterkeyhint: PropType<FieldEnterKeyHint>;
|
|
309
309
|
clearTrigger: {
|
|
310
310
|
type: PropType<FieldClearTrigger>;
|
|
311
311
|
default: FieldClearTrigger;
|
package/lib/field/Field.js
CHANGED
|
@@ -243,7 +243,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
243
243
|
var _a, _b;
|
|
244
244
|
const originalValue = value;
|
|
245
245
|
value = limitValueLength(value);
|
|
246
|
-
const limitDiffLen =
|
|
246
|
+
const limitDiffLen = originalValue.length - value.length;
|
|
247
247
|
if (props.type === "number" || props.type === "digit") {
|
|
248
248
|
const isNumber = props.type === "number";
|
|
249
249
|
value = (0, import_utils.formatNumber)(value, isNumber, isNumber);
|
|
@@ -269,7 +269,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
269
269
|
selectionEnd
|
|
270
270
|
} = inputRef.value;
|
|
271
271
|
const bcoVal = (0, import_utils2.cutString)(originalValue, selectionEnd);
|
|
272
|
-
formatterDiffLen =
|
|
272
|
+
formatterDiffLen = formatter(bcoVal).length - bcoVal.length;
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
if (inputRef.value && inputRef.value.value !== value) {
|
|
@@ -280,7 +280,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
280
280
|
} = inputRef.value;
|
|
281
281
|
inputRef.value.value = value;
|
|
282
282
|
if ((0, import_utils.isDef)(selectionStart) && (0, import_utils.isDef)(selectionEnd)) {
|
|
283
|
-
const valueLen =
|
|
283
|
+
const valueLen = value.length;
|
|
284
284
|
if (limitDiffLen) {
|
|
285
285
|
selectionStart -= limitDiffLen;
|
|
286
286
|
selectionEnd -= limitDiffLen;
|
package/lib/field/index.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
|
54
54
|
autocapitalize: StringConstructor;
|
|
55
55
|
autocorrect: StringConstructor;
|
|
56
56
|
errorMessage: StringConstructor;
|
|
57
|
-
enterkeyhint:
|
|
57
|
+
enterkeyhint: import("vue").PropType<import("./types").FieldEnterKeyHint>;
|
|
58
58
|
clearTrigger: {
|
|
59
59
|
type: import("vue").PropType<import("./types").FieldClearTrigger>;
|
|
60
60
|
default: import("./types").FieldClearTrigger;
|
|
@@ -152,7 +152,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
|
152
152
|
autocapitalize: StringConstructor;
|
|
153
153
|
autocorrect: StringConstructor;
|
|
154
154
|
errorMessage: StringConstructor;
|
|
155
|
-
enterkeyhint:
|
|
155
|
+
enterkeyhint: import("vue").PropType<import("./types").FieldEnterKeyHint>;
|
|
156
156
|
clearTrigger: {
|
|
157
157
|
type: import("vue").PropType<import("./types").FieldClearTrigger>;
|
|
158
158
|
default: import("./types").FieldClearTrigger;
|
|
@@ -230,7 +230,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
|
230
230
|
export default Field;
|
|
231
231
|
export { fieldProps } from './Field';
|
|
232
232
|
export type { FieldProps };
|
|
233
|
-
export type { FieldType, FieldRule, FieldInstance, FieldTextAlign, FieldThemeVars, FieldRuleMessage, FieldClearTrigger, FieldFormatTrigger, FieldRuleValidator, FieldRuleFormatter, FieldValidateError, FieldAutosizeConfig, FieldValidateTrigger, FieldValidationStatus, } from './types';
|
|
233
|
+
export type { FieldType, FieldRule, FieldInstance, FieldTextAlign, FieldThemeVars, FieldRuleMessage, FieldClearTrigger, FieldFormatTrigger, FieldRuleValidator, FieldRuleFormatter, FieldValidateError, FieldAutosizeConfig, FieldValidateTrigger, FieldValidationStatus, FieldEnterKeyHint, } from './types';
|
|
234
234
|
declare module 'vue' {
|
|
235
235
|
interface GlobalComponents {
|
|
236
236
|
VanField: typeof Field;
|
package/lib/field/types.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type FieldTextAlign = 'left' | 'center' | 'right' | 'top';
|
|
|
5
5
|
export type FieldClearTrigger = 'always' | 'focus';
|
|
6
6
|
export type FieldFormatTrigger = 'onBlur' | 'onChange';
|
|
7
7
|
export type FieldValidateTrigger = 'onBlur' | 'onChange' | 'onSubmit';
|
|
8
|
+
export type FieldEnterKeyHint = 'search' | 'done' | 'enter' | 'go' | 'next' | 'previous' | 'send';
|
|
8
9
|
export type FieldAutosizeConfig = {
|
|
9
10
|
maxHeight?: number;
|
|
10
11
|
minHeight?: number;
|
|
@@ -12,6 +12,10 @@ export declare const floatingPanelProps: {
|
|
|
12
12
|
type: (NumberConstructor | StringConstructor)[];
|
|
13
13
|
default: number;
|
|
14
14
|
};
|
|
15
|
+
magnetic: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: true;
|
|
18
|
+
};
|
|
15
19
|
contentDraggable: {
|
|
16
20
|
type: BooleanConstructor;
|
|
17
21
|
default: true;
|
|
@@ -36,6 +40,10 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
36
40
|
type: (NumberConstructor | StringConstructor)[];
|
|
37
41
|
default: number;
|
|
38
42
|
};
|
|
43
|
+
magnetic: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: true;
|
|
46
|
+
};
|
|
39
47
|
contentDraggable: {
|
|
40
48
|
type: BooleanConstructor;
|
|
41
49
|
default: true;
|
|
@@ -58,6 +66,10 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
58
66
|
type: (NumberConstructor | StringConstructor)[];
|
|
59
67
|
default: number;
|
|
60
68
|
};
|
|
69
|
+
magnetic: {
|
|
70
|
+
type: BooleanConstructor;
|
|
71
|
+
default: true;
|
|
72
|
+
};
|
|
61
73
|
contentDraggable: {
|
|
62
74
|
type: BooleanConstructor;
|
|
63
75
|
default: true;
|
|
@@ -75,6 +87,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
75
87
|
safeAreaInsetBottom: boolean;
|
|
76
88
|
duration: string | number;
|
|
77
89
|
lockScroll: boolean;
|
|
90
|
+
magnetic: boolean;
|
|
78
91
|
anchors: number[];
|
|
79
92
|
contentDraggable: boolean;
|
|
80
93
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -31,6 +31,7 @@ const floatingPanelProps = {
|
|
|
31
31
|
height: (0, import_utils.makeNumericProp)(0),
|
|
32
32
|
anchors: (0, import_utils.makeArrayProp)(),
|
|
33
33
|
duration: (0, import_utils.makeNumericProp)(0.3),
|
|
34
|
+
magnetic: import_utils.truthProp,
|
|
34
35
|
contentDraggable: import_utils.truthProp,
|
|
35
36
|
lockScroll: Boolean,
|
|
36
37
|
safeAreaInsetBottom: import_utils.truthProp
|
|
@@ -107,7 +108,15 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
107
108
|
const onTouchend = () => {
|
|
108
109
|
maxScroll = -1;
|
|
109
110
|
dragging.value = false;
|
|
110
|
-
|
|
111
|
+
if (props.magnetic) {
|
|
112
|
+
height.value = (0, import_utils.closest)(anchors.value, height.value);
|
|
113
|
+
} else {
|
|
114
|
+
const {
|
|
115
|
+
min,
|
|
116
|
+
max
|
|
117
|
+
} = boundary.value;
|
|
118
|
+
height.value = Math.max(min, Math.min(max, height.value));
|
|
119
|
+
}
|
|
111
120
|
if (height.value !== -startY) {
|
|
112
121
|
emit("heightChange", {
|
|
113
122
|
height: height.value
|
|
@@ -146,7 +155,10 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
146
155
|
"onTouchcancel": onTouchend
|
|
147
156
|
}, [renderHeader(), (0, import_vue.createVNode)("div", {
|
|
148
157
|
"class": bem("content"),
|
|
149
|
-
"ref": contentRef
|
|
158
|
+
"ref": contentRef,
|
|
159
|
+
"style": {
|
|
160
|
+
paddingBottom: (0, import_utils.addUnit)(boundary.value.max - height.value)
|
|
161
|
+
}
|
|
150
162
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
|
|
151
163
|
};
|
|
152
164
|
}
|
|
@@ -11,6 +11,10 @@ export declare const FloatingPanel: import("../utils").WithInstall<import("vue")
|
|
|
11
11
|
type: (NumberConstructor | StringConstructor)[];
|
|
12
12
|
default: number;
|
|
13
13
|
};
|
|
14
|
+
magnetic: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: true;
|
|
17
|
+
};
|
|
14
18
|
contentDraggable: {
|
|
15
19
|
type: BooleanConstructor;
|
|
16
20
|
default: true;
|
|
@@ -33,6 +37,10 @@ export declare const FloatingPanel: import("../utils").WithInstall<import("vue")
|
|
|
33
37
|
type: (NumberConstructor | StringConstructor)[];
|
|
34
38
|
default: number;
|
|
35
39
|
};
|
|
40
|
+
magnetic: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: true;
|
|
43
|
+
};
|
|
36
44
|
contentDraggable: {
|
|
37
45
|
type: BooleanConstructor;
|
|
38
46
|
default: true;
|
|
@@ -50,6 +58,7 @@ export declare const FloatingPanel: import("../utils").WithInstall<import("vue")
|
|
|
50
58
|
safeAreaInsetBottom: boolean;
|
|
51
59
|
duration: string | number;
|
|
52
60
|
lockScroll: boolean;
|
|
61
|
+
magnetic: boolean;
|
|
53
62
|
anchors: number[];
|
|
54
63
|
contentDraggable: boolean;
|
|
55
64
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
package/lib/grid/Grid.d.ts
CHANGED
|
@@ -66,8 +66,8 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
66
66
|
}>> & Readonly<{}>, {
|
|
67
67
|
reverse: boolean;
|
|
68
68
|
center: boolean;
|
|
69
|
-
border: boolean;
|
|
70
69
|
square: boolean;
|
|
70
|
+
border: boolean;
|
|
71
71
|
clickable: boolean;
|
|
72
72
|
columnNum: string | number;
|
|
73
73
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/lib/grid/index.d.ts
CHANGED
|
@@ -39,8 +39,8 @@ export declare const Grid: import("../utils").WithInstall<import("vue").DefineCo
|
|
|
39
39
|
}>> & Readonly<{}>, {
|
|
40
40
|
reverse: boolean;
|
|
41
41
|
center: boolean;
|
|
42
|
-
border: boolean;
|
|
43
42
|
square: boolean;
|
|
43
|
+
border: boolean;
|
|
44
44
|
clickable: boolean;
|
|
45
45
|
columnNum: string | number;
|
|
46
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|