vant 4.6.0 → 4.6.1

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/lib/index.d.ts CHANGED
@@ -105,4 +105,4 @@ declare namespace _default {
105
105
  }
106
106
  export default _default;
107
107
  export function install(app: any): void;
108
- export const version: "4.6.0";
108
+ export const version: "4.6.1";
package/lib/index.js CHANGED
@@ -224,7 +224,7 @@ __reExport(stdin_exports, require("./toast"), module.exports);
224
224
  __reExport(stdin_exports, require("./tree-select"), module.exports);
225
225
  __reExport(stdin_exports, require("./uploader"), module.exports);
226
226
  __reExport(stdin_exports, require("./watermark"), module.exports);
227
- const version = "4.6.0";
227
+ const version = "4.6.1";
228
228
  function install(app) {
229
229
  const components = [
230
230
  import_action_bar.ActionBar,
@@ -6,8 +6,8 @@ export function on(el: any, type: any, func: any): void;
6
6
  export function off(el: any, type: any, func: any): void;
7
7
  export const hasIntersectionObserver: boolean;
8
8
  export namespace modeType {
9
- const event: string;
10
- const observer: string;
9
+ let event: string;
10
+ let observer: string;
11
11
  }
12
12
  export function getDPR(scale?: number): number;
13
13
  export function loadImageAsync(item: any, resolve: any, reject: any): any;
@@ -1 +1 @@
1
- :root{--van-black: #000;--van-white: #fff;--van-gray-1: #f7f8fa;--van-gray-2: #f2f3f5;--van-gray-3: #ebedf0;--van-gray-4: #dcdee0;--van-gray-5: #c8c9cc;--van-gray-6: #969799;--van-gray-7: #646566;--van-gray-8: #323233;--van-red: #ee0a24;--van-blue: #1989fa;--van-orange: #ff976a;--van-orange-dark: #ed6a0c;--van-orange-light: #fffbe8;--van-green: #07c160;--van-gradient-red: linear-gradient(to right, #ff6034, #ee0a24);--van-gradient-orange: linear-gradient(to right, #ffd01e, #ff8917);--van-primary-color: var(--van-blue);--van-success-color: var(--van-green);--van-danger-color: var(--van-red);--van-warning-color: var(--van-orange);--van-text-color: var(--van-gray-8);--van-text-color-2: var(--van-gray-6);--van-text-color-3: var(--van-gray-5);--van-active-color: var(--van-gray-2);--van-active-opacity: .6;--van-disabled-opacity: .5;--van-background: var(--van-gray-1);--van-background-2: var(--van-white);--van-background-3: var(--van-white);--van-padding-base: 4px;--van-padding-xs: 8px;--van-padding-sm: 12px;--van-padding-md: 16px;--van-padding-lg: 24px;--van-padding-xl: 32px;--van-font-bold: 600;--van-font-size-xs: 10px;--van-font-size-sm: 12px;--van-font-size-md: 14px;--van-font-size-lg: 16px;--van-line-height-xs: 14px;--van-line-height-sm: 18px;--van-line-height-md: 20px;--van-line-height-lg: 22px;--van-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--van-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--van-duration-base: .3s;--van-duration-fast: .2s;--van-ease-out: ease-out;--van-ease-in: ease-in;--van-border-color: var(--van-gray-3);--van-border-width: 1px;--van-radius-sm: 2px;--van-radius-md: 4px;--van-radius-lg: 8px;--van-radius-max: 999px}.van-theme-dark{--van-text-color: #f5f5f5;--van-text-color-2: #707070;--van-text-color-3: #4d4d4d;--van-border-color: #3a3a3c;--van-active-color: #3a3a3c;--van-background: #000;--van-background-2: #1c1c1e;--van-background-3: #37363b}html{-webkit-tap-highlight-color:transparent}body{margin:0;font-family:var(--van-base-font)}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=van-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes van-slide-up-enter{0%{transform:translate3d(0,100%,0)}}@keyframes van-slide-up-leave{to{transform:translate3d(0,100%,0)}}@keyframes van-slide-down-enter{0%{transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-leave{to{transform:translate3d(0,-100%,0)}}@keyframes van-slide-left-enter{0%{transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-leave{to{transform:translate3d(-100%,0,0)}}@keyframes van-slide-right-enter{0%{transform:translate3d(100%,0,0)}}@keyframes van-slide-right-leave{to{transform:translate3d(100%,0,0)}}@keyframes van-fade-in{0%{opacity:0}to{opacity:1}}@keyframes van-fade-out{0%{opacity:1}to{opacity:0}}@keyframes van-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.van-fade-enter-active{animation:var(--van-duration-base) van-fade-in both var(--van-ease-out)}.van-fade-leave-active{animation:var(--van-duration-base) van-fade-out both var(--van-ease-in)}.van-slide-up-enter-active{animation:van-slide-up-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-up-leave-active{animation:van-slide-up-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-down-enter-active{animation:van-slide-down-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-down-leave-active{animation:van-slide-down-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-left-enter-active{animation:van-slide-left-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-left-leave-active{animation:van-slide-left-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-right-enter-active{animation:van-slide-right-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-right-leave-active{animation:van-slide-right-leave var(--van-duration-base) both var(--van-ease-in)}.van-clearfix:after{display:table;clear:both;content:""}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}.van-safe-area-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.van-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-haptics-feedback{cursor:pointer}.van-haptics-feedback:active{opacity:var(--van-active-opacity)}[class*=van-hairline]:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--van-border-color);transform:scale(.5)}.van-hairline,.van-hairline--top,.van-hairline--left,.van-hairline--right,.van-hairline--bottom,.van-hairline--surround,.van-hairline--top-bottom{position:relative}.van-hairline--top:after{border-top-width:var(--van-border-width)}.van-hairline--left:after{border-left-width:var(--van-border-width)}.van-hairline--right:after{border-right-width:var(--van-border-width)}.van-hairline--bottom:after{border-bottom-width:var(--van-border-width)}.van-hairline--top-bottom:after,.van-hairline-unset--top-bottom:after{border-width:var(--van-border-width) 0}.van-hairline--surround:after{border-width:var(--van-border-width)}
1
+ :root{--van-black: #000;--van-white: #fff;--van-gray-1: #f7f8fa;--van-gray-2: #f2f3f5;--van-gray-3: #ebedf0;--van-gray-4: #dcdee0;--van-gray-5: #c8c9cc;--van-gray-6: #969799;--van-gray-7: #646566;--van-gray-8: #323233;--van-red: #ee0a24;--van-blue: #1989fa;--van-orange: #ff976a;--van-orange-dark: #ed6a0c;--van-orange-light: #fffbe8;--van-green: #07c160;--van-gradient-red: linear-gradient(to right, #ff6034, #ee0a24);--van-gradient-orange: linear-gradient(to right, #ffd01e, #ff8917);--van-primary-color: var(--van-blue);--van-success-color: var(--van-green);--van-danger-color: var(--van-red);--van-warning-color: var(--van-orange);--van-text-color: var(--van-gray-8);--van-text-color-2: var(--van-gray-6);--van-text-color-3: var(--van-gray-5);--van-active-color: var(--van-gray-2);--van-active-opacity: .6;--van-disabled-opacity: .5;--van-background: var(--van-gray-1);--van-background-2: var(--van-white);--van-background-3: var(--van-white);--van-padding-base: 4px;--van-padding-xs: 8px;--van-padding-sm: 12px;--van-padding-md: 16px;--van-padding-lg: 24px;--van-padding-xl: 32px;--van-font-bold: 600;--van-font-size-xs: 10px;--van-font-size-sm: 12px;--van-font-size-md: 14px;--van-font-size-lg: 16px;--van-line-height-xs: 14px;--van-line-height-sm: 18px;--van-line-height-md: 20px;--van-line-height-lg: 22px;--van-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--van-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--van-duration-base: .3s;--van-duration-fast: .2s;--van-ease-out: ease-out;--van-ease-in: ease-in;--van-border-color: var(--van-gray-3);--van-border-width: 1px;--van-radius-sm: 2px;--van-radius-md: 4px;--van-radius-lg: 8px;--van-radius-max: 999px}.van-theme-dark{--van-text-color: #f5f5f5;--van-text-color-2: #707070;--van-text-color-3: #4d4d4d;--van-border-color: #3a3a3c;--van-active-color: #3a3a3c;--van-background: #000;--van-background-2: #1c1c1e;--van-background-3: #37363b}html{-webkit-tap-highlight-color:transparent}body{margin:0;font-family:var(--van-base-font)}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=van-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes van-slide-up-enter{0%{transform:translate3d(0,100%,0)}}@keyframes van-slide-up-leave{to{transform:translate3d(0,100%,0)}}@keyframes van-slide-down-enter{0%{transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-leave{to{transform:translate3d(0,-100%,0)}}@keyframes van-slide-left-enter{0%{transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-leave{to{transform:translate3d(-100%,0,0)}}@keyframes van-slide-right-enter{0%{transform:translate3d(100%,0,0)}}@keyframes van-slide-right-leave{to{transform:translate3d(100%,0,0)}}@keyframes van-fade-in{0%{opacity:0}to{opacity:1}}@keyframes van-fade-out{0%{opacity:1}to{opacity:0}}@keyframes van-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.van-fade-enter-active{animation:var(--van-duration-base) van-fade-in both var(--van-ease-out)}.van-fade-leave-active{animation:var(--van-duration-base) van-fade-out both var(--van-ease-in)}.van-slide-up-enter-active{animation:van-slide-up-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-up-leave-active{animation:van-slide-up-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-down-enter-active{animation:van-slide-down-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-down-leave-active{animation:van-slide-down-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-left-enter-active{animation:van-slide-left-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-left-leave-active{animation:van-slide-left-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-right-enter-active{animation:van-slide-right-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-right-leave-active{animation:van-slide-right-leave var(--van-duration-base) both var(--van-ease-in)}.van-clearfix:after{display:table;clear:both;content:""}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;line-break:anywhere;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;line-break:anywhere;-webkit-box-orient:vertical}.van-safe-area-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.van-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-haptics-feedback{cursor:pointer}.van-haptics-feedback:active{opacity:var(--van-active-opacity)}[class*=van-hairline]:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--van-border-color);transform:scale(.5)}.van-hairline,.van-hairline--top,.van-hairline--left,.van-hairline--right,.van-hairline--bottom,.van-hairline--surround,.van-hairline--top-bottom{position:relative}.van-hairline--top:after{border-top-width:var(--van-border-width)}.van-hairline--left:after{border-left-width:var(--van-border-width)}.van-hairline--right:after{border-right-width:var(--van-border-width)}.van-hairline--bottom:after{border-bottom-width:var(--van-border-width)}.van-hairline--top-bottom:after,.van-hairline-unset--top-bottom:after{border-width:var(--van-border-width) 0}.van-hairline--surround:after{border-width:var(--van-border-width)}
@@ -7,7 +7,6 @@ export type SubmitBarThemeVars = {
7
7
  submitBarPriceFontSize?: string;
8
8
  submitBarPriceIntegerFontSize?: string;
9
9
  submitBarPriceFont?: string;
10
- submitBarCurrencyFontSize?: string;
11
10
  submitBarTextColor?: string;
12
11
  submitBarTextFontSize?: string;
13
12
  submitBarTipPadding?: string;
@@ -133,7 +133,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
133
133
  const result = {
134
134
  file,
135
135
  status: "",
136
- message: ""
136
+ message: "",
137
+ objectUrl: URL.createObjectURL(file)
137
138
  };
138
139
  if (contents[index]) {
139
140
  result.content = contents[index];
@@ -147,7 +148,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
147
148
  const result = {
148
149
  file: files,
149
150
  status: "",
150
- message: ""
151
+ message: "",
152
+ objectUrl: URL.createObjectURL(files)
151
153
  };
152
154
  if (content) {
153
155
  result.content = content;
@@ -189,8 +191,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
189
191
  if (props.previewFullImage) {
190
192
  const imageFiles = props.modelValue.filter(import_utils2.isImageFile);
191
193
  const images = imageFiles.map((item2) => {
192
- if (item2.file && !item2.url && item2.status !== "failed") {
193
- item2.url = URL.createObjectURL(item2.file);
194
+ if (item2.objectUrl && !item2.url && item2.status !== "failed") {
195
+ item2.url = item2.objectUrl;
194
196
  urls.push(item2.url);
195
197
  }
196
198
  return item2.url;
@@ -123,7 +123,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
123
123
  if ((0, import_utils.isImageFile)(item)) {
124
124
  return (0, import_vue.createVNode)(import_image.Image, {
125
125
  "fit": imageFit,
126
- "src": item.content || item.url,
126
+ "src": item.objectUrl || item.content || item.url,
127
127
  "class": (0, import_utils.bem)("preview-image"),
128
128
  "width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
129
129
  "height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
@@ -6,6 +6,7 @@ export type UploaderResultType = 'dataUrl' | 'text' | 'file';
6
6
  export type UploaderFileListItem = {
7
7
  url?: string;
8
8
  file?: File;
9
+ objectUrl?: string;
9
10
  content?: string;
10
11
  isImage?: boolean;
11
12
  status?: '' | 'uploading' | 'done' | 'failed';
package/lib/vant.cjs.js CHANGED
@@ -114,7 +114,7 @@ function isHidden(elementRef) {
114
114
  const parentHidden = el.offsetParent === null && style.position !== "fixed";
115
115
  return hidden || parentHidden;
116
116
  }
117
- const { width: windowWidth, height: windowHeight$1 } = use.useWindowSize();
117
+ const { width: windowWidth, height: windowHeight } = use.useWindowSize();
118
118
  function addUnit(value) {
119
119
  if (isDef(value)) {
120
120
  return isNumeric(value) ? `${value}px` : String(value);
@@ -162,7 +162,7 @@ function convertVw(value) {
162
162
  }
163
163
  function convertVh(value) {
164
164
  value = value.replace(/vh/g, "");
165
- return +value * windowHeight$1.value / 100;
165
+ return +value * windowHeight.value / 100;
166
166
  }
167
167
  function unitToPx(value) {
168
168
  if (typeof value === "number") {
@@ -438,7 +438,7 @@ const useHeight = (element, withSafeArea) => {
438
438
  }
439
439
  });
440
440
  onPopupReopen(() => vue.nextTick(setHeight));
441
- vue.watch([windowWidth, windowHeight$1], setHeight);
441
+ vue.watch([windowWidth, windowHeight], setHeight);
442
442
  return height;
443
443
  };
444
444
  function usePlaceholder(contentRef, bem2) {
@@ -2098,7 +2098,7 @@ var stdin_default$1F = vue.defineComponent({
2098
2098
  passive: true
2099
2099
  });
2100
2100
  useVisibilityChange(root, onScroll);
2101
- vue.watch([windowWidth, windowHeight$1], () => {
2101
+ vue.watch([windowWidth, windowHeight], () => {
2102
2102
  if (!root.value || isHidden(root) || !state.fixed) {
2103
2103
  return;
2104
2104
  }
@@ -2456,7 +2456,7 @@ var stdin_default$1E = vue.defineComponent({
2456
2456
  vue.watch(() => props2.initialSwipe, (value) => initialize(+value));
2457
2457
  vue.watch(count, () => initialize(state.active));
2458
2458
  vue.watch(() => props2.autoplay, autoplay);
2459
- vue.watch([windowWidth, windowHeight$1, () => props2.width, () => props2.height], resize);
2459
+ vue.watch([windowWidth, windowHeight, () => props2.width, () => props2.height], resize);
2460
2460
  vue.watch(use.usePageVisibility(), (visible) => {
2461
2461
  if (visible === "visible") {
2462
2462
  autoplay();
@@ -8825,7 +8825,7 @@ var stdin_default$X = vue.defineComponent({
8825
8825
  const TABS_HEIGHT = 44;
8826
8826
  const rootHeight = use.useRect(root).height;
8827
8827
  const headerHeight = use.useRect(barRef).height + TABS_HEIGHT;
8828
- listHeight.value = (rootHeight > headerHeight ? rootHeight : windowHeight$1.value) - headerHeight;
8828
+ listHeight.value = (rootHeight > headerHeight ? rootHeight : windowHeight.value) - headerHeight;
8829
8829
  };
8830
8830
  const onExchange = () => {
8831
8831
  emit("exchange", currentCode.value);
@@ -8929,7 +8929,7 @@ var stdin_default$X = vue.defineComponent({
8929
8929
  vue.watch(() => props2.code, (value) => {
8930
8930
  currentCode.value = value;
8931
8931
  });
8932
- vue.watch(windowHeight$1, updateListHeight);
8932
+ vue.watch(windowHeight, updateListHeight);
8933
8933
  vue.watch(currentCode, (value) => emit("update:code", value));
8934
8934
  vue.watch(() => props2.displayedCouponIndex, scrollToCoupon);
8935
8935
  vue.onMounted(() => {
@@ -9430,7 +9430,7 @@ var stdin_default$T = vue.defineComponent({
9430
9430
  if (props2.direction === "down") {
9431
9431
  offset.value = rect.bottom;
9432
9432
  } else {
9433
- offset.value = windowHeight$1.value - rect.top;
9433
+ offset.value = windowHeight.value - rect.top;
9434
9434
  }
9435
9435
  }
9436
9436
  };
@@ -9722,7 +9722,7 @@ var stdin_default$R = vue.defineComponent({
9722
9722
  const boundary = vue.computed(() => ({
9723
9723
  top: props2.gap,
9724
9724
  right: windowWidth.value - state.value.height - props2.gap,
9725
- bottom: windowHeight$1.value - state.value.width - props2.gap,
9725
+ bottom: windowHeight.value - state.value.width - props2.gap,
9726
9726
  left: props2.gap
9727
9727
  }));
9728
9728
  const dragging = vue.ref(false);
@@ -9747,7 +9747,7 @@ var stdin_default$R = vue.defineComponent({
9747
9747
  } = props2;
9748
9748
  state.value = {
9749
9749
  x: offset.x > -1 ? offset.x : windowWidth.value - width - props2.gap,
9750
- y: offset.y > -1 ? offset.y : windowHeight$1.value - height - props2.gap,
9750
+ y: offset.y > -1 ? offset.y : windowHeight.value - height - props2.gap,
9751
9751
  width,
9752
9752
  height
9753
9753
  };
@@ -9820,7 +9820,7 @@ var stdin_default$R = vue.defineComponent({
9820
9820
  initialized = true;
9821
9821
  });
9822
9822
  });
9823
- vue.watch([windowWidth, windowHeight$1, () => props2.gap, () => props2.offset], () => updateState(), {
9823
+ vue.watch([windowWidth, windowHeight, () => props2.gap, () => props2.offset], () => updateState(), {
9824
9824
  deep: true
9825
9825
  });
9826
9826
  const show = vue.ref(true);
@@ -9854,9 +9854,6 @@ var stdin_default$R = vue.defineComponent({
9854
9854
  }
9855
9855
  });
9856
9856
  const FloatingBubble = withInstall(stdin_default$R);
9857
- const {
9858
- height: windowHeight
9859
- } = use.useWindowSize();
9860
9857
  const floatingPanelProps = {
9861
9858
  height: makeNumericProp(0),
9862
9859
  anchors: makeArrayProp(),
@@ -10584,7 +10581,7 @@ var stdin_default$M = vue.defineComponent({
10584
10581
  swipeTo
10585
10582
  });
10586
10583
  vue.onMounted(resize);
10587
- vue.watch([windowWidth, windowHeight$1], resize);
10584
+ vue.watch([windowWidth, windowHeight], resize);
10588
10585
  vue.watch(() => props2.startPosition, (value) => setActive(+value));
10589
10586
  vue.watch(() => props2.show, (value) => {
10590
10587
  const {
@@ -15050,7 +15047,7 @@ var stdin_default$6 = vue.defineComponent({
15050
15047
  if (isImageFile(item)) {
15051
15048
  return vue.createVNode(Image$1, {
15052
15049
  "fit": imageFit,
15053
- "src": item.content || item.url,
15050
+ "src": item.objectUrl || item.content || item.url,
15054
15051
  "class": bem$1("preview-image"),
15055
15052
  "width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
15056
15053
  "height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
@@ -15168,7 +15165,8 @@ var stdin_default$5 = vue.defineComponent({
15168
15165
  const result = {
15169
15166
  file,
15170
15167
  status: "",
15171
- message: ""
15168
+ message: "",
15169
+ objectUrl: URL.createObjectURL(file)
15172
15170
  };
15173
15171
  if (contents[index]) {
15174
15172
  result.content = contents[index];
@@ -15182,7 +15180,8 @@ var stdin_default$5 = vue.defineComponent({
15182
15180
  const result = {
15183
15181
  file: files,
15184
15182
  status: "",
15185
- message: ""
15183
+ message: "",
15184
+ objectUrl: URL.createObjectURL(files)
15186
15185
  };
15187
15186
  if (content) {
15188
15187
  result.content = content;
@@ -15224,8 +15223,8 @@ var stdin_default$5 = vue.defineComponent({
15224
15223
  if (props2.previewFullImage) {
15225
15224
  const imageFiles = props2.modelValue.filter(isImageFile);
15226
15225
  const images = imageFiles.map((item2) => {
15227
- if (item2.file && !item2.url && item2.status !== "failed") {
15228
- item2.url = URL.createObjectURL(item2.file);
15226
+ if (item2.objectUrl && !item2.url && item2.status !== "failed") {
15227
+ item2.url = item2.objectUrl;
15229
15228
  urls.push(item2.url);
15230
15229
  }
15231
15230
  return item2.url;
@@ -16329,7 +16328,7 @@ const Lazyload = {
16329
16328
  });
16330
16329
  }
16331
16330
  };
16332
- const version = "4.6.0";
16331
+ const version = "4.6.1";
16333
16332
  function install(app) {
16334
16333
  const components = [
16335
16334
  ActionBar,
package/lib/vant.es.js CHANGED
@@ -112,7 +112,7 @@ function isHidden(elementRef) {
112
112
  const parentHidden = el.offsetParent === null && style.position !== "fixed";
113
113
  return hidden || parentHidden;
114
114
  }
115
- const { width: windowWidth, height: windowHeight$1 } = useWindowSize();
115
+ const { width: windowWidth, height: windowHeight } = useWindowSize();
116
116
  function addUnit(value) {
117
117
  if (isDef(value)) {
118
118
  return isNumeric(value) ? `${value}px` : String(value);
@@ -160,7 +160,7 @@ function convertVw(value) {
160
160
  }
161
161
  function convertVh(value) {
162
162
  value = value.replace(/vh/g, "");
163
- return +value * windowHeight$1.value / 100;
163
+ return +value * windowHeight.value / 100;
164
164
  }
165
165
  function unitToPx(value) {
166
166
  if (typeof value === "number") {
@@ -436,7 +436,7 @@ const useHeight = (element, withSafeArea) => {
436
436
  }
437
437
  });
438
438
  onPopupReopen(() => nextTick(setHeight));
439
- watch([windowWidth, windowHeight$1], setHeight);
439
+ watch([windowWidth, windowHeight], setHeight);
440
440
  return height;
441
441
  };
442
442
  function usePlaceholder(contentRef, bem2) {
@@ -2096,7 +2096,7 @@ var stdin_default$1F = defineComponent({
2096
2096
  passive: true
2097
2097
  });
2098
2098
  useVisibilityChange(root, onScroll);
2099
- watch([windowWidth, windowHeight$1], () => {
2099
+ watch([windowWidth, windowHeight], () => {
2100
2100
  if (!root.value || isHidden(root) || !state.fixed) {
2101
2101
  return;
2102
2102
  }
@@ -2454,7 +2454,7 @@ var stdin_default$1E = defineComponent({
2454
2454
  watch(() => props2.initialSwipe, (value) => initialize(+value));
2455
2455
  watch(count, () => initialize(state.active));
2456
2456
  watch(() => props2.autoplay, autoplay);
2457
- watch([windowWidth, windowHeight$1, () => props2.width, () => props2.height], resize);
2457
+ watch([windowWidth, windowHeight, () => props2.width, () => props2.height], resize);
2458
2458
  watch(usePageVisibility(), (visible) => {
2459
2459
  if (visible === "visible") {
2460
2460
  autoplay();
@@ -8823,7 +8823,7 @@ var stdin_default$X = defineComponent({
8823
8823
  const TABS_HEIGHT = 44;
8824
8824
  const rootHeight = useRect(root).height;
8825
8825
  const headerHeight = useRect(barRef).height + TABS_HEIGHT;
8826
- listHeight.value = (rootHeight > headerHeight ? rootHeight : windowHeight$1.value) - headerHeight;
8826
+ listHeight.value = (rootHeight > headerHeight ? rootHeight : windowHeight.value) - headerHeight;
8827
8827
  };
8828
8828
  const onExchange = () => {
8829
8829
  emit("exchange", currentCode.value);
@@ -8927,7 +8927,7 @@ var stdin_default$X = defineComponent({
8927
8927
  watch(() => props2.code, (value) => {
8928
8928
  currentCode.value = value;
8929
8929
  });
8930
- watch(windowHeight$1, updateListHeight);
8930
+ watch(windowHeight, updateListHeight);
8931
8931
  watch(currentCode, (value) => emit("update:code", value));
8932
8932
  watch(() => props2.displayedCouponIndex, scrollToCoupon);
8933
8933
  onMounted(() => {
@@ -9428,7 +9428,7 @@ var stdin_default$T = defineComponent({
9428
9428
  if (props2.direction === "down") {
9429
9429
  offset.value = rect.bottom;
9430
9430
  } else {
9431
- offset.value = windowHeight$1.value - rect.top;
9431
+ offset.value = windowHeight.value - rect.top;
9432
9432
  }
9433
9433
  }
9434
9434
  };
@@ -9720,7 +9720,7 @@ var stdin_default$R = defineComponent({
9720
9720
  const boundary = computed(() => ({
9721
9721
  top: props2.gap,
9722
9722
  right: windowWidth.value - state.value.height - props2.gap,
9723
- bottom: windowHeight$1.value - state.value.width - props2.gap,
9723
+ bottom: windowHeight.value - state.value.width - props2.gap,
9724
9724
  left: props2.gap
9725
9725
  }));
9726
9726
  const dragging = ref(false);
@@ -9745,7 +9745,7 @@ var stdin_default$R = defineComponent({
9745
9745
  } = props2;
9746
9746
  state.value = {
9747
9747
  x: offset.x > -1 ? offset.x : windowWidth.value - width - props2.gap,
9748
- y: offset.y > -1 ? offset.y : windowHeight$1.value - height - props2.gap,
9748
+ y: offset.y > -1 ? offset.y : windowHeight.value - height - props2.gap,
9749
9749
  width,
9750
9750
  height
9751
9751
  };
@@ -9818,7 +9818,7 @@ var stdin_default$R = defineComponent({
9818
9818
  initialized = true;
9819
9819
  });
9820
9820
  });
9821
- watch([windowWidth, windowHeight$1, () => props2.gap, () => props2.offset], () => updateState(), {
9821
+ watch([windowWidth, windowHeight, () => props2.gap, () => props2.offset], () => updateState(), {
9822
9822
  deep: true
9823
9823
  });
9824
9824
  const show = ref(true);
@@ -9852,9 +9852,6 @@ var stdin_default$R = defineComponent({
9852
9852
  }
9853
9853
  });
9854
9854
  const FloatingBubble = withInstall(stdin_default$R);
9855
- const {
9856
- height: windowHeight
9857
- } = useWindowSize();
9858
9855
  const floatingPanelProps = {
9859
9856
  height: makeNumericProp(0),
9860
9857
  anchors: makeArrayProp(),
@@ -10582,7 +10579,7 @@ var stdin_default$M = defineComponent({
10582
10579
  swipeTo
10583
10580
  });
10584
10581
  onMounted(resize);
10585
- watch([windowWidth, windowHeight$1], resize);
10582
+ watch([windowWidth, windowHeight], resize);
10586
10583
  watch(() => props2.startPosition, (value) => setActive(+value));
10587
10584
  watch(() => props2.show, (value) => {
10588
10585
  const {
@@ -15048,7 +15045,7 @@ var stdin_default$6 = defineComponent({
15048
15045
  if (isImageFile(item)) {
15049
15046
  return createVNode(Image$1, {
15050
15047
  "fit": imageFit,
15051
- "src": item.content || item.url,
15048
+ "src": item.objectUrl || item.content || item.url,
15052
15049
  "class": bem$1("preview-image"),
15053
15050
  "width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
15054
15051
  "height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
@@ -15166,7 +15163,8 @@ var stdin_default$5 = defineComponent({
15166
15163
  const result = {
15167
15164
  file,
15168
15165
  status: "",
15169
- message: ""
15166
+ message: "",
15167
+ objectUrl: URL.createObjectURL(file)
15170
15168
  };
15171
15169
  if (contents[index]) {
15172
15170
  result.content = contents[index];
@@ -15180,7 +15178,8 @@ var stdin_default$5 = defineComponent({
15180
15178
  const result = {
15181
15179
  file: files,
15182
15180
  status: "",
15183
- message: ""
15181
+ message: "",
15182
+ objectUrl: URL.createObjectURL(files)
15184
15183
  };
15185
15184
  if (content) {
15186
15185
  result.content = content;
@@ -15222,8 +15221,8 @@ var stdin_default$5 = defineComponent({
15222
15221
  if (props2.previewFullImage) {
15223
15222
  const imageFiles = props2.modelValue.filter(isImageFile);
15224
15223
  const images = imageFiles.map((item2) => {
15225
- if (item2.file && !item2.url && item2.status !== "failed") {
15226
- item2.url = URL.createObjectURL(item2.file);
15224
+ if (item2.objectUrl && !item2.url && item2.status !== "failed") {
15225
+ item2.url = item2.objectUrl;
15227
15226
  urls.push(item2.url);
15228
15227
  }
15229
15228
  return item2.url;
@@ -16327,7 +16326,7 @@ const Lazyload = {
16327
16326
  });
16328
16327
  }
16329
16328
  };
16330
- const version = "4.6.0";
16329
+ const version = "4.6.1";
16331
16330
  function install(app) {
16332
16331
  const components = [
16333
16332
  ActionBar,