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/README.md +6 -6
- package/es/floating-bubble/types.d.ts +1 -1
- package/es/floating-panel/FloatingPanel.mjs +2 -5
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/lazyload/vue-lazyload/util.d.ts +2 -2
- package/es/style/base.css +1 -1
- package/es/submit-bar/types.d.ts +0 -1
- package/es/uploader/Uploader.mjs +6 -4
- package/es/uploader/UploaderPreviewItem.mjs +1 -1
- package/es/uploader/types.d.ts +1 -0
- package/lib/floating-bubble/types.d.ts +1 -1
- package/lib/floating-panel/FloatingPanel.js +1 -4
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/lazyload/vue-lazyload/util.d.ts +2 -2
- package/lib/style/base.css +1 -1
- package/lib/submit-bar/types.d.ts +0 -1
- package/lib/uploader/Uploader.js +6 -4
- package/lib/uploader/UploaderPreviewItem.js +1 -1
- package/lib/uploader/types.d.ts +1 -0
- package/lib/vant.cjs.js +20 -21
- package/lib/vant.es.js +20 -21
- package/lib/vant.js +31 -159
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -124,13 +124,13 @@ You can scan the following QR code to access the demo:
|
|
124
124
|
|
125
125
|
Core contributors of Vant and Vant Weapp:
|
126
126
|
|
127
|
-
| [](https://github.com/chenjiahan/) | [](https://github.com/cookfront/) | [](https://github.com/w91/) | [](https://github.com/pangxie1991/) | [](https://github.com/rex-zsd/) |
|
128
|
-
| :-: | :-: | :-: | :-: | :-: |
|
129
|
-
| [chenjiahan](https://github.com/chenjiahan/) | [cookfront](https://github.com/cookfront/) | [wangnaiyi](https://github.com/w91/) | [pangxie](https://github.com/pangxie1991/) | [rex-zsd](https://github.com/rex-zsd/) |
|
127
|
+
| [](https://github.com/chenjiahan/) | [](https://github.com/cookfront/) | [](https://github.com/w91/) | [](https://github.com/pangxie1991/) | [](https://github.com/rex-zsd/) | [](https://github.com/nemo-shen/) |
|
128
|
+
| :-: | :-: | :-: | :-: | :-: | :-: |
|
129
|
+
| [chenjiahan](https://github.com/chenjiahan/) | [cookfront](https://github.com/cookfront/) | [wangnaiyi](https://github.com/w91/) | [pangxie](https://github.com/pangxie1991/) | [rex-zsd](https://github.com/rex-zsd/) | [nemo-shen](https://github.com/nemo-shen/) |
|
130
130
|
|
131
|
-
| [](https://github.com/Lindysen/) | [](https://github.com/JakeLaoyu/) | [](https://github.com/landluck/) | [](https://github.com/wjw-gavin/) | [](https://github.com/inottn/) | [](https://github.com/zhousg/) |
|
132
|
+
| :-: | :-: | :-: | :-: | :-: | :-: |
|
133
|
+
| [Lindysen](https://github.com/Lindysen/) | [JakeLaoyu](https://github.com/JakeLaoyu/) | [landluck](https://github.com/landluck/) | [wjw-gavin](https://github.com/wjw-gavin/) | [inottn](https://github.com/inottn/) | [zhousg](https://github.com/zhousg/) |
|
134
134
|
|
135
135
|
## All Contributors
|
136
136
|
|
@@ -2,7 +2,7 @@ export type FloatingBubbleThemeVars = {
|
|
2
2
|
floatingBubbleSize?: string;
|
3
3
|
floatingBubbleInitialGap?: string;
|
4
4
|
floatingBubbleIconSize?: string;
|
5
|
-
floatingBubbleBackground
|
5
|
+
floatingBubbleBackground?: string;
|
6
6
|
floatingBubbleColor?: string;
|
7
7
|
floatingBubbleZIndex?: number | string;
|
8
8
|
};
|
@@ -1,13 +1,10 @@
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
2
2
|
import { computed, defineComponent, ref, watch } from "vue";
|
3
|
-
import { addUnit, closest, createNamespace, makeArrayProp, makeNumericProp, truthProp } from "../utils/index.mjs";
|
4
|
-
import {
|
3
|
+
import { addUnit, closest, createNamespace, makeArrayProp, makeNumericProp, truthProp, windowHeight } from "../utils/index.mjs";
|
4
|
+
import { useEventListener } from "@vant/use";
|
5
5
|
import { useLockScroll } from "../composables/use-lock-scroll.mjs";
|
6
6
|
import { useTouch } from "../composables/use-touch.mjs";
|
7
7
|
import { useSyncPropRef } from "../composables/use-sync-prop-ref.mjs";
|
8
|
-
const {
|
9
|
-
height: windowHeight
|
10
|
-
} = useWindowSize();
|
11
8
|
const floatingPanelProps = {
|
12
9
|
height: makeNumericProp(0),
|
13
10
|
anchors: makeArrayProp(),
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
@@ -98,7 +98,7 @@ import { Toast } from "./toast/index.mjs";
|
|
98
98
|
import { TreeSelect } from "./tree-select/index.mjs";
|
99
99
|
import { Uploader } from "./uploader/index.mjs";
|
100
100
|
import { Watermark } from "./watermark/index.mjs";
|
101
|
-
const version = "4.6.
|
101
|
+
const version = "4.6.1";
|
102
102
|
function install(app) {
|
103
103
|
const components = [
|
104
104
|
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
|
-
|
10
|
-
|
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;
|
package/es/style/base.css
CHANGED
@@ -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)}
|
package/es/submit-bar/types.d.ts
CHANGED
@@ -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;
|
package/es/uploader/Uploader.mjs
CHANGED
@@ -100,7 +100,8 @@ var stdin_default = defineComponent({
|
|
100
100
|
const result = {
|
101
101
|
file,
|
102
102
|
status: "",
|
103
|
-
message: ""
|
103
|
+
message: "",
|
104
|
+
objectUrl: URL.createObjectURL(file)
|
104
105
|
};
|
105
106
|
if (contents[index]) {
|
106
107
|
result.content = contents[index];
|
@@ -114,7 +115,8 @@ var stdin_default = defineComponent({
|
|
114
115
|
const result = {
|
115
116
|
file: files,
|
116
117
|
status: "",
|
117
|
-
message: ""
|
118
|
+
message: "",
|
119
|
+
objectUrl: URL.createObjectURL(files)
|
118
120
|
};
|
119
121
|
if (content) {
|
120
122
|
result.content = content;
|
@@ -156,8 +158,8 @@ var stdin_default = defineComponent({
|
|
156
158
|
if (props.previewFullImage) {
|
157
159
|
const imageFiles = props.modelValue.filter(isImageFile);
|
158
160
|
const images = imageFiles.map((item2) => {
|
159
|
-
if (item2.
|
160
|
-
item2.url =
|
161
|
+
if (item2.objectUrl && !item2.url && item2.status !== "failed") {
|
162
|
+
item2.url = item2.objectUrl;
|
161
163
|
urls.push(item2.url);
|
162
164
|
}
|
163
165
|
return item2.url;
|
@@ -101,7 +101,7 @@ var stdin_default = defineComponent({
|
|
101
101
|
if (isImageFile(item)) {
|
102
102
|
return _createVNode(Image, {
|
103
103
|
"fit": imageFit,
|
104
|
-
"src": item.content || item.url,
|
104
|
+
"src": item.objectUrl || item.content || item.url,
|
105
105
|
"class": bem("preview-image"),
|
106
106
|
"width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
|
107
107
|
"height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
|
package/es/uploader/types.d.ts
CHANGED
@@ -2,7 +2,7 @@ export type FloatingBubbleThemeVars = {
|
|
2
2
|
floatingBubbleSize?: string;
|
3
3
|
floatingBubbleInitialGap?: string;
|
4
4
|
floatingBubbleIconSize?: string;
|
5
|
-
floatingBubbleBackground
|
5
|
+
floatingBubbleBackground?: string;
|
6
6
|
floatingBubbleColor?: string;
|
7
7
|
floatingBubbleZIndex?: number | string;
|
8
8
|
};
|
@@ -28,9 +28,6 @@ var import_use = require("@vant/use");
|
|
28
28
|
var import_use_lock_scroll = require("../composables/use-lock-scroll");
|
29
29
|
var import_use_touch = require("../composables/use-touch");
|
30
30
|
var import_use_sync_prop_ref = require("../composables/use-sync-prop-ref");
|
31
|
-
const {
|
32
|
-
height: windowHeight
|
33
|
-
} = (0, import_use.useWindowSize)();
|
34
31
|
const floatingPanelProps = {
|
35
32
|
height: (0, import_utils.makeNumericProp)(0),
|
36
33
|
anchors: (0, import_utils.makeArrayProp)(),
|
@@ -55,7 +52,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
55
52
|
var _a, _b;
|
56
53
|
return {
|
57
54
|
min: (_a = props.anchors[0]) != null ? _a : 100,
|
58
|
-
max: (_b = props.anchors[props.anchors.length - 1]) != null ? _b : Math.round(windowHeight.value * 0.6)
|
55
|
+
max: (_b = props.anchors[props.anchors.length - 1]) != null ? _b : Math.round(import_utils.windowHeight.value * 0.6)
|
59
56
|
};
|
60
57
|
});
|
61
58
|
const anchors = (0, import_vue2.computed)(() => props.anchors.length >= 2 ? props.anchors : [boundary.value.min, boundary.value.max]);
|