persagy-vant 0.0.23 → 0.0.25
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/action-sheet/index.css +1 -1
- package/es/action-sheet/index.d.ts +0 -63
- package/es/action-sheet/index.less +0 -96
- package/es/action-sheet/index.mjs +0 -3
- package/es/action-sheet/style/index.mjs +0 -8
- package/es/action-sheet/style/less.mjs +0 -8
- package/es/background/Background.d.ts +23 -0
- package/es/background/Background.mjs +23 -0
- package/es/background/assets/background-default.png +0 -0
- package/es/background/assets/background-light.png +0 -0
- package/es/background/assets/background-style-1.png +0 -0
- package/es/background/assets/background-style-2.png +0 -0
- package/es/background/assets/background-style-3.png +0 -0
- package/es/background/index.css +1 -0
- package/es/background/index.d.ts +21 -0
- package/es/background/index.less +41 -0
- package/es/background/index.mjs +8 -0
- package/es/background/style/index.d.ts +1 -0
- package/es/background/style/index.mjs +2 -0
- package/es/background/style/less.d.ts +1 -0
- package/es/background/style/less.mjs +2 -0
- package/es/background/types.d.ts +1 -0
- package/es/background/types.mjs +0 -0
- package/es/background/var.css +0 -0
- package/es/background/var.less +6 -0
- package/es/cascader/style/index.mjs +0 -8
- package/es/cascader/style/less.mjs +0 -8
- package/es/{action-sheet/ActionSheetPanel.d.ts → checkbox-panel/CheckboxPanel.d.ts} +11 -26
- package/es/checkbox-panel/CheckboxPanel.mjs +100 -0
- package/es/checkbox-panel/index.css +1 -0
- package/es/checkbox-panel/index.d.ts +58 -0
- package/es/checkbox-panel/index.less +26 -0
- package/es/checkbox-panel/index.mjs +8 -0
- package/es/checkbox-panel/style/index.d.ts +1 -0
- package/es/checkbox-panel/style/index.mjs +16 -0
- package/es/checkbox-panel/style/less.d.ts +1 -0
- package/es/checkbox-panel/style/less.mjs +16 -0
- package/es/coupon-list/style/index.mjs +1 -3
- package/es/coupon-list/style/less.mjs +1 -3
- package/es/datetime-picker/DatetimePicker.mjs +1 -3
- package/es/field/Field.d.ts +17 -4
- package/es/field/Field.mjs +1 -1
- package/es/field/index.d.ts +9 -2
- package/es/filter-tag/FilterTag.d.ts +14 -0
- package/es/filter-tag/FilterTag.mjs +6 -1
- package/es/filter-tag/index.css +1 -1
- package/es/filter-tag/index.d.ts +10 -1
- package/es/filter-tag/index.less +16 -0
- package/es/filter-tag/var.less +5 -0
- package/es/floor-select/FloorSelect.d.ts +38 -0
- package/es/floor-select/FloorSelect.mjs +234 -0
- package/es/floor-select/index.css +1 -0
- package/es/floor-select/index.d.ts +32 -0
- package/es/floor-select/index.less +57 -0
- package/es/floor-select/index.mjs +8 -0
- package/es/floor-select/style/index.d.ts +1 -0
- package/es/floor-select/style/index.mjs +20 -0
- package/es/floor-select/style/less.d.ts +1 -0
- package/es/floor-select/style/less.mjs +20 -0
- package/es/floor-select/types.d.ts +18 -0
- package/es/floor-select/types.mjs +0 -0
- package/es/fonts/meri-mobile-icon.ttf +0 -0
- package/es/fonts/meri-mobile-icon.woff +0 -0
- package/es/fonts/meri-mobile-icon.woff2 +0 -0
- package/es/form-panel/FormPanel.d.ts +32 -0
- package/es/form-panel/FormPanel.mjs +64 -0
- package/es/form-panel/index.css +1 -0
- package/es/form-panel/index.d.ts +28 -0
- package/es/form-panel/index.less +95 -0
- package/es/form-panel/index.mjs +8 -0
- package/es/form-panel/style/index.d.ts +1 -0
- package/es/form-panel/style/index.mjs +11 -0
- package/es/form-panel/style/less.d.ts +1 -0
- package/es/form-panel/style/less.mjs +11 -0
- package/es/friendly-tip/FriendlyTip.d.ts +86 -0
- package/es/friendly-tip/FriendlyTip.mjs +60 -0
- package/es/friendly-tip/index.css +1 -0
- package/es/friendly-tip/index.d.ts +64 -0
- package/es/friendly-tip/index.less +48 -0
- package/es/friendly-tip/index.mjs +8 -0
- package/es/friendly-tip/style/index.d.ts +1 -0
- package/es/friendly-tip/style/index.mjs +7 -0
- package/es/friendly-tip/style/less.d.ts +1 -0
- package/es/friendly-tip/style/less.mjs +7 -0
- package/es/friendly-tip/var.css +0 -0
- package/es/friendly-tip/var.less +10 -0
- package/es/index.d.ts +7 -1
- package/es/index.mjs +19 -1
- package/es/location-select/style/index.mjs +1 -1
- package/es/location-select/style/less.mjs +1 -1
- package/es/material-add/MaterialAdd.d.ts +14 -1
- package/es/material-add/MaterialAdd.mjs +98 -50
- package/es/material-add/index.d.ts +10 -1
- package/es/material-add/style/index.mjs +1 -1
- package/es/material-add/style/less.mjs +1 -1
- package/es/material-add/types.d.ts +9 -0
- package/es/multi-person-select/MultiPersonSelect.d.ts +1 -1
- package/es/multi-person-select/index.d.ts +1 -1
- package/es/multi-person-select/style/index.mjs +1 -1
- package/es/multi-person-select/style/less.mjs +1 -1
- package/es/notify/index.css +1 -1
- package/es/notify/index.less +10 -0
- package/es/notify/var.less +3 -0
- package/es/object-select/style/index.mjs +1 -1
- package/es/object-select/style/less.mjs +1 -1
- package/es/popover/Popover.mjs +5 -4
- package/es/popover/index.css +1 -1
- package/es/popover/index.less +12 -5
- package/es/popover/var.less +1 -1
- package/es/quantity-input/QuantityInput.d.ts +1 -1
- package/es/quantity-input/index.d.ts +2 -2
- package/es/radio-panel/RadioPanel.d.ts +41 -0
- package/es/radio-panel/RadioPanel.mjs +71 -0
- package/es/radio-panel/index.css +1 -0
- package/es/radio-panel/index.d.ts +31 -0
- package/es/radio-panel/index.less +26 -0
- package/es/radio-panel/index.mjs +8 -0
- package/es/radio-panel/style/index.d.ts +1 -0
- package/es/radio-panel/style/index.mjs +15 -0
- package/es/radio-panel/style/less.d.ts +1 -0
- package/es/radio-panel/style/less.mjs +15 -0
- package/es/rate/Rate.d.ts +1 -1
- package/es/rate/Rate.mjs +2 -1
- package/es/rate/RateCell.d.ts +196 -0
- package/es/rate/RateCell.mjs +60 -0
- package/es/rate/index.css +1 -1
- package/es/rate/index.d.ts +136 -0
- package/es/rate/index.less +35 -0
- package/es/rate/index.mjs +8 -0
- package/es/rate/style/index.mjs +5 -0
- package/es/rate/style/less.mjs +5 -0
- package/es/rate/var.less +1 -1
- package/es/search/Search.d.ts +13 -3
- package/es/search/index.d.ts +9 -2
- package/es/single-person-select/style/index.mjs +1 -2
- package/es/single-person-select/style/less.mjs +1 -2
- package/es/style/base.css +1 -1
- package/es/style/css-variables.css +1 -1
- package/es/style/css-variables.less +10 -0
- package/es/tab/style/index.mjs +0 -8
- package/es/tab/style/less.mjs +0 -8
- package/es/tabbar/index.css +1 -1
- package/es/tabbar/var.less +1 -1
- package/es/tabs/Tabs.mjs +5 -1
- package/es/tabs/index.css +1 -1
- package/es/tabs/index.less +4 -0
- package/es/tabs/style/index.mjs +0 -8
- package/es/tabs/style/less.mjs +0 -8
- package/es/tag/Tag.d.ts +13 -3
- package/es/tag/Tag.mjs +1 -1
- package/es/tag/index.d.ts +9 -2
- package/es/work-order-filter/style/index.mjs +1 -1
- package/es/work-order-filter/style/less.mjs +1 -1
- package/lib/action-sheet/index.css +1 -1
- package/lib/action-sheet/index.d.ts +0 -63
- package/lib/action-sheet/index.js +0 -3
- package/lib/action-sheet/index.less +0 -96
- package/lib/action-sheet/style/index.js +0 -8
- package/lib/action-sheet/style/less.js +0 -8
- package/lib/background/Background.d.ts +23 -0
- package/lib/background/Background.js +42 -0
- package/lib/background/assets/background-default.png +0 -0
- package/lib/background/assets/background-light.png +0 -0
- package/lib/background/assets/background-style-1.png +0 -0
- package/lib/background/assets/background-style-2.png +0 -0
- package/lib/background/assets/background-style-3.png +0 -0
- package/lib/background/index.css +1 -0
- package/lib/background/index.d.ts +21 -0
- package/lib/background/index.js +37 -0
- package/lib/background/index.less +41 -0
- package/lib/background/style/index.d.ts +1 -0
- package/lib/background/style/index.js +2 -0
- package/lib/background/style/less.d.ts +1 -0
- package/lib/background/style/less.js +2 -0
- package/lib/background/types.d.ts +1 -0
- package/lib/background/types.js +15 -0
- package/lib/background/var.css +0 -0
- package/lib/background/var.less +6 -0
- package/lib/cascader/style/index.js +0 -8
- package/lib/cascader/style/less.js +0 -8
- package/lib/{action-sheet/ActionSheetPanel.d.ts → checkbox-panel/CheckboxPanel.d.ts} +11 -26
- package/lib/checkbox-panel/CheckboxPanel.js +119 -0
- package/lib/checkbox-panel/index.css +1 -0
- package/lib/checkbox-panel/index.d.ts +58 -0
- package/lib/checkbox-panel/index.js +37 -0
- package/lib/checkbox-panel/index.less +26 -0
- package/lib/checkbox-panel/style/index.d.ts +1 -0
- package/lib/checkbox-panel/style/index.js +16 -0
- package/lib/checkbox-panel/style/less.d.ts +1 -0
- package/lib/checkbox-panel/style/less.js +16 -0
- package/lib/coupon-list/style/index.js +1 -3
- package/lib/coupon-list/style/less.js +1 -3
- package/lib/datetime-picker/DatetimePicker.js +1 -3
- package/lib/field/Field.d.ts +17 -4
- package/lib/field/Field.js +1 -1
- package/lib/field/index.d.ts +9 -2
- package/lib/filter-tag/FilterTag.d.ts +14 -0
- package/lib/filter-tag/FilterTag.js +6 -1
- package/lib/filter-tag/index.css +1 -1
- package/lib/filter-tag/index.d.ts +10 -1
- package/lib/filter-tag/index.less +16 -0
- package/lib/filter-tag/var.less +5 -0
- package/lib/floor-select/FloorSelect.d.ts +38 -0
- package/lib/floor-select/FloorSelect.js +253 -0
- package/lib/floor-select/index.css +1 -0
- package/lib/floor-select/index.d.ts +32 -0
- package/lib/floor-select/index.js +37 -0
- package/lib/floor-select/index.less +57 -0
- package/lib/floor-select/style/index.d.ts +1 -0
- package/lib/floor-select/style/index.js +20 -0
- package/lib/floor-select/style/less.d.ts +1 -0
- package/lib/floor-select/style/less.js +20 -0
- package/lib/floor-select/types.d.ts +18 -0
- package/lib/floor-select/types.js +15 -0
- package/lib/fonts/meri-mobile-icon.ttf +0 -0
- package/lib/fonts/meri-mobile-icon.woff +0 -0
- package/lib/fonts/meri-mobile-icon.woff2 +0 -0
- package/lib/form-panel/FormPanel.d.ts +32 -0
- package/lib/form-panel/FormPanel.js +83 -0
- package/lib/form-panel/index.css +1 -0
- package/lib/form-panel/index.d.ts +28 -0
- package/lib/form-panel/index.js +37 -0
- package/lib/form-panel/index.less +95 -0
- package/lib/form-panel/style/index.d.ts +1 -0
- package/lib/form-panel/style/index.js +11 -0
- package/lib/form-panel/style/less.d.ts +1 -0
- package/lib/form-panel/style/less.js +11 -0
- package/lib/friendly-tip/FriendlyTip.d.ts +86 -0
- package/lib/friendly-tip/FriendlyTip.js +79 -0
- package/lib/friendly-tip/index.css +1 -0
- package/lib/friendly-tip/index.d.ts +64 -0
- package/lib/friendly-tip/index.js +37 -0
- package/lib/friendly-tip/index.less +48 -0
- package/lib/friendly-tip/style/index.d.ts +1 -0
- package/lib/friendly-tip/style/index.js +7 -0
- package/lib/friendly-tip/style/less.d.ts +1 -0
- package/lib/friendly-tip/style/less.js +7 -0
- package/lib/friendly-tip/var.css +0 -0
- package/lib/friendly-tip/var.less +10 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +7 -1
- package/lib/index.js +19 -1
- package/lib/index.less +15 -9
- package/lib/location-select/style/index.js +1 -1
- package/lib/location-select/style/less.js +1 -1
- package/lib/material-add/MaterialAdd.d.ts +14 -1
- package/lib/material-add/MaterialAdd.js +98 -50
- package/lib/material-add/index.d.ts +10 -1
- package/lib/material-add/style/index.js +1 -1
- package/lib/material-add/style/less.js +1 -1
- package/lib/material-add/types.d.ts +9 -0
- package/lib/multi-person-select/MultiPersonSelect.d.ts +1 -1
- package/lib/multi-person-select/index.d.ts +1 -1
- package/lib/multi-person-select/style/index.js +1 -1
- package/lib/multi-person-select/style/less.js +1 -1
- package/lib/notify/index.css +1 -1
- package/lib/notify/index.less +10 -0
- package/lib/notify/var.less +3 -0
- package/lib/object-select/style/index.js +1 -1
- package/lib/object-select/style/less.js +1 -1
- package/lib/popover/Popover.js +5 -4
- package/lib/popover/index.css +1 -1
- package/lib/popover/index.less +12 -5
- package/lib/popover/var.less +1 -1
- package/lib/quantity-input/QuantityInput.d.ts +1 -1
- package/lib/quantity-input/index.d.ts +2 -2
- package/lib/radio-panel/RadioPanel.d.ts +41 -0
- package/lib/radio-panel/RadioPanel.js +90 -0
- package/lib/radio-panel/index.css +1 -0
- package/lib/radio-panel/index.d.ts +31 -0
- package/lib/radio-panel/index.js +37 -0
- package/lib/radio-panel/index.less +26 -0
- package/lib/radio-panel/style/index.d.ts +1 -0
- package/lib/radio-panel/style/index.js +15 -0
- package/lib/radio-panel/style/less.d.ts +1 -0
- package/lib/radio-panel/style/less.js +15 -0
- package/lib/rate/Rate.d.ts +1 -1
- package/lib/rate/Rate.js +2 -1
- package/lib/rate/RateCell.d.ts +196 -0
- package/lib/rate/RateCell.js +89 -0
- package/lib/rate/index.css +1 -1
- package/lib/rate/index.d.ts +136 -0
- package/lib/rate/index.js +8 -0
- package/lib/rate/index.less +35 -0
- package/lib/rate/style/index.js +5 -0
- package/lib/rate/style/less.js +5 -0
- package/lib/rate/var.less +1 -1
- package/lib/search/Search.d.ts +13 -3
- package/lib/search/index.d.ts +9 -2
- package/lib/single-person-select/style/index.js +1 -2
- package/lib/single-person-select/style/less.js +1 -2
- package/lib/style/base.css +1 -1
- package/lib/style/css-variables.css +1 -1
- package/lib/style/css-variables.less +10 -0
- package/lib/tab/style/index.js +0 -8
- package/lib/tab/style/less.js +0 -8
- package/lib/tabbar/index.css +1 -1
- package/lib/tabbar/var.less +1 -1
- package/lib/tabs/Tabs.js +5 -1
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.less +4 -0
- package/lib/tabs/style/index.js +0 -8
- package/lib/tabs/style/less.js +0 -8
- package/lib/tag/Tag.d.ts +13 -3
- package/lib/tag/Tag.js +1 -1
- package/lib/tag/index.d.ts +9 -2
- package/lib/vant.cjs.js +2919 -2420
- package/lib/vant.es.js +2920 -2421
- package/lib/vant.js +5375 -4876
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/lib/work-order-filter/style/index.js +1 -1
- package/lib/work-order-filter/style/less.js +1 -1
- package/package.json +1 -1
- package/skills/use-persagy-vant/SKILL.md +7 -6
- package/skills/use-persagy-vant/references/design-interaction-baseline.md +71 -0
- package/skills/use-persagy-vant/references/page-recipes.md +11 -4
- package/es/action-sheet/ActionSheetPanel.mjs +0 -145
- package/lib/action-sheet/ActionSheetPanel.js +0 -174
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
require("../../style/base.less");
|
|
2
|
+
require("../../badge/index.less");
|
|
3
|
+
require("../../icon/index.less");
|
|
4
|
+
require("../../loading/index.less");
|
|
5
|
+
require("../../button/index.less");
|
|
6
|
+
require("../../overlay/index.less");
|
|
7
|
+
require("../../popup/index.less");
|
|
8
|
+
require("../../popover/index.less");
|
|
9
|
+
require("../../nav-bar/index.less");
|
|
10
|
+
require("../../action-sheet/index.less");
|
|
11
|
+
require("../../checkbox-group/index.less");
|
|
12
|
+
require("../../checkbox/index.less");
|
|
13
|
+
require("../../radio-group/index.less");
|
|
14
|
+
require("../../radio/index.less");
|
|
15
|
+
require("../../cell/index.less");
|
|
16
|
+
require("../index.less");
|
|
@@ -5,8 +5,7 @@ require("../../loading/index.css");
|
|
|
5
5
|
require("../../button/index.css");
|
|
6
6
|
require("../../overlay/index.css");
|
|
7
7
|
require("../../popup/index.css");
|
|
8
|
-
require("../../
|
|
9
|
-
require("../../nav-bar/index.css");
|
|
8
|
+
require("../../action-sheet/index.css");
|
|
10
9
|
require("../../checkbox-group/index.css");
|
|
11
10
|
require("../../checkbox/index.css");
|
|
12
11
|
require("../../coupon/index.css");
|
|
@@ -14,7 +13,6 @@ require("../../radio-group/index.css");
|
|
|
14
13
|
require("../../radio/index.css");
|
|
15
14
|
require("../../cell/index.css");
|
|
16
15
|
require("../../field/index.css");
|
|
17
|
-
require("../../action-sheet/index.css");
|
|
18
16
|
require("../../sticky/index.css");
|
|
19
17
|
require("../../swipe/index.css");
|
|
20
18
|
require("../../swipe-item/index.css");
|
|
@@ -5,8 +5,7 @@ require("../../loading/index.less");
|
|
|
5
5
|
require("../../button/index.less");
|
|
6
6
|
require("../../overlay/index.less");
|
|
7
7
|
require("../../popup/index.less");
|
|
8
|
-
require("../../
|
|
9
|
-
require("../../nav-bar/index.less");
|
|
8
|
+
require("../../action-sheet/index.less");
|
|
10
9
|
require("../../checkbox-group/index.less");
|
|
11
10
|
require("../../checkbox/index.less");
|
|
12
11
|
require("../../coupon/index.less");
|
|
@@ -14,7 +13,6 @@ require("../../radio-group/index.less");
|
|
|
14
13
|
require("../../radio/index.less");
|
|
15
14
|
require("../../cell/index.less");
|
|
16
15
|
require("../../field/index.less");
|
|
17
|
-
require("../../action-sheet/index.less");
|
|
18
16
|
require("../../sticky/index.less");
|
|
19
17
|
require("../../swipe/index.less");
|
|
20
18
|
require("../../swipe-item/index.less");
|
|
@@ -75,9 +75,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
75
75
|
};
|
|
76
76
|
const getLaterDate = (first, second) => first.getTime() > second.getTime() ? first : second;
|
|
77
77
|
const currentTime = getCurrentTime();
|
|
78
|
-
const formatRangeStartTime = (value) =>
|
|
79
|
-
return value || (props.startTimeFromCurrent ? currentTime : props.minDate);
|
|
80
|
-
};
|
|
78
|
+
const formatRangeStartTime = (value) => value || (props.startTimeFromCurrent ? currentTime : props.minDate);
|
|
81
79
|
const rangeStartTime = (0, import_vue.ref)(formatRangeStartTime(props.startTime));
|
|
82
80
|
const rangeEndTime = (0, import_vue.ref)(getLaterDate(props.endTime || rangeStartTime.value, rangeStartTime.value));
|
|
83
81
|
const updateRangeStartTime = (value) => {
|
package/lib/field/Field.d.ts
CHANGED
|
@@ -18,7 +18,10 @@ export declare const fieldSharedProps: {
|
|
|
18
18
|
type: (NumberConstructor | StringConstructor)[];
|
|
19
19
|
default: string;
|
|
20
20
|
};
|
|
21
|
-
inputAlign:
|
|
21
|
+
inputAlign: {
|
|
22
|
+
type: PropType<FieldTextAlign>;
|
|
23
|
+
default: FieldTextAlign;
|
|
24
|
+
};
|
|
22
25
|
placeholder: StringConstructor;
|
|
23
26
|
autocomplete: StringConstructor;
|
|
24
27
|
errorMessage: StringConstructor;
|
|
@@ -105,7 +108,10 @@ declare const fieldProps: {
|
|
|
105
108
|
type: (NumberConstructor | StringConstructor)[];
|
|
106
109
|
default: string;
|
|
107
110
|
};
|
|
108
|
-
inputAlign:
|
|
111
|
+
inputAlign: {
|
|
112
|
+
type: PropType<FieldTextAlign>;
|
|
113
|
+
default: FieldTextAlign;
|
|
114
|
+
};
|
|
109
115
|
placeholder: StringConstructor;
|
|
110
116
|
autocomplete: StringConstructor;
|
|
111
117
|
errorMessage: StringConstructor;
|
|
@@ -219,7 +225,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
219
225
|
type: (NumberConstructor | StringConstructor)[];
|
|
220
226
|
default: string;
|
|
221
227
|
};
|
|
222
|
-
inputAlign:
|
|
228
|
+
inputAlign: {
|
|
229
|
+
type: PropType<FieldTextAlign>;
|
|
230
|
+
default: FieldTextAlign;
|
|
231
|
+
};
|
|
223
232
|
placeholder: StringConstructor;
|
|
224
233
|
autocomplete: StringConstructor;
|
|
225
234
|
errorMessage: StringConstructor;
|
|
@@ -331,7 +340,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
331
340
|
type: (NumberConstructor | StringConstructor)[];
|
|
332
341
|
default: string;
|
|
333
342
|
};
|
|
334
|
-
inputAlign:
|
|
343
|
+
inputAlign: {
|
|
344
|
+
type: PropType<FieldTextAlign>;
|
|
345
|
+
default: FieldTextAlign;
|
|
346
|
+
};
|
|
335
347
|
placeholder: StringConstructor;
|
|
336
348
|
autocomplete: StringConstructor;
|
|
337
349
|
errorMessage: StringConstructor;
|
|
@@ -411,6 +423,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
411
423
|
modelValue: string | number;
|
|
412
424
|
clearable: boolean;
|
|
413
425
|
clearIcon: string;
|
|
426
|
+
inputAlign: FieldTextAlign;
|
|
414
427
|
clearTrigger: FieldClearTrigger;
|
|
415
428
|
formatTrigger: FieldFormatTrigger;
|
|
416
429
|
error: boolean;
|
package/lib/field/Field.js
CHANGED
|
@@ -42,7 +42,7 @@ const fieldSharedProps = {
|
|
|
42
42
|
formatter: Function,
|
|
43
43
|
clearIcon: (0, import_utils.makeStringProp)("clear"),
|
|
44
44
|
modelValue: (0, import_utils.makeNumericProp)(""),
|
|
45
|
-
inputAlign:
|
|
45
|
+
inputAlign: (0, import_utils.makeStringProp)("right"),
|
|
46
46
|
placeholder: String,
|
|
47
47
|
autocomplete: String,
|
|
48
48
|
errorMessage: String,
|
package/lib/field/index.d.ts
CHANGED
|
@@ -60,7 +60,10 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
|
60
60
|
type: (NumberConstructor | StringConstructor)[];
|
|
61
61
|
default: string;
|
|
62
62
|
};
|
|
63
|
-
inputAlign:
|
|
63
|
+
inputAlign: {
|
|
64
|
+
type: import("vue").PropType<import("./types").FieldTextAlign>;
|
|
65
|
+
default: import("./types").FieldTextAlign;
|
|
66
|
+
};
|
|
64
67
|
placeholder: StringConstructor;
|
|
65
68
|
autocomplete: StringConstructor;
|
|
66
69
|
errorMessage: StringConstructor;
|
|
@@ -172,7 +175,10 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
|
172
175
|
type: (NumberConstructor | StringConstructor)[];
|
|
173
176
|
default: string;
|
|
174
177
|
};
|
|
175
|
-
inputAlign:
|
|
178
|
+
inputAlign: {
|
|
179
|
+
type: import("vue").PropType<import("./types").FieldTextAlign>;
|
|
180
|
+
default: import("./types").FieldTextAlign;
|
|
181
|
+
};
|
|
176
182
|
placeholder: StringConstructor;
|
|
177
183
|
autocomplete: StringConstructor;
|
|
178
184
|
errorMessage: StringConstructor;
|
|
@@ -252,6 +258,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
|
252
258
|
modelValue: string | number;
|
|
253
259
|
clearable: boolean;
|
|
254
260
|
clearIcon: string;
|
|
261
|
+
inputAlign: import("./types").FieldTextAlign;
|
|
255
262
|
clearTrigger: import("./types").FieldClearTrigger;
|
|
256
263
|
formatTrigger: import("./types").FieldFormatTrigger;
|
|
257
264
|
error: boolean;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { type PropType, type ExtractPropTypes } from 'vue';
|
|
2
2
|
export declare type FilterTagIconPosition = 'left' | 'right';
|
|
3
|
+
export declare type FilterTagSize = 'normal' | 'large';
|
|
3
4
|
declare const filterTagProps: {
|
|
4
5
|
selected: BooleanConstructor;
|
|
5
6
|
disabled: BooleanConstructor;
|
|
7
|
+
size: {
|
|
8
|
+
type: PropType<FilterTagSize>;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
6
11
|
icon: StringConstructor;
|
|
7
12
|
iconPrefix: StringConstructor;
|
|
8
13
|
iconPosition: {
|
|
@@ -16,6 +21,10 @@ export declare type FilterTagProps = ExtractPropTypes<typeof filterTagProps>;
|
|
|
16
21
|
declare const _default: import("vue").DefineComponent<{
|
|
17
22
|
selected: BooleanConstructor;
|
|
18
23
|
disabled: BooleanConstructor;
|
|
24
|
+
size: {
|
|
25
|
+
type: PropType<FilterTagSize>;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
19
28
|
icon: StringConstructor;
|
|
20
29
|
iconPrefix: StringConstructor;
|
|
21
30
|
iconPosition: {
|
|
@@ -27,6 +36,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
36
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
28
37
|
selected: BooleanConstructor;
|
|
29
38
|
disabled: BooleanConstructor;
|
|
39
|
+
size: {
|
|
40
|
+
type: PropType<FilterTagSize>;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
30
43
|
icon: StringConstructor;
|
|
31
44
|
iconPrefix: StringConstructor;
|
|
32
45
|
iconPosition: {
|
|
@@ -39,6 +52,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
39
52
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
40
53
|
}, {
|
|
41
54
|
dot: boolean;
|
|
55
|
+
size: FilterTagSize;
|
|
42
56
|
disabled: boolean;
|
|
43
57
|
selected: boolean;
|
|
44
58
|
iconPosition: FilterTagIconPosition;
|
|
@@ -28,6 +28,10 @@ const [name, bem] = (0, import_utils.createNamespace)("filter-tag");
|
|
|
28
28
|
const filterTagProps = {
|
|
29
29
|
selected: Boolean,
|
|
30
30
|
disabled: Boolean,
|
|
31
|
+
size: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "normal"
|
|
34
|
+
},
|
|
31
35
|
icon: String,
|
|
32
36
|
iconPrefix: String,
|
|
33
37
|
iconPosition: {
|
|
@@ -70,7 +74,8 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
70
74
|
"type": "button",
|
|
71
75
|
"class": bem({
|
|
72
76
|
selected: props.selected,
|
|
73
|
-
disabled: props.disabled
|
|
77
|
+
disabled: props.disabled,
|
|
78
|
+
large: props.size === "large"
|
|
74
79
|
}),
|
|
75
80
|
"disabled": props.disabled,
|
|
76
81
|
"onClick": (event) => emit("click", event)
|
package/lib/filter-tag/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--van-filter-tag-padding: 4px 12px;--van-filter-tag-gap: 4px;--van-filter-tag-font-size: var(--van-font-size-md);--van-filter-tag-font-weight: var(--van-font-weight-bold);--van-filter-tag-line-height: var(--van-line-height-lg);--van-filter-tag-border-radius: var(--van-border-radius-lg);--van-filter-tag-color: var(--van-gray-8);--van-filter-tag-background-color: var(--van-gray-2);--van-filter-tag-selected-color: var(--van-primary-color);--van-filter-tag-selected-background-color: var(--van-blue-100);--van-filter-tag-disabled-color: var(--van-gray-5);--van-filter-tag-active-opacity: var(--van-active-opacity)}.van-filter-tag{display:inline-flex;align-items:center;justify-content:center;gap:var(--van-filter-tag-gap);min-width:0;padding:var(--van-filter-tag-padding);color:var(--van-filter-tag-color);font:inherit;font-size:var(--van-filter-tag-font-size);font-weight:400;line-height:var(--van-filter-tag-line-height);white-space:nowrap;background:var(--van-filter-tag-background-color);border:0;border-radius:var(--van-filter-tag-border-radius)}.van-filter-tag:not(:disabled){cursor:pointer}.van-filter-tag:not(:disabled):active{opacity:var(--van-filter-tag-active-opacity)}.van-filter-tag--selected{color:var(--van-filter-tag-selected-color);font-weight:var(--van-filter-tag-font-weight);background:var(--van-filter-tag-selected-background-color)}.van-filter-tag--disabled{color:var(--van-filter-tag-disabled-color);cursor:not-allowed}.van-filter-tag__icon{flex:none;font-size:16px}.van-filter-tag__text{overflow:hidden;text-overflow:ellipsis}.van-filter-tag .van-badge{position:static;display:inline-flex;box-sizing:border-box;flex:none;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;line-height:16px;border:0;transform:none}.van-filter-tag .van-badge--dot{width:8px;min-width:0;height:8px;padding:0}
|
|
1
|
+
:root{--van-filter-tag-padding: 4px 12px;--van-filter-tag-gap: 4px;--van-filter-tag-font-size: var(--van-font-size-md);--van-filter-tag-font-weight: var(--van-font-weight-bold);--van-filter-tag-line-height: var(--van-line-height-lg);--van-filter-tag-border-radius: var(--van-border-radius-lg);--van-filter-tag-color: var(--van-gray-8);--van-filter-tag-background-color: var(--van-gray-2);--van-filter-tag-selected-color: var(--van-primary-color);--van-filter-tag-selected-background-color: var(--van-blue-100);--van-filter-tag-disabled-color: var(--van-gray-5);--van-filter-tag-active-opacity: var(--van-active-opacity);--van-filter-tag-large-padding: 6px 16px;--van-filter-tag-large-gap: 6px;--van-filter-tag-large-font-size: var(--van-font-size-lg);--van-filter-tag-large-line-height: var(--van-line-height-xl);--van-filter-tag-large-icon-size: 18px}.van-filter-tag{display:inline-flex;align-items:center;justify-content:center;gap:var(--van-filter-tag-gap);min-width:0;padding:var(--van-filter-tag-padding);color:var(--van-filter-tag-color);font:inherit;font-size:var(--van-filter-tag-font-size);font-weight:400;line-height:var(--van-filter-tag-line-height);white-space:nowrap;background:var(--van-filter-tag-background-color);border:0;border-radius:var(--van-filter-tag-border-radius)}.van-filter-tag:not(:disabled){cursor:pointer}.van-filter-tag:not(:disabled):active{opacity:var(--van-filter-tag-active-opacity)}.van-filter-tag--selected{color:var(--van-filter-tag-selected-color);font-weight:var(--van-filter-tag-font-weight);background:var(--van-filter-tag-selected-background-color)}.van-filter-tag--disabled{color:var(--van-filter-tag-disabled-color);cursor:not-allowed}.van-filter-tag--large{gap:var(--van-filter-tag-large-gap);padding:var(--van-filter-tag-large-padding);font-size:var(--van-filter-tag-large-font-size);line-height:var(--van-filter-tag-large-line-height)}.van-filter-tag--large .van-filter-tag__icon{font-size:var(--van-filter-tag-large-icon-size)}.van-filter-tag__icon{flex:none;font-size:16px}.van-filter-tag__text{overflow:hidden;text-overflow:ellipsis}.van-filter-tag .van-badge{position:static;display:inline-flex;box-sizing:border-box;flex:none;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;line-height:16px;border:0;transform:none}.van-filter-tag .van-badge--dot{width:8px;min-width:0;height:8px;padding:0}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export declare const FilterTag: import("../utils").WithInstall<import("vue").DefineComponent<{
|
|
2
2
|
selected: BooleanConstructor;
|
|
3
3
|
disabled: BooleanConstructor;
|
|
4
|
+
size: {
|
|
5
|
+
type: import("vue").PropType<import("./FilterTag").FilterTagSize>;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
4
8
|
icon: StringConstructor;
|
|
5
9
|
iconPrefix: StringConstructor;
|
|
6
10
|
iconPosition: {
|
|
@@ -12,6 +16,10 @@ export declare const FilterTag: import("../utils").WithInstall<import("vue").Def
|
|
|
12
16
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
17
|
selected: BooleanConstructor;
|
|
14
18
|
disabled: BooleanConstructor;
|
|
19
|
+
size: {
|
|
20
|
+
type: import("vue").PropType<import("./FilterTag").FilterTagSize>;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
15
23
|
icon: StringConstructor;
|
|
16
24
|
iconPrefix: StringConstructor;
|
|
17
25
|
iconPosition: {
|
|
@@ -24,12 +32,13 @@ export declare const FilterTag: import("../utils").WithInstall<import("vue").Def
|
|
|
24
32
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
25
33
|
}, {
|
|
26
34
|
dot: boolean;
|
|
35
|
+
size: import("./FilterTag").FilterTagSize;
|
|
27
36
|
disabled: boolean;
|
|
28
37
|
selected: boolean;
|
|
29
38
|
iconPosition: import("./FilterTag").FilterTagIconPosition;
|
|
30
39
|
}>>;
|
|
31
40
|
export default FilterTag;
|
|
32
|
-
export type { FilterTagIconPosition, FilterTagProps } from './FilterTag';
|
|
41
|
+
export type { FilterTagIconPosition, FilterTagProps, FilterTagSize, } from './FilterTag';
|
|
33
42
|
declare module 'vue' {
|
|
34
43
|
interface GlobalComponents {
|
|
35
44
|
VanFilterTag: typeof FilterTag;
|
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
--van-filter-tag-selected-background-color: @filter-tag-selected-background-color;
|
|
14
14
|
--van-filter-tag-disabled-color: @filter-tag-disabled-color;
|
|
15
15
|
--van-filter-tag-active-opacity: @filter-tag-active-opacity;
|
|
16
|
+
--van-filter-tag-large-padding: @filter-tag-large-padding;
|
|
17
|
+
--van-filter-tag-large-gap: @filter-tag-large-gap;
|
|
18
|
+
--van-filter-tag-large-font-size: @filter-tag-large-font-size;
|
|
19
|
+
--van-filter-tag-large-line-height: @filter-tag-large-line-height;
|
|
20
|
+
--van-filter-tag-large-icon-size: @filter-tag-large-icon-size;
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
.van-filter-tag {
|
|
@@ -51,6 +56,17 @@
|
|
|
51
56
|
cursor: not-allowed;
|
|
52
57
|
}
|
|
53
58
|
|
|
59
|
+
&--large {
|
|
60
|
+
gap: var(--van-filter-tag-large-gap);
|
|
61
|
+
padding: var(--van-filter-tag-large-padding);
|
|
62
|
+
font-size: var(--van-filter-tag-large-font-size);
|
|
63
|
+
line-height: var(--van-filter-tag-large-line-height);
|
|
64
|
+
|
|
65
|
+
.van-filter-tag__icon {
|
|
66
|
+
font-size: var(--van-filter-tag-large-icon-size);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
54
70
|
&__icon {
|
|
55
71
|
flex: none;
|
|
56
72
|
font-size: 16px;
|
package/lib/filter-tag/var.less
CHANGED
|
@@ -12,3 +12,8 @@
|
|
|
12
12
|
@filter-tag-selected-background-color: var(--van-blue-100);
|
|
13
13
|
@filter-tag-disabled-color: var(--van-gray-5);
|
|
14
14
|
@filter-tag-active-opacity: var(--van-active-opacity);
|
|
15
|
+
@filter-tag-large-padding: 6px 16px;
|
|
16
|
+
@filter-tag-large-gap: 6px;
|
|
17
|
+
@filter-tag-large-font-size: var(--van-font-size-lg);
|
|
18
|
+
@filter-tag-large-line-height: var(--van-line-height-xl);
|
|
19
|
+
@filter-tag-large-icon-size: 18px;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type ExtractPropTypes, type PropType } from 'vue';
|
|
2
|
+
import { type Numeric } from '../utils';
|
|
3
|
+
import type { FloorSelectBuilding } from './types';
|
|
4
|
+
declare const floorSelectProps: {
|
|
5
|
+
modelValue: PropType<Numeric | undefined>;
|
|
6
|
+
activeBuilding: PropType<Numeric | undefined>;
|
|
7
|
+
buildings: {
|
|
8
|
+
type: PropType<FloorSelectBuilding[]>;
|
|
9
|
+
default: () => FloorSelectBuilding[];
|
|
10
|
+
};
|
|
11
|
+
more: BooleanConstructor;
|
|
12
|
+
};
|
|
13
|
+
export declare type FloorSelectProps = ExtractPropTypes<typeof floorSelectProps>;
|
|
14
|
+
declare const _default: import("vue").DefineComponent<{
|
|
15
|
+
modelValue: PropType<Numeric | undefined>;
|
|
16
|
+
activeBuilding: PropType<Numeric | undefined>;
|
|
17
|
+
buildings: {
|
|
18
|
+
type: PropType<FloorSelectBuilding[]>;
|
|
19
|
+
default: () => FloorSelectBuilding[];
|
|
20
|
+
};
|
|
21
|
+
more: BooleanConstructor;
|
|
22
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue" | "update:activeBuilding")[], "change" | "update:modelValue" | "update:activeBuilding", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
23
|
+
modelValue: PropType<Numeric | undefined>;
|
|
24
|
+
activeBuilding: PropType<Numeric | undefined>;
|
|
25
|
+
buildings: {
|
|
26
|
+
type: PropType<FloorSelectBuilding[]>;
|
|
27
|
+
default: () => FloorSelectBuilding[];
|
|
28
|
+
};
|
|
29
|
+
more: BooleanConstructor;
|
|
30
|
+
}>> & {
|
|
31
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
32
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
"onUpdate:activeBuilding"?: ((...args: any[]) => any) | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
more: boolean;
|
|
36
|
+
buildings: FloorSelectBuilding[];
|
|
37
|
+
}>;
|
|
38
|
+
export default _default;
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name2 in all)
|
|
7
|
+
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
default: () => stdin_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
23
|
+
var import_vue = require("vue");
|
|
24
|
+
var import_utils = require("../utils");
|
|
25
|
+
var import_cell = require("../cell");
|
|
26
|
+
var import_sidebar = require("../sidebar");
|
|
27
|
+
var import_sidebar_item = require("../sidebar-item");
|
|
28
|
+
var import_tab = require("../tab");
|
|
29
|
+
var import_tabs = require("../tabs");
|
|
30
|
+
const [name, bem] = (0, import_utils.createNamespace)("floor-select");
|
|
31
|
+
const defaultBuildings = [{
|
|
32
|
+
id: "building-a",
|
|
33
|
+
text: "\u5EFA\u7B51A\u5EA7",
|
|
34
|
+
floors: [{
|
|
35
|
+
id: "a-b3",
|
|
36
|
+
text: "B3",
|
|
37
|
+
spaces: [{
|
|
38
|
+
id: "a-b3-01",
|
|
39
|
+
text: "B3 \u8BBE\u5907\u673A\u623F"
|
|
40
|
+
}, {
|
|
41
|
+
id: "a-b3-02",
|
|
42
|
+
text: "B3 \u914D\u7535\u5BA4"
|
|
43
|
+
}, {
|
|
44
|
+
id: "a-b3-03",
|
|
45
|
+
text: "B3 \u7269\u4E1A\u4ED3\u5E93"
|
|
46
|
+
}]
|
|
47
|
+
}, {
|
|
48
|
+
id: "a-b2",
|
|
49
|
+
text: "B2",
|
|
50
|
+
spaces: [{
|
|
51
|
+
id: "a-b2-01",
|
|
52
|
+
text: "B2 \u505C\u8F66\u533A"
|
|
53
|
+
}, {
|
|
54
|
+
id: "a-b2-02",
|
|
55
|
+
text: "B2 \u6C34\u6CF5\u623F"
|
|
56
|
+
}]
|
|
57
|
+
}, {
|
|
58
|
+
id: "a-b1",
|
|
59
|
+
text: "B1",
|
|
60
|
+
dot: true,
|
|
61
|
+
spaces: [{
|
|
62
|
+
id: "a-b1-01",
|
|
63
|
+
text: "B1 \u6D88\u9632\u63A7\u5236\u5BA4"
|
|
64
|
+
}, {
|
|
65
|
+
id: "a-b1-02",
|
|
66
|
+
text: "B1 \u8BBE\u5907\u95F4"
|
|
67
|
+
}, {
|
|
68
|
+
id: "a-b1-03",
|
|
69
|
+
text: "B1 \u5458\u5DE5\u9910\u5385"
|
|
70
|
+
}]
|
|
71
|
+
}, {
|
|
72
|
+
id: "a-f1",
|
|
73
|
+
text: "F1",
|
|
74
|
+
spaces: [{
|
|
75
|
+
id: "a-f1-01",
|
|
76
|
+
text: "F1 \u5927\u5802"
|
|
77
|
+
}, {
|
|
78
|
+
id: "a-f1-02",
|
|
79
|
+
text: "F1 \u7269\u4E1A\u670D\u52A1\u4E2D\u5FC3"
|
|
80
|
+
}, {
|
|
81
|
+
id: "a-f1-03",
|
|
82
|
+
text: "F1 \u4F1A\u8BAE\u5BA4"
|
|
83
|
+
}, {
|
|
84
|
+
id: "a-f1-04",
|
|
85
|
+
text: "F1 \u8BBE\u5907\u8D70\u5ECA"
|
|
86
|
+
}]
|
|
87
|
+
}]
|
|
88
|
+
}, {
|
|
89
|
+
id: "building-b",
|
|
90
|
+
text: "\u5EFA\u7B51B\u5EA7",
|
|
91
|
+
floors: [{
|
|
92
|
+
id: "b-b1",
|
|
93
|
+
text: "B1",
|
|
94
|
+
spaces: [{
|
|
95
|
+
id: "b-b1-01",
|
|
96
|
+
text: "B\u5EA7 B1 \u8BBE\u5907\u95F4"
|
|
97
|
+
}]
|
|
98
|
+
}, {
|
|
99
|
+
id: "b-f1",
|
|
100
|
+
text: "F1",
|
|
101
|
+
spaces: [{
|
|
102
|
+
id: "b-f1-01",
|
|
103
|
+
text: "B\u5EA7 F1 \u5927\u5802"
|
|
104
|
+
}]
|
|
105
|
+
}, {
|
|
106
|
+
id: "b-f2",
|
|
107
|
+
text: "F2",
|
|
108
|
+
spaces: [{
|
|
109
|
+
id: "b-f2-01",
|
|
110
|
+
text: "B\u5EA7 F2 \u529E\u516C\u533A"
|
|
111
|
+
}]
|
|
112
|
+
}]
|
|
113
|
+
}, {
|
|
114
|
+
id: "building-c",
|
|
115
|
+
text: "\u5EFA\u7B51C\u5EA7",
|
|
116
|
+
floors: [{
|
|
117
|
+
id: "c-f1",
|
|
118
|
+
text: "F1",
|
|
119
|
+
spaces: [{
|
|
120
|
+
id: "c-f1-01",
|
|
121
|
+
text: "C\u5EA7 F1 \u8BBE\u5907\u95F4"
|
|
122
|
+
}]
|
|
123
|
+
}]
|
|
124
|
+
}, {
|
|
125
|
+
id: "building-d",
|
|
126
|
+
text: "\u5EFA\u7B51D\u5EA7",
|
|
127
|
+
floors: [{
|
|
128
|
+
id: "d-f1",
|
|
129
|
+
text: "F1",
|
|
130
|
+
spaces: [{
|
|
131
|
+
id: "d-f1-01",
|
|
132
|
+
text: "D\u5EA7 F1 \u529E\u516C\u533A"
|
|
133
|
+
}]
|
|
134
|
+
}]
|
|
135
|
+
}];
|
|
136
|
+
const floorSelectProps = {
|
|
137
|
+
modelValue: [String, Number],
|
|
138
|
+
activeBuilding: [String, Number],
|
|
139
|
+
buildings: {
|
|
140
|
+
type: Array,
|
|
141
|
+
default: () => defaultBuildings
|
|
142
|
+
},
|
|
143
|
+
more: Boolean
|
|
144
|
+
};
|
|
145
|
+
var stdin_default = (0, import_vue.defineComponent)({
|
|
146
|
+
name,
|
|
147
|
+
props: floorSelectProps,
|
|
148
|
+
emits: ["change", "update:activeBuilding", "update:modelValue"],
|
|
149
|
+
setup(props, {
|
|
150
|
+
emit,
|
|
151
|
+
slots
|
|
152
|
+
}) {
|
|
153
|
+
const activeBuilding = (0, import_vue.ref)();
|
|
154
|
+
const activeFloor = (0, import_vue.ref)(0);
|
|
155
|
+
const showMore = (0, import_vue.ref)(false);
|
|
156
|
+
const currentBuilding = (0, import_vue.computed)(() => props.buildings.find((building) => building.id === activeBuilding.value));
|
|
157
|
+
const floors = (0, import_vue.computed)(() => {
|
|
158
|
+
var _a, _b;
|
|
159
|
+
return (_b = (_a = currentBuilding.value) == null ? void 0 : _a.floors) != null ? _b : [];
|
|
160
|
+
});
|
|
161
|
+
const spaces = (0, import_vue.computed)(() => {
|
|
162
|
+
var _a, _b;
|
|
163
|
+
return (_b = (_a = floors.value[activeFloor.value]) == null ? void 0 : _a.spaces) != null ? _b : [];
|
|
164
|
+
});
|
|
165
|
+
const syncBuilding = () => {
|
|
166
|
+
var _a, _b, _c;
|
|
167
|
+
const selectedBuilding = props.buildings.find((building) => building.id === props.activeBuilding);
|
|
168
|
+
const containsSelectedSpace = props.buildings.find((building) => building.floors.some((floor) => floor.spaces.some((space) => space.id === props.modelValue)));
|
|
169
|
+
activeBuilding.value = (_c = (_a = selectedBuilding == null ? void 0 : selectedBuilding.id) != null ? _a : containsSelectedSpace == null ? void 0 : containsSelectedSpace.id) != null ? _c : (_b = props.buildings[0]) == null ? void 0 : _b.id;
|
|
170
|
+
};
|
|
171
|
+
(0, import_vue.watch)(() => [props.activeBuilding, props.modelValue, props.buildings], () => {
|
|
172
|
+
syncBuilding();
|
|
173
|
+
}, {
|
|
174
|
+
immediate: true,
|
|
175
|
+
deep: true
|
|
176
|
+
});
|
|
177
|
+
(0, import_vue.watch)([activeBuilding, floors], () => {
|
|
178
|
+
const selectedIndex = floors.value.findIndex((floor) => floor.spaces.some((space) => space.id === props.modelValue));
|
|
179
|
+
activeFloor.value = selectedIndex >= 0 ? selectedIndex : 0;
|
|
180
|
+
}, {
|
|
181
|
+
immediate: true
|
|
182
|
+
});
|
|
183
|
+
const selectBuilding = (id) => {
|
|
184
|
+
activeBuilding.value = id;
|
|
185
|
+
emit("update:activeBuilding", id);
|
|
186
|
+
};
|
|
187
|
+
const selectSpace = (item) => {
|
|
188
|
+
if (item.disabled) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
emit("update:modelValue", item.id);
|
|
192
|
+
emit("change", item, activeBuilding.value);
|
|
193
|
+
};
|
|
194
|
+
const renderCell = (item, index) => {
|
|
195
|
+
var _a;
|
|
196
|
+
const selected = props.modelValue === item.id;
|
|
197
|
+
const cell = (_a = slots.cell) == null ? void 0 : _a.call(slots, {
|
|
198
|
+
item,
|
|
199
|
+
selected,
|
|
200
|
+
select: () => selectSpace(item)
|
|
201
|
+
});
|
|
202
|
+
return (0, import_vue.createVNode)("div", {
|
|
203
|
+
"key": item.id,
|
|
204
|
+
"class": bem("cell")
|
|
205
|
+
}, [cell || (0, import_vue.createVNode)(import_cell.Cell, {
|
|
206
|
+
"title": item.text,
|
|
207
|
+
"border": index < spaces.value.length - 1,
|
|
208
|
+
"clickable": !item.disabled,
|
|
209
|
+
"rightSelect": selected,
|
|
210
|
+
"selectType": "radio",
|
|
211
|
+
"onClick": () => selectSpace(item),
|
|
212
|
+
"onUpdate:rightSelect": () => selectSpace(item)
|
|
213
|
+
}, null)]);
|
|
214
|
+
};
|
|
215
|
+
return () => (0, import_vue.createVNode)("div", {
|
|
216
|
+
"class": bem()
|
|
217
|
+
}, [(0, import_vue.createVNode)(import_tabs.Tabs, {
|
|
218
|
+
"active": activeBuilding.value,
|
|
219
|
+
"type": "filter",
|
|
220
|
+
"shrink": true,
|
|
221
|
+
"more": props.more,
|
|
222
|
+
"showMore": showMore.value,
|
|
223
|
+
"class": bem("tabs"),
|
|
224
|
+
"onUpdate:active": selectBuilding,
|
|
225
|
+
"onUpdate:showMore": (value) => {
|
|
226
|
+
showMore.value = value;
|
|
227
|
+
}
|
|
228
|
+
}, {
|
|
229
|
+
default: () => [props.buildings.map((building) => (0, import_vue.createVNode)(import_tab.Tab, {
|
|
230
|
+
"key": building.id,
|
|
231
|
+
"name": building.id,
|
|
232
|
+
"title": building.text
|
|
233
|
+
}, null))]
|
|
234
|
+
}), (0, import_vue.createVNode)("div", {
|
|
235
|
+
"class": bem("content")
|
|
236
|
+
}, [(0, import_vue.createVNode)(import_sidebar.Sidebar, {
|
|
237
|
+
"modelValue": activeFloor.value,
|
|
238
|
+
"class": bem("sidebar"),
|
|
239
|
+
"onUpdate:modelValue": (value) => {
|
|
240
|
+
activeFloor.value = +value;
|
|
241
|
+
}
|
|
242
|
+
}, {
|
|
243
|
+
default: () => [floors.value.map((floor) => (0, import_vue.createVNode)(import_sidebar_item.SidebarItem, {
|
|
244
|
+
"key": floor.id,
|
|
245
|
+
"title": floor.text,
|
|
246
|
+
"dot": floor.dot,
|
|
247
|
+
"disabled": floor.disabled
|
|
248
|
+
}, null))]
|
|
249
|
+
}), (0, import_vue.createVNode)("div", {
|
|
250
|
+
"class": bem("cells")
|
|
251
|
+
}, [spaces.value.map(renderCell)])])]);
|
|
252
|
+
}
|
|
253
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.van-floor-select{display:flex;flex-direction:column;min-height:100vh;color:var(--van-text-color);background:var(--van-background-color-light)}.van-floor-select__tabs{flex:none;padding:var(--van-padding-xs) var(--van-padding-md);--van-tabs-line-height: 38px;--van-tabs-nav-background-color: transparent;--van-tabs-filter-background-color: var(--van-gray-2);--van-tabs-filter-active-background-color: var(--van-blue-1);--van-tabs-filter-border-radius: var(--van-border-radius-lg)}.van-floor-select__tabs .van-tabs__nav{gap:6px}.van-floor-select__tabs .van-tabs__more{z-index:3;width:40px;color:var(--van-gray-8);background:linear-gradient(90deg,transparent,var(--van-white) 36%)}.van-floor-select__content{display:flex;flex:1;min-height:0}.van-floor-select__sidebar{flex:none;height:auto;background:var(--van-gray-1);--van-sidebar-width: 80px;--van-sidebar-padding: var(--van-padding-sm);--van-sidebar-background-color: var(--van-gray-1);--van-sidebar-selected-background-color: var(--van-background-color-light);--van-sidebar-selected-text-color: var(--van-primary-color);--van-sidebar-selected-font-weight: var(--van-font-weight-bold)}.van-floor-select__cells{flex:1;min-width:0;overflow-y:auto;background:var(--van-background-color-light)}.van-floor-select__cell .van-cell{--van-cell-vertical-padding: var(--van-padding-sm)}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const FloorSelect: import("../utils").WithInstall<import("vue").DefineComponent<{
|
|
2
|
+
modelValue: import("vue").PropType<import("../utils").Numeric | undefined>;
|
|
3
|
+
activeBuilding: import("vue").PropType<import("../utils").Numeric | undefined>;
|
|
4
|
+
buildings: {
|
|
5
|
+
type: import("vue").PropType<import("./types").FloorSelectBuilding[]>;
|
|
6
|
+
default: () => import("./types").FloorSelectBuilding[];
|
|
7
|
+
};
|
|
8
|
+
more: BooleanConstructor;
|
|
9
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue" | "update:activeBuilding")[], "change" | "update:modelValue" | "update:activeBuilding", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
modelValue: import("vue").PropType<import("../utils").Numeric | undefined>;
|
|
11
|
+
activeBuilding: import("vue").PropType<import("../utils").Numeric | undefined>;
|
|
12
|
+
buildings: {
|
|
13
|
+
type: import("vue").PropType<import("./types").FloorSelectBuilding[]>;
|
|
14
|
+
default: () => import("./types").FloorSelectBuilding[];
|
|
15
|
+
};
|
|
16
|
+
more: BooleanConstructor;
|
|
17
|
+
}>> & {
|
|
18
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
"onUpdate:activeBuilding"?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
more: boolean;
|
|
23
|
+
buildings: import("./types").FloorSelectBuilding[];
|
|
24
|
+
}>>;
|
|
25
|
+
export default FloorSelect;
|
|
26
|
+
export type { FloorSelectProps } from './FloorSelect';
|
|
27
|
+
export type { FloorSelectBuilding, FloorSelectItem, FloorSelectSpace } from './types';
|
|
28
|
+
declare module 'vue' {
|
|
29
|
+
interface GlobalComponents {
|
|
30
|
+
VanFloorSelect: typeof FloorSelect;
|
|
31
|
+
}
|
|
32
|
+
}
|