first commit

This commit is contained in:
2025-12-29 14:59:44 +08:00
commit 10c3fbb0d7
5315 changed files with 795443 additions and 0 deletions

118
node_modules/vant/lib/toast/Toast.d.ts generated vendored Normal file
View File

@@ -0,0 +1,118 @@
import { type PropType, type TeleportProps, type CSSProperties, type ExtractPropTypes } from 'vue';
import { LoadingType } from '../loading';
import type { ToastType, ToastPosition, ToastWordBreak } from './types';
export declare const toastProps: {
icon: StringConstructor;
show: BooleanConstructor;
type: {
type: PropType<ToastType>;
default: ToastType;
};
overlay: BooleanConstructor;
message: (NumberConstructor | StringConstructor)[];
iconSize: (NumberConstructor | StringConstructor)[];
duration: {
type: NumberConstructor;
default: number;
};
position: {
type: PropType<ToastPosition>;
default: ToastPosition;
};
teleport: PropType<TeleportProps["to"]>;
wordBreak: PropType<ToastWordBreak>;
className: PropType<unknown>;
iconPrefix: StringConstructor;
transition: {
type: PropType<string>;
default: string;
};
loadingType: PropType<LoadingType>;
forbidClick: BooleanConstructor;
overlayClass: PropType<unknown>;
overlayStyle: PropType<CSSProperties>;
closeOnClick: BooleanConstructor;
closeOnClickOverlay: BooleanConstructor;
zIndex: (NumberConstructor | StringConstructor)[];
};
export type ToastProps = ExtractPropTypes<typeof toastProps>;
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
icon: StringConstructor;
show: BooleanConstructor;
type: {
type: PropType<ToastType>;
default: ToastType;
};
overlay: BooleanConstructor;
message: (NumberConstructor | StringConstructor)[];
iconSize: (NumberConstructor | StringConstructor)[];
duration: {
type: NumberConstructor;
default: number;
};
position: {
type: PropType<ToastPosition>;
default: ToastPosition;
};
teleport: PropType<TeleportProps["to"]>;
wordBreak: PropType<ToastWordBreak>;
className: PropType<unknown>;
iconPrefix: StringConstructor;
transition: {
type: PropType<string>;
default: string;
};
loadingType: PropType<LoadingType>;
forbidClick: BooleanConstructor;
overlayClass: PropType<unknown>;
overlayStyle: PropType<CSSProperties>;
closeOnClick: BooleanConstructor;
closeOnClickOverlay: BooleanConstructor;
zIndex: (NumberConstructor | StringConstructor)[];
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").PublicProps, Readonly<ExtractPropTypes<{
icon: StringConstructor;
show: BooleanConstructor;
type: {
type: PropType<ToastType>;
default: ToastType;
};
overlay: BooleanConstructor;
message: (NumberConstructor | StringConstructor)[];
iconSize: (NumberConstructor | StringConstructor)[];
duration: {
type: NumberConstructor;
default: number;
};
position: {
type: PropType<ToastPosition>;
default: ToastPosition;
};
teleport: PropType<TeleportProps["to"]>;
wordBreak: PropType<ToastWordBreak>;
className: PropType<unknown>;
iconPrefix: StringConstructor;
transition: {
type: PropType<string>;
default: string;
};
loadingType: PropType<LoadingType>;
forbidClick: BooleanConstructor;
overlayClass: PropType<unknown>;
overlayStyle: PropType<CSSProperties>;
closeOnClick: BooleanConstructor;
closeOnClickOverlay: BooleanConstructor;
zIndex: (NumberConstructor | StringConstructor)[];
}>> & Readonly<{
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
}>, {
type: ToastType;
position: ToastPosition;
overlay: boolean;
show: boolean;
duration: number;
closeOnClickOverlay: boolean;
transition: string;
forbidClick: boolean;
closeOnClick: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;

146
node_modules/vant/lib/toast/Toast.js generated vendored Normal file
View File

@@ -0,0 +1,146 @@
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name2 in all)
__defProp(target, name2, { get: all[name2], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var stdin_exports = {};
__export(stdin_exports, {
default: () => stdin_default,
toastProps: () => toastProps
});
module.exports = __toCommonJS(stdin_exports);
var import_vue = require("vue");
var import_utils = require("../utils");
var import_lock_click = require("./lock-click");
var import_icon = require("../icon");
var import_popup = require("../popup");
var import_loading = require("../loading");
const [name, bem] = (0, import_utils.createNamespace)("toast");
const popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay", "zIndex"];
const toastProps = {
icon: String,
show: Boolean,
type: (0, import_utils.makeStringProp)("text"),
overlay: Boolean,
message: import_utils.numericProp,
iconSize: import_utils.numericProp,
duration: (0, import_utils.makeNumberProp)(2e3),
position: (0, import_utils.makeStringProp)("middle"),
teleport: [String, Object],
wordBreak: String,
className: import_utils.unknownProp,
iconPrefix: String,
transition: (0, import_utils.makeStringProp)("van-fade"),
loadingType: String,
forbidClick: Boolean,
overlayClass: import_utils.unknownProp,
overlayStyle: Object,
closeOnClick: Boolean,
closeOnClickOverlay: Boolean,
zIndex: import_utils.numericProp
};
var stdin_default = (0, import_vue.defineComponent)({
name,
props: toastProps,
emits: ["update:show"],
setup(props, {
emit,
slots
}) {
let timer;
let clickable = false;
const toggleClickable = () => {
const newValue = props.show && props.forbidClick;
if (clickable !== newValue) {
clickable = newValue;
(0, import_lock_click.lockClick)(clickable);
}
};
const updateShow = (show) => emit("update:show", show);
const onClick = () => {
if (props.closeOnClick) {
updateShow(false);
}
};
const clearTimer = () => clearTimeout(timer);
const renderIcon = () => {
const {
icon,
type,
iconSize,
iconPrefix,
loadingType
} = props;
const hasIcon = icon || type === "success" || type === "fail";
if (hasIcon) {
return (0, import_vue.createVNode)(import_icon.Icon, {
"name": icon || type,
"size": iconSize,
"class": bem("icon"),
"classPrefix": iconPrefix
}, null);
}
if (type === "loading") {
return (0, import_vue.createVNode)(import_loading.Loading, {
"class": bem("loading"),
"size": iconSize,
"type": loadingType
}, null);
}
};
const renderMessage = () => {
const {
type,
message
} = props;
if (slots.message) {
return (0, import_vue.createVNode)("div", {
"class": bem("text")
}, [slots.message()]);
}
if ((0, import_utils.isDef)(message) && message !== "") {
return type === "html" ? (0, import_vue.createVNode)("div", {
"key": 0,
"class": bem("text"),
"innerHTML": String(message)
}, null) : (0, import_vue.createVNode)("div", {
"class": bem("text")
}, [message]);
}
};
(0, import_vue.watch)(() => [props.show, props.forbidClick], toggleClickable);
(0, import_vue.watch)(() => [props.show, props.type, props.message, props.duration], () => {
clearTimer();
if (props.show && props.duration > 0) {
timer = setTimeout(() => {
updateShow(false);
}, props.duration);
}
});
(0, import_vue.onMounted)(toggleClickable);
(0, import_vue.onUnmounted)(toggleClickable);
return () => (0, import_vue.createVNode)(import_popup.Popup, (0, import_vue.mergeProps)({
"class": [bem([props.position, props.wordBreak === "normal" ? "break-normal" : props.wordBreak, {
[props.type]: !props.icon
}]), props.className],
"lockScroll": false,
"onClick": onClick,
"onClosed": clearTimer,
"onUpdate:show": updateShow
}, (0, import_utils.pick)(props, popupInheritProps)), {
default: () => [renderIcon(), renderMessage()]
});
}
});

36
node_modules/vant/lib/toast/function-call.d.ts generated vendored Normal file
View File

@@ -0,0 +1,36 @@
import type { ToastType, ToastOptions, ToastWrapperInstance } from './types';
/**
* Display a text toast
*/
export declare function showToast(options?: string | ToastOptions): ToastWrapperInstance;
/**
* Display a loading toast
*/
export declare const showLoadingToast: (options: string | ToastOptions) => ToastWrapperInstance;
/**
* Display a success toast
*/
export declare const showSuccessToast: (options: string | ToastOptions) => ToastWrapperInstance;
/**
* Display a fail toast
*/
export declare const showFailToast: (options: string | ToastOptions) => ToastWrapperInstance;
/**
* Close the currently displayed toast
*/
export declare const closeToast: (all?: boolean) => void;
/**
* Modify the default configuration that affects all `showToast` calls.
* Specify the `type` parameter to modify the default configuration of a specific type of toast
*/
export declare function setToastDefaultOptions(options: ToastOptions): void;
export declare function setToastDefaultOptions(type: ToastType, options: ToastOptions): void;
/**
* Reset the default configuration that affects all `showToast` calls.
* Specify the `type` parameter to reset the default configuration of a specific type of toast
*/
export declare const resetToastDefaultOptions: (type?: ToastType) => void;
/**
* Allow multiple toasts to be displayed as the same time
*/
export declare const allowMultipleToast: (value?: boolean) => void;

170
node_modules/vant/lib/toast/function-call.js generated vendored Normal file
View File

@@ -0,0 +1,170 @@
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var stdin_exports = {};
__export(stdin_exports, {
allowMultipleToast: () => allowMultipleToast,
closeToast: () => closeToast,
resetToastDefaultOptions: () => resetToastDefaultOptions,
setToastDefaultOptions: () => setToastDefaultOptions,
showFailToast: () => showFailToast,
showLoadingToast: () => showLoadingToast,
showSuccessToast: () => showSuccessToast,
showToast: () => showToast
});
module.exports = __toCommonJS(stdin_exports);
var import_vue = require("vue");
var import_utils = require("../utils");
var import_mount_component = require("../utils/mount-component");
var import_Toast = __toESM(require("./Toast"));
const defaultOptions = {
icon: "",
type: "text",
message: "",
className: "",
overlay: false,
onClose: void 0,
onOpened: void 0,
duration: 2e3,
teleport: "body",
iconSize: void 0,
iconPrefix: void 0,
position: "middle",
transition: "van-fade",
forbidClick: false,
loadingType: void 0,
overlayClass: "",
overlayStyle: void 0,
closeOnClick: false,
closeOnClickOverlay: false
};
let queue = [];
let allowMultiple = false;
let currentOptions = (0, import_utils.extend)({}, defaultOptions);
const defaultOptionsMap = /* @__PURE__ */ new Map();
function parseOptions(message) {
if ((0, import_utils.isObject)(message)) {
return message;
}
return {
message
};
}
function createInstance() {
const {
instance,
unmount
} = (0, import_mount_component.mountComponent)({
setup() {
const message = (0, import_vue.ref)("");
const {
open,
state,
close,
toggle
} = (0, import_mount_component.usePopupState)();
const onClosed = () => {
if (allowMultiple) {
queue = queue.filter((item) => item !== instance);
unmount();
}
};
const render = () => {
const attrs = {
onClosed,
"onUpdate:show": toggle
};
return (0, import_vue.createVNode)(import_Toast.default, (0, import_vue.mergeProps)(state, attrs), null);
};
(0, import_vue.watch)(message, (val) => {
state.message = val;
});
(0, import_vue.getCurrentInstance)().render = render;
return {
open,
close,
message
};
}
});
return instance;
}
function getInstance() {
if (!queue.length || allowMultiple) {
const instance = createInstance();
queue.push(instance);
}
return queue[queue.length - 1];
}
function showToast(options = {}) {
if (!import_utils.inBrowser) {
return {};
}
const toast = getInstance();
const parsedOptions = parseOptions(options);
toast.open((0, import_utils.extend)({}, currentOptions, defaultOptionsMap.get(parsedOptions.type || currentOptions.type), parsedOptions));
return toast;
}
const createMethod = (type) => (options) => showToast((0, import_utils.extend)({
type
}, parseOptions(options)));
const showLoadingToast = createMethod("loading");
const showSuccessToast = createMethod("success");
const showFailToast = createMethod("fail");
const closeToast = (all) => {
var _a;
if (queue.length) {
if (all) {
queue.forEach((toast) => {
toast.close();
});
queue = [];
} else if (!allowMultiple) {
queue[0].close();
} else {
(_a = queue.shift()) == null ? void 0 : _a.close();
}
}
};
function setToastDefaultOptions(type, options) {
if (typeof type === "string") {
defaultOptionsMap.set(type, options);
} else {
(0, import_utils.extend)(currentOptions, type);
}
}
const resetToastDefaultOptions = (type) => {
if (typeof type === "string") {
defaultOptionsMap.delete(type);
} else {
currentOptions = (0, import_utils.extend)({}, defaultOptions);
defaultOptionsMap.clear();
}
};
const allowMultipleToast = (value = true) => {
allowMultiple = value;
};

1
node_modules/vant/lib/toast/index.css generated vendored Normal file
View File

@@ -0,0 +1 @@
:root,:host{--van-toast-max-width: 70%;--van-toast-font-size: var(--van-font-size-md);--van-toast-text-color: var(--van-white);--van-toast-loading-icon-color: var(--van-white);--van-toast-line-height: var(--van-line-height-md);--van-toast-radius: var(--van-radius-lg);--van-toast-background: rgba(0, 0, 0, .7);--van-toast-icon-size: 36px;--van-toast-text-min-width: 96px;--van-toast-text-padding: var(--van-padding-xs) var(--van-padding-sm);--van-toast-default-padding: var(--van-padding-md);--van-toast-default-width: 88px;--van-toast-default-min-height: 88px;--van-toast-position-top-distance: 20%;--van-toast-position-bottom-distance: 20%}.van-toast{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:content-box;transition:all var(--van-duration-fast);width:var(--van-toast-default-width);max-width:var(--van-toast-max-width);min-height:var(--van-toast-default-min-height);padding:var(--van-toast-default-padding);color:var(--van-toast-text-color);font-size:var(--van-toast-font-size);line-height:var(--van-toast-line-height);white-space:pre-wrap;word-break:break-all;text-align:center;background:var(--van-toast-background);border-radius:var(--van-toast-radius)}.van-toast--break-normal{word-break:normal;word-wrap:normal}.van-toast--break-word{word-break:normal;word-wrap:break-word}.van-toast--unclickable{overflow:hidden;cursor:not-allowed}.van-toast--unclickable *{pointer-events:none}.van-toast--text,.van-toast--html{width:-webkit-fit-content;width:fit-content;min-width:var(--van-toast-text-min-width);min-height:0;padding:var(--van-toast-text-padding)}.van-toast--text .van-toast__text,.van-toast--html .van-toast__text{margin-top:0}.van-toast--top{top:var(--van-toast-position-top-distance)}.van-toast--bottom{top:auto;bottom:var(--van-toast-position-bottom-distance)}.van-toast__icon{font-size:var(--van-toast-icon-size)}.van-toast__loading{padding:var(--van-padding-base);color:var(--van-toast-loading-icon-color)}.van-toast__text{margin-top:var(--van-padding-xs)}

89
node_modules/vant/lib/toast/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,89 @@
export declare const Toast: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
icon: StringConstructor;
show: BooleanConstructor;
type: {
type: import("vue").PropType<import("./types").ToastType>;
default: import("./types").ToastType;
};
overlay: BooleanConstructor;
message: (NumberConstructor | StringConstructor)[];
iconSize: (NumberConstructor | StringConstructor)[];
duration: {
type: NumberConstructor;
default: number;
};
position: {
type: import("vue").PropType<import("./types").ToastPosition>;
default: import("./types").ToastPosition;
};
teleport: import("vue").PropType<import("vue").TeleportProps["to"]>;
wordBreak: import("vue").PropType<import("./types").ToastWordBreak>;
className: import("vue").PropType<unknown>;
iconPrefix: StringConstructor;
transition: {
type: import("vue").PropType<string>;
default: string;
};
loadingType: import("vue").PropType<import("..").LoadingType>;
forbidClick: BooleanConstructor;
overlayClass: import("vue").PropType<unknown>;
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
closeOnClick: BooleanConstructor;
closeOnClickOverlay: BooleanConstructor;
zIndex: (NumberConstructor | StringConstructor)[];
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
icon: StringConstructor;
show: BooleanConstructor;
type: {
type: import("vue").PropType<import("./types").ToastType>;
default: import("./types").ToastType;
};
overlay: BooleanConstructor;
message: (NumberConstructor | StringConstructor)[];
iconSize: (NumberConstructor | StringConstructor)[];
duration: {
type: NumberConstructor;
default: number;
};
position: {
type: import("vue").PropType<import("./types").ToastPosition>;
default: import("./types").ToastPosition;
};
teleport: import("vue").PropType<import("vue").TeleportProps["to"]>;
wordBreak: import("vue").PropType<import("./types").ToastWordBreak>;
className: import("vue").PropType<unknown>;
iconPrefix: StringConstructor;
transition: {
type: import("vue").PropType<string>;
default: string;
};
loadingType: import("vue").PropType<import("..").LoadingType>;
forbidClick: BooleanConstructor;
overlayClass: import("vue").PropType<unknown>;
overlayStyle: import("vue").PropType<import("vue").CSSProperties>;
closeOnClick: BooleanConstructor;
closeOnClickOverlay: BooleanConstructor;
zIndex: (NumberConstructor | StringConstructor)[];
}>> & Readonly<{
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
}>, {
type: import("./types").ToastType;
position: import("./types").ToastPosition;
overlay: boolean;
show: boolean;
duration: number;
closeOnClickOverlay: boolean;
transition: string;
forbidClick: boolean;
closeOnClick: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
export default Toast;
export { toastProps } from './Toast';
export { showToast, closeToast, showFailToast, showLoadingToast, showSuccessToast, allowMultipleToast, setToastDefaultOptions, resetToastDefaultOptions, } from './function-call';
export type { ToastProps } from './Toast';
export type { ToastType, ToastOptions, ToastPosition, ToastThemeVars, ToastWordBreak, ToastWrapperInstance, } from './types';
declare module 'vue' {
interface GlobalComponents {
VanToast: typeof Toast;
}
}

48
node_modules/vant/lib/toast/index.js generated vendored Normal file
View File

@@ -0,0 +1,48 @@
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var stdin_exports = {};
__export(stdin_exports, {
Toast: () => Toast,
allowMultipleToast: () => import_function_call.allowMultipleToast,
closeToast: () => import_function_call.closeToast,
default: () => stdin_default,
resetToastDefaultOptions: () => import_function_call.resetToastDefaultOptions,
setToastDefaultOptions: () => import_function_call.setToastDefaultOptions,
showFailToast: () => import_function_call.showFailToast,
showLoadingToast: () => import_function_call.showLoadingToast,
showSuccessToast: () => import_function_call.showSuccessToast,
showToast: () => import_function_call.showToast,
toastProps: () => import_Toast2.toastProps
});
module.exports = __toCommonJS(stdin_exports);
var import_utils = require("../utils");
var import_Toast = __toESM(require("./Toast"));
var import_Toast2 = require("./Toast");
var import_function_call = require("./function-call");
const Toast = (0, import_utils.withInstall)(import_Toast.default);
var stdin_default = Toast;

1
node_modules/vant/lib/toast/lock-click.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function lockClick(lock: boolean): void;

36
node_modules/vant/lib/toast/lock-click.js generated vendored Normal file
View File

@@ -0,0 +1,36 @@
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var stdin_exports = {};
__export(stdin_exports, {
lockClick: () => lockClick
});
module.exports = __toCommonJS(stdin_exports);
let lockCount = 0;
function lockClick(lock) {
if (lock) {
if (!lockCount) {
document.body.classList.add("van-toast--unclickable");
}
lockCount++;
} else if (lockCount) {
lockCount--;
if (!lockCount) {
document.body.classList.remove("van-toast--unclickable");
}
}
}

1
node_modules/vant/lib/toast/style/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export {};

7
node_modules/vant/lib/toast/style/index.js generated vendored Normal file
View File

@@ -0,0 +1,7 @@
require("../../style/base.css");
require("../../badge/index.css");
require("../../icon/index.css");
require("../../loading/index.css");
require("../../overlay/index.css");
require("../../popup/index.css");
require("../index.css");

56
node_modules/vant/lib/toast/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,56 @@
import type { ComponentPublicInstance, TeleportProps } from 'vue';
import type { LoadingType } from '../loading';
import type { Numeric } from '../utils';
export type ToastType = 'text' | 'loading' | 'success' | 'fail' | 'html';
export type ToastPosition = 'top' | 'middle' | 'bottom';
export type ToastWordBreak = 'break-all' | 'break-word' | 'normal';
export type ToastOptions = {
icon?: string;
type?: ToastType;
mask?: boolean;
message?: Numeric;
overlay?: boolean;
duration?: number;
teleport?: TeleportProps['to'];
iconSize?: Numeric;
position?: ToastPosition;
className?: unknown;
transition?: string;
iconPrefix?: string;
wordBreak?: ToastWordBreak;
loadingType?: LoadingType;
forbidClick?: boolean;
closeOnClick?: boolean;
overlayClass?: unknown;
overlayStyle?: Record<string, any>;
closeOnClickOverlay?: boolean;
zIndex?: Numeric;
onClose?: () => void;
onOpened?: () => void;
};
export type ToastWrapperInstance = ComponentPublicInstance<{
message: Numeric;
}, {
close: () => void;
/**
* @private
*/
open: (props: Record<string, any>) => void;
}>;
export type ToastThemeVars = {
toastMaxWidth?: string;
toastFontSize?: string;
toastTextColor?: string;
toastLoadingIconColor?: string;
toastLineHeight?: number | string;
toastRadius?: string;
toastBackground?: string;
toastIconSize?: string;
toastTextMinWidth?: string;
toastTextPadding?: string;
toastDefaultPadding?: string;
toastDefaultWidth?: string;
toastDefaultMinHeight?: string;
toastPositionTopDistance?: string;
toastPositionBottomDistance?: string;
};

15
node_modules/vant/lib/toast/types.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var stdin_exports = {};
module.exports = __toCommonJS(stdin_exports);