vant 3.6.2 → 3.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -92,16 +92,15 @@ Vant 3/4 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3)
92
92
  | --- | --- |
93
93
  | [vant-weapp](https://github.com/vant-ui/vant-weapp) | WeChat MiniProgram UI |
94
94
  | [vant-demo](https://github.com/vant-ui/vant-demo) | Collection of Vant demos |
95
- | [vant-cli](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli) | Scaffold for UI library |
96
- | [vant-icons](https://github.com/vant-ui/vant/tree/dev/packages/vant-icons) | Vant icons |
97
- | [vant-touch-emulator](https://github.com/vant-ui/vant/tree/dev/packages/vant-touch-emulator) | Using vant in desktop browsers |
95
+ | [vant-cli](https://github.com/vant-ui/vant/tree/3.x/packages/vant-cli) | Scaffold for UI library |
96
+ | [vant-icons](https://github.com/vant-ui/vant/tree/3.x/packages/vant-icons) | Vant icons |
97
+ | [vant-touch-emulator](https://github.com/vant-ui/vant/tree/3.x/packages/vant-touch-emulator) | Using vant in desktop browsers |
98
98
 
99
99
  ## Community Ecosystem
100
100
 
101
101
  | Project | Description |
102
102
  | --- | --- |
103
103
  | [3lang3/react-vant](https://github.com/3lang3/react-vant) | React mobile UI Components based on Vant |
104
- | [rc-ui-lib](https://github.com/rancui/rc-ui-lib) | React mobile UI Components based on Vant |
105
104
  | [vant-aliapp](https://github.com/ant-move/Vant-Aliapp) | Alipay MiniProgram UI |
106
105
  | [taroify](https://gitee.com/mallfoundry/taroify) | Vant Taro |
107
106
  | [vant-theme](https://github.com/Aisen60/vant-theme) | Online theme preview built on Vant UI |
@@ -112,7 +111,7 @@ Vant 3/4 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3)
112
111
 
113
112
  - [Documentation](https://vant-ui.github.io/vant)
114
113
  - [Changelog](https://vant-ui.github.io/vant#/en-US/changelog)
115
- - [Gitter](https://gitter.im/vant-contrib/discuss?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
114
+ - [Discussions](https://github.com/vant-ui/vant/discussions)
116
115
 
117
116
  ## Preview
118
117
 
@@ -1,3 +1,30 @@
1
+ ### [v3.6.3](https://github.com/vant-ui/vant/compare/v3.6.2...v3.6.3)
2
+
3
+ `2022-09-24`
4
+
5
+ **Bug Fixes**
6
+
7
+ - @vant/cli: failed to build types of sfc [#11012](https://github.com/vant-ui/vant/issues/11012)
8
+ - Tabs: incorrect scroll position in some cases [#11085](https://github.com/vant-ui/vant/issues/11085)
9
+ - Tabs: incorrect scroll position when inited [#11059](https://github.com/vant-ui/vant/issues/11059)
10
+ - utils: avoid getting unexpected value [#11010](https://github.com/vant-ui/vant/issues/11010)
11
+
12
+ **Document**
13
+
14
+ - changelog: @vant/cli 4.0.4 [1b08f8](https://github.com/vant-ui/vant/commit/1b08f84ac6dc84cb3cea93f7816a4fcd5f5c2293)
15
+ - changelog: vant@3.6.2 [#11008](https://github.com/vant-ui/vant/issues/11008)
16
+ - switch dev branch to v4 [99833f](https://github.com/vant-ui/vant/commit/99833f218508d0177c886ba5756536563a926e25)
17
+ - update links [#11041](https://github.com/vant-ui/vant/issues/11041)
18
+ - update links for 3.x branch [2d4782](https://github.com/vant-ui/vant/commit/2d47824ae76a1b14715332d336f8e767c674a334)
19
+
20
+ **Feature**
21
+
22
+ - Dialog: message-align can be justify [#11014](https://github.com/vant-ui/vant/issues/11014)
23
+ - Image: add block prop [#11022](https://github.com/vant-ui/vant/issues/11022)
24
+
25
+ **release**
26
+
27
+ - @vant/cli 4.0.4 [f0d3e0](https://github.com/vant-ui/vant/commit/f0d3e04fba4ecb05d7893d290d48089e860e3ee6)
1
28
  ### [v3.6.2](https://github.com/vant-ui/vant/compare/v3.6.1...v3.6.2)
2
29
 
3
30
  `2022-09-04`
@@ -24,28 +51,4 @@
24
51
  **release**
25
52
 
26
53
  - @vant/area-data 1.3.2 [94c5af](https://github.com/vant-ui/vant/commit/94c5afe65caa97188fe3a800c52c629c1416ff41)
27
- ### [v3.6.1](https://github.com/vant-ui/vant/compare/v3.6.0...v3.6.1)
28
-
29
- `2022-08-24`
30
-
31
- **Bug Fixes**
32
-
33
- - reduce passive event warning of touchstart event [#10954](https://github.com/vant-ui/vant/issues/10954)
34
- - Tabs: resize not work for swipeable tabs [#10964](https://github.com/vant-ui/vant/issues/10964)
35
-
36
- **Document**
37
-
38
- - changelog: vant@3.6.0 [667034](https://github.com/vant-ui/vant/commit/667034322ed4e1c39fd014e83d8661a1ff891ee0)
39
- - NoticeBar: disable swipe drag in demo [#10950](https://github.com/vant-ui/vant/issues/10950)
40
-
41
- **perf**
42
-
43
- - add correct passive flag to improve scroll performance [#10951](https://github.com/vant-ui/vant/issues/10951)
44
-
45
- **release**
46
-
47
- - 3.6.1 [2cca63](https://github.com/vant-ui/vant/commit/2cca63080868beb1b64bedddd004d8f13bc64d4a)
48
-
49
- **Types**
50
-
51
- - @vant/use: improve useEventListener typing [#10952](https://github.com/vant-ui/vant/issues/10952)
54
+ - 3.6.2 [7afb74](https://github.com/vant-ui/vant/commit/7afb74345a39f23a3c62aa8b0e6d95de4c2b35de)
@@ -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-background-color-light);--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__confirm,.van-dialog__cancel{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__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog-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}
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-background-color-light);--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__message--justify{text-align:justify}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__confirm,.van-dialog__cancel{flex:1;height:var(--van-dialog-button-height);margin:0;border:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog-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}
@@ -83,6 +83,10 @@
83
83
  &--right {
84
84
  text-align: right;
85
85
  }
86
+
87
+ &--justify {
88
+ text-align: justify;
89
+ }
86
90
  }
87
91
 
88
92
  &__footer {
@@ -4,7 +4,7 @@ import type { Interceptor, Numeric } from '../utils';
4
4
  export declare type DialogTheme = 'default' | 'round-button';
5
5
  export declare type DialogAction = 'confirm' | 'cancel';
6
6
  export declare type DialogMessage = string | (() => JSX.Element);
7
- export declare type DialogMessageAlign = 'left' | 'center' | 'right';
7
+ export declare type DialogMessageAlign = 'left' | 'center' | 'right' | 'justify';
8
8
  export declare type DialogOptions = {
9
9
  title?: string;
10
10
  width?: Numeric;
@@ -7,6 +7,7 @@ declare const imageProps: {
7
7
  fit: PropType<ImageFit>;
8
8
  position: PropType<string>;
9
9
  round: BooleanConstructor;
10
+ block: BooleanConstructor;
10
11
  width: (NumberConstructor | StringConstructor)[];
11
12
  height: (NumberConstructor | StringConstructor)[];
12
13
  radius: (NumberConstructor | StringConstructor)[];
@@ -37,6 +38,7 @@ declare const _default: import("vue").DefineComponent<{
37
38
  fit: PropType<ImageFit>;
38
39
  position: PropType<string>;
39
40
  round: BooleanConstructor;
41
+ block: BooleanConstructor;
40
42
  width: (NumberConstructor | StringConstructor)[];
41
43
  height: (NumberConstructor | StringConstructor)[];
42
44
  radius: (NumberConstructor | StringConstructor)[];
@@ -65,6 +67,7 @@ declare const _default: import("vue").DefineComponent<{
65
67
  fit: PropType<ImageFit>;
66
68
  position: PropType<string>;
67
69
  round: BooleanConstructor;
70
+ block: BooleanConstructor;
68
71
  width: (NumberConstructor | StringConstructor)[];
69
72
  height: (NumberConstructor | StringConstructor)[];
70
73
  radius: (NumberConstructor | StringConstructor)[];
@@ -93,6 +96,7 @@ declare const _default: import("vue").DefineComponent<{
93
96
  }, {
94
97
  round: boolean;
95
98
  showError: boolean;
99
+ block: boolean;
96
100
  lazyLoad: boolean;
97
101
  errorIcon: string;
98
102
  showLoading: boolean;
@@ -9,6 +9,7 @@ const imageProps = {
9
9
  fit: String,
10
10
  position: String,
11
11
  round: Boolean,
12
+ block: Boolean,
12
13
  width: numericProp,
13
14
  height: numericProp,
14
15
  radius: numericProp,
@@ -137,7 +138,8 @@ var stdin_default = defineComponent({
137
138
  var _a;
138
139
  return _createVNode("div", {
139
140
  "class": bem({
140
- round: props.round
141
+ round: props.round,
142
+ block: props.block
141
143
  }),
142
144
  "style": style.value
143
145
  }, [renderImage(), renderPlaceholder(), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
@@ -1 +1 @@
1
- :root{--van-image-placeholder-text-color: var(--van-text-color-2);--van-image-placeholder-font-size: var(--van-font-size-md);--van-image-placeholder-background-color: var(--van-background-color);--van-image-loading-icon-size: 32px;--van-image-loading-icon-color: var(--van-gray-4);--van-image-error-icon-size: 32px;--van-image-error-icon-color: var(--van-gray-4)}.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:var(--van-border-radius-max)}.van-image--round .van-image__img{border-radius:inherit}.van-image__img,.van-image__error,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-image-placeholder-text-color);font-size:var(--van-image-placeholder-font-size);background:var(--van-image-placeholder-background-color)}.van-image__loading-icon{color:var(--van-image-loading-icon-color);font-size:var(--van-image-loading-icon-size)}.van-image__error-icon{color:var(--van-image-error-icon-color);font-size:var(--van-image-error-icon-size)}
1
+ :root{--van-image-placeholder-text-color: var(--van-text-color-2);--van-image-placeholder-font-size: var(--van-font-size-md);--van-image-placeholder-background-color: var(--van-background-color);--van-image-loading-icon-size: 32px;--van-image-loading-icon-color: var(--van-gray-4);--van-image-error-icon-size: 32px;--van-image-error-icon-color: var(--van-gray-4)}.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:var(--van-border-radius-max)}.van-image--round .van-image__img{border-radius:inherit}.van-image--block{display:block}.van-image__img,.van-image__error,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-image-placeholder-text-color);font-size:var(--van-image-placeholder-font-size);background:var(--van-image-placeholder-background-color)}.van-image__loading-icon{color:var(--van-image-loading-icon-color);font-size:var(--van-image-loading-icon-size)}.van-image__error-icon{color:var(--van-image-error-icon-color);font-size:var(--van-image-error-icon-size)}
@@ -4,6 +4,7 @@ export declare const Image: import("../utils").WithInstall<import("vue").DefineC
4
4
  fit: import("vue").PropType<import("./Image").ImageFit>;
5
5
  position: import("vue").PropType<string>;
6
6
  round: BooleanConstructor;
7
+ block: BooleanConstructor;
7
8
  width: (NumberConstructor | StringConstructor)[];
8
9
  height: (NumberConstructor | StringConstructor)[];
9
10
  radius: (NumberConstructor | StringConstructor)[];
@@ -32,6 +33,7 @@ export declare const Image: import("../utils").WithInstall<import("vue").DefineC
32
33
  fit: import("vue").PropType<import("./Image").ImageFit>;
33
34
  position: import("vue").PropType<string>;
34
35
  round: BooleanConstructor;
36
+ block: BooleanConstructor;
35
37
  width: (NumberConstructor | StringConstructor)[];
36
38
  height: (NumberConstructor | StringConstructor)[];
37
39
  radius: (NumberConstructor | StringConstructor)[];
@@ -60,6 +62,7 @@ export declare const Image: import("../utils").WithInstall<import("vue").DefineC
60
62
  }, {
61
63
  round: boolean;
62
64
  showError: boolean;
65
+ block: boolean;
63
66
  lazyLoad: boolean;
64
67
  errorIcon: string;
65
68
  showLoading: boolean;
@@ -23,6 +23,10 @@
23
23
  }
24
24
  }
25
25
 
26
+ &--block {
27
+ display: block;
28
+ }
29
+
26
30
  &__img,
27
31
  &__error,
28
32
  &__loading {
package/es/index.d.ts CHANGED
@@ -91,4 +91,4 @@ declare namespace _default {
91
91
  }
92
92
  export default _default;
93
93
  export function install(app: any): void;
94
- export const version: "3.6.2";
94
+ export const version: "3.6.3";
package/es/index.mjs CHANGED
@@ -84,7 +84,7 @@ import { Tag } from "./tag/index.mjs";
84
84
  import { Toast } from "./toast/index.mjs";
85
85
  import { TreeSelect } from "./tree-select/index.mjs";
86
86
  import { Uploader } from "./uploader/index.mjs";
87
- const version = "3.6.2";
87
+ const version = "3.6.3";
88
88
  function install(app) {
89
89
  const components = [
90
90
  ActionBar,
package/es/tab/Tab.mjs CHANGED
@@ -2,7 +2,7 @@ import { withDirectives as _withDirectives, vShow as _vShow, createVNode as _cre
2
2
  import { ref, watch, provide, computed, nextTick, defineComponent } from "vue";
3
3
  import { extend, truthProp, unknownProp, numericProp, createNamespace } from "../utils/index.mjs";
4
4
  import { TABS_KEY } from "../tabs/Tabs.mjs";
5
- import { useParent } from "@vant/use";
5
+ import { doubleRaf, useParent } from "@vant/use";
6
6
  import { useId } from "../composables/use-id.mjs";
7
7
  import { useExpose } from "../composables/use-expose.mjs";
8
8
  import { routeProps } from "../composables/use-route.mjs";
@@ -56,6 +56,16 @@ var stdin_default = defineComponent({
56
56
  }
57
57
  return isActive;
58
58
  });
59
+ const hasInactiveClass = ref(!active.value);
60
+ watch(active, (val) => {
61
+ if (val) {
62
+ hasInactiveClass.value = false;
63
+ } else {
64
+ doubleRaf(() => {
65
+ hasInactiveClass.value = true;
66
+ });
67
+ }
68
+ });
59
69
  watch(() => props.title, () => {
60
70
  parent.setLine();
61
71
  parent.scrollIntoView();
@@ -79,7 +89,7 @@ var stdin_default = defineComponent({
79
89
  "id": id,
80
90
  "role": "tabpanel",
81
91
  "class": bem("panel-wrapper", {
82
- inactive: !active.value
92
+ inactive: hasInactiveClass.value
83
93
  }),
84
94
  "tabindex": active.value ? 0 : -1,
85
95
  "aria-hidden": !active.value,
package/es/tabs/Tabs.mjs CHANGED
@@ -143,7 +143,7 @@ var stdin_default = defineComponent({
143
143
  index += diff;
144
144
  }
145
145
  };
146
- const setCurrentIndex = (currentIndex) => {
146
+ const setCurrentIndex = (currentIndex, skipScrollIntoView) => {
147
147
  const newIndex = findAvailableTab(currentIndex);
148
148
  if (!isDef(newIndex)) {
149
149
  return;
@@ -158,11 +158,18 @@ var stdin_default = defineComponent({
158
158
  emit("change", newName, newTab.title);
159
159
  }
160
160
  }
161
+ if (!skipScrollIntoView) {
162
+ scrollIntoView();
163
+ }
164
+ setLine();
165
+ if (stickyFixed && !props.scrollspy) {
166
+ setRootScrollTop(Math.ceil(getElementTop(root.value) - offsetTopPx.value));
167
+ }
161
168
  };
162
- const setCurrentIndexByName = (name2) => {
169
+ const setCurrentIndexByName = (name2, skipScrollIntoView) => {
163
170
  const matched = children.find((tab, index2) => getTabName(tab, index2) === name2);
164
171
  const index = matched ? children.indexOf(matched) : 0;
165
- setCurrentIndex(index);
172
+ setCurrentIndex(index, skipScrollIntoView);
166
173
  };
167
174
  const scrollToCurrentContent = (immediate = false) => {
168
175
  if (props.scrollspy) {
@@ -292,15 +299,8 @@ var stdin_default = defineComponent({
292
299
  });
293
300
  }
294
301
  });
295
- watch(() => state.currentIndex, () => {
296
- scrollIntoView();
297
- setLine();
298
- if (stickyFixed && !props.scrollspy) {
299
- setRootScrollTop(Math.ceil(getElementTop(root.value) - offsetTopPx.value));
300
- }
301
- });
302
302
  const init = () => {
303
- setCurrentIndexByName(props.active);
303
+ setCurrentIndexByName(props.active, true);
304
304
  nextTick(() => {
305
305
  state.inited = true;
306
306
  if (wrapRef.value) {
@@ -1,3 +1,4 @@
1
+ import { isObject } from "./validate.mjs";
1
2
  function noop() {
2
3
  }
3
4
  const extend = Object.assign;
@@ -7,7 +8,7 @@ function get(object, path) {
7
8
  let result = object;
8
9
  keys.forEach((key) => {
9
10
  var _a;
10
- result = (_a = result[key]) != null ? _a : "";
11
+ result = isObject(result) ? (_a = result[key]) != null ? _a : "" : "";
11
12
  });
12
13
  return result;
13
14
  }
@@ -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-background-color-light);--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__confirm,.van-dialog__cancel{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__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog-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}
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-background-color-light);--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__message--justify{text-align:justify}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-dialog__confirm,.van-dialog__cancel{flex:1;height:var(--van-dialog-button-height);margin:0;border:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog-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}
@@ -83,6 +83,10 @@
83
83
  &--right {
84
84
  text-align: right;
85
85
  }
86
+
87
+ &--justify {
88
+ text-align: justify;
89
+ }
86
90
  }
87
91
 
88
92
  &__footer {
@@ -4,7 +4,7 @@ import type { Interceptor, Numeric } from '../utils';
4
4
  export declare type DialogTheme = 'default' | 'round-button';
5
5
  export declare type DialogAction = 'confirm' | 'cancel';
6
6
  export declare type DialogMessage = string | (() => JSX.Element);
7
- export declare type DialogMessageAlign = 'left' | 'center' | 'right';
7
+ export declare type DialogMessageAlign = 'left' | 'center' | 'right' | 'justify';
8
8
  export declare type DialogOptions = {
9
9
  title?: string;
10
10
  width?: Numeric;
@@ -7,6 +7,7 @@ declare const imageProps: {
7
7
  fit: PropType<ImageFit>;
8
8
  position: PropType<string>;
9
9
  round: BooleanConstructor;
10
+ block: BooleanConstructor;
10
11
  width: (NumberConstructor | StringConstructor)[];
11
12
  height: (NumberConstructor | StringConstructor)[];
12
13
  radius: (NumberConstructor | StringConstructor)[];
@@ -37,6 +38,7 @@ declare const _default: import("vue").DefineComponent<{
37
38
  fit: PropType<ImageFit>;
38
39
  position: PropType<string>;
39
40
  round: BooleanConstructor;
41
+ block: BooleanConstructor;
40
42
  width: (NumberConstructor | StringConstructor)[];
41
43
  height: (NumberConstructor | StringConstructor)[];
42
44
  radius: (NumberConstructor | StringConstructor)[];
@@ -65,6 +67,7 @@ declare const _default: import("vue").DefineComponent<{
65
67
  fit: PropType<ImageFit>;
66
68
  position: PropType<string>;
67
69
  round: BooleanConstructor;
70
+ block: BooleanConstructor;
68
71
  width: (NumberConstructor | StringConstructor)[];
69
72
  height: (NumberConstructor | StringConstructor)[];
70
73
  radius: (NumberConstructor | StringConstructor)[];
@@ -93,6 +96,7 @@ declare const _default: import("vue").DefineComponent<{
93
96
  }, {
94
97
  round: boolean;
95
98
  showError: boolean;
99
+ block: boolean;
96
100
  lazyLoad: boolean;
97
101
  errorIcon: string;
98
102
  showLoading: boolean;
@@ -31,6 +31,7 @@ const imageProps = {
31
31
  fit: String,
32
32
  position: String,
33
33
  round: Boolean,
34
+ block: Boolean,
34
35
  width: import_utils.numericProp,
35
36
  height: import_utils.numericProp,
36
37
  radius: import_utils.numericProp,
@@ -159,7 +160,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
159
160
  var _a;
160
161
  return (0, import_vue.createVNode)("div", {
161
162
  "class": bem({
162
- round: props.round
163
+ round: props.round,
164
+ block: props.block
163
165
  }),
164
166
  "style": style.value
165
167
  }, [renderImage(), renderPlaceholder(), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
@@ -1 +1 @@
1
- :root{--van-image-placeholder-text-color: var(--van-text-color-2);--van-image-placeholder-font-size: var(--van-font-size-md);--van-image-placeholder-background-color: var(--van-background-color);--van-image-loading-icon-size: 32px;--van-image-loading-icon-color: var(--van-gray-4);--van-image-error-icon-size: 32px;--van-image-error-icon-color: var(--van-gray-4)}.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:var(--van-border-radius-max)}.van-image--round .van-image__img{border-radius:inherit}.van-image__img,.van-image__error,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-image-placeholder-text-color);font-size:var(--van-image-placeholder-font-size);background:var(--van-image-placeholder-background-color)}.van-image__loading-icon{color:var(--van-image-loading-icon-color);font-size:var(--van-image-loading-icon-size)}.van-image__error-icon{color:var(--van-image-error-icon-color);font-size:var(--van-image-error-icon-size)}
1
+ :root{--van-image-placeholder-text-color: var(--van-text-color-2);--van-image-placeholder-font-size: var(--van-font-size-md);--van-image-placeholder-background-color: var(--van-background-color);--van-image-loading-icon-size: 32px;--van-image-loading-icon-color: var(--van-gray-4);--van-image-error-icon-size: 32px;--van-image-error-icon-color: var(--van-gray-4)}.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:var(--van-border-radius-max)}.van-image--round .van-image__img{border-radius:inherit}.van-image--block{display:block}.van-image__img,.van-image__error,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-image-placeholder-text-color);font-size:var(--van-image-placeholder-font-size);background:var(--van-image-placeholder-background-color)}.van-image__loading-icon{color:var(--van-image-loading-icon-color);font-size:var(--van-image-loading-icon-size)}.van-image__error-icon{color:var(--van-image-error-icon-color);font-size:var(--van-image-error-icon-size)}
@@ -4,6 +4,7 @@ export declare const Image: import("../utils").WithInstall<import("vue").DefineC
4
4
  fit: import("vue").PropType<import("./Image").ImageFit>;
5
5
  position: import("vue").PropType<string>;
6
6
  round: BooleanConstructor;
7
+ block: BooleanConstructor;
7
8
  width: (NumberConstructor | StringConstructor)[];
8
9
  height: (NumberConstructor | StringConstructor)[];
9
10
  radius: (NumberConstructor | StringConstructor)[];
@@ -32,6 +33,7 @@ export declare const Image: import("../utils").WithInstall<import("vue").DefineC
32
33
  fit: import("vue").PropType<import("./Image").ImageFit>;
33
34
  position: import("vue").PropType<string>;
34
35
  round: BooleanConstructor;
36
+ block: BooleanConstructor;
35
37
  width: (NumberConstructor | StringConstructor)[];
36
38
  height: (NumberConstructor | StringConstructor)[];
37
39
  radius: (NumberConstructor | StringConstructor)[];
@@ -60,6 +62,7 @@ export declare const Image: import("../utils").WithInstall<import("vue").DefineC
60
62
  }, {
61
63
  round: boolean;
62
64
  showError: boolean;
65
+ block: boolean;
63
66
  lazyLoad: boolean;
64
67
  errorIcon: string;
65
68
  showLoading: boolean;
@@ -23,6 +23,10 @@
23
23
  }
24
24
  }
25
25
 
26
+ &--block {
27
+ display: block;
28
+ }
29
+
26
30
  &__img,
27
31
  &__error,
28
32
  &__loading {