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

246
node_modules/vant/lib/time-picker/TimePicker.d.ts generated vendored Normal file
View File

@@ -0,0 +1,246 @@
import { type ExtractPropTypes, type PropType, type ComponentPublicInstance } from 'vue';
export type TimePickerColumnType = 'hour' | 'minute' | 'second';
export declare const timePickerProps: {
loading: BooleanConstructor;
readonly: BooleanConstructor;
allowHtml: BooleanConstructor;
optionHeight: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
showToolbar: {
type: BooleanConstructor;
default: true;
};
swipeDuration: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
visibleOptionNum: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
} & {
title: StringConstructor;
cancelButtonText: StringConstructor;
confirmButtonText: StringConstructor;
} & {
modelValue: {
type: PropType<string[]>;
default: () => never[];
};
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values: string[]) => import("../picker").PickerOption[]>;
formatter: {
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
};
} & {
minHour: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
maxHour: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
minMinute: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
maxMinute: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
minSecond: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
maxSecond: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
minTime: {
type: StringConstructor;
validator: (val: string) => boolean;
};
maxTime: {
type: StringConstructor;
validator: (val: string) => boolean;
};
columnsType: {
type: PropType<TimePickerColumnType[]>;
default: () => string[];
};
};
export type TimePickerProps = ExtractPropTypes<typeof timePickerProps>;
export type TimePickerExpose = {
confirm: () => void;
getSelectedTime: () => string[];
};
export type TimePickerInstance = ComponentPublicInstance<TimePickerProps, TimePickerExpose>;
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
loading: BooleanConstructor;
readonly: BooleanConstructor;
allowHtml: BooleanConstructor;
optionHeight: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
showToolbar: {
type: BooleanConstructor;
default: true;
};
swipeDuration: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
visibleOptionNum: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
} & {
title: StringConstructor;
cancelButtonText: StringConstructor;
confirmButtonText: StringConstructor;
} & {
modelValue: {
type: PropType<string[]>;
default: () => never[];
};
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values: string[]) => import("../picker").PickerOption[]>;
formatter: {
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
};
} & {
minHour: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
maxHour: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
minMinute: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
maxMinute: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
minSecond: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
maxSecond: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
minTime: {
type: StringConstructor;
validator: (val: string) => boolean;
};
maxTime: {
type: StringConstructor;
validator: (val: string) => boolean;
};
columnsType: {
type: PropType<TimePickerColumnType[]>;
default: () => string[];
};
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "confirm")[], "update:modelValue" | "cancel" | "change" | "confirm", import("vue").PublicProps, Readonly<ExtractPropTypes<{
loading: BooleanConstructor;
readonly: BooleanConstructor;
allowHtml: BooleanConstructor;
optionHeight: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
showToolbar: {
type: BooleanConstructor;
default: true;
};
swipeDuration: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
visibleOptionNum: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
} & {
title: StringConstructor;
cancelButtonText: StringConstructor;
confirmButtonText: StringConstructor;
} & {
modelValue: {
type: PropType<string[]>;
default: () => never[];
};
filter: PropType<(columnType: string, options: import("../picker").PickerOption[], values: string[]) => import("../picker").PickerOption[]>;
formatter: {
type: PropType<(type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption>;
default: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
};
} & {
minHour: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
maxHour: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
minMinute: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
maxMinute: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
minSecond: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
maxSecond: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
minTime: {
type: StringConstructor;
validator: (val: string) => boolean;
};
maxTime: {
type: StringConstructor;
validator: (val: string) => boolean;
};
columnsType: {
type: PropType<TimePickerColumnType[]>;
default: () => string[];
};
}>> & Readonly<{
onChange?: ((...args: any[]) => any) | undefined;
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
onCancel?: ((...args: any[]) => any) | undefined;
onConfirm?: ((...args: any[]) => any) | undefined;
}>, {
formatter: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
modelValue: string[];
readonly: boolean;
loading: boolean;
allowHtml: boolean;
optionHeight: string | number;
showToolbar: boolean;
swipeDuration: string | number;
visibleOptionNum: string | number;
columnsType: TimePickerColumnType[];
minHour: string | number;
maxHour: string | number;
minMinute: string | number;
maxMinute: string | number;
minSecond: string | number;
maxSecond: string | number;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;

157
node_modules/vant/lib/time-picker/TimePicker.js generated vendored Normal file
View File

@@ -0,0 +1,157 @@
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,
timePickerProps: () => timePickerProps
});
module.exports = __toCommonJS(stdin_exports);
var import_vue = require("vue");
var import_utils = require("../date-picker/utils");
var import_utils2 = require("../utils");
var import_use_expose = require("../composables/use-expose");
var import_picker = require("../picker");
const [name] = (0, import_utils2.createNamespace)("time-picker");
const validateTime = (val) => /^([01]\d|2[0-3]):([0-5]\d):([0-5]\d)$/.test(val);
const fullColumns = ["hour", "minute", "second"];
const timePickerProps = (0, import_utils2.extend)({}, import_utils.sharedProps, {
minHour: (0, import_utils2.makeNumericProp)(0),
maxHour: (0, import_utils2.makeNumericProp)(23),
minMinute: (0, import_utils2.makeNumericProp)(0),
maxMinute: (0, import_utils2.makeNumericProp)(59),
minSecond: (0, import_utils2.makeNumericProp)(0),
maxSecond: (0, import_utils2.makeNumericProp)(59),
minTime: {
type: String,
validator: validateTime
},
maxTime: {
type: String,
validator: validateTime
},
columnsType: {
type: Array,
default: () => ["hour", "minute"]
}
});
var stdin_default = (0, import_vue.defineComponent)({
name,
props: timePickerProps,
emits: ["confirm", "cancel", "change", "update:modelValue"],
setup(props, {
emit,
slots
}) {
const currentValues = (0, import_vue.ref)(props.modelValue);
const pickerRef = (0, import_vue.ref)();
const getValidTime = (time) => {
const timeLimitArr = time.split(":");
return fullColumns.map((col, i) => props.columnsType.includes(col) ? timeLimitArr[i] : "00");
};
const confirm = () => {
var _a;
return (_a = pickerRef.value) == null ? void 0 : _a.confirm();
};
const getSelectedTime = () => currentValues.value;
const columns = (0, import_vue.computed)(() => {
let {
minHour,
maxHour,
minMinute,
maxMinute,
minSecond,
maxSecond
} = props;
if (props.minTime || props.maxTime) {
const fullTime = {
hour: 0,
minute: 0,
second: 0
};
props.columnsType.forEach((col, i) => {
var _a;
fullTime[col] = (_a = currentValues.value[i]) != null ? _a : 0;
});
const {
hour,
minute
} = fullTime;
if (props.minTime) {
const [minH, minM, minS] = getValidTime(props.minTime);
minHour = minH;
minMinute = +hour <= +minHour ? minM : "00";
minSecond = +hour <= +minHour && +minute <= +minMinute ? minS : "00";
}
if (props.maxTime) {
const [maxH, maxM, maxS] = getValidTime(props.maxTime);
maxHour = maxH;
maxMinute = +hour >= +maxHour ? maxM : "59";
maxSecond = +hour >= +maxHour && +minute >= +maxMinute ? maxS : "59";
}
}
return props.columnsType.map((type) => {
const {
filter,
formatter
} = props;
switch (type) {
case "hour":
return (0, import_utils.genOptions)(+minHour, +maxHour, type, formatter, filter, currentValues.value);
case "minute":
return (0, import_utils.genOptions)(+minMinute, +maxMinute, type, formatter, filter, currentValues.value);
case "second":
return (0, import_utils.genOptions)(+minSecond, +maxSecond, type, formatter, filter, currentValues.value);
default:
if (process.env.NODE_ENV !== "production") {
throw new Error(`[Vant] DatePicker: unsupported columns type: ${type}`);
}
return [];
}
});
});
(0, import_vue.watch)(currentValues, (newValues) => {
if (!(0, import_utils2.isSameValue)(newValues, props.modelValue)) {
emit("update:modelValue", newValues);
}
});
(0, import_vue.watch)(() => props.modelValue, (newValues) => {
newValues = (0, import_utils.formatValueRange)(newValues, columns.value);
if (!(0, import_utils2.isSameValue)(newValues, currentValues.value)) {
currentValues.value = newValues;
}
}, {
immediate: true
});
const onChange = (...args) => emit("change", ...args);
const onCancel = (...args) => emit("cancel", ...args);
const onConfirm = (...args) => emit("confirm", ...args);
(0, import_use_expose.useExpose)({
confirm,
getSelectedTime
});
return () => (0, import_vue.createVNode)(import_picker.Picker, (0, import_vue.mergeProps)({
"ref": pickerRef,
"modelValue": currentValues.value,
"onUpdate:modelValue": ($event) => currentValues.value = $event,
"columns": columns.value,
"onChange": onChange,
"onCancel": onCancel,
"onConfirm": onConfirm
}, (0, import_utils2.pick)(props, import_utils.pickerInheritKeys)), slots);
}
});

175
node_modules/vant/lib/time-picker/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,175 @@
import { TimePickerProps } from './TimePicker';
export declare const TimePicker: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
loading: BooleanConstructor;
readonly: BooleanConstructor;
allowHtml: BooleanConstructor;
optionHeight: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
showToolbar: {
type: BooleanConstructor;
default: true;
};
swipeDuration: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
visibleOptionNum: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
} & {
title: StringConstructor;
cancelButtonText: StringConstructor;
confirmButtonText: StringConstructor;
} & {
modelValue: {
type: import("vue").PropType<string[]>;
default: () => never[];
};
filter: import("vue").PropType<(columnType: string, options: import("..").PickerOption[], values: string[]) => import("..").PickerOption[]>;
formatter: {
type: import("vue").PropType<(type: string, option: import("..").PickerOption) => import("..").PickerOption>;
default: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
};
} & {
minHour: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
maxHour: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
minMinute: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
maxMinute: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
minSecond: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
maxSecond: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
minTime: {
type: StringConstructor;
validator: (val: string) => boolean;
};
maxTime: {
type: StringConstructor;
validator: (val: string) => boolean;
};
columnsType: {
type: import("vue").PropType<import("./TimePicker").TimePickerColumnType[]>;
default: () => string[];
};
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "confirm")[], "update:modelValue" | "cancel" | "change" | "confirm", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
loading: BooleanConstructor;
readonly: BooleanConstructor;
allowHtml: BooleanConstructor;
optionHeight: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
showToolbar: {
type: BooleanConstructor;
default: true;
};
swipeDuration: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
visibleOptionNum: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
} & {
title: StringConstructor;
cancelButtonText: StringConstructor;
confirmButtonText: StringConstructor;
} & {
modelValue: {
type: import("vue").PropType<string[]>;
default: () => never[];
};
filter: import("vue").PropType<(columnType: string, options: import("..").PickerOption[], values: string[]) => import("..").PickerOption[]>;
formatter: {
type: import("vue").PropType<(type: string, option: import("..").PickerOption) => import("..").PickerOption>;
default: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
};
} & {
minHour: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
maxHour: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
minMinute: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
maxMinute: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
minSecond: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
maxSecond: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
minTime: {
type: StringConstructor;
validator: (val: string) => boolean;
};
maxTime: {
type: StringConstructor;
validator: (val: string) => boolean;
};
columnsType: {
type: import("vue").PropType<import("./TimePicker").TimePickerColumnType[]>;
default: () => string[];
};
}>> & Readonly<{
onChange?: ((...args: any[]) => any) | undefined;
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
onCancel?: ((...args: any[]) => any) | undefined;
onConfirm?: ((...args: any[]) => any) | undefined;
}>, {
formatter: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
modelValue: string[];
readonly: boolean;
loading: boolean;
allowHtml: boolean;
optionHeight: string | number;
showToolbar: boolean;
swipeDuration: string | number;
visibleOptionNum: string | number;
columnsType: import("./TimePicker").TimePickerColumnType[];
minHour: string | number;
maxHour: string | number;
minMinute: string | number;
maxMinute: string | number;
minSecond: string | number;
maxSecond: string | number;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
export default TimePicker;
export { timePickerProps } from './TimePicker';
export type { TimePickerProps };
export type { TimePickerColumnType, TimePickerInstance } from './TimePicker';
declare module 'vue' {
interface GlobalComponents {
VanTimePicker: typeof TimePicker;
}
}

39
node_modules/vant/lib/time-picker/index.js generated vendored Normal file
View File

@@ -0,0 +1,39 @@
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, {
TimePicker: () => TimePicker,
default: () => stdin_default,
timePickerProps: () => import_TimePicker2.timePickerProps
});
module.exports = __toCommonJS(stdin_exports);
var import_utils = require("../utils");
var import_TimePicker = __toESM(require("./TimePicker"));
var import_TimePicker2 = require("./TimePicker");
const TimePicker = (0, import_utils.withInstall)(import_TimePicker.default);
var stdin_default = TimePicker;

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

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

10
node_modules/vant/lib/time-picker/style/index.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
require("../../style/base.css");
require("../../badge/index.css");
require("../../loading/index.css");
require("../../sticky/index.css");
require("../../swipe/index.css");
require("../../swipe-item/index.css");
require("../../tabs/index.css");
require("../../tab/index.css");
require("../../picker/index.css");
require("../../picker-group/index.css");