vant 4.9.0 → 4.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/README.md +5 -4
  2. package/es/action-bar-button/ActionBarButton.d.ts +3 -3
  3. package/es/action-bar-button/index.d.ts +2 -2
  4. package/es/action-bar-icon/ActionBarIcon.d.ts +3 -3
  5. package/es/action-bar-icon/index.d.ts +2 -2
  6. package/es/address-list/AddressList.d.ts +13 -13
  7. package/es/address-list/AddressList.mjs +20 -4
  8. package/es/address-list/AddressListItem.d.ts +3 -0
  9. package/es/address-list/AddressListItem.mjs +19 -7
  10. package/es/address-list/index.d.ts +2 -2
  11. package/es/address-list/style/index.mjs +1 -0
  12. package/es/area/utils.mjs +3 -3
  13. package/es/button/Button.d.ts +3 -3
  14. package/es/button/index.d.ts +2 -2
  15. package/es/card/Card.mjs +3 -3
  16. package/es/cell/Cell.d.ts +3 -3
  17. package/es/cell/index.d.ts +2 -2
  18. package/es/composables/use-route.d.ts +1 -2
  19. package/es/floating-panel/FloatingPanel.mjs +11 -5
  20. package/es/form/Form.d.ts +3 -0
  21. package/es/form/Form.mjs +9 -2
  22. package/es/form/index.d.ts +2 -0
  23. package/es/grid-item/GridItem.d.ts +3 -3
  24. package/es/grid-item/index.d.ts +2 -2
  25. package/es/index.d.ts +1 -1
  26. package/es/index.mjs +1 -1
  27. package/es/notify/types.d.ts +3 -0
  28. package/es/sidebar-item/SidebarItem.d.ts +3 -3
  29. package/es/sidebar-item/index.d.ts +2 -2
  30. package/es/stepper/Stepper.mjs +1 -0
  31. package/es/tab/Tab.d.ts +3 -3
  32. package/es/tab/index.d.ts +2 -2
  33. package/es/tabbar-item/TabbarItem.d.ts +3 -3
  34. package/es/tabbar-item/index.d.ts +2 -2
  35. package/es/tabs/index.css +1 -1
  36. package/es/tabs/utils.mjs +3 -1
  37. package/es/uploader/index.d.ts +1 -1
  38. package/lib/action-bar-button/ActionBarButton.d.ts +3 -3
  39. package/lib/action-bar-button/index.d.ts +2 -2
  40. package/lib/action-bar-icon/ActionBarIcon.d.ts +3 -3
  41. package/lib/action-bar-icon/index.d.ts +2 -2
  42. package/lib/address-list/AddressList.d.ts +13 -13
  43. package/lib/address-list/AddressList.js +19 -3
  44. package/lib/address-list/AddressListItem.d.ts +3 -0
  45. package/lib/address-list/AddressListItem.js +19 -7
  46. package/lib/address-list/index.d.ts +2 -2
  47. package/lib/address-list/style/index.js +1 -0
  48. package/lib/area/utils.js +3 -3
  49. package/lib/button/Button.d.ts +3 -3
  50. package/lib/button/index.d.ts +2 -2
  51. package/lib/card/Card.js +2 -2
  52. package/lib/cell/Cell.d.ts +3 -3
  53. package/lib/cell/index.d.ts +2 -2
  54. package/lib/composables/use-route.d.ts +1 -2
  55. package/lib/floating-panel/FloatingPanel.js +11 -5
  56. package/lib/form/Form.d.ts +3 -0
  57. package/lib/form/Form.js +9 -2
  58. package/lib/form/index.d.ts +2 -0
  59. package/lib/grid-item/GridItem.d.ts +3 -3
  60. package/lib/grid-item/index.d.ts +2 -2
  61. package/lib/index.css +1 -1
  62. package/lib/index.d.ts +1 -1
  63. package/lib/index.js +1 -1
  64. package/lib/notify/types.d.ts +3 -0
  65. package/lib/sidebar-item/SidebarItem.d.ts +3 -3
  66. package/lib/sidebar-item/index.d.ts +2 -2
  67. package/lib/stepper/Stepper.js +1 -0
  68. package/lib/tab/Tab.d.ts +3 -3
  69. package/lib/tab/index.d.ts +2 -2
  70. package/lib/tabbar-item/TabbarItem.d.ts +3 -3
  71. package/lib/tabbar-item/index.d.ts +2 -2
  72. package/lib/tabs/index.css +1 -1
  73. package/lib/tabs/utils.js +3 -1
  74. package/lib/uploader/index.d.ts +1 -1
  75. package/lib/vant.cjs.js +342 -300
  76. package/lib/vant.es.js +342 -300
  77. package/lib/vant.js +344 -302
  78. package/lib/vant.min.js +3 -3
  79. package/lib/web-types.json +1 -1
  80. package/package.json +15 -15
@@ -1,5 +1,5 @@
1
1
  export declare const GridItem: import("../utils").WithInstall<import("vue").DefineComponent<{
2
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
2
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
3
3
  url: StringConstructor;
4
4
  replace: BooleanConstructor;
5
5
  } & {
@@ -11,7 +11,7 @@ export declare const GridItem: import("../utils").WithInstall<import("vue").Defi
11
11
  iconPrefix: StringConstructor;
12
12
  badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
13
13
  }, (() => import("vue/jsx-runtime").JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
14
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
14
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
15
15
  url: StringConstructor;
16
16
  replace: BooleanConstructor;
17
17
  } & {
package/es/index.d.ts CHANGED
@@ -106,4 +106,4 @@ declare namespace _default {
106
106
  }
107
107
  export default _default;
108
108
  export function install(app: any): void;
109
- export const version: "4.9.0";
109
+ export const version: "4.9.2";
package/es/index.mjs CHANGED
@@ -99,7 +99,7 @@ import { Toast } from "./toast/index.mjs";
99
99
  import { TreeSelect } from "./tree-select/index.mjs";
100
100
  import { Uploader } from "./uploader/index.mjs";
101
101
  import { Watermark } from "./watermark/index.mjs";
102
- const version = "4.9.0";
102
+ const version = "4.9.2";
103
103
  function install(app) {
104
104
  const components = [
105
105
  ActionBar,
@@ -1,3 +1,4 @@
1
+ import type { TeleportProps } from 'vue';
1
2
  import type { Numeric } from '../utils';
2
3
  export type NotifyMessage = Numeric;
3
4
  export type NotifyType = 'primary' | 'success' | 'danger' | 'warning';
@@ -7,10 +8,12 @@ export type NotifyOptions = {
7
8
  color?: string;
8
9
  message?: NotifyMessage;
9
10
  duration?: number;
11
+ zIndex?: number;
10
12
  position?: NotifyPosition;
11
13
  className?: unknown;
12
14
  background?: string;
13
15
  lockScroll?: boolean;
16
+ teleport?: TeleportProps['to'];
14
17
  onClick?: (event: MouseEvent) => void;
15
18
  onClose?: () => void;
16
19
  onOpened?: () => void;
@@ -1,7 +1,7 @@
1
1
  import { type PropType, type ExtractPropTypes } from 'vue';
2
2
  import { type BadgeProps } from '../badge';
3
3
  export declare const sidebarItemProps: {
4
- to: PropType<import("vue-router").RouteLocationRaw>;
4
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
5
5
  url: StringConstructor;
6
6
  replace: BooleanConstructor;
7
7
  } & {
@@ -13,7 +13,7 @@ export declare const sidebarItemProps: {
13
13
  };
14
14
  export type SidebarItemProps = ExtractPropTypes<typeof sidebarItemProps>;
15
15
  declare const _default: import("vue").DefineComponent<{
16
- to: PropType<import("vue-router").RouteLocationRaw>;
16
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
17
17
  url: StringConstructor;
18
18
  replace: BooleanConstructor;
19
19
  } & {
@@ -23,7 +23,7 @@ declare const _default: import("vue").DefineComponent<{
23
23
  disabled: BooleanConstructor;
24
24
  badgeProps: PropType<Partial<BadgeProps>>;
25
25
  }, (() => import("vue/jsx-runtime").JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<ExtractPropTypes<{
26
- to: PropType<import("vue-router").RouteLocationRaw>;
26
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
27
27
  url: StringConstructor;
28
28
  replace: BooleanConstructor;
29
29
  } & {
@@ -1,5 +1,5 @@
1
1
  export declare const SidebarItem: import("../utils").WithInstall<import("vue").DefineComponent<{
2
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
2
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
3
3
  url: StringConstructor;
4
4
  replace: BooleanConstructor;
5
5
  } & {
@@ -9,7 +9,7 @@ export declare const SidebarItem: import("../utils").WithInstall<import("vue").D
9
9
  disabled: BooleanConstructor;
10
10
  badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
11
11
  }, (() => import("vue/jsx-runtime").JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
12
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
12
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
13
13
  url: StringConstructor;
14
14
  replace: BooleanConstructor;
15
15
  } & {
@@ -223,6 +223,7 @@ var stdin_default = defineComponent({
223
223
  "readonly": props.disableInput,
224
224
  "inputmode": props.integer ? "numeric" : "decimal",
225
225
  "placeholder": props.placeholder,
226
+ "autocomplete": "off",
226
227
  "aria-valuemax": props.max,
227
228
  "aria-valuemin": props.min,
228
229
  "aria-valuenow": current.value,
package/es/tab/Tab.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type PropType, type CSSProperties, type ExtractPropTypes } from 'vue';
2
2
  export declare const tabProps: {
3
- to: PropType<import("vue-router").RouteLocationRaw>;
3
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
4
4
  url: StringConstructor;
5
5
  replace: BooleanConstructor;
6
6
  } & {
@@ -18,7 +18,7 @@ export declare const tabProps: {
18
18
  };
19
19
  export type TabProps = ExtractPropTypes<typeof tabProps>;
20
20
  declare const _default: import("vue").DefineComponent<{
21
- to: PropType<import("vue-router").RouteLocationRaw>;
21
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
22
22
  url: StringConstructor;
23
23
  replace: BooleanConstructor;
24
24
  } & {
@@ -34,7 +34,7 @@ declare const _default: import("vue").DefineComponent<{
34
34
  default: true;
35
35
  };
36
36
  }, (() => import("vue/jsx-runtime").JSX.Element | undefined) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
37
- to: PropType<import("vue-router").RouteLocationRaw>;
37
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
38
38
  url: StringConstructor;
39
39
  replace: BooleanConstructor;
40
40
  } & {
package/es/tab/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export declare const Tab: import("../utils").WithInstall<import("vue").DefineComponent<{
2
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
2
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
3
3
  url: StringConstructor;
4
4
  replace: BooleanConstructor;
5
5
  } & {
@@ -15,7 +15,7 @@ export declare const Tab: import("../utils").WithInstall<import("vue").DefineCom
15
15
  default: true;
16
16
  };
17
17
  }, (() => import("vue/jsx-runtime").JSX.Element | undefined) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
18
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
19
19
  url: StringConstructor;
20
20
  replace: BooleanConstructor;
21
21
  } & {
@@ -1,7 +1,7 @@
1
1
  import { type PropType, type ExtractPropTypes } from 'vue';
2
2
  import { type BadgeProps } from '../badge';
3
3
  export declare const tabbarItemProps: {
4
- to: PropType<import("vue-router").RouteLocationRaw>;
4
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
5
5
  url: StringConstructor;
6
6
  replace: BooleanConstructor;
7
7
  } & {
@@ -14,7 +14,7 @@ export declare const tabbarItemProps: {
14
14
  };
15
15
  export type TabbarItemProps = ExtractPropTypes<typeof tabbarItemProps>;
16
16
  declare const _default: import("vue").DefineComponent<{
17
- to: PropType<import("vue-router").RouteLocationRaw>;
17
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
18
18
  url: StringConstructor;
19
19
  replace: BooleanConstructor;
20
20
  } & {
@@ -25,7 +25,7 @@ declare const _default: import("vue").DefineComponent<{
25
25
  badgeProps: PropType<Partial<BadgeProps>>;
26
26
  iconPrefix: StringConstructor;
27
27
  }, (() => import("vue/jsx-runtime").JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<ExtractPropTypes<{
28
- to: PropType<import("vue-router").RouteLocationRaw>;
28
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
29
29
  url: StringConstructor;
30
30
  replace: BooleanConstructor;
31
31
  } & {
@@ -1,5 +1,5 @@
1
1
  export declare const TabbarItem: import("../utils").WithInstall<import("vue").DefineComponent<{
2
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
2
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
3
3
  url: StringConstructor;
4
4
  replace: BooleanConstructor;
5
5
  } & {
@@ -10,7 +10,7 @@ export declare const TabbarItem: import("../utils").WithInstall<import("vue").De
10
10
  badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
11
11
  iconPrefix: StringConstructor;
12
12
  }, (() => import("vue/jsx-runtime").JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
13
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
13
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
14
14
  url: StringConstructor;
15
15
  replace: BooleanConstructor;
16
16
  } & {
package/es/tabs/index.css CHANGED
@@ -1 +1 @@
1
- :root,:host{--van-tab-text-color: var(--van-gray-7);--van-tab-active-text-color: var(--van-text-color);--van-tab-disabled-text-color: var(--van-text-color-3);--van-tab-font-size: var(--van-font-size-md);--van-tab-line-height: var(--van-line-height-md);--van-tabs-default-color: var(--van-primary-color);--van-tabs-line-height: 44px;--van-tabs-card-height: 30px;--van-tabs-nav-background: var(--van-background-2);--van-tabs-bottom-bar-width: 40px;--van-tabs-bottom-bar-height: 3px;--van-tabs-bottom-bar-color: var(--van-primary-color)}.van-tab{position:relative;display:flex;flex:1;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--van-padding-base);color:var(--van-tab-text-color);font-size:var(--van-tab-font-size);line-height:var(--van-tab-line-height);cursor:pointer}.van-tab--active{color:var(--van-tab-active-text-color);font-weight:var(--van-font-bold)}.van-tab--disabled{color:var(--van-tab-disabled-text-color);cursor:not-allowed}.van-tab--grow{flex:1 0 auto;padding:0 var(--van-padding-sm)}.van-tab--shrink{flex:none;padding:0 var(--van-padding-xs)}.van-tab--card{color:var(--van-tabs-default-color);border-right:var(--van-border-width) solid var(--van-tabs-default-color)}.van-tab--card:last-child{border-right:none}.van-tab--card.van-tab--active{color:var(--van-white);background-color:var(--van-tabs-default-color)}.van-tab--card--disabled{color:var(--van-tab-disabled-text-color)}.van-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.van-tabs{position:relative}.van-tabs__wrap{overflow:hidden}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__nav{position:relative;display:flex;background:var(--van-tabs-nav-background);-webkit-user-select:none;user-select:none}.van-tabs__nav--complete{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.van-tabs__nav--complete::-webkit-scrollbar{display:none}.van-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:15px}.van-tabs__nav--line.van-tabs__nav--shrink,.van-tabs__nav--line.van-tabs__nav--complete{padding-right:var(--van-padding-xs);padding-left:var(--van-padding-xs)}.van-tabs__nav--card{box-sizing:border-box;height:var(--van-tabs-card-height);margin:0 var(--van-padding-md);border:var(--van-border-width) solid var(--van-tabs-default-color);border-radius:var(--van-radius-sm)}.van-tabs__nav--card.van-tabs__nav--shrink{display:inline-flex}.van-tabs__line{position:absolute;bottom:15px;left:0;z-index:1;width:var(--van-tabs-bottom-bar-width);height:var(--van-tabs-bottom-bar-height);background:var(--van-tabs-bottom-bar-color);border-radius:var(--van-tabs-bottom-bar-height)}.van-tabs__track{position:relative;display:flex;width:100%;height:100%;will-change:left}.van-tabs__content--animated{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:var(--van-tabs-line-height)}.van-tabs--card>.van-tabs__wrap{height:var(--van-tabs-card-height)}
1
+ :root,:host{--van-tab-text-color: var(--van-gray-7);--van-tab-active-text-color: var(--van-text-color);--van-tab-disabled-text-color: var(--van-text-color-3);--van-tab-font-size: var(--van-font-size-md);--van-tab-line-height: var(--van-line-height-md);--van-tabs-default-color: var(--van-primary-color);--van-tabs-line-height: 44px;--van-tabs-card-height: 30px;--van-tabs-nav-background: var(--van-background-2);--van-tabs-bottom-bar-width: 40px;--van-tabs-bottom-bar-height: 3px;--van-tabs-bottom-bar-color: var(--van-primary-color)}.van-tab{position:relative;display:flex;flex:1;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--van-padding-base);color:var(--van-tab-text-color);font-size:var(--van-tab-font-size);line-height:var(--van-tab-line-height);cursor:pointer}.van-tab--active{color:var(--van-tab-active-text-color);font-weight:var(--van-font-bold)}.van-tab--disabled{color:var(--van-tab-disabled-text-color);cursor:not-allowed}.van-tab--grow{flex:1 0 auto;padding:0 var(--van-padding-sm)}.van-tab--shrink{flex:none;padding:0 var(--van-padding-xs)}.van-tab--card{color:var(--van-tabs-default-color);border-right:var(--van-border-width) solid var(--van-tabs-default-color)}.van-tab--card:last-child{border-right:none}.van-tab--card.van-tab--active{color:var(--van-white);background-color:var(--van-tabs-default-color)}.van-tab--card.van-tab--disabled{color:var(--van-tab-disabled-text-color)}.van-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.van-tabs{position:relative}.van-tabs__wrap{overflow:hidden}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__nav{position:relative;display:flex;background:var(--van-tabs-nav-background);-webkit-user-select:none;user-select:none}.van-tabs__nav--complete{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.van-tabs__nav--complete::-webkit-scrollbar{display:none}.van-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:15px}.van-tabs__nav--line.van-tabs__nav--shrink,.van-tabs__nav--line.van-tabs__nav--complete{padding-right:var(--van-padding-xs);padding-left:var(--van-padding-xs)}.van-tabs__nav--card{box-sizing:border-box;height:var(--van-tabs-card-height);margin:0 var(--van-padding-md);border:var(--van-border-width) solid var(--van-tabs-default-color);border-radius:var(--van-radius-sm)}.van-tabs__nav--card.van-tabs__nav--shrink{display:inline-flex}.van-tabs__line{position:absolute;bottom:15px;left:0;z-index:1;width:var(--van-tabs-bottom-bar-width);height:var(--van-tabs-bottom-bar-height);background:var(--van-tabs-bottom-bar-color);border-radius:var(--van-tabs-bottom-bar-height)}.van-tabs__track{position:relative;display:flex;width:100%;height:100%;will-change:left}.van-tabs__content--animated{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:var(--van-tabs-line-height)}.van-tabs--card>.van-tabs__wrap{height:var(--van-tabs-card-height)}
package/es/tabs/utils.mjs CHANGED
@@ -5,11 +5,13 @@ function scrollLeftTo(scroller, to, duration) {
5
5
  let count = 0;
6
6
  const from = scroller.scrollLeft;
7
7
  const frames = duration === 0 ? 1 : Math.round(duration * 1e3 / 16);
8
+ let scrollLeft = from;
8
9
  function cancel() {
9
10
  cancelRaf(rafId);
10
11
  }
11
12
  function animate() {
12
- scroller.scrollLeft += (to - from) / frames;
13
+ scrollLeft += (to - from) / frames;
14
+ scroller.scrollLeft = scrollLeft;
13
15
  if (++count < frames) {
14
16
  rafId = raf(animate);
15
17
  }
@@ -151,7 +151,7 @@ export declare const Uploader: import("../utils").WithInstall<import("vue").Defi
151
151
  export default Uploader;
152
152
  export { uploaderProps } from './Uploader';
153
153
  export type { UploaderProps };
154
- export type { UploaderInstance, UploaderThemeVars, UploaderResultType, UploaderFileListItem, } from './types';
154
+ export type { UploaderInstance, UploaderThemeVars, UploaderResultType, UploaderFileListItem, UploaderBeforeRead, UploaderAfterRead, } from './types';
155
155
  declare module 'vue' {
156
156
  interface GlobalComponents {
157
157
  VanUploader: typeof Uploader;
@@ -1,7 +1,7 @@
1
1
  import { type PropType, type ExtractPropTypes } from 'vue';
2
2
  import { ButtonType } from '../button';
3
3
  export declare const actionBarButtonProps: {
4
- to: PropType<import("vue-router").RouteLocationRaw>;
4
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
5
5
  url: StringConstructor;
6
6
  replace: BooleanConstructor;
7
7
  } & {
@@ -14,7 +14,7 @@ export declare const actionBarButtonProps: {
14
14
  };
15
15
  export type ActionBarButtonProps = ExtractPropTypes<typeof actionBarButtonProps>;
16
16
  declare const _default: import("vue").DefineComponent<{
17
- to: PropType<import("vue-router").RouteLocationRaw>;
17
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
18
18
  url: StringConstructor;
19
19
  replace: BooleanConstructor;
20
20
  } & {
@@ -25,7 +25,7 @@ declare const _default: import("vue").DefineComponent<{
25
25
  loading: BooleanConstructor;
26
26
  disabled: BooleanConstructor;
27
27
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
28
- to: PropType<import("vue-router").RouteLocationRaw>;
28
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
29
29
  url: StringConstructor;
30
30
  replace: BooleanConstructor;
31
31
  } & {
@@ -1,5 +1,5 @@
1
1
  export declare const ActionBarButton: import("../utils").WithInstall<import("vue").DefineComponent<{
2
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
2
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
3
3
  url: StringConstructor;
4
4
  replace: BooleanConstructor;
5
5
  } & {
@@ -10,7 +10,7 @@ export declare const ActionBarButton: import("../utils").WithInstall<import("vue
10
10
  loading: BooleanConstructor;
11
11
  disabled: BooleanConstructor;
12
12
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
13
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
13
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
14
14
  url: StringConstructor;
15
15
  replace: BooleanConstructor;
16
16
  } & {
@@ -1,7 +1,7 @@
1
1
  import { type PropType, type ExtractPropTypes } from 'vue';
2
2
  import { type BadgeProps } from '../badge';
3
3
  export declare const actionBarIconProps: {
4
- to: PropType<import("vue-router").RouteLocationRaw>;
4
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
5
5
  url: StringConstructor;
6
6
  replace: BooleanConstructor;
7
7
  } & {
@@ -16,7 +16,7 @@ export declare const actionBarIconProps: {
16
16
  };
17
17
  export type ActionBarIconProps = ExtractPropTypes<typeof actionBarIconProps>;
18
18
  declare const _default: import("vue").DefineComponent<{
19
- to: PropType<import("vue-router").RouteLocationRaw>;
19
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
20
20
  url: StringConstructor;
21
21
  replace: BooleanConstructor;
22
22
  } & {
@@ -29,7 +29,7 @@ declare const _default: import("vue").DefineComponent<{
29
29
  badgeProps: PropType<Partial<BadgeProps>>;
30
30
  iconPrefix: StringConstructor;
31
31
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
32
- to: PropType<import("vue-router").RouteLocationRaw>;
32
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
33
33
  url: StringConstructor;
34
34
  replace: BooleanConstructor;
35
35
  } & {
@@ -1,5 +1,5 @@
1
1
  export declare const ActionBarIcon: import("../utils").WithInstall<import("vue").DefineComponent<{
2
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
2
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
3
3
  url: StringConstructor;
4
4
  replace: BooleanConstructor;
5
5
  } & {
@@ -12,7 +12,7 @@ export declare const ActionBarIcon: import("../utils").WithInstall<import("vue")
12
12
  badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
13
13
  iconPrefix: StringConstructor;
14
14
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
15
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
16
16
  url: StringConstructor;
17
17
  replace: BooleanConstructor;
18
18
  } & {
@@ -1,18 +1,18 @@
1
- import { type ExtractPropTypes } from 'vue';
1
+ import { type ExtractPropTypes, type PropType } from 'vue';
2
2
  import { AddressListAddress } from './AddressListItem';
3
3
  export declare const addressListProps: {
4
4
  list: {
5
- type: import("vue").PropType<AddressListAddress[]>;
5
+ type: PropType<AddressListAddress[]>;
6
6
  default: () => never[];
7
7
  };
8
- modelValue: (NumberConstructor | StringConstructor)[];
8
+ modelValue: PropType<string | number | (string | number)[]>;
9
9
  switchable: {
10
10
  type: BooleanConstructor;
11
11
  default: true;
12
12
  };
13
13
  disabledText: StringConstructor;
14
14
  disabledList: {
15
- type: import("vue").PropType<AddressListAddress[]>;
15
+ type: PropType<AddressListAddress[]>;
16
16
  default: () => never[];
17
17
  };
18
18
  showAddButton: {
@@ -22,24 +22,24 @@ export declare const addressListProps: {
22
22
  addButtonText: StringConstructor;
23
23
  defaultTagText: StringConstructor;
24
24
  rightIcon: {
25
- type: import("vue").PropType<string>;
25
+ type: PropType<string>;
26
26
  default: string;
27
27
  };
28
28
  };
29
29
  export type AddressListProps = ExtractPropTypes<typeof addressListProps>;
30
30
  declare const _default: import("vue").DefineComponent<{
31
31
  list: {
32
- type: import("vue").PropType<AddressListAddress[]>;
32
+ type: PropType<AddressListAddress[]>;
33
33
  default: () => never[];
34
34
  };
35
- modelValue: (NumberConstructor | StringConstructor)[];
35
+ modelValue: PropType<string | number | (string | number)[]>;
36
36
  switchable: {
37
37
  type: BooleanConstructor;
38
38
  default: true;
39
39
  };
40
40
  disabledText: StringConstructor;
41
41
  disabledList: {
42
- type: import("vue").PropType<AddressListAddress[]>;
42
+ type: PropType<AddressListAddress[]>;
43
43
  default: () => never[];
44
44
  };
45
45
  showAddButton: {
@@ -49,22 +49,22 @@ declare const _default: import("vue").DefineComponent<{
49
49
  addButtonText: StringConstructor;
50
50
  defaultTagText: StringConstructor;
51
51
  rightIcon: {
52
- type: import("vue").PropType<string>;
52
+ type: PropType<string>;
53
53
  default: string;
54
54
  };
55
55
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "add" | "update:modelValue" | "edit" | "clickItem" | "editDisabled" | "selectDisabled")[], "select" | "add" | "update:modelValue" | "edit" | "clickItem" | "editDisabled" | "selectDisabled", import("vue").PublicProps, Readonly<ExtractPropTypes<{
56
56
  list: {
57
- type: import("vue").PropType<AddressListAddress[]>;
57
+ type: PropType<AddressListAddress[]>;
58
58
  default: () => never[];
59
59
  };
60
- modelValue: (NumberConstructor | StringConstructor)[];
60
+ modelValue: PropType<string | number | (string | number)[]>;
61
61
  switchable: {
62
62
  type: BooleanConstructor;
63
63
  default: true;
64
64
  };
65
65
  disabledText: StringConstructor;
66
66
  disabledList: {
67
- type: import("vue").PropType<AddressListAddress[]>;
67
+ type: PropType<AddressListAddress[]>;
68
68
  default: () => never[];
69
69
  };
70
70
  showAddButton: {
@@ -74,7 +74,7 @@ declare const _default: import("vue").DefineComponent<{
74
74
  addButtonText: StringConstructor;
75
75
  defaultTagText: StringConstructor;
76
76
  rightIcon: {
77
- type: import("vue").PropType<string>;
77
+ type: PropType<string>;
78
78
  default: string;
79
79
  };
80
80
  }>> & {
@@ -36,11 +36,12 @@ var import_vue2 = require("vue");
36
36
  var import_utils = require("../utils");
37
37
  var import_button = require("../button");
38
38
  var import_radio_group = require("../radio-group");
39
+ var import_checkbox_group = require("../checkbox-group");
39
40
  var import_AddressListItem = __toESM(require("./AddressListItem"));
40
41
  const [name, bem, t] = (0, import_utils.createNamespace)("address-list");
41
42
  const addressListProps = {
42
43
  list: (0, import_utils.makeArrayProp)(),
43
- modelValue: import_utils.numericProp,
44
+ modelValue: [...import_utils.numericProp, Array],
44
45
  switchable: import_utils.truthProp,
45
46
  disabledText: String,
46
47
  disabledList: (0, import_utils.makeArrayProp)(),
@@ -57,6 +58,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
57
58
  slots,
58
59
  emit
59
60
  }) {
61
+ const singleChoice = (0, import_vue2.computed)(() => !Array.isArray(props.modelValue));
60
62
  const renderItem = (item, index, disabled) => {
61
63
  const onEdit = () => emit(disabled ? "editDisabled" : "edit", item, index);
62
64
  const onClick = (event) => emit("clickItem", item, index, {
@@ -65,7 +67,16 @@ var stdin_default = (0, import_vue2.defineComponent)({
65
67
  const onSelect = () => {
66
68
  emit(disabled ? "selectDisabled" : "select", item, index);
67
69
  if (!disabled) {
68
- emit("update:modelValue", item.id);
70
+ if (singleChoice.value) {
71
+ emit("update:modelValue", item.id);
72
+ } else {
73
+ const value = props.modelValue;
74
+ if (value.includes(item.id)) {
75
+ emit("update:modelValue", value.filter((id) => id !== item.id));
76
+ } else {
77
+ emit("update:modelValue", [...value, item.id]);
78
+ }
79
+ }
69
80
  }
70
81
  };
71
82
  return (0, import_vue.createVNode)(import_AddressListItem.default, {
@@ -73,6 +84,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
73
84
  "address": item,
74
85
  "disabled": disabled,
75
86
  "switchable": props.switchable,
87
+ "singleChoice": singleChoice.value,
76
88
  "defaultTagText": props.defaultTagText,
77
89
  "rightIcon": props.rightIcon,
78
90
  "onEdit": onEdit,
@@ -107,7 +119,11 @@ var stdin_default = (0, import_vue2.defineComponent)({
107
119
  }, [props.disabledText]);
108
120
  return (0, import_vue.createVNode)("div", {
109
121
  "class": bem()
110
- }, [(_a = slots.top) == null ? void 0 : _a.call(slots), (0, import_vue.createVNode)(import_radio_group.RadioGroup, {
122
+ }, [(_a = slots.top) == null ? void 0 : _a.call(slots), !singleChoice.value && Array.isArray(props.modelValue) ? (0, import_vue.createVNode)(import_checkbox_group.CheckboxGroup, {
123
+ "modelValue": props.modelValue
124
+ }, {
125
+ default: () => [List]
126
+ }) : (0, import_vue.createVNode)(import_radio_group.RadioGroup, {
111
127
  "modelValue": props.modelValue
112
128
  }, {
113
129
  default: () => [List]
@@ -14,6 +14,7 @@ declare const _default: import("vue").DefineComponent<{
14
14
  };
15
15
  disabled: BooleanConstructor;
16
16
  switchable: BooleanConstructor;
17
+ singleChoice: BooleanConstructor;
17
18
  defaultTagText: StringConstructor;
18
19
  rightIcon: {
19
20
  type: PropType<string>;
@@ -26,6 +27,7 @@ declare const _default: import("vue").DefineComponent<{
26
27
  };
27
28
  disabled: BooleanConstructor;
28
29
  switchable: BooleanConstructor;
30
+ singleChoice: BooleanConstructor;
29
31
  defaultTagText: StringConstructor;
30
32
  rightIcon: {
31
33
  type: PropType<string>;
@@ -39,5 +41,6 @@ declare const _default: import("vue").DefineComponent<{
39
41
  disabled: boolean;
40
42
  rightIcon: string;
41
43
  switchable: boolean;
44
+ singleChoice: boolean;
42
45
  }, {}>;
43
46
  export default _default;
@@ -27,6 +27,7 @@ var import_tag = require("../tag");
27
27
  var import_icon = require("../icon");
28
28
  var import_cell = require("../cell");
29
29
  var import_radio = require("../radio");
30
+ var import_checkbox = require("../checkbox");
30
31
  const [name, bem] = (0, import_utils.createNamespace)("address-item");
31
32
  var stdin_default = (0, import_vue2.defineComponent)({
32
33
  name,
@@ -34,6 +35,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
34
35
  address: (0, import_utils.makeRequiredProp)(Object),
35
36
  disabled: Boolean,
36
37
  switchable: Boolean,
38
+ singleChoice: Boolean,
37
39
  defaultTagText: String,
38
40
  rightIcon: (0, import_utils.makeStringProp)("edit")
39
41
  },
@@ -75,7 +77,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
75
77
  const {
76
78
  address,
77
79
  disabled,
78
- switchable
80
+ switchable,
81
+ singleChoice
79
82
  } = props;
80
83
  const Info = [(0, import_vue.createVNode)("div", {
81
84
  "class": bem("name")
@@ -83,12 +86,21 @@ var stdin_default = (0, import_vue2.defineComponent)({
83
86
  "class": bem("address")
84
87
  }, [address.address])];
85
88
  if (switchable && !disabled) {
86
- return (0, import_vue.createVNode)(import_radio.Radio, {
87
- "name": address.id,
88
- "iconSize": 18
89
- }, {
90
- default: () => [Info]
91
- });
89
+ if (singleChoice) {
90
+ return (0, import_vue.createVNode)(import_radio.Radio, {
91
+ "name": address.id,
92
+ "iconSize": 18
93
+ }, {
94
+ default: () => [Info]
95
+ });
96
+ } else {
97
+ return (0, import_vue.createVNode)(import_checkbox.Checkbox, {
98
+ "name": address.id,
99
+ "iconSize": 18
100
+ }, {
101
+ default: () => [Info]
102
+ });
103
+ }
92
104
  }
93
105
  return Info;
94
106
  };
@@ -3,7 +3,7 @@ export declare const AddressList: import("../utils").WithInstall<import("vue").D
3
3
  type: import("vue").PropType<import("./AddressListItem").AddressListAddress[]>;
4
4
  default: () => never[];
5
5
  };
6
- modelValue: (NumberConstructor | StringConstructor)[];
6
+ modelValue: import("vue").PropType<string | number | (string | number)[]>;
7
7
  switchable: {
8
8
  type: BooleanConstructor;
9
9
  default: true;
@@ -28,7 +28,7 @@ export declare const AddressList: import("../utils").WithInstall<import("vue").D
28
28
  type: import("vue").PropType<import("./AddressListItem").AddressListAddress[]>;
29
29
  default: () => never[];
30
30
  };
31
- modelValue: (NumberConstructor | StringConstructor)[];
31
+ modelValue: import("vue").PropType<string | number | (string | number)[]>;
32
32
  switchable: {
33
33
  type: BooleanConstructor;
34
34
  default: true;
@@ -6,6 +6,7 @@ require("../../cell/index.css");
6
6
  require("../../loading/index.css");
7
7
  require("../../button/index.css");
8
8
  require("../../radio-group/index.css");
9
+ require("../../checkbox-group/index.css");
9
10
  require("../../checkbox/index.css");
10
11
  require("../../radio/index.css");
11
12
  require("../index.css");
package/lib/area/utils.js CHANGED
@@ -61,9 +61,9 @@ function formatDataForCascade({
61
61
  const showCounty = +columnsNum > 2;
62
62
  const getProvinceChildren = () => {
63
63
  if (showCity) {
64
- return placeholder.length ? [
64
+ return placeholder.length > 1 ? [
65
65
  makeOption(
66
- placeholder[0],
66
+ placeholder[1],
67
67
  AREA_EMPTY_CODE,
68
68
  showCounty ? [] : void 0
69
69
  )
@@ -81,7 +81,7 @@ function formatDataForCascade({
81
81
  if (showCity) {
82
82
  const getCityChildren = () => {
83
83
  if (showCounty) {
84
- return placeholder.length ? [makeOption(placeholder[1])] : [];
84
+ return placeholder.length > 2 ? [makeOption(placeholder[2])] : [];
85
85
  }
86
86
  };
87
87
  Object.keys(city).forEach((code) => {
@@ -2,7 +2,7 @@ import { type PropType, type ExtractPropTypes } from 'vue';
2
2
  import { LoadingType } from '../loading';
3
3
  import { ButtonSize, ButtonType, ButtonNativeType, ButtonIconPosition } from './types';
4
4
  export declare const buttonProps: {
5
- to: PropType<import("vue-router").RouteLocationRaw>;
5
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
6
6
  url: StringConstructor;
7
7
  replace: BooleanConstructor;
8
8
  } & {
@@ -43,7 +43,7 @@ export declare const buttonProps: {
43
43
  };
44
44
  export type ButtonProps = ExtractPropTypes<typeof buttonProps>;
45
45
  declare const _default: import("vue").DefineComponent<{
46
- to: PropType<import("vue-router").RouteLocationRaw>;
46
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
47
47
  url: StringConstructor;
48
48
  replace: BooleanConstructor;
49
49
  } & {
@@ -82,7 +82,7 @@ declare const _default: import("vue").DefineComponent<{
82
82
  default: ButtonIconPosition;
83
83
  };
84
84
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<ExtractPropTypes<{
85
- to: PropType<import("vue-router").RouteLocationRaw>;
85
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
86
86
  url: StringConstructor;
87
87
  replace: BooleanConstructor;
88
88
  } & {