vant 4.7.0 → 4.7.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 +4 -1
- package/es/cell-group/CellGroup.mjs +2 -1
- package/es/composables/use-scope-id.d.ts +3 -0
- package/es/composables/use-scope-id.mjs +9 -0
- package/es/dialog/function-call.d.ts +15 -0
- package/es/floating-panel/FloatingPanel.mjs +2 -2
- package/es/floating-panel/index.css +1 -1
- package/es/image-preview/function-call.d.ts +3 -0
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/notify/function-call.d.ts +12 -0
- package/es/popover/Popover.mjs +2 -1
- package/es/popup/Popup.mjs +7 -5
- package/es/swipe/Swipe.mjs +1 -1
- package/es/swipe/index.css +1 -1
- package/es/toast/function-call.d.ts +26 -0
- package/lib/cell-group/CellGroup.js +2 -1
- package/lib/composables/use-scope-id.d.ts +3 -0
- package/lib/composables/use-scope-id.js +28 -0
- package/lib/dialog/function-call.d.ts +15 -0
- package/lib/floating-panel/FloatingPanel.js +2 -2
- package/lib/floating-panel/index.css +1 -1
- package/lib/image-preview/function-call.d.ts +3 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/notify/function-call.d.ts +12 -0
- package/lib/popover/Popover.js +2 -1
- package/lib/popup/Popup.js +6 -4
- package/lib/swipe/Swipe.js +1 -1
- package/lib/swipe/index.css +1 -1
- package/lib/toast/function-call.d.ts +26 -0
- package/lib/vant.cjs.js +16 -10
- package/lib/vant.es.js +16 -10
- package/lib/vant.js +16 -10
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
@@ -109,7 +109,10 @@ Vant 3/4 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3)
|
|
109
109
|
| [taroify](https://gitee.com/mallfoundry/taroify) | Vant Taro |
|
110
110
|
| [vant-theme](https://github.com/Aisen60/vant-theme) | Online theme preview built on Vant UI |
|
111
111
|
| [@antmjs/vantui](https://github.com/antmjs/vantui) | Mobile UI Components based on Vant, supporting Taro and React |
|
112
|
-
| [
|
112
|
+
| [vant-playground](https://github.com/LadyChatterleyLover/vant-playground) | Vant Playground |
|
113
|
+
| [sfc-playground-vant](https://github.com/zhixiaoqiang/sfc-playground-vant) | Vant Playground |
|
114
|
+
| [vue3-h5-template](https://github.com/yulimchen/vue3-h5-template) | Mobile project template based on Vant |
|
115
|
+
| [vue3-vant-mobile](https://github.com/CharleeWa/vue3-vant-mobile) | Mobile project template based on Vant |
|
113
116
|
|
114
117
|
## Links
|
115
118
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Fragment as _Fragment, createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
2
2
|
import { defineComponent } from "vue";
|
3
3
|
import { truthProp, createNamespace, BORDER_TOP_BOTTOM } from "../utils/index.mjs";
|
4
|
+
import { useScopeId } from "../composables/use-scope-id.mjs";
|
4
5
|
const [name, bem] = createNamespace("cell-group");
|
5
6
|
const cellGroupProps = {
|
6
7
|
title: String,
|
@@ -23,7 +24,7 @@ var stdin_default = defineComponent({
|
|
23
24
|
}), {
|
24
25
|
[BORDER_TOP_BOTTOM]: props.border && !props.inset
|
25
26
|
}]
|
26
|
-
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
27
|
+
}, attrs, useScopeId()), [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
27
28
|
};
|
28
29
|
const renderTitle = () => _createVNode("div", {
|
29
30
|
"class": bem("title", {
|
@@ -1,6 +1,21 @@
|
|
1
1
|
import type { DialogAction, DialogOptions } from './types';
|
2
|
+
/**
|
3
|
+
* Display a message prompt dialog with a default confirm button
|
4
|
+
*/
|
2
5
|
export declare function showDialog(options: DialogOptions): Promise<DialogAction | undefined>;
|
6
|
+
/**
|
7
|
+
* Modify the default configuration that affects all `showDialog` calls
|
8
|
+
*/
|
3
9
|
export declare const setDialogDefaultOptions: (options: DialogOptions) => void;
|
10
|
+
/**
|
11
|
+
* Reset the default configuration that affects all `showDialog` calls
|
12
|
+
*/
|
4
13
|
export declare const resetDialogDefaultOptions: () => void;
|
14
|
+
/**
|
15
|
+
* Display a message confirmation dialog with default confirm and cancel buttons
|
16
|
+
*/
|
5
17
|
export declare const showConfirmDialog: (options: DialogOptions) => Promise<DialogAction | undefined>;
|
18
|
+
/**
|
19
|
+
* Close the currently displayed dialog
|
20
|
+
*/
|
6
21
|
export declare const closeDialog: () => void;
|
@@ -8,7 +8,7 @@ import { useSyncPropRef } from "../composables/use-sync-prop-ref.mjs";
|
|
8
8
|
const floatingPanelProps = {
|
9
9
|
height: makeNumericProp(0),
|
10
10
|
anchors: makeArrayProp(),
|
11
|
-
duration: makeNumericProp(0.
|
11
|
+
duration: makeNumericProp(0.3),
|
12
12
|
contentDraggable: truthProp,
|
13
13
|
lockScroll: Boolean,
|
14
14
|
safeAreaInsetBottom: truthProp
|
@@ -38,7 +38,7 @@ var stdin_default = defineComponent({
|
|
38
38
|
const rootStyle = computed(() => ({
|
39
39
|
height: addUnit(boundary.value.max),
|
40
40
|
transform: `translateY(calc(100% + ${addUnit(-height.value)}))`,
|
41
|
-
transition: !dragging.value ? `transform ${props.duration}s` : "none"
|
41
|
+
transition: !dragging.value ? `transform ${props.duration}s cubic-bezier(0.18, 0.89, 0.32, 1.28)` : "none"
|
42
42
|
}));
|
43
43
|
const ease = (moveY) => {
|
44
44
|
const absDistance = Math.abs(moveY);
|
@@ -1 +1 @@
|
|
1
|
-
:root{--van-floating-panel-border-radius: 16px;--van-floating-panel-header-height: 30px;--van-floating-panel-z-index: 999;--van-floating-panel-background: var(--van-background-2);--van-floating-panel-bar-width: 20px;--van-floating-panel-bar-height: 3px;--van-floating-panel-bar-color: var(--van-gray-5)}.van-floating-panel{position:fixed;left:0;bottom:0;width:100vw;z-index:var(--van-floating-panel-z-index);display:flex;flex-direction:column;touch-action:none;border-top-left-radius:var(--van-floating-panel-border-radius);border-top-right-radius:var(--van-floating-panel-border-radius);background:var(--van-floating-panel-background)}.van-floating-panel:after{content:"";display:block;position:absolute;bottom:-100vh;height:100vh;width:100vw;background-color:inherit}.van-floating-panel__header{height:var(--van-floating-panel-header-height);display:flex;justify-content:center;align-items:center;cursor:-webkit-grab;cursor:grab;-webkit-user-select:none;user-select:none}.van-floating-panel__header-bar{height:var(--van-floating-panel-bar-height);width:var(--van-floating-panel-bar-width);border-radius:var(--van-radius-md);background:var(--van-floating-panel-bar-color)}.van-floating-panel__content{flex:1;overflow-y:auto;background-color:var(--van-floating-panel-background)}
|
1
|
+
:root{--van-floating-panel-border-radius: 16px;--van-floating-panel-header-height: 30px;--van-floating-panel-z-index: 999;--van-floating-panel-background: var(--van-background-2);--van-floating-panel-bar-width: 20px;--van-floating-panel-bar-height: 3px;--van-floating-panel-bar-color: var(--van-gray-5)}.van-floating-panel{position:fixed;left:0;bottom:0;width:100vw;z-index:var(--van-floating-panel-z-index);display:flex;flex-direction:column;touch-action:none;border-top-left-radius:var(--van-floating-panel-border-radius);border-top-right-radius:var(--van-floating-panel-border-radius);background:var(--van-floating-panel-background);will-change:transform}.van-floating-panel:after{content:"";display:block;position:absolute;bottom:-100vh;height:100vh;width:100vw;background-color:inherit}.van-floating-panel__header{height:var(--van-floating-panel-header-height);display:flex;justify-content:center;align-items:center;cursor:-webkit-grab;cursor:grab;-webkit-user-select:none;user-select:none}.van-floating-panel__header-bar{height:var(--van-floating-panel-bar-height);width:var(--van-floating-panel-bar-width);border-radius:var(--van-radius-md);background:var(--van-floating-panel-bar-color)}.van-floating-panel__content{flex:1;overflow-y:auto;background-color:var(--van-floating-panel-background)}
|
@@ -1,3 +1,6 @@
|
|
1
1
|
import { ComponentInstance } from '../utils';
|
2
2
|
import type { ImagePreviewOptions } from './types';
|
3
|
+
/**
|
4
|
+
* Display a full-screen image preview component
|
5
|
+
*/
|
3
6
|
export declare const showImagePreview: (options: string[] | ImagePreviewOptions, startPosition?: number) => ComponentInstance | undefined;
|
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.7.
|
101
|
+
const version = "4.7.1";
|
102
102
|
function install(app) {
|
103
103
|
const components = [
|
104
104
|
ActionBar,
|
@@ -1,6 +1,18 @@
|
|
1
1
|
import { type ComponentInstance } from '../utils';
|
2
2
|
import type { NotifyMessage, NotifyOptions } from './types';
|
3
|
+
/**
|
4
|
+
* Close the currently displayed Notify
|
5
|
+
*/
|
3
6
|
export declare const closeNotify: () => void;
|
7
|
+
/**
|
8
|
+
* Display Notify at the top of the page
|
9
|
+
*/
|
4
10
|
export declare function showNotify(options: NotifyMessage | NotifyOptions): ComponentInstance | undefined;
|
11
|
+
/**
|
12
|
+
* Modify the default configuration, affecting all `showNotify` calls
|
13
|
+
*/
|
5
14
|
export declare const setNotifyDefaultOptions: (options: NotifyOptions) => NotifyOptions;
|
15
|
+
/**
|
16
|
+
* Reset the default configuration, affecting all `showNotify` calls
|
17
|
+
*/
|
6
18
|
export declare const resetNotifyDefaultOptions: () => void;
|
package/es/popover/Popover.mjs
CHANGED
@@ -3,6 +3,7 @@ import { ref, watch, nextTick, onMounted, watchEffect, onBeforeUnmount, defineCo
|
|
3
3
|
import { createPopper, offsetModifier } from "@vant/popperjs";
|
4
4
|
import { pick, extend, inBrowser, truthProp, numericProp, unknownProp, BORDER_RIGHT, BORDER_BOTTOM, makeArrayProp, makeStringProp, createNamespace } from "../utils/index.mjs";
|
5
5
|
import { useClickAway } from "@vant/use";
|
6
|
+
import { useScopeId } from "../composables/use-scope-id.mjs";
|
6
7
|
import { useSyncPropRef } from "../composables/use-sync-prop-ref.mjs";
|
7
8
|
import { Icon } from "../icon/index.mjs";
|
8
9
|
import { Popup } from "../popup/index.mjs";
|
@@ -180,7 +181,7 @@ var stdin_default = defineComponent({
|
|
180
181
|
"transition": "van-popover-zoom",
|
181
182
|
"lockScroll": false,
|
182
183
|
"onUpdate:show": updateShow
|
183
|
-
}, attrs, pick(props, popupProps)), {
|
184
|
+
}, attrs, useScopeId(), pick(props, popupProps)), {
|
184
185
|
default: () => [props.showArrow && _createVNode("div", {
|
185
186
|
"class": bem("arrow")
|
186
187
|
}, null), _createVNode("div", {
|
package/es/popup/Popup.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Fragment as _Fragment, withDirectives as _withDirectives,
|
1
|
+
import { Fragment as _Fragment, withDirectives as _withDirectives, vShow as _vShow, createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
2
2
|
import { ref, watch, provide, Teleport, nextTick, computed, onMounted, Transition, onActivated, onDeactivated, defineComponent } from "vue";
|
3
3
|
import { popupSharedProps } from "./shared.mjs";
|
4
4
|
import { isDef, extend, makeStringProp, callInterceptor, createNamespace, HAPTICS_FEEDBACK } from "../utils/index.mjs";
|
@@ -8,6 +8,7 @@ import { useLockScroll } from "../composables/use-lock-scroll.mjs";
|
|
8
8
|
import { useLazyRender } from "../composables/use-lazy-render.mjs";
|
9
9
|
import { POPUP_TOGGLE_KEY } from "../composables/on-popup-reopen.mjs";
|
10
10
|
import { useGlobalZIndex } from "../composables/use-global-z-index.mjs";
|
11
|
+
import { useScopeId } from "../composables/use-scope-id.mjs";
|
11
12
|
import { Icon } from "../icon/index.mjs";
|
12
13
|
import { Overlay } from "../overlay/index.mjs";
|
13
14
|
const popupProps = extend({}, popupSharedProps, {
|
@@ -74,16 +75,17 @@ var stdin_default = defineComponent({
|
|
74
75
|
};
|
75
76
|
const renderOverlay = () => {
|
76
77
|
if (props.overlay) {
|
77
|
-
return _createVNode(Overlay, {
|
78
|
+
return _createVNode(Overlay, _mergeProps({
|
78
79
|
"show": props.show,
|
79
80
|
"class": props.overlayClass,
|
80
81
|
"zIndex": zIndex.value,
|
81
82
|
"duration": props.duration,
|
82
83
|
"customStyle": props.overlayStyle,
|
83
84
|
"role": props.closeOnClickOverlay ? "button" : void 0,
|
84
|
-
"tabindex": props.closeOnClickOverlay ? 0 : void 0
|
85
|
+
"tabindex": props.closeOnClickOverlay ? 0 : void 0
|
86
|
+
}, useScopeId(), {
|
85
87
|
"onClick": onClickOverlay
|
86
|
-
}, {
|
88
|
+
}), {
|
87
89
|
default: slots["overlay-content"]
|
88
90
|
});
|
89
91
|
}
|
@@ -135,7 +137,7 @@ var stdin_default = defineComponent({
|
|
135
137
|
"van-safe-area-bottom": safeAreaInsetBottom
|
136
138
|
}],
|
137
139
|
"onKeydown": onKeydown
|
138
|
-
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), renderCloseIcon()]), [[_vShow, props.show]]);
|
140
|
+
}, attrs, useScopeId()), [(_a = slots.default) == null ? void 0 : _a.call(slots), renderCloseIcon()]), [[_vShow, props.show]]);
|
139
141
|
});
|
140
142
|
const renderTransition = () => {
|
141
143
|
const {
|
package/es/swipe/Swipe.mjs
CHANGED
@@ -65,7 +65,7 @@ var stdin_default = defineComponent({
|
|
65
65
|
const trackStyle = computed(() => {
|
66
66
|
const style = {
|
67
67
|
transitionDuration: `${state.swiping ? 0 : props.duration}ms`,
|
68
|
-
transform: `translate${props.vertical ? "Y" : "X"}(${state.offset}px)`
|
68
|
+
transform: `translate${props.vertical ? "Y" : "X"}(${+state.offset.toFixed(2)}px)`
|
69
69
|
};
|
70
70
|
if (size.value) {
|
71
71
|
const mainAxis = props.vertical ? "height" : "width";
|
package/es/swipe/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-swipe-indicator-size: 6px;--van-swipe-indicator-margin: var(--van-padding-sm);--van-swipe-indicator-active-opacity: 1;--van-swipe-indicator-inactive-opacity: .3;--van-swipe-indicator-active-background: var(--van-primary-color);--van-swipe-indicator-inactive-background: var(--van-border-color)}.van-swipe{position:relative;overflow:hidden;transform:translateZ(0);cursor:-webkit-grab;cursor:grab;-webkit-user-select:none;user-select:none}.van-swipe__track{display:flex;height:100
|
1
|
+
:root{--van-swipe-indicator-size: 6px;--van-swipe-indicator-margin: var(--van-padding-sm);--van-swipe-indicator-active-opacity: 1;--van-swipe-indicator-inactive-opacity: .3;--van-swipe-indicator-active-background: var(--van-primary-color);--van-swipe-indicator-inactive-background: var(--van-border-color)}.van-swipe{position:relative;overflow:hidden;transform:translateZ(0);cursor:-webkit-grab;cursor:grab;-webkit-user-select:none;user-select:none}.van-swipe__track{display:flex;height:100%;transition-property:transform}.van-swipe__track--vertical{flex-direction:column}.van-swipe__indicators{position:absolute;bottom:var(--van-swipe-indicator-margin);left:50%;display:flex;transform:translate(-50%)}.van-swipe__indicators--vertical{top:50%;bottom:auto;left:var(--van-swipe-indicator-margin);flex-direction:column;transform:translateY(-50%)}.van-swipe__indicators--vertical .van-swipe__indicator:not(:last-child){margin-bottom:var(--van-swipe-indicator-size)}.van-swipe__indicator{width:var(--van-swipe-indicator-size);height:var(--van-swipe-indicator-size);background-color:var(--van-swipe-indicator-inactive-background);border-radius:100%;opacity:var(--van-swipe-indicator-inactive-opacity);transition:opacity var(--van-duration-fast),background-color var(--van-duration-fast)}.van-swipe__indicator:not(:last-child){margin-right:var(--van-swipe-indicator-size)}.van-swipe__indicator--active{background-color:var(--van-swipe-indicator-active-background);opacity:var(--van-swipe-indicator-active-opacity)}
|
@@ -1,10 +1,36 @@
|
|
1
1
|
import type { ToastType, ToastOptions, ToastWrapperInstance } from './types';
|
2
|
+
/**
|
3
|
+
* Display a text toast
|
4
|
+
*/
|
2
5
|
export declare function showToast(options?: string | ToastOptions): ToastWrapperInstance;
|
6
|
+
/**
|
7
|
+
* Display a loading toast
|
8
|
+
*/
|
3
9
|
export declare const showLoadingToast: (options: string | ToastOptions) => ToastWrapperInstance;
|
10
|
+
/**
|
11
|
+
* Display a success toast
|
12
|
+
*/
|
4
13
|
export declare const showSuccessToast: (options: string | ToastOptions) => ToastWrapperInstance;
|
14
|
+
/**
|
15
|
+
* Display a fail toast
|
16
|
+
*/
|
5
17
|
export declare const showFailToast: (options: string | ToastOptions) => ToastWrapperInstance;
|
18
|
+
/**
|
19
|
+
* Close the currently displayed toast
|
20
|
+
*/
|
6
21
|
export declare const closeToast: (all?: boolean) => void;
|
22
|
+
/**
|
23
|
+
* Modify the default configuration that affects all `showToast` calls.
|
24
|
+
* Specify the `type` parameter to modify the default configuration of a specific type of toast
|
25
|
+
*/
|
7
26
|
export declare function setToastDefaultOptions(options: ToastOptions): void;
|
8
27
|
export declare function setToastDefaultOptions(type: ToastType, options: ToastOptions): void;
|
28
|
+
/**
|
29
|
+
* Reset the default configuration that affects all `showToast` calls.
|
30
|
+
* Specify the `type` parameter to reset the default configuration of a specific type of toast
|
31
|
+
*/
|
9
32
|
export declare const resetToastDefaultOptions: (type?: ToastType) => void;
|
33
|
+
/**
|
34
|
+
* Allow multiple toasts to be displayed as the same time
|
35
|
+
*/
|
10
36
|
export declare const allowMultipleToast: (value?: boolean) => void;
|
@@ -24,6 +24,7 @@ module.exports = __toCommonJS(stdin_exports);
|
|
24
24
|
var import_vue = require("vue");
|
25
25
|
var import_vue2 = require("vue");
|
26
26
|
var import_utils = require("../utils");
|
27
|
+
var import_use_scope_id = require("../composables/use-scope-id");
|
27
28
|
const [name, bem] = (0, import_utils.createNamespace)("cell-group");
|
28
29
|
const cellGroupProps = {
|
29
30
|
title: String,
|
@@ -46,7 +47,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
46
47
|
}), {
|
47
48
|
[import_utils.BORDER_TOP_BOTTOM]: props.border && !props.inset
|
48
49
|
}]
|
49
|
-
}, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
50
|
+
}, attrs, (0, import_use_scope_id.useScopeId)()), [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
50
51
|
};
|
51
52
|
const renderTitle = () => (0, import_vue.createVNode)("div", {
|
52
53
|
"class": bem("title", {
|
@@ -0,0 +1,28 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __export = (target, all) => {
|
6
|
+
for (var name in all)
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
8
|
+
};
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
11
|
+
for (let key of __getOwnPropNames(from))
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
14
|
+
}
|
15
|
+
return to;
|
16
|
+
};
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
|
+
var stdin_exports = {};
|
19
|
+
__export(stdin_exports, {
|
20
|
+
useScopeId: () => useScopeId
|
21
|
+
});
|
22
|
+
module.exports = __toCommonJS(stdin_exports);
|
23
|
+
var import_vue = require("vue");
|
24
|
+
const useScopeId = () => {
|
25
|
+
var _a;
|
26
|
+
const { scopeId } = ((_a = (0, import_vue.getCurrentInstance)()) == null ? void 0 : _a.vnode) || {};
|
27
|
+
return scopeId ? { [scopeId]: "" } : null;
|
28
|
+
};
|
@@ -1,6 +1,21 @@
|
|
1
1
|
import type { DialogAction, DialogOptions } from './types';
|
2
|
+
/**
|
3
|
+
* Display a message prompt dialog with a default confirm button
|
4
|
+
*/
|
2
5
|
export declare function showDialog(options: DialogOptions): Promise<DialogAction | undefined>;
|
6
|
+
/**
|
7
|
+
* Modify the default configuration that affects all `showDialog` calls
|
8
|
+
*/
|
3
9
|
export declare const setDialogDefaultOptions: (options: DialogOptions) => void;
|
10
|
+
/**
|
11
|
+
* Reset the default configuration that affects all `showDialog` calls
|
12
|
+
*/
|
4
13
|
export declare const resetDialogDefaultOptions: () => void;
|
14
|
+
/**
|
15
|
+
* Display a message confirmation dialog with default confirm and cancel buttons
|
16
|
+
*/
|
5
17
|
export declare const showConfirmDialog: (options: DialogOptions) => Promise<DialogAction | undefined>;
|
18
|
+
/**
|
19
|
+
* Close the currently displayed dialog
|
20
|
+
*/
|
6
21
|
export declare const closeDialog: () => void;
|
@@ -31,7 +31,7 @@ var import_use_sync_prop_ref = require("../composables/use-sync-prop-ref");
|
|
31
31
|
const floatingPanelProps = {
|
32
32
|
height: (0, import_utils.makeNumericProp)(0),
|
33
33
|
anchors: (0, import_utils.makeArrayProp)(),
|
34
|
-
duration: (0, import_utils.makeNumericProp)(0.
|
34
|
+
duration: (0, import_utils.makeNumericProp)(0.3),
|
35
35
|
contentDraggable: import_utils.truthProp,
|
36
36
|
lockScroll: Boolean,
|
37
37
|
safeAreaInsetBottom: import_utils.truthProp
|
@@ -61,7 +61,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
61
61
|
const rootStyle = (0, import_vue2.computed)(() => ({
|
62
62
|
height: (0, import_utils.addUnit)(boundary.value.max),
|
63
63
|
transform: `translateY(calc(100% + ${(0, import_utils.addUnit)(-height.value)}))`,
|
64
|
-
transition: !dragging.value ? `transform ${props.duration}s` : "none"
|
64
|
+
transition: !dragging.value ? `transform ${props.duration}s cubic-bezier(0.18, 0.89, 0.32, 1.28)` : "none"
|
65
65
|
}));
|
66
66
|
const ease = (moveY) => {
|
67
67
|
const absDistance = Math.abs(moveY);
|
@@ -1 +1 @@
|
|
1
|
-
:root{--van-floating-panel-border-radius: 16px;--van-floating-panel-header-height: 30px;--van-floating-panel-z-index: 999;--van-floating-panel-background: var(--van-background-2);--van-floating-panel-bar-width: 20px;--van-floating-panel-bar-height: 3px;--van-floating-panel-bar-color: var(--van-gray-5)}.van-floating-panel{position:fixed;left:0;bottom:0;width:100vw;z-index:var(--van-floating-panel-z-index);display:flex;flex-direction:column;touch-action:none;border-top-left-radius:var(--van-floating-panel-border-radius);border-top-right-radius:var(--van-floating-panel-border-radius);background:var(--van-floating-panel-background)}.van-floating-panel:after{content:"";display:block;position:absolute;bottom:-100vh;height:100vh;width:100vw;background-color:inherit}.van-floating-panel__header{height:var(--van-floating-panel-header-height);display:flex;justify-content:center;align-items:center;cursor:-webkit-grab;cursor:grab;-webkit-user-select:none;user-select:none}.van-floating-panel__header-bar{height:var(--van-floating-panel-bar-height);width:var(--van-floating-panel-bar-width);border-radius:var(--van-radius-md);background:var(--van-floating-panel-bar-color)}.van-floating-panel__content{flex:1;overflow-y:auto;background-color:var(--van-floating-panel-background)}
|
1
|
+
:root{--van-floating-panel-border-radius: 16px;--van-floating-panel-header-height: 30px;--van-floating-panel-z-index: 999;--van-floating-panel-background: var(--van-background-2);--van-floating-panel-bar-width: 20px;--van-floating-panel-bar-height: 3px;--van-floating-panel-bar-color: var(--van-gray-5)}.van-floating-panel{position:fixed;left:0;bottom:0;width:100vw;z-index:var(--van-floating-panel-z-index);display:flex;flex-direction:column;touch-action:none;border-top-left-radius:var(--van-floating-panel-border-radius);border-top-right-radius:var(--van-floating-panel-border-radius);background:var(--van-floating-panel-background);will-change:transform}.van-floating-panel:after{content:"";display:block;position:absolute;bottom:-100vh;height:100vh;width:100vw;background-color:inherit}.van-floating-panel__header{height:var(--van-floating-panel-header-height);display:flex;justify-content:center;align-items:center;cursor:-webkit-grab;cursor:grab;-webkit-user-select:none;user-select:none}.van-floating-panel__header-bar{height:var(--van-floating-panel-bar-height);width:var(--van-floating-panel-bar-width);border-radius:var(--van-radius-md);background:var(--van-floating-panel-bar-color)}.van-floating-panel__content{flex:1;overflow-y:auto;background-color:var(--van-floating-panel-background)}
|
@@ -1,3 +1,6 @@
|
|
1
1
|
import { ComponentInstance } from '../utils';
|
2
2
|
import type { ImagePreviewOptions } from './types';
|
3
|
+
/**
|
4
|
+
* Display a full-screen image preview component
|
5
|
+
*/
|
3
6
|
export declare const showImagePreview: (options: string[] | ImagePreviewOptions, startPosition?: number) => ComponentInstance | undefined;
|