vant 3.2.5 → 3.2.6
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-bar/index.css +1 -1
- package/es/action-bar/index.less +1 -1
- package/es/action-bar-icon/ActionBarIcon.js +2 -2
- package/es/action-bar-icon/index.css +1 -1
- package/es/action-bar-icon/index.less +1 -1
- package/es/action-sheet/ActionSheet.d.ts +15 -9
- package/es/action-sheet/ActionSheet.js +7 -15
- package/es/action-sheet/index.css +1 -1
- package/es/action-sheet/index.d.ts +10 -3
- package/es/action-sheet/index.less +2 -2
- package/es/address-edit/AddressEdit.d.ts +1 -2
- package/es/address-edit/AddressEdit.js +3 -8
- package/es/address-edit/AddressEditDetail.js +5 -6
- package/es/address-edit/index.css +1 -1
- package/es/address-edit/index.d.ts +1 -2
- package/es/address-edit/index.less +2 -2
- package/es/address-edit/style/index.js +0 -3
- package/es/address-edit/style/less.js +0 -3
- package/es/address-list/AddressList.js +2 -6
- package/es/badge/index.css +1 -1
- package/es/badge/index.less +4 -2
- package/es/calendar/Calendar.js +11 -8
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.less +3 -3
- package/es/card/index.css +1 -1
- package/es/card/index.less +1 -1
- package/es/cascader/Cascader.d.ts +25 -14
- package/es/cascader/Cascader.js +49 -46
- package/es/cascader/index.d.ts +8 -6
- package/es/cascader/types.d.ts +18 -0
- package/es/cascader/types.js +1 -0
- package/es/cell/index.css +1 -1
- package/es/cell/index.less +1 -1
- package/es/cell-group/index.css +1 -1
- package/es/cell-group/index.less +1 -1
- package/es/checkbox/Checker.js +1 -8
- package/es/checkbox/index.d.ts +1 -1
- package/es/checkbox/types.d.ts +3 -0
- package/es/checkbox-group/index.d.ts +1 -1
- package/es/checkbox-group/types.d.ts +2 -1
- package/es/collapse-item/index.css +1 -1
- package/es/collapse-item/index.less +1 -1
- package/es/contact-edit/ContactEdit.js +1 -4
- package/es/contact-edit/style/index.js +0 -5
- package/es/contact-edit/style/less.js +0 -5
- package/es/coupon/index.css +1 -1
- package/es/coupon/index.less +1 -1
- package/es/coupon-list/CouponList.js +1 -1
- package/es/coupon-list/index.css +1 -1
- package/es/coupon-list/index.less +1 -1
- package/es/dialog/Dialog.js +5 -10
- package/es/dialog/function-call.d.ts +2 -2
- package/es/dialog/function-call.js +2 -2
- package/es/dialog/index.css +1 -1
- package/es/dialog/index.less +1 -1
- package/es/dropdown-item/DropdownItem.js +1 -1
- package/es/dropdown-menu/index.css +1 -1
- package/es/dropdown-menu/index.less +1 -1
- package/es/empty/Network.js +8 -27
- package/es/grid-item/GridItem.js +2 -2
- package/es/grid-item/index.css +1 -1
- package/es/grid-item/index.less +1 -1
- package/es/image/Image.js +7 -20
- package/es/image/index.css +1 -1
- package/es/image/index.less +1 -1
- package/es/image-preview/ImagePreview.js +5 -6
- package/es/image-preview/function-call.js +2 -2
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.less +1 -1
- package/es/index-anchor/index.css +1 -1
- package/es/index-anchor/index.less +2 -2
- package/es/index-bar/IndexBar.js +1 -12
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/locale/lang/de-DE-formal.d.ts +0 -1
- package/es/locale/lang/de-DE-formal.js +0 -1
- package/es/locale/lang/de-DE.d.ts +0 -1
- package/es/locale/lang/de-DE.js +0 -1
- package/es/locale/lang/en-US.d.ts +0 -1
- package/es/locale/lang/en-US.js +0 -1
- package/es/locale/lang/es-ES.d.ts +0 -1
- package/es/locale/lang/es-ES.js +0 -1
- package/es/locale/lang/fr-FR.d.ts +0 -1
- package/es/locale/lang/fr-FR.js +0 -1
- package/es/locale/lang/ja-JP.d.ts +0 -1
- package/es/locale/lang/ja-JP.js +0 -1
- package/es/locale/lang/nb-NO.d.ts +0 -1
- package/es/locale/lang/nb-NO.js +0 -1
- package/es/locale/lang/ro-RO.d.ts +0 -1
- package/es/locale/lang/ro-RO.js +0 -1
- package/es/locale/lang/ru-RU.d.ts +0 -1
- package/es/locale/lang/ru-RU.js +0 -1
- package/es/locale/lang/th-TH.d.ts +0 -1
- package/es/locale/lang/th-TH.js +0 -1
- package/es/locale/lang/tr-TR.d.ts +0 -1
- package/es/locale/lang/tr-TR.js +0 -1
- package/es/locale/lang/zh-CN.d.ts +0 -1
- package/es/locale/lang/zh-CN.js +0 -1
- package/es/locale/lang/zh-HK.d.ts +0 -1
- package/es/locale/lang/zh-HK.js +0 -1
- package/es/locale/lang/zh-TW.d.ts +0 -1
- package/es/locale/lang/zh-TW.js +0 -1
- package/es/nav-bar/index.css +1 -1
- package/es/nav-bar/index.less +1 -1
- package/es/notice-bar/NoticeBar.d.ts +1 -1
- package/es/notice-bar/index.css +1 -1
- package/es/notice-bar/index.d.ts +1 -1
- package/es/notice-bar/index.less +1 -1
- package/es/notify/Notify.d.ts +4 -2
- package/es/notify/Notify.js +6 -1
- package/es/notify/function-call.d.ts +4 -2
- package/es/notify/function-call.js +1 -1
- package/es/notify/index.css +1 -1
- package/es/notify/index.less +4 -4
- package/es/number-keyboard/index.css +1 -1
- package/es/number-keyboard/index.less +3 -3
- package/es/overlay/Overlay.js +2 -2
- package/es/overlay/index.css +1 -1
- package/es/overlay/index.less +1 -1
- package/es/pagination/index.css +1 -1
- package/es/pagination/index.less +1 -1
- package/es/password-input/index.css +1 -1
- package/es/password-input/index.less +3 -3
- package/es/picker/index.css +1 -1
- package/es/picker/index.less +2 -2
- package/es/popover/Popover.js +3 -4
- package/es/popover/index.css +1 -1
- package/es/popover/index.less +2 -2
- package/es/popup/Popup.js +2 -4
- package/es/popup/index.css +1 -1
- package/es/popup/index.less +1 -1
- package/es/progress/Progress.js +7 -3
- package/es/progress/index.css +1 -1
- package/es/progress/index.less +10 -1
- package/es/progress/var.less +1 -0
- package/es/pull-refresh/PullRefresh.js +2 -2
- package/es/radio/Radio.d.ts +9 -6
- package/es/radio/index.d.ts +2 -0
- package/es/radio-group/RadioGroup.d.ts +1 -0
- package/es/radio-group/index.d.ts +2 -0
- package/es/search/Search.js +3 -4
- package/es/search/index.css +1 -1
- package/es/search/index.less +2 -2
- package/es/share-sheet/ShareSheet.d.ts +7 -0
- package/es/share-sheet/ShareSheet.js +5 -6
- package/es/share-sheet/index.d.ts +7 -0
- package/es/sidebar-item/index.css +1 -1
- package/es/sidebar-item/index.less +1 -1
- package/es/skeleton/index.css +1 -1
- package/es/skeleton/index.less +2 -2
- package/es/slider/index.css +1 -1
- package/es/slider/index.less +3 -3
- package/es/stepper/Stepper.d.ts +1 -1
- package/es/stepper/Stepper.js +1 -2
- package/es/stepper/index.css +1 -1
- package/es/stepper/index.d.ts +1 -1
- package/es/stepper/index.less +3 -3
- package/es/steps/index.d.ts +6 -4
- package/es/submit-bar/index.css +1 -1
- package/es/submit-bar/index.less +2 -2
- package/es/swipe-cell/SwipeCell.js +1 -2
- package/es/switch/index.css +1 -1
- package/es/switch/index.less +3 -3
- package/es/tabbar/Tabbar.js +1 -2
- package/es/tabbar/index.css +1 -1
- package/es/tabbar/index.less +1 -1
- package/es/tabbar-item/TabbarItem.js +2 -2
- package/es/tabs/Tabs.js +2 -5
- package/es/tabs/index.css +1 -1
- package/es/tabs/index.less +2 -2
- package/es/tag/index.css +1 -1
- package/es/tag/index.less +6 -6
- package/es/toast/Toast.js +5 -11
- package/es/toast/index.css +1 -1
- package/es/toast/index.less +1 -1
- package/es/tree-select/index.css +1 -1
- package/es/tree-select/index.less +2 -2
- package/es/uploader/UploaderPreviewItem.js +3 -4
- package/es/uploader/index.css +1 -1
- package/es/uploader/index.less +4 -4
- package/es/utils/interceptor.d.ts +1 -2
- package/es/utils/interceptor.js +6 -9
- package/lib/action-bar/index.css +1 -1
- package/lib/action-bar/index.less +1 -1
- package/lib/action-bar-icon/ActionBarIcon.js +1 -1
- package/lib/action-bar-icon/index.css +1 -1
- package/lib/action-bar-icon/index.less +1 -1
- package/lib/action-sheet/ActionSheet.d.ts +15 -9
- package/lib/action-sheet/ActionSheet.js +6 -14
- package/lib/action-sheet/index.css +1 -1
- package/lib/action-sheet/index.d.ts +10 -3
- package/lib/action-sheet/index.less +2 -2
- package/lib/address-edit/AddressEdit.d.ts +1 -2
- package/lib/address-edit/AddressEdit.js +3 -9
- package/lib/address-edit/AddressEditDetail.js +4 -5
- package/lib/address-edit/index.css +1 -1
- package/lib/address-edit/index.d.ts +1 -2
- package/lib/address-edit/index.less +2 -2
- package/lib/address-edit/style/index.js +0 -6
- package/lib/address-edit/style/less.js +0 -6
- package/lib/address-list/AddressList.js +2 -6
- package/lib/badge/index.css +1 -1
- package/lib/badge/index.less +4 -2
- package/lib/calendar/Calendar.js +11 -8
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.less +3 -3
- package/lib/card/index.css +1 -1
- package/lib/card/index.less +1 -1
- package/lib/cascader/Cascader.d.ts +25 -14
- package/lib/cascader/Cascader.js +48 -45
- package/lib/cascader/index.d.ts +8 -6
- package/lib/cascader/types.d.ts +18 -0
- package/lib/cascader/types.js +3 -0
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.less +1 -1
- package/lib/cell-group/index.css +1 -1
- package/lib/cell-group/index.less +1 -1
- package/lib/checkbox/Checker.js +1 -8
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/checkbox/types.d.ts +3 -0
- package/lib/checkbox-group/index.d.ts +1 -1
- package/lib/checkbox-group/types.d.ts +2 -1
- package/lib/collapse-item/index.css +1 -1
- package/lib/collapse-item/index.less +1 -1
- package/lib/contact-edit/ContactEdit.js +1 -5
- package/lib/contact-edit/style/index.js +0 -10
- package/lib/contact-edit/style/less.js +0 -10
- package/lib/coupon/index.css +1 -1
- package/lib/coupon/index.less +1 -1
- package/lib/coupon-list/CouponList.js +1 -1
- package/lib/coupon-list/index.css +1 -1
- package/lib/coupon-list/index.less +1 -1
- package/lib/dialog/Dialog.js +5 -10
- package/lib/dialog/function-call.d.ts +2 -2
- package/lib/dialog/function-call.js +2 -2
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.less +1 -1
- package/lib/dropdown-item/DropdownItem.js +1 -1
- package/lib/dropdown-menu/index.css +1 -1
- package/lib/dropdown-menu/index.less +1 -1
- package/lib/empty/Network.js +8 -27
- package/lib/grid-item/GridItem.js +1 -1
- package/lib/grid-item/index.css +1 -1
- package/lib/grid-item/index.less +1 -1
- package/lib/image/Image.js +7 -20
- package/lib/image/index.css +1 -1
- package/lib/image/index.less +1 -1
- package/lib/image-preview/ImagePreview.js +5 -6
- package/lib/image-preview/function-call.js +2 -2
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.less +1 -1
- package/lib/index-anchor/index.css +1 -1
- package/lib/index-anchor/index.less +2 -2
- package/lib/index-bar/IndexBar.js +1 -12
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.less +1 -1
- package/lib/locale/lang/de-DE-formal.d.ts +0 -1
- package/lib/locale/lang/de-DE-formal.js +0 -1
- package/lib/locale/lang/de-DE.d.ts +0 -1
- package/lib/locale/lang/de-DE.js +0 -1
- package/lib/locale/lang/en-US.d.ts +0 -1
- package/lib/locale/lang/en-US.js +0 -1
- package/lib/locale/lang/es-ES.d.ts +0 -1
- package/lib/locale/lang/es-ES.js +0 -1
- package/lib/locale/lang/fr-FR.d.ts +0 -1
- package/lib/locale/lang/fr-FR.js +0 -1
- package/lib/locale/lang/ja-JP.d.ts +0 -1
- package/lib/locale/lang/ja-JP.js +0 -1
- package/lib/locale/lang/nb-NO.d.ts +0 -1
- package/lib/locale/lang/nb-NO.js +0 -1
- package/lib/locale/lang/ro-RO.d.ts +0 -1
- package/lib/locale/lang/ro-RO.js +0 -1
- package/lib/locale/lang/ru-RU.d.ts +0 -1
- package/lib/locale/lang/ru-RU.js +0 -1
- package/lib/locale/lang/th-TH.d.ts +0 -1
- package/lib/locale/lang/th-TH.js +0 -1
- package/lib/locale/lang/tr-TR.d.ts +0 -1
- package/lib/locale/lang/tr-TR.js +0 -1
- package/lib/locale/lang/zh-CN.d.ts +0 -1
- package/lib/locale/lang/zh-CN.js +0 -1
- package/lib/locale/lang/zh-HK.d.ts +0 -1
- package/lib/locale/lang/zh-HK.js +0 -1
- package/lib/locale/lang/zh-TW.d.ts +0 -1
- package/lib/locale/lang/zh-TW.js +0 -1
- package/lib/nav-bar/index.css +1 -1
- package/lib/nav-bar/index.less +1 -1
- package/lib/notice-bar/NoticeBar.d.ts +1 -1
- package/lib/notice-bar/index.css +1 -1
- package/lib/notice-bar/index.d.ts +1 -1
- package/lib/notice-bar/index.less +1 -1
- package/lib/notify/Notify.d.ts +4 -2
- package/lib/notify/Notify.js +6 -1
- package/lib/notify/function-call.d.ts +4 -2
- package/lib/notify/function-call.js +1 -1
- package/lib/notify/index.css +1 -1
- package/lib/notify/index.less +4 -4
- package/lib/number-keyboard/index.css +1 -1
- package/lib/number-keyboard/index.less +3 -3
- package/lib/overlay/Overlay.js +1 -1
- package/lib/overlay/index.css +1 -1
- package/lib/overlay/index.less +1 -1
- package/lib/pagination/index.css +1 -1
- package/lib/pagination/index.less +1 -1
- package/lib/password-input/index.css +1 -1
- package/lib/password-input/index.less +3 -3
- package/lib/picker/index.css +1 -1
- package/lib/picker/index.less +2 -2
- package/lib/popover/Popover.js +3 -4
- package/lib/popover/index.css +1 -1
- package/lib/popover/index.less +2 -2
- package/lib/popup/Popup.js +2 -4
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.less +1 -1
- package/lib/progress/Progress.js +7 -3
- package/lib/progress/index.css +1 -1
- package/lib/progress/index.less +10 -1
- package/lib/progress/var.less +1 -0
- package/lib/pull-refresh/PullRefresh.js +1 -1
- package/lib/radio/Radio.d.ts +9 -6
- package/lib/radio/index.d.ts +2 -0
- package/lib/radio-group/RadioGroup.d.ts +1 -0
- package/lib/radio-group/index.d.ts +2 -0
- package/lib/search/Search.js +3 -4
- package/lib/search/index.css +1 -1
- package/lib/search/index.less +2 -2
- package/lib/share-sheet/ShareSheet.d.ts +7 -0
- package/lib/share-sheet/ShareSheet.js +5 -6
- package/lib/share-sheet/index.d.ts +7 -0
- package/lib/sidebar-item/index.css +1 -1
- package/lib/sidebar-item/index.less +1 -1
- package/lib/skeleton/index.css +1 -1
- package/lib/skeleton/index.less +2 -2
- package/lib/slider/index.css +1 -1
- package/lib/slider/index.less +3 -3
- package/lib/stepper/Stepper.d.ts +1 -1
- package/lib/stepper/Stepper.js +1 -2
- package/lib/stepper/index.css +1 -1
- package/lib/stepper/index.d.ts +1 -1
- package/lib/stepper/index.less +3 -3
- package/lib/steps/index.d.ts +6 -4
- package/lib/submit-bar/index.css +1 -1
- package/lib/submit-bar/index.less +2 -2
- package/lib/swipe-cell/SwipeCell.js +1 -2
- package/lib/switch/index.css +1 -1
- package/lib/switch/index.less +3 -3
- package/lib/tabbar/Tabbar.js +1 -2
- package/lib/tabbar/index.css +1 -1
- package/lib/tabbar/index.less +1 -1
- package/lib/tabbar-item/TabbarItem.js +1 -1
- package/lib/tabs/Tabs.js +2 -5
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.less +2 -2
- package/lib/tag/index.css +1 -1
- package/lib/tag/index.less +6 -6
- package/lib/toast/Toast.js +4 -10
- package/lib/toast/index.css +1 -1
- package/lib/toast/index.less +1 -1
- package/lib/tree-select/index.css +1 -1
- package/lib/tree-select/index.less +2 -2
- package/lib/uploader/UploaderPreviewItem.js +2 -3
- package/lib/uploader/index.css +1 -1
- package/lib/uploader/index.less +4 -4
- package/lib/utils/interceptor.d.ts +1 -2
- package/lib/utils/interceptor.js +6 -9
- package/lib/vant.es.js +758 -831
- package/lib/vant.es.min.js +758 -831
- package/lib/vant.js +758 -831
- package/lib/vant.min.js +1 -1
- package/package.json +1 -1
- package/vetur/attributes.json +60 -56
- package/vetur/tags.json +18 -17
- package/vetur/web-types.json +198 -184
- package/changelog.generated.md +0 -148
@@ -1,18 +1,29 @@
|
|
1
|
-
import { PropType } from 'vue';
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
import { PropType, ExtractPropTypes } from 'vue';
|
2
|
+
import type { CascaderOption, CascaderFieldNames } from './types';
|
3
|
+
declare const props: {
|
4
|
+
title: StringConstructor;
|
5
|
+
options: {
|
6
|
+
type: PropType<CascaderOption[]>;
|
7
|
+
default: () => never[];
|
8
|
+
};
|
9
|
+
closeable: {
|
10
|
+
type: BooleanConstructor;
|
11
|
+
default: true;
|
12
|
+
};
|
13
|
+
swipeable: {
|
14
|
+
type: BooleanConstructor;
|
15
|
+
default: true;
|
16
|
+
};
|
17
|
+
closeIcon: {
|
18
|
+
type: PropType<string>;
|
19
|
+
default: string;
|
20
|
+
};
|
21
|
+
modelValue: (NumberConstructor | StringConstructor)[];
|
22
|
+
fieldNames: PropType<CascaderFieldNames>;
|
23
|
+
placeholder: StringConstructor;
|
24
|
+
activeColor: StringConstructor;
|
15
25
|
};
|
26
|
+
export declare type CascaderProps = ExtractPropTypes<typeof props>;
|
16
27
|
declare const _default: import("vue").DefineComponent<{
|
17
28
|
title: StringConstructor;
|
18
29
|
options: {
|
package/es/cascader/Cascader.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
2
|
-
import {
|
2
|
+
import { ref, watch, nextTick, defineComponent } from 'vue';
|
3
3
|
import { extend, truthProp, numericProp, makeArrayProp, makeStringProp, createNamespace } from '../utils'; // Components
|
4
4
|
|
5
5
|
import { Tab } from '../tab';
|
@@ -7,29 +7,28 @@ import { Tabs } from '../tabs';
|
|
7
7
|
import { Icon } from '../icon'; // Types
|
8
8
|
|
9
9
|
var [name, bem, t] = createNamespace('cascader');
|
10
|
+
var props = {
|
11
|
+
title: String,
|
12
|
+
options: makeArrayProp(),
|
13
|
+
closeable: truthProp,
|
14
|
+
swipeable: truthProp,
|
15
|
+
closeIcon: makeStringProp('cross'),
|
16
|
+
modelValue: numericProp,
|
17
|
+
fieldNames: Object,
|
18
|
+
placeholder: String,
|
19
|
+
activeColor: String
|
20
|
+
};
|
10
21
|
export default defineComponent({
|
11
22
|
name,
|
12
|
-
props
|
13
|
-
|
14
|
-
options: makeArrayProp(),
|
15
|
-
closeable: truthProp,
|
16
|
-
swipeable: truthProp,
|
17
|
-
closeIcon: makeStringProp('cross'),
|
18
|
-
modelValue: numericProp,
|
19
|
-
fieldNames: Object,
|
20
|
-
placeholder: String,
|
21
|
-
activeColor: String
|
22
|
-
},
|
23
|
-
emits: ['close', 'change', 'finish', 'update:modelValue', 'click-tab'],
|
23
|
+
props,
|
24
|
+
emits: ['close', 'change', 'finish', 'click-tab', 'update:modelValue'],
|
24
25
|
|
25
26
|
setup(props, {
|
26
27
|
slots,
|
27
28
|
emit
|
28
29
|
}) {
|
29
|
-
var
|
30
|
-
|
31
|
-
activeTab: 0
|
32
|
-
});
|
30
|
+
var tabs = ref([]);
|
31
|
+
var activeTab = ref(0);
|
33
32
|
var {
|
34
33
|
text: textKey,
|
35
34
|
value: valueKey,
|
@@ -41,9 +40,7 @@ export default defineComponent({
|
|
41
40
|
}, props.fieldNames);
|
42
41
|
|
43
42
|
var getSelectedOptionsByValue = (options, value) => {
|
44
|
-
for (var
|
45
|
-
var option = options[i];
|
46
|
-
|
43
|
+
for (var option of options) {
|
47
44
|
if (option[valueKey] === value) {
|
48
45
|
return [option];
|
49
46
|
}
|
@@ -59,12 +56,17 @@ export default defineComponent({
|
|
59
56
|
};
|
60
57
|
|
61
58
|
var updateTabs = () => {
|
62
|
-
|
63
|
-
|
59
|
+
var {
|
60
|
+
options,
|
61
|
+
modelValue
|
62
|
+
} = props;
|
63
|
+
|
64
|
+
if (modelValue !== undefined) {
|
65
|
+
var selectedOptions = getSelectedOptionsByValue(options, modelValue);
|
64
66
|
|
65
67
|
if (selectedOptions) {
|
66
|
-
var optionsCursor =
|
67
|
-
|
68
|
+
var optionsCursor = options;
|
69
|
+
tabs.value = selectedOptions.map(option => {
|
68
70
|
var tab = {
|
69
71
|
options: optionsCursor,
|
70
72
|
selected: option
|
@@ -79,21 +81,21 @@ export default defineComponent({
|
|
79
81
|
});
|
80
82
|
|
81
83
|
if (optionsCursor) {
|
82
|
-
|
84
|
+
tabs.value.push({
|
83
85
|
options: optionsCursor,
|
84
86
|
selected: null
|
85
87
|
});
|
86
88
|
}
|
87
89
|
|
88
90
|
nextTick(() => {
|
89
|
-
|
91
|
+
activeTab.value = tabs.value.length - 1;
|
90
92
|
});
|
91
93
|
return;
|
92
94
|
}
|
93
95
|
}
|
94
96
|
|
95
|
-
|
96
|
-
options
|
97
|
+
tabs.value = [{
|
98
|
+
options,
|
97
99
|
selected: null
|
98
100
|
}];
|
99
101
|
};
|
@@ -103,10 +105,10 @@ export default defineComponent({
|
|
103
105
|
return;
|
104
106
|
}
|
105
107
|
|
106
|
-
|
108
|
+
tabs.value[tabIndex].selected = option;
|
107
109
|
|
108
|
-
if (
|
109
|
-
|
110
|
+
if (tabs.value.length > tabIndex + 1) {
|
111
|
+
tabs.value = tabs.value.slice(0, tabIndex + 1);
|
110
112
|
}
|
111
113
|
|
112
114
|
if (option[childrenKey]) {
|
@@ -115,28 +117,28 @@ export default defineComponent({
|
|
115
117
|
selected: null
|
116
118
|
};
|
117
119
|
|
118
|
-
if (
|
119
|
-
|
120
|
+
if (tabs.value[tabIndex + 1]) {
|
121
|
+
tabs.value[tabIndex + 1] = nextTab;
|
120
122
|
} else {
|
121
|
-
|
123
|
+
tabs.value.push(nextTab);
|
122
124
|
}
|
123
125
|
|
124
126
|
nextTick(() => {
|
125
|
-
|
127
|
+
activeTab.value++;
|
126
128
|
});
|
127
129
|
}
|
128
130
|
|
129
|
-
var selectedOptions =
|
130
|
-
|
131
|
+
var selectedOptions = tabs.value.map(tab => tab.selected).filter(Boolean);
|
132
|
+
emit('update:modelValue', option[valueKey]);
|
133
|
+
var params = {
|
131
134
|
value: option[valueKey],
|
132
135
|
tabIndex,
|
133
136
|
selectedOptions
|
134
137
|
};
|
135
|
-
emit('
|
136
|
-
emit('change', eventParams);
|
138
|
+
emit('change', params);
|
137
139
|
|
138
140
|
if (!option[childrenKey]) {
|
139
|
-
emit('finish',
|
141
|
+
emit('finish', params);
|
140
142
|
}
|
141
143
|
};
|
142
144
|
|
@@ -188,7 +190,8 @@ export default defineComponent({
|
|
188
190
|
options,
|
189
191
|
selected
|
190
192
|
} = tab;
|
191
|
-
var
|
193
|
+
var placeholder = props.placeholder || t('select');
|
194
|
+
var title = selected ? selected[textKey] : placeholder;
|
192
195
|
return _createVNode(Tab, {
|
193
196
|
"title": title,
|
194
197
|
"titleClass": bem('tab', {
|
@@ -200,8 +203,8 @@ export default defineComponent({
|
|
200
203
|
};
|
201
204
|
|
202
205
|
var renderTabs = () => _createVNode(Tabs, {
|
203
|
-
|
204
|
-
"onUpdate:active": $event =>
|
206
|
+
"active": activeTab.value,
|
207
|
+
"onUpdate:active": $event => activeTab.value = $event,
|
205
208
|
"animated": true,
|
206
209
|
"class": bem('tabs'),
|
207
210
|
"color": props.activeColor,
|
@@ -209,7 +212,7 @@ export default defineComponent({
|
|
209
212
|
"swipeable": props.swipeable,
|
210
213
|
"onClick-tab": onClickTab
|
211
214
|
}, {
|
212
|
-
default: () => [
|
215
|
+
default: () => [tabs.value.map(renderTab)]
|
213
216
|
});
|
214
217
|
|
215
218
|
updateTabs();
|
@@ -217,8 +220,8 @@ export default defineComponent({
|
|
217
220
|
deep: true
|
218
221
|
});
|
219
222
|
watch(() => props.modelValue, value => {
|
220
|
-
if (value
|
221
|
-
var values =
|
223
|
+
if (value !== undefined) {
|
224
|
+
var values = tabs.value.map(tab => {
|
222
225
|
var _tab$selected;
|
223
226
|
|
224
227
|
return (_tab$selected = tab.selected) == null ? void 0 : _tab$selected[valueKey];
|
package/es/cascader/index.d.ts
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
import { CascaderProps } from './Cascader';
|
1
2
|
export declare const Cascader: import("../utils").WithInstall<import("vue").DefineComponent<{
|
2
3
|
title: StringConstructor;
|
3
4
|
options: {
|
4
|
-
type: import("vue").PropType<import("./
|
5
|
+
type: import("vue").PropType<import("./types").CascaderOption[]>;
|
5
6
|
default: () => never[];
|
6
7
|
};
|
7
8
|
closeable: {
|
@@ -17,7 +18,7 @@ export declare const Cascader: import("../utils").WithInstall<import("vue").Defi
|
|
17
18
|
default: string;
|
18
19
|
};
|
19
20
|
modelValue: (NumberConstructor | StringConstructor)[];
|
20
|
-
fieldNames: import("vue").PropType<import("./
|
21
|
+
fieldNames: import("vue").PropType<import("./types").CascaderFieldNames>;
|
21
22
|
placeholder: StringConstructor;
|
22
23
|
activeColor: StringConstructor;
|
23
24
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "close" | "click-tab" | "finish")[], "update:modelValue" | "change" | "close" | "click-tab" | "finish", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<{
|
@@ -33,14 +34,14 @@ export declare const Cascader: import("../utils").WithInstall<import("vue").Defi
|
|
33
34
|
} & {
|
34
35
|
closeIcon: string;
|
35
36
|
closeable: boolean;
|
36
|
-
options: import("./
|
37
|
+
options: import("./types").CascaderOption[];
|
37
38
|
swipeable: boolean;
|
38
39
|
} & {
|
39
40
|
title?: string | undefined;
|
40
41
|
modelValue?: string | number | undefined;
|
41
42
|
placeholder?: string | undefined;
|
42
43
|
activeColor?: string | undefined;
|
43
|
-
fieldNames?: import("./
|
44
|
+
fieldNames?: import("./types").CascaderFieldNames | undefined;
|
44
45
|
}> & {
|
45
46
|
onChange?: ((...args: any[]) => any) | undefined;
|
46
47
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
@@ -50,8 +51,9 @@ export declare const Cascader: import("../utils").WithInstall<import("vue").Defi
|
|
50
51
|
}, {
|
51
52
|
closeIcon: string;
|
52
53
|
closeable: boolean;
|
53
|
-
options: import("./
|
54
|
+
options: import("./types").CascaderOption[];
|
54
55
|
swipeable: boolean;
|
55
56
|
}>>;
|
56
57
|
export default Cascader;
|
57
|
-
export type {
|
58
|
+
export type { CascaderProps };
|
59
|
+
export type { CascaderOption, CascaderFieldNames } from './types';
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export declare type CascaderOption = {
|
2
|
+
text?: string;
|
3
|
+
value?: string | number;
|
4
|
+
color?: string;
|
5
|
+
disabled?: boolean;
|
6
|
+
children?: CascaderOption[];
|
7
|
+
className?: unknown;
|
8
|
+
[key: PropertyKey]: any;
|
9
|
+
};
|
10
|
+
export declare type CascaderTab = {
|
11
|
+
options: CascaderOption[];
|
12
|
+
selected: CascaderOption | null;
|
13
|
+
};
|
14
|
+
export declare type CascaderFieldNames = {
|
15
|
+
text?: string;
|
16
|
+
value?: string;
|
17
|
+
children?: string;
|
18
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/es/cell/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-cell-font-size:var(--van-font-size-md);--van-cell-line-height:24px;--van-cell-vertical-padding:10px;--van-cell-horizontal-padding:var(--van-padding-md);--van-cell-text-color:var(--van-text-color);--van-cell-background-color:var(--van-white);--van-cell-border-color:var(--van-border-color);--van-cell-active-color:var(--van-active-color);--van-cell-required-color:var(--van-danger-color);--van-cell-label-color:var(--van-gray-6);--van-cell-label-font-size:var(--van-font-size-sm);--van-cell-label-line-height:var(--van-line-height-sm);--van-cell-label-margin-top:var(--van-padding-base);--van-cell-value-color:var(--van-gray-6);--van-cell-icon-size:16px;--van-cell-right-icon-color:var(--van-gray-6);--van-cell-large-vertical-padding:var(--van-padding-sm);--van-cell-large-title-font-size:var(--van-font-size-lg);--van-cell-large-label-font-size:var(--van-font-size-md)}.van-cell{position:relative;display:flex;box-sizing:border-box;width:100%;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);overflow:hidden;color:var(--van-cell-text-color);font-size:var(--van-cell-font-size);line-height:var(--van-cell-line-height);background
|
1
|
+
:root{--van-cell-font-size:var(--van-font-size-md);--van-cell-line-height:24px;--van-cell-vertical-padding:10px;--van-cell-horizontal-padding:var(--van-padding-md);--van-cell-text-color:var(--van-text-color);--van-cell-background-color:var(--van-white);--van-cell-border-color:var(--van-border-color);--van-cell-active-color:var(--van-active-color);--van-cell-required-color:var(--van-danger-color);--van-cell-label-color:var(--van-gray-6);--van-cell-label-font-size:var(--van-font-size-sm);--van-cell-label-line-height:var(--van-line-height-sm);--van-cell-label-margin-top:var(--van-padding-base);--van-cell-value-color:var(--van-gray-6);--van-cell-icon-size:16px;--van-cell-right-icon-color:var(--van-gray-6);--van-cell-large-vertical-padding:var(--van-padding-sm);--van-cell-large-title-font-size:var(--van-font-size-lg);--van-cell-large-label-font-size:var(--van-font-size-md)}.van-cell{position:relative;display:flex;box-sizing:border-box;width:100%;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);overflow:hidden;color:var(--van-cell-text-color);font-size:var(--van-cell-font-size);line-height:var(--van-cell-line-height);background:var(--van-cell-background-color)}.van-cell::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-cell-border-color);transform:scaleY(.5)}.van-cell--borderless::after,.van-cell:last-child::after{display:none}.van-cell__label{margin-top:var(--van-cell-label-margin-top);color:var(--van-cell-label-color);font-size:var(--van-cell-label-font-size);line-height:var(--van-cell-label-line-height)}.van-cell__title,.van-cell__value{flex:1}.van-cell__value{position:relative;overflow:hidden;color:var(--van-cell-value-color);text-align:right;vertical-align:middle;word-wrap:break-word}.van-cell__value--alone{color:var(--van-text-color);text-align:left}.van-cell__left-icon,.van-cell__right-icon{height:var(--van-cell-line-height);font-size:var(--van-cell-icon-size);line-height:var(--van-cell-line-height)}.van-cell__left-icon{margin-right:var(--van-padding-base)}.van-cell__right-icon{margin-left:var(--van-padding-base);color:var(--van-cell-right-icon-color)}.van-cell--clickable{cursor:pointer}.van-cell--clickable:active{background-color:var(--van-cell-active-color)}.van-cell--required{overflow:visible}.van-cell--required::before{position:absolute;left:var(--van-padding-xs);color:var(--van-cell-required-color);font-size:var(--van-cell-font-size);content:'*'}.van-cell--center{align-items:center}.van-cell--large{padding-top:var(--van-cell-large-vertical-padding);padding-bottom:var(--van-cell-large-vertical-padding)}.van-cell--large .van-cell__title{font-size:var(--van-cell-large-title-font-size)}.van-cell--large .van-cell__label{font-size:var(--van-cell-large-label-font-size)}
|
package/es/cell/index.less
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
color: var(--van-cell-text-color);
|
34
34
|
font-size: var(--van-cell-font-size);
|
35
35
|
line-height: var(--van-cell-line-height);
|
36
|
-
background
|
36
|
+
background: var(--van-cell-background-color);
|
37
37
|
|
38
38
|
&::after {
|
39
39
|
.hairline-bottom(var(--van-cell-border-color), var(--van-padding-md), var(--van-padding-md));
|
package/es/cell-group/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-cell-group-background-color:var(--van-white);--van-cell-group-title-color:var(--van-gray-6);--van-cell-group-title-padding:var(--van-padding-md) var(--van-padding-md) var(--van-padding-xs);--van-cell-group-title-font-size:var(--van-font-size-md);--van-cell-group-title-line-height:16px;--van-cell-group-inset-padding:0 var(--van-padding-md);--van-cell-group-inset-border-radius:var(--van-border-radius-lg);--van-cell-group-inset-title-padding:var(--van-padding-md) var(--van-padding-md) var(--van-padding-xs) var(--van-padding-xl)}.van-cell-group{background
|
1
|
+
:root{--van-cell-group-background-color:var(--van-white);--van-cell-group-title-color:var(--van-gray-6);--van-cell-group-title-padding:var(--van-padding-md) var(--van-padding-md) var(--van-padding-xs);--van-cell-group-title-font-size:var(--van-font-size-md);--van-cell-group-title-line-height:16px;--van-cell-group-inset-padding:0 var(--van-padding-md);--van-cell-group-inset-border-radius:var(--van-border-radius-lg);--van-cell-group-inset-title-padding:var(--van-padding-md) var(--van-padding-md) var(--van-padding-xs) var(--van-padding-xl)}.van-cell-group{background:var(--van-cell-group-background-color)}.van-cell-group--inset{margin:var(--van-cell-group-inset-padding);border-radius:var(--van-cell-group-inset-border-radius);overflow:hidden}.van-cell-group__title{padding:var(--van-cell-group-title-padding);color:var(--van-cell-group-title-color);font-size:var(--van-cell-group-title-font-size);line-height:var(--van-cell-group-title-line-height)}.van-cell-group__title--inset{padding:var(--van-cell-group-inset-title-padding)}
|
package/es/cell-group/index.less
CHANGED
package/es/checkbox/Checker.js
CHANGED
@@ -97,14 +97,7 @@ export default defineComponent({
|
|
97
97
|
};
|
98
98
|
|
99
99
|
return () => {
|
100
|
-
var nodes = [renderIcon()];
|
101
|
-
|
102
|
-
if (props.labelPosition === 'left') {
|
103
|
-
nodes.unshift(renderLabel());
|
104
|
-
} else {
|
105
|
-
nodes.push(renderLabel());
|
106
|
-
}
|
107
|
-
|
100
|
+
var nodes = props.labelPosition === 'left' ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()];
|
108
101
|
return _createVNode("div", {
|
109
102
|
"role": props.role,
|
110
103
|
"class": props.bem([{
|
package/es/checkbox/index.d.ts
CHANGED
@@ -48,4 +48,4 @@ export declare const Checkbox: import("../utils").WithInstall<import("vue").Defi
|
|
48
48
|
}>>;
|
49
49
|
export default Checkbox;
|
50
50
|
export type { CheckboxProps };
|
51
|
-
export type { CheckboxInstance } from './types';
|
51
|
+
export type { CheckboxShape, CheckboxInstance, CheckboxLabelPosition, } from './types';
|
package/es/checkbox/types.d.ts
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
import type { ComponentPublicInstance, ComputedRef } from 'vue';
|
2
2
|
import type { CheckboxProps } from './Checkbox';
|
3
|
+
import type { CheckerShape, CheckerLabelPosition } from './Checker';
|
4
|
+
export declare type CheckboxShape = CheckerShape;
|
5
|
+
export declare type CheckboxLabelPosition = CheckerLabelPosition;
|
3
6
|
export declare type CheckboxExpose = {
|
4
7
|
toggle: (newValue?: boolean) => void;
|
5
8
|
/**
|
@@ -33,4 +33,4 @@ export declare const CheckboxGroup: import("../utils").WithInstall<import("vue")
|
|
33
33
|
}>>;
|
34
34
|
export default CheckboxGroup;
|
35
35
|
export type { CheckboxGroupProps };
|
36
|
-
export type { CheckboxGroupInstance, CheckboxGroupToggleAllOptions, } from './types';
|
36
|
+
export type { CheckboxGroupInstance, CheckboxGroupDirection, CheckboxGroupToggleAllOptions, } from './types';
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { ComponentPublicInstance } from 'vue';
|
2
2
|
import type { CheckboxGroupProps } from './CheckboxGroup';
|
3
|
-
import type { CheckerParent } from '../checkbox/Checker';
|
3
|
+
import type { CheckerParent, CheckerDirection } from '../checkbox/Checker';
|
4
|
+
export declare type CheckboxGroupDirection = CheckerDirection;
|
4
5
|
export declare type CheckboxGroupToggleAllOptions = boolean | {
|
5
6
|
checked?: boolean;
|
6
7
|
skipDisabled?: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
:root{--van-collapse-item-transition-duration:var(--van-animation-duration-base);--van-collapse-item-content-padding:var(--van-padding-sm) var(--van-padding-md);--van-collapse-item-content-font-size:var(--van-font-size-md);--van-collapse-item-content-line-height:1.5;--van-collapse-item-content-text-color:var(--van-gray-6);--van-collapse-item-content-background-color:var(--van-white);--van-collapse-item-title-disabled-color:var(--van-gray-5)}.van-collapse-item{position:relative}.van-collapse-item--border::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:0;right:var(--van-padding-md);left:var(--van-padding-md);border-top:1px solid var(--van-border-color);transform:scaleY(.5)}.van-collapse-item__title .van-cell__right-icon::before{transform:rotate(90deg) translateZ(0);transition:transform var(--van-collapse-item-transition-duration)}.van-collapse-item__title::after{right:var(--van-padding-md);display:none}.van-collapse-item__title--expanded .van-cell__right-icon::before{transform:rotate(-90deg)}.van-collapse-item__title--expanded::after{display:block}.van-collapse-item__title--borderless::after{display:none}.van-collapse-item__title--disabled{cursor:not-allowed}.van-collapse-item__title--disabled,.van-collapse-item__title--disabled .van-cell__right-icon{color:var(--van-collapse-item-title-disabled-color)}.van-collapse-item__wrapper{overflow:hidden;transition:height var(--van-collapse-item-transition-duration) ease-in-out;will-change:height}.van-collapse-item__content{padding:var(--van-collapse-item-content-padding);color:var(--van-collapse-item-content-text-color);font-size:var(--van-collapse-item-content-font-size);line-height:var(--van-collapse-item-content-line-height);background
|
1
|
+
:root{--van-collapse-item-transition-duration:var(--van-animation-duration-base);--van-collapse-item-content-padding:var(--van-padding-sm) var(--van-padding-md);--van-collapse-item-content-font-size:var(--van-font-size-md);--van-collapse-item-content-line-height:1.5;--van-collapse-item-content-text-color:var(--van-gray-6);--van-collapse-item-content-background-color:var(--van-white);--van-collapse-item-title-disabled-color:var(--van-gray-5)}.van-collapse-item{position:relative}.van-collapse-item--border::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:0;right:var(--van-padding-md);left:var(--van-padding-md);border-top:1px solid var(--van-border-color);transform:scaleY(.5)}.van-collapse-item__title .van-cell__right-icon::before{transform:rotate(90deg) translateZ(0);transition:transform var(--van-collapse-item-transition-duration)}.van-collapse-item__title::after{right:var(--van-padding-md);display:none}.van-collapse-item__title--expanded .van-cell__right-icon::before{transform:rotate(-90deg)}.van-collapse-item__title--expanded::after{display:block}.van-collapse-item__title--borderless::after{display:none}.van-collapse-item__title--disabled{cursor:not-allowed}.van-collapse-item__title--disabled,.van-collapse-item__title--disabled .van-cell__right-icon{color:var(--van-collapse-item-title-disabled-color)}.van-collapse-item__wrapper{overflow:hidden;transition:height var(--van-collapse-item-transition-duration) ease-in-out;will-change:height}.van-collapse-item__content{padding:var(--van-collapse-item-content-padding);color:var(--van-collapse-item-content-text-color);font-size:var(--van-collapse-item-content-font-size);line-height:var(--van-collapse-item-content-line-height);background:var(--van-collapse-item-content-background-color)}
|
@@ -70,6 +70,6 @@
|
|
70
70
|
color: var(--van-collapse-item-content-text-color);
|
71
71
|
font-size: var(--van-collapse-item-content-font-size);
|
72
72
|
line-height: var(--van-collapse-item-content-line-height);
|
73
|
-
background
|
73
|
+
background: var(--van-collapse-item-content-background-color);
|
74
74
|
}
|
75
75
|
}
|
@@ -7,7 +7,6 @@ import { Cell } from '../cell';
|
|
7
7
|
import { Form } from '../form';
|
8
8
|
import { Field } from '../field';
|
9
9
|
import { Button } from '../button';
|
10
|
-
import { Dialog } from '../dialog';
|
11
10
|
import { Switch } from '../switch';
|
12
11
|
var [name, bem, t] = createNamespace('contact-edit');
|
13
12
|
var DEFAULT_CONTACT = {
|
@@ -44,9 +43,7 @@ export default defineComponent({
|
|
44
43
|
}
|
45
44
|
};
|
46
45
|
|
47
|
-
var onDelete = () =>
|
48
|
-
title: t('confirmDelete')
|
49
|
-
}).then(() => emit('delete', contact));
|
46
|
+
var onDelete = () => emit('delete', contact);
|
50
47
|
|
51
48
|
var renderButtons = () => _createVNode("div", {
|
52
49
|
"class": bem('buttons')
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import '../../style/base.css';
|
2
|
-
import '../../action-bar/index.css';
|
3
2
|
import '../../badge/index.css';
|
4
3
|
import '../../icon/index.css';
|
5
4
|
import '../../cell/index.css';
|
@@ -7,8 +6,4 @@ import '../../field/index.css';
|
|
7
6
|
import '../../loading/index.css';
|
8
7
|
import '../../switch/index.css';
|
9
8
|
import '../../button/index.css';
|
10
|
-
import '../../action-bar-button/index.css';
|
11
|
-
import '../../overlay/index.css';
|
12
|
-
import '../../popup/index.css';
|
13
|
-
import '../../dialog/index.css';
|
14
9
|
import '../index.css';
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import '../../style/base.less';
|
2
|
-
import '../../action-bar/index.less';
|
3
2
|
import '../../badge/index.less';
|
4
3
|
import '../../icon/index.less';
|
5
4
|
import '../../cell/index.less';
|
@@ -7,8 +6,4 @@ import '../../field/index.less';
|
|
7
6
|
import '../../loading/index.less';
|
8
7
|
import '../../switch/index.less';
|
9
8
|
import '../../button/index.less';
|
10
|
-
import '../../action-bar-button/index.less';
|
11
|
-
import '../../overlay/index.less';
|
12
|
-
import '../../popup/index.less';
|
13
|
-
import '../../dialog/index.less';
|
14
9
|
import '../index.less';
|
package/es/coupon/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-coupon-margin:0 var(--van-padding-sm) var(--van-padding-sm);--van-coupon-content-height:84px;--van-coupon-content-padding:14px 0;--van-coupon-background-color:var(--van-white);--van-coupon-active-background-color:var(--van-active-color);--van-coupon-border-radius:var(--van-border-radius-lg);--van-coupon-box-shadow:0 0 4px rgba(0, 0, 0, 0.1);--van-coupon-head-width:96px;--van-coupon-amount-color:var(--van-danger-color);--van-coupon-amount-font-size:30px;--van-coupon-currency-font-size:40%;--van-coupon-name-font-size:var(--van-font-size-md);--van-coupon-disabled-text-color:var(--van-gray-6);--van-coupon-description-padding:var(--van-padding-xs) var(--van-padding-md);--van-coupon-description-border-color:var(--van-border-color);--van-coupon-corner-checkbox-icon-color:var(--van-danger-color)}.van-coupon{margin:var(--van-coupon-margin);overflow:hidden;background
|
1
|
+
:root{--van-coupon-margin:0 var(--van-padding-sm) var(--van-padding-sm);--van-coupon-content-height:84px;--van-coupon-content-padding:14px 0;--van-coupon-background-color:var(--van-white);--van-coupon-active-background-color:var(--van-active-color);--van-coupon-border-radius:var(--van-border-radius-lg);--van-coupon-box-shadow:0 0 4px rgba(0, 0, 0, 0.1);--van-coupon-head-width:96px;--van-coupon-amount-color:var(--van-danger-color);--van-coupon-amount-font-size:30px;--van-coupon-currency-font-size:40%;--van-coupon-name-font-size:var(--van-font-size-md);--van-coupon-disabled-text-color:var(--van-gray-6);--van-coupon-description-padding:var(--van-padding-xs) var(--van-padding-md);--van-coupon-description-border-color:var(--van-border-color);--van-coupon-corner-checkbox-icon-color:var(--van-danger-color)}.van-coupon{margin:var(--van-coupon-margin);overflow:hidden;background:var(--van-coupon-background-color);border-radius:var(--van-coupon-border-radius);box-shadow:var(--van-coupon-box-shadow)}.van-coupon:active{background-color:var(--van-coupon-active-background-color)}.van-coupon__content{display:flex;align-items:center;box-sizing:border-box;min-height:var(--van-coupon-content-height);padding:var(--van-coupon-content-padding);color:var(--van-gray-8)}.van-coupon__head{position:relative;min-width:var(--van-coupon-head-width);padding:0 var(--van-padding-xs);color:var(--van-coupon-amount-color);text-align:center}.van-coupon__amount,.van-coupon__condition,.van-coupon__name,.van-coupon__valid{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount{margin-bottom:6px;font-weight:var(--van-font-weight-bold);font-size:var(--van-coupon-amount-font-size);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount span{font-weight:400;font-size:var(--van-coupon-currency-font-size)}.van-coupon__amount span:not(:empty){margin-left:2px}.van-coupon__condition{font-size:var(--van-font-size-sm);line-height:16px;white-space:pre-wrap}.van-coupon__body{position:relative;flex:1;border-radius:0 var(--van-coupon-border-radius) var(--van-coupon-border-radius) 0}.van-coupon__name{margin-bottom:10px;font-weight:700;font-size:var(--van-coupon-name-font-size);line-height:var(--van-line-height-md)}.van-coupon__valid{font-size:var(--van-font-size-sm)}.van-coupon__corner{position:absolute;top:0;right:var(--van-padding-md);bottom:0}.van-coupon__corner .van-checkbox__icon--checked .van-icon{background-color:var(--van-coupon-corner-checkbox-icon-color);border-color:var(--van-coupon-corner-checkbox-icon-color)}.van-coupon__description{padding:var(--van-coupon-description-padding);font-size:var(--van-font-size-sm);border-top:1px dashed var(--van-coupon-description-border-color)}.van-coupon--disabled:active{background-color:var(--van-coupon-background-color)}.van-coupon--disabled .van-coupon-item__content{height:calc(var(--van-coupon-content-height) - 10px)}.van-coupon--disabled .van-coupon__head{color:inherit}
|
package/es/coupon/index.less
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
.van-coupon {
|
24
24
|
margin: var(--van-coupon-margin);
|
25
25
|
overflow: hidden;
|
26
|
-
background
|
26
|
+
background: var(--van-coupon-background-color);
|
27
27
|
border-radius: var(--van-coupon-border-radius);
|
28
28
|
box-shadow: var(--van-coupon-box-shadow);
|
29
29
|
|
@@ -156,7 +156,7 @@ export default defineComponent({
|
|
156
156
|
return () => _createVNode("div", {
|
157
157
|
"class": bem()
|
158
158
|
}, [renderExchangeBar(), _createVNode(Tabs, {
|
159
|
-
|
159
|
+
"active": state.tab,
|
160
160
|
"onUpdate:active": $event => state.tab = $event,
|
161
161
|
"class": bem('tab'),
|
162
162
|
"border": false
|
package/es/coupon-list/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-coupon-list-background-color:var(--van-background-color);--van-coupon-list-field-padding:5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height:32px;--van-coupon-list-close-button-height:40px;--van-coupon-list-empty-image-size:200px;--van-coupon-list-empty-tip-color:var(--van-gray-6);--van-coupon-list-empty-tip-font-size:var(--van-font-size-md);--van-coupon-list-empty-tip-line-height:var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background
|
1
|
+
:root{--van-coupon-list-background-color:var(--van-background-color);--van-coupon-list-field-padding:5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height:32px;--van-coupon-list-close-button-height:40px;--van-coupon-list-empty-image-size:200px;--van-coupon-list-empty-tip-color:var(--van-gray-6);--van-coupon-list-empty-tip-font-size:var(--van-font-size-md);--van-coupon-list-empty-tip-line-height:var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background:var(--van-coupon-list-background-color)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-gray-1);border-radius:17px}.van-coupon-list__field .van-field__body::-webkit-input-placeholder{color:var(--van-gray-5)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-gray-5)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-white)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;height:calc(100vh - 108px);padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bar{height:calc(100vh - 152px)}.van-coupon-list__list--with-bottom{padding-bottom:50px}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-weight-bold);background-color:var(--van-white)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty{padding-top:60px;text-align:center}.van-coupon-list__empty p{margin:var(--van-padding-md) 0;color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}.van-coupon-list__empty img{width:var(--van-coupon-list-empty-image-size);height:var(--van-coupon-list-empty-image-size)}
|
package/es/dialog/Dialog.js
CHANGED
@@ -47,10 +47,7 @@ export default defineComponent({
|
|
47
47
|
|
48
48
|
var close = action => {
|
49
49
|
updateShow(false);
|
50
|
-
|
51
|
-
if (props.callback) {
|
52
|
-
props.callback(action);
|
53
|
-
}
|
50
|
+
props.callback == null ? void 0 : props.callback(action);
|
54
51
|
};
|
55
52
|
|
56
53
|
var getActionHandler = action => () => {
|
@@ -63,8 +60,7 @@ export default defineComponent({
|
|
63
60
|
|
64
61
|
if (props.beforeClose) {
|
65
62
|
loading[action] = true;
|
66
|
-
callInterceptor({
|
67
|
-
interceptor: props.beforeClose,
|
63
|
+
callInterceptor(props.beforeClose, {
|
68
64
|
args: [action],
|
69
65
|
|
70
66
|
done() {
|
@@ -211,10 +207,9 @@ export default defineComponent({
|
|
211
207
|
"style": {
|
212
208
|
width: addUnit(width)
|
213
209
|
},
|
214
|
-
"aria-labelledby": title || message
|
215
|
-
|
216
|
-
|
217
|
-
}), {
|
210
|
+
"aria-labelledby": title || message,
|
211
|
+
"onUpdate:show": updateShow
|
212
|
+
}, pick(props, popupKeys)), {
|
218
213
|
default: () => [renderTitle(), renderContent(), renderFooter()]
|
219
214
|
});
|
220
215
|
};
|
@@ -13,7 +13,7 @@ declare namespace Dialog {
|
|
13
13
|
className: string;
|
14
14
|
allowHtml: boolean;
|
15
15
|
lockScroll: boolean;
|
16
|
-
transition:
|
16
|
+
transition: undefined;
|
17
17
|
beforeClose: null;
|
18
18
|
overlayClass: string;
|
19
19
|
overlayStyle: undefined;
|
@@ -38,7 +38,7 @@ declare namespace Dialog {
|
|
38
38
|
className: string;
|
39
39
|
allowHtml: boolean;
|
40
40
|
lockScroll: boolean;
|
41
|
-
transition:
|
41
|
+
transition: undefined;
|
42
42
|
beforeClose: null;
|
43
43
|
overlayClass: string;
|
44
44
|
overlayStyle: undefined;
|
@@ -12,7 +12,7 @@ function initInstance() {
|
|
12
12
|
toggle
|
13
13
|
} = usePopupState();
|
14
14
|
return () => _createVNode(VanDialog, _mergeProps(state, {
|
15
|
-
|
15
|
+
"onUpdate:show": toggle
|
16
16
|
}), null);
|
17
17
|
}
|
18
18
|
|
@@ -52,7 +52,7 @@ Dialog.defaultOptions = {
|
|
52
52
|
className: '',
|
53
53
|
allowHtml: false,
|
54
54
|
lockScroll: true,
|
55
|
-
transition:
|
55
|
+
transition: undefined,
|
56
56
|
beforeClose: null,
|
57
57
|
overlayClass: '',
|
58
58
|
overlayStyle: undefined,
|
package/es/dialog/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-dialog-width:320px;--van-dialog-small-screen-width:90%;--van-dialog-font-size:var(--van-font-size-lg);--van-dialog-transition:var(--van-animation-duration-base);--van-dialog-border-radius:16px;--van-dialog-background-color:var(--van-white);--van-dialog-header-font-weight:var(--van-font-weight-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-danger-color)}.van-dialog{top:45%;left:50%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background
|
1
|
+
:root{--van-dialog-width:320px;--van-dialog-small-screen-width:90%;--van-dialog-font-size:var(--van-font-size-lg);--van-dialog-transition:var(--van-animation-duration-base);--van-dialog-border-radius:16px;--van-dialog-background-color:var(--van-white);--van-dialog-header-font-weight:var(--van-font-weight-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-danger-color)}.van-dialog{top:45%;left:50%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background-color);border-radius:var(--van-dialog-border-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{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{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__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__cancel,.van-dialog__confirm{flex:1;height:var(--van-dialog-button-height);margin:0;border: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__cancel,.van-dialog--round-button .van-dialog__confirm{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog-bounce-enter-from{transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
|
package/es/dialog/index.less
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
width: var(--van-dialog-width);
|
29
29
|
overflow: hidden;
|
30
30
|
font-size: var(--van-dialog-font-size);
|
31
|
-
background
|
31
|
+
background: var(--van-dialog-background-color);
|
32
32
|
border-radius: var(--van-dialog-border-radius);
|
33
33
|
backface-visibility: hidden; // avoid blurry text after scale animation
|
34
34
|
transition: var(--van-dialog-transition);
|