first commit
This commit is contained in:
207
node_modules/vant/es/dialog/Dialog.d.ts
generated
vendored
Normal file
207
node_modules/vant/es/dialog/Dialog.d.ts
generated
vendored
Normal file
@@ -0,0 +1,207 @@
|
||||
import { type PropType, type ExtractPropTypes } from 'vue';
|
||||
import type { DialogTheme, DialogAction, DialogMessage, DialogMessageAlign } from './types';
|
||||
export declare const dialogProps: {
|
||||
show: BooleanConstructor;
|
||||
zIndex: (NumberConstructor | StringConstructor)[];
|
||||
overlay: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
duration: (NumberConstructor | StringConstructor)[];
|
||||
teleport: PropType<import("vue").TeleportProps["to"]>;
|
||||
lockScroll: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
lazyRender: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
beforeClose: PropType<import("../utils").Interceptor>;
|
||||
overlayProps: PropType<Partial<import("..").OverlayProps>>;
|
||||
overlayStyle: PropType<import("vue").CSSProperties>;
|
||||
overlayClass: PropType<unknown>;
|
||||
transitionAppear: BooleanConstructor;
|
||||
closeOnClickOverlay: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
} & {
|
||||
title: StringConstructor;
|
||||
theme: PropType<DialogTheme>;
|
||||
width: (NumberConstructor | StringConstructor)[];
|
||||
message: PropType<DialogMessage>;
|
||||
callback: PropType<(action?: DialogAction) => void>;
|
||||
allowHtml: BooleanConstructor;
|
||||
className: PropType<unknown>;
|
||||
transition: {
|
||||
type: PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
messageAlign: PropType<DialogMessageAlign>;
|
||||
closeOnPopstate: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
showCancelButton: BooleanConstructor;
|
||||
cancelButtonText: StringConstructor;
|
||||
cancelButtonColor: StringConstructor;
|
||||
cancelButtonDisabled: BooleanConstructor;
|
||||
confirmButtonText: StringConstructor;
|
||||
confirmButtonColor: StringConstructor;
|
||||
confirmButtonDisabled: BooleanConstructor;
|
||||
showConfirmButton: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
closeOnClickOverlay: BooleanConstructor;
|
||||
keyboardEnabled: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
destroyOnClose: BooleanConstructor;
|
||||
};
|
||||
export type DialogProps = ExtractPropTypes<typeof dialogProps>;
|
||||
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
||||
show: BooleanConstructor;
|
||||
zIndex: (NumberConstructor | StringConstructor)[];
|
||||
overlay: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
duration: (NumberConstructor | StringConstructor)[];
|
||||
teleport: PropType<import("vue").TeleportProps["to"]>;
|
||||
lockScroll: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
lazyRender: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
beforeClose: PropType<import("../utils").Interceptor>;
|
||||
overlayProps: PropType<Partial<import("..").OverlayProps>>;
|
||||
overlayStyle: PropType<import("vue").CSSProperties>;
|
||||
overlayClass: PropType<unknown>;
|
||||
transitionAppear: BooleanConstructor;
|
||||
closeOnClickOverlay: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
} & {
|
||||
title: StringConstructor;
|
||||
theme: PropType<DialogTheme>;
|
||||
width: (NumberConstructor | StringConstructor)[];
|
||||
message: PropType<DialogMessage>;
|
||||
callback: PropType<(action?: DialogAction) => void>;
|
||||
allowHtml: BooleanConstructor;
|
||||
className: PropType<unknown>;
|
||||
transition: {
|
||||
type: PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
messageAlign: PropType<DialogMessageAlign>;
|
||||
closeOnPopstate: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
showCancelButton: BooleanConstructor;
|
||||
cancelButtonText: StringConstructor;
|
||||
cancelButtonColor: StringConstructor;
|
||||
cancelButtonDisabled: BooleanConstructor;
|
||||
confirmButtonText: StringConstructor;
|
||||
confirmButtonColor: StringConstructor;
|
||||
confirmButtonDisabled: BooleanConstructor;
|
||||
showConfirmButton: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
closeOnClickOverlay: BooleanConstructor;
|
||||
keyboardEnabled: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
destroyOnClose: BooleanConstructor;
|
||||
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "keydown" | "update:show" | "confirm")[], "cancel" | "keydown" | "update:show" | "confirm", import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
||||
show: BooleanConstructor;
|
||||
zIndex: (NumberConstructor | StringConstructor)[];
|
||||
overlay: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
duration: (NumberConstructor | StringConstructor)[];
|
||||
teleport: PropType<import("vue").TeleportProps["to"]>;
|
||||
lockScroll: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
lazyRender: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
beforeClose: PropType<import("../utils").Interceptor>;
|
||||
overlayProps: PropType<Partial<import("..").OverlayProps>>;
|
||||
overlayStyle: PropType<import("vue").CSSProperties>;
|
||||
overlayClass: PropType<unknown>;
|
||||
transitionAppear: BooleanConstructor;
|
||||
closeOnClickOverlay: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
} & {
|
||||
title: StringConstructor;
|
||||
theme: PropType<DialogTheme>;
|
||||
width: (NumberConstructor | StringConstructor)[];
|
||||
message: PropType<DialogMessage>;
|
||||
callback: PropType<(action?: DialogAction) => void>;
|
||||
allowHtml: BooleanConstructor;
|
||||
className: PropType<unknown>;
|
||||
transition: {
|
||||
type: PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
messageAlign: PropType<DialogMessageAlign>;
|
||||
closeOnPopstate: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
showCancelButton: BooleanConstructor;
|
||||
cancelButtonText: StringConstructor;
|
||||
cancelButtonColor: StringConstructor;
|
||||
cancelButtonDisabled: BooleanConstructor;
|
||||
confirmButtonText: StringConstructor;
|
||||
confirmButtonColor: StringConstructor;
|
||||
confirmButtonDisabled: BooleanConstructor;
|
||||
showConfirmButton: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
closeOnClickOverlay: BooleanConstructor;
|
||||
keyboardEnabled: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
destroyOnClose: BooleanConstructor;
|
||||
}>> & Readonly<{
|
||||
onKeydown?: ((...args: any[]) => any) | undefined;
|
||||
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
||||
onCancel?: ((...args: any[]) => any) | undefined;
|
||||
onConfirm?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
overlay: boolean;
|
||||
show: boolean;
|
||||
lockScroll: boolean;
|
||||
lazyRender: boolean;
|
||||
transitionAppear: boolean;
|
||||
closeOnClickOverlay: boolean;
|
||||
transition: string;
|
||||
closeOnPopstate: boolean;
|
||||
destroyOnClose: boolean;
|
||||
allowHtml: boolean;
|
||||
showCancelButton: boolean;
|
||||
cancelButtonDisabled: boolean;
|
||||
confirmButtonDisabled: boolean;
|
||||
showConfirmButton: boolean;
|
||||
keyboardEnabled: boolean;
|
||||
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
||||
export default _default;
|
||||
222
node_modules/vant/es/dialog/Dialog.mjs
generated
vendored
Normal file
222
node_modules/vant/es/dialog/Dialog.mjs
generated
vendored
Normal file
@@ -0,0 +1,222 @@
|
||||
import { ref, reactive, withKeys, defineComponent, createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
||||
import { noop, pick, extend, addUnit, truthProp, isFunction, BORDER_TOP, BORDER_LEFT, unknownProp, numericProp, makeStringProp, callInterceptor, createNamespace } from "../utils/index.mjs";
|
||||
import { popupSharedProps, popupSharedPropKeys } from "../popup/shared.mjs";
|
||||
import { Popup } from "../popup/index.mjs";
|
||||
import { Button } from "../button/index.mjs";
|
||||
import { ActionBar } from "../action-bar/index.mjs";
|
||||
import { ActionBarButton } from "../action-bar-button/index.mjs";
|
||||
const [name, bem, t] = createNamespace("dialog");
|
||||
const dialogProps = extend({}, popupSharedProps, {
|
||||
title: String,
|
||||
theme: String,
|
||||
width: numericProp,
|
||||
message: [String, Function],
|
||||
callback: Function,
|
||||
allowHtml: Boolean,
|
||||
className: unknownProp,
|
||||
transition: makeStringProp("van-dialog-bounce"),
|
||||
messageAlign: String,
|
||||
closeOnPopstate: truthProp,
|
||||
showCancelButton: Boolean,
|
||||
cancelButtonText: String,
|
||||
cancelButtonColor: String,
|
||||
cancelButtonDisabled: Boolean,
|
||||
confirmButtonText: String,
|
||||
confirmButtonColor: String,
|
||||
confirmButtonDisabled: Boolean,
|
||||
showConfirmButton: truthProp,
|
||||
closeOnClickOverlay: Boolean,
|
||||
keyboardEnabled: truthProp,
|
||||
destroyOnClose: Boolean
|
||||
});
|
||||
const popupInheritKeys = [...popupSharedPropKeys, "transition", "closeOnPopstate", "destroyOnClose"];
|
||||
var stdin_default = defineComponent({
|
||||
name,
|
||||
props: dialogProps,
|
||||
emits: ["confirm", "cancel", "keydown", "update:show"],
|
||||
setup(props, {
|
||||
emit,
|
||||
slots
|
||||
}) {
|
||||
const root = ref();
|
||||
const loading = reactive({
|
||||
confirm: false,
|
||||
cancel: false
|
||||
});
|
||||
const updateShow = (value) => emit("update:show", value);
|
||||
const close = (action) => {
|
||||
var _a;
|
||||
updateShow(false);
|
||||
(_a = props.callback) == null ? void 0 : _a.call(props, action);
|
||||
};
|
||||
const getActionHandler = (action) => () => {
|
||||
if (!props.show) {
|
||||
return;
|
||||
}
|
||||
emit(action);
|
||||
if (props.beforeClose) {
|
||||
loading[action] = true;
|
||||
callInterceptor(props.beforeClose, {
|
||||
args: [action],
|
||||
done() {
|
||||
close(action);
|
||||
loading[action] = false;
|
||||
},
|
||||
canceled() {
|
||||
loading[action] = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
close(action);
|
||||
}
|
||||
};
|
||||
const onCancel = getActionHandler("cancel");
|
||||
const onConfirm = getActionHandler("confirm");
|
||||
const onKeydown = withKeys((event) => {
|
||||
var _a, _b;
|
||||
if (!props.keyboardEnabled) {
|
||||
return;
|
||||
}
|
||||
if (event.target !== ((_b = (_a = root.value) == null ? void 0 : _a.popupRef) == null ? void 0 : _b.value)) {
|
||||
return;
|
||||
}
|
||||
const onEventType = {
|
||||
Enter: props.showConfirmButton ? onConfirm : noop,
|
||||
Escape: props.showCancelButton ? onCancel : noop
|
||||
};
|
||||
onEventType[event.key]();
|
||||
emit("keydown", event);
|
||||
}, ["enter", "esc"]);
|
||||
const renderTitle = () => {
|
||||
const title = slots.title ? slots.title() : props.title;
|
||||
if (title) {
|
||||
return _createVNode("div", {
|
||||
"class": bem("header", {
|
||||
isolated: !props.message && !slots.default
|
||||
})
|
||||
}, [title]);
|
||||
}
|
||||
};
|
||||
const renderMessage = (hasTitle) => {
|
||||
const {
|
||||
message,
|
||||
allowHtml,
|
||||
messageAlign
|
||||
} = props;
|
||||
const classNames = bem("message", {
|
||||
"has-title": hasTitle,
|
||||
[messageAlign]: messageAlign
|
||||
});
|
||||
const content = isFunction(message) ? message() : message;
|
||||
if (allowHtml && typeof content === "string") {
|
||||
return _createVNode("div", {
|
||||
"class": classNames,
|
||||
"innerHTML": content
|
||||
}, null);
|
||||
}
|
||||
return _createVNode("div", {
|
||||
"class": classNames
|
||||
}, [content]);
|
||||
};
|
||||
const renderContent = () => {
|
||||
if (slots.default) {
|
||||
return _createVNode("div", {
|
||||
"class": bem("content")
|
||||
}, [slots.default()]);
|
||||
}
|
||||
const {
|
||||
title,
|
||||
message,
|
||||
allowHtml
|
||||
} = props;
|
||||
if (message) {
|
||||
const hasTitle = !!(title || slots.title);
|
||||
return _createVNode("div", {
|
||||
"key": allowHtml ? 1 : 0,
|
||||
"class": bem("content", {
|
||||
isolated: !hasTitle
|
||||
})
|
||||
}, [renderMessage(hasTitle)]);
|
||||
}
|
||||
};
|
||||
const renderButtons = () => _createVNode("div", {
|
||||
"class": [BORDER_TOP, bem("footer")]
|
||||
}, [props.showCancelButton && _createVNode(Button, {
|
||||
"size": "large",
|
||||
"text": props.cancelButtonText || t("cancel"),
|
||||
"class": bem("cancel"),
|
||||
"style": {
|
||||
color: props.cancelButtonColor
|
||||
},
|
||||
"loading": loading.cancel,
|
||||
"disabled": props.cancelButtonDisabled,
|
||||
"onClick": onCancel
|
||||
}, null), props.showConfirmButton && _createVNode(Button, {
|
||||
"size": "large",
|
||||
"text": props.confirmButtonText || t("confirm"),
|
||||
"class": [bem("confirm"), {
|
||||
[BORDER_LEFT]: props.showCancelButton
|
||||
}],
|
||||
"style": {
|
||||
color: props.confirmButtonColor
|
||||
},
|
||||
"loading": loading.confirm,
|
||||
"disabled": props.confirmButtonDisabled,
|
||||
"onClick": onConfirm
|
||||
}, null)]);
|
||||
const renderRoundButtons = () => _createVNode(ActionBar, {
|
||||
"class": bem("footer")
|
||||
}, {
|
||||
default: () => [props.showCancelButton && _createVNode(ActionBarButton, {
|
||||
"type": "warning",
|
||||
"text": props.cancelButtonText || t("cancel"),
|
||||
"class": bem("cancel"),
|
||||
"color": props.cancelButtonColor,
|
||||
"loading": loading.cancel,
|
||||
"disabled": props.cancelButtonDisabled,
|
||||
"onClick": onCancel
|
||||
}, null), props.showConfirmButton && _createVNode(ActionBarButton, {
|
||||
"type": "danger",
|
||||
"text": props.confirmButtonText || t("confirm"),
|
||||
"class": bem("confirm"),
|
||||
"color": props.confirmButtonColor,
|
||||
"loading": loading.confirm,
|
||||
"disabled": props.confirmButtonDisabled,
|
||||
"onClick": onConfirm
|
||||
}, null)]
|
||||
});
|
||||
const renderFooter = () => {
|
||||
if (slots.footer) {
|
||||
return slots.footer();
|
||||
}
|
||||
return props.theme === "round-button" ? renderRoundButtons() : renderButtons();
|
||||
};
|
||||
return () => {
|
||||
const {
|
||||
width,
|
||||
title,
|
||||
theme,
|
||||
message,
|
||||
className
|
||||
} = props;
|
||||
return _createVNode(Popup, _mergeProps({
|
||||
"ref": root,
|
||||
"role": "dialog",
|
||||
"class": [bem([theme]), className],
|
||||
"style": {
|
||||
width: addUnit(width)
|
||||
},
|
||||
"tabindex": 0,
|
||||
"aria-labelledby": title || message,
|
||||
"onKeydown": onKeydown,
|
||||
"onUpdate:show": updateShow
|
||||
}, pick(props, popupInheritKeys)), {
|
||||
default: () => [renderTitle(), renderContent(), renderFooter()]
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
export {
|
||||
stdin_default as default,
|
||||
dialogProps
|
||||
};
|
||||
21
node_modules/vant/es/dialog/function-call.d.ts
generated
vendored
Normal file
21
node_modules/vant/es/dialog/function-call.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { DialogAction, DialogOptions } from './types';
|
||||
/**
|
||||
* Display a message prompt dialog with a default confirm button
|
||||
*/
|
||||
export declare function showDialog(options: DialogOptions): Promise<DialogAction | undefined>;
|
||||
/**
|
||||
* Modify the default configuration that affects all `showDialog` calls
|
||||
*/
|
||||
export declare const setDialogDefaultOptions: (options: DialogOptions) => void;
|
||||
/**
|
||||
* Reset the default configuration that affects all `showDialog` calls
|
||||
*/
|
||||
export declare const resetDialogDefaultOptions: () => void;
|
||||
/**
|
||||
* Display a message confirmation dialog with default confirm and cancel buttons
|
||||
*/
|
||||
export declare const showConfirmDialog: (options: DialogOptions) => Promise<DialogAction | undefined>;
|
||||
/**
|
||||
* Close the currently displayed dialog
|
||||
*/
|
||||
export declare const closeDialog: () => void;
|
||||
86
node_modules/vant/es/dialog/function-call.mjs
generated
vendored
Normal file
86
node_modules/vant/es/dialog/function-call.mjs
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
|
||||
import { extend, inBrowser } from "../utils/index.mjs";
|
||||
import { mountComponent, usePopupState } from "../utils/mount-component.mjs";
|
||||
import Dialog from "./Dialog.mjs";
|
||||
let instance;
|
||||
const DEFAULT_OPTIONS = {
|
||||
title: "",
|
||||
width: "",
|
||||
theme: null,
|
||||
message: "",
|
||||
overlay: true,
|
||||
callback: null,
|
||||
teleport: "body",
|
||||
className: "",
|
||||
allowHtml: false,
|
||||
lockScroll: true,
|
||||
transition: void 0,
|
||||
beforeClose: null,
|
||||
overlayClass: "",
|
||||
overlayStyle: void 0,
|
||||
messageAlign: "",
|
||||
cancelButtonText: "",
|
||||
cancelButtonColor: null,
|
||||
cancelButtonDisabled: false,
|
||||
confirmButtonText: "",
|
||||
confirmButtonColor: null,
|
||||
confirmButtonDisabled: false,
|
||||
showConfirmButton: true,
|
||||
showCancelButton: false,
|
||||
closeOnPopstate: true,
|
||||
closeOnClickOverlay: false,
|
||||
destroyOnClose: false
|
||||
};
|
||||
let currentOptions = extend({}, DEFAULT_OPTIONS);
|
||||
function initInstance() {
|
||||
const Wrapper = {
|
||||
setup() {
|
||||
const {
|
||||
state,
|
||||
toggle
|
||||
} = usePopupState();
|
||||
return () => _createVNode(Dialog, _mergeProps(state, {
|
||||
"onUpdate:show": toggle
|
||||
}), null);
|
||||
}
|
||||
};
|
||||
({
|
||||
instance
|
||||
} = mountComponent(Wrapper));
|
||||
}
|
||||
function showDialog(options) {
|
||||
if (!inBrowser) {
|
||||
return Promise.resolve(void 0);
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!instance) {
|
||||
initInstance();
|
||||
}
|
||||
instance.open(extend({}, currentOptions, options, {
|
||||
callback: (action) => {
|
||||
(action === "confirm" ? resolve : reject)(action);
|
||||
}
|
||||
}));
|
||||
});
|
||||
}
|
||||
const setDialogDefaultOptions = (options) => {
|
||||
extend(currentOptions, options);
|
||||
};
|
||||
const resetDialogDefaultOptions = () => {
|
||||
currentOptions = extend({}, DEFAULT_OPTIONS);
|
||||
};
|
||||
const showConfirmDialog = (options) => showDialog(extend({
|
||||
showCancelButton: true
|
||||
}, options));
|
||||
const closeDialog = () => {
|
||||
if (instance) {
|
||||
instance.toggle(false);
|
||||
}
|
||||
};
|
||||
export {
|
||||
closeDialog,
|
||||
resetDialogDefaultOptions,
|
||||
setDialogDefaultOptions,
|
||||
showConfirmDialog,
|
||||
showDialog
|
||||
};
|
||||
1
node_modules/vant/es/dialog/index.css
generated
vendored
Normal file
1
node_modules/vant/es/dialog/index.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
:root,:host{--van-dialog-width: 320px;--van-dialog-small-screen-width: 90%;--van-dialog-font-size: var(--van-font-size-lg);--van-dialog-transition: var(--van-duration-base);--van-dialog-radius: 16px;--van-dialog-background: var(--van-background-2);--van-dialog-header-font-weight: var(--van-font-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-primary-color)}.van-dialog{top:45%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background);border-radius:var(--van-dialog-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{color:var(--van-text-color);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{color:var(--van-text-color);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;border-radius: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--round-button .van-action-bar-button--first{border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-dialog--round-button .van-action-bar-button--last{border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-dialog-bounce-enter-from{transform:translate3d(0,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate3d(0,-50%,0) scale(.9);opacity:0}
|
||||
152
node_modules/vant/es/dialog/index.d.ts
generated
vendored
Normal file
152
node_modules/vant/es/dialog/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
export declare const Dialog: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
||||
show: BooleanConstructor;
|
||||
zIndex: (NumberConstructor | StringConstructor)[];
|
||||
overlay: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
duration: (NumberConstructor | StringConstructor)[];
|
||||
teleport: import("vue").PropType<import("vue").TeleportProps["to"]>;
|
||||
lockScroll: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
lazyRender: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
||||
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
||||
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
||||
overlayClass: import("vue").PropType<unknown>;
|
||||
transitionAppear: BooleanConstructor;
|
||||
closeOnClickOverlay: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
} & {
|
||||
title: StringConstructor;
|
||||
theme: import("vue").PropType<import("./types").DialogTheme>;
|
||||
width: (NumberConstructor | StringConstructor)[];
|
||||
message: import("vue").PropType<import("./types").DialogMessage>;
|
||||
callback: import("vue").PropType<(action?: import("./types").DialogAction) => void>;
|
||||
allowHtml: BooleanConstructor;
|
||||
className: import("vue").PropType<unknown>;
|
||||
transition: {
|
||||
type: import("vue").PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
messageAlign: import("vue").PropType<import("./types").DialogMessageAlign>;
|
||||
closeOnPopstate: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
showCancelButton: BooleanConstructor;
|
||||
cancelButtonText: StringConstructor;
|
||||
cancelButtonColor: StringConstructor;
|
||||
cancelButtonDisabled: BooleanConstructor;
|
||||
confirmButtonText: StringConstructor;
|
||||
confirmButtonColor: StringConstructor;
|
||||
confirmButtonDisabled: BooleanConstructor;
|
||||
showConfirmButton: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
closeOnClickOverlay: BooleanConstructor;
|
||||
keyboardEnabled: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
destroyOnClose: BooleanConstructor;
|
||||
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "keydown" | "update:show" | "confirm")[], "cancel" | "keydown" | "update:show" | "confirm", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
show: BooleanConstructor;
|
||||
zIndex: (NumberConstructor | StringConstructor)[];
|
||||
overlay: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
duration: (NumberConstructor | StringConstructor)[];
|
||||
teleport: import("vue").PropType<import("vue").TeleportProps["to"]>;
|
||||
lockScroll: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
lazyRender: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
beforeClose: import("vue").PropType<import("../utils").Interceptor>;
|
||||
overlayProps: import("vue").PropType<Partial<import("..").OverlayProps>>;
|
||||
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
|
||||
overlayClass: import("vue").PropType<unknown>;
|
||||
transitionAppear: BooleanConstructor;
|
||||
closeOnClickOverlay: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
} & {
|
||||
title: StringConstructor;
|
||||
theme: import("vue").PropType<import("./types").DialogTheme>;
|
||||
width: (NumberConstructor | StringConstructor)[];
|
||||
message: import("vue").PropType<import("./types").DialogMessage>;
|
||||
callback: import("vue").PropType<(action?: import("./types").DialogAction) => void>;
|
||||
allowHtml: BooleanConstructor;
|
||||
className: import("vue").PropType<unknown>;
|
||||
transition: {
|
||||
type: import("vue").PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
messageAlign: import("vue").PropType<import("./types").DialogMessageAlign>;
|
||||
closeOnPopstate: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
showCancelButton: BooleanConstructor;
|
||||
cancelButtonText: StringConstructor;
|
||||
cancelButtonColor: StringConstructor;
|
||||
cancelButtonDisabled: BooleanConstructor;
|
||||
confirmButtonText: StringConstructor;
|
||||
confirmButtonColor: StringConstructor;
|
||||
confirmButtonDisabled: BooleanConstructor;
|
||||
showConfirmButton: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
closeOnClickOverlay: BooleanConstructor;
|
||||
keyboardEnabled: {
|
||||
type: BooleanConstructor;
|
||||
default: true;
|
||||
};
|
||||
destroyOnClose: BooleanConstructor;
|
||||
}>> & Readonly<{
|
||||
onKeydown?: ((...args: any[]) => any) | undefined;
|
||||
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
||||
onCancel?: ((...args: any[]) => any) | undefined;
|
||||
onConfirm?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
overlay: boolean;
|
||||
show: boolean;
|
||||
lockScroll: boolean;
|
||||
lazyRender: boolean;
|
||||
transitionAppear: boolean;
|
||||
closeOnClickOverlay: boolean;
|
||||
transition: string;
|
||||
closeOnPopstate: boolean;
|
||||
destroyOnClose: boolean;
|
||||
allowHtml: boolean;
|
||||
showCancelButton: boolean;
|
||||
cancelButtonDisabled: boolean;
|
||||
confirmButtonDisabled: boolean;
|
||||
showConfirmButton: boolean;
|
||||
keyboardEnabled: boolean;
|
||||
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
||||
export default Dialog;
|
||||
export { dialogProps } from './Dialog';
|
||||
export { showDialog, closeDialog, showConfirmDialog, setDialogDefaultOptions, resetDialogDefaultOptions, } from './function-call';
|
||||
export type { DialogProps } from './Dialog';
|
||||
export type { DialogTheme, DialogMessage, DialogOptions, DialogThemeVars, DialogMessageAlign, } from './types';
|
||||
declare module 'vue' {
|
||||
interface GlobalComponents {
|
||||
VanDialog: typeof Dialog;
|
||||
}
|
||||
}
|
||||
22
node_modules/vant/es/dialog/index.mjs
generated
vendored
Normal file
22
node_modules/vant/es/dialog/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import { withInstall } from "../utils/index.mjs";
|
||||
import _Dialog from "./Dialog.mjs";
|
||||
const Dialog = withInstall(_Dialog);
|
||||
var stdin_default = Dialog;
|
||||
import { dialogProps } from "./Dialog.mjs";
|
||||
import {
|
||||
showDialog,
|
||||
closeDialog,
|
||||
showConfirmDialog,
|
||||
setDialogDefaultOptions,
|
||||
resetDialogDefaultOptions
|
||||
} from "./function-call.mjs";
|
||||
export {
|
||||
Dialog,
|
||||
closeDialog,
|
||||
stdin_default as default,
|
||||
dialogProps,
|
||||
resetDialogDefaultOptions,
|
||||
setDialogDefaultOptions,
|
||||
showConfirmDialog,
|
||||
showDialog
|
||||
};
|
||||
1
node_modules/vant/es/dialog/style/index.d.ts
generated
vendored
Normal file
1
node_modules/vant/es/dialog/style/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
10
node_modules/vant/es/dialog/style/index.mjs
generated
vendored
Normal file
10
node_modules/vant/es/dialog/style/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import "../../style/base.css";
|
||||
import "../../action-bar/index.css";
|
||||
import "../../badge/index.css";
|
||||
import "../../icon/index.css";
|
||||
import "../../loading/index.css";
|
||||
import "../../button/index.css";
|
||||
import "../../action-bar-button/index.css";
|
||||
import "../../overlay/index.css";
|
||||
import "../../popup/index.css";
|
||||
import "../index.css";
|
||||
55
node_modules/vant/es/dialog/types.d.ts
generated
vendored
Normal file
55
node_modules/vant/es/dialog/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
import type { CSSProperties, TeleportProps } from 'vue';
|
||||
import type { Interceptor, Numeric } from '../utils';
|
||||
export type DialogTheme = 'default' | 'round-button';
|
||||
export type DialogAction = 'confirm' | 'cancel';
|
||||
export type DialogMessage = string | (() => JSX.Element);
|
||||
export type DialogMessageAlign = 'left' | 'center' | 'right' | 'justify';
|
||||
export type DialogOptions = {
|
||||
title?: string;
|
||||
width?: Numeric;
|
||||
theme?: DialogTheme;
|
||||
message?: DialogMessage;
|
||||
overlay?: boolean;
|
||||
teleport?: TeleportProps['to'];
|
||||
className?: unknown;
|
||||
allowHtml?: boolean;
|
||||
lockScroll?: boolean;
|
||||
transition?: string;
|
||||
beforeClose?: Interceptor;
|
||||
messageAlign?: DialogMessageAlign;
|
||||
overlayClass?: string;
|
||||
overlayStyle?: CSSProperties;
|
||||
closeOnPopstate?: boolean;
|
||||
showCancelButton?: boolean;
|
||||
showConfirmButton?: boolean;
|
||||
cancelButtonText?: string;
|
||||
cancelButtonColor?: string;
|
||||
cancelButtonDisabled?: boolean;
|
||||
confirmButtonText?: string;
|
||||
confirmButtonColor?: string;
|
||||
confirmButtonDisabled?: boolean;
|
||||
closeOnClickOverlay?: boolean;
|
||||
destroyOnClose?: boolean;
|
||||
keyboardEnabled?: boolean;
|
||||
};
|
||||
export type DialogThemeVars = {
|
||||
dialogWidth?: string;
|
||||
dialogSmallScreenWidth?: string;
|
||||
dialogFontSize?: string;
|
||||
dialogTransition?: string;
|
||||
dialogRadius?: string;
|
||||
dialogBackground?: string;
|
||||
dialogHeaderFontWeight?: string;
|
||||
dialogHeaderLineHeight?: number | string;
|
||||
dialogHeaderPaddingTop?: string;
|
||||
dialogHeaderIsolatedPadding?: string;
|
||||
dialogMessagePadding?: string;
|
||||
dialogMessageFontSize?: string;
|
||||
dialogMessageLineHeight?: number | string;
|
||||
dialogMessageMaxHeight?: string;
|
||||
dialogHasTitleMessageTextColor?: string;
|
||||
dialogHasTitleMessagePaddingTop?: string;
|
||||
dialogButtonHeight?: string;
|
||||
dialogRoundButtonHeight?: string;
|
||||
dialogConfirmButtonTextColor?: string;
|
||||
};
|
||||
0
node_modules/vant/es/dialog/types.mjs
generated
vendored
Normal file
0
node_modules/vant/es/dialog/types.mjs
generated
vendored
Normal file
Reference in New Issue
Block a user