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/es/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;

138
node_modules/vant/es/time-picker/TimePicker.mjs generated vendored Normal file
View File

@@ -0,0 +1,138 @@
import { computed, defineComponent, ref, watch, mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
import { formatValueRange, genOptions, pickerInheritKeys, sharedProps } from "../date-picker/utils.mjs";
import { pick, extend, isSameValue, makeNumericProp, createNamespace } from "../utils/index.mjs";
import { useExpose } from "../composables/use-expose.mjs";
import { Picker } from "../picker/index.mjs";
const [name] = 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 = extend({}, sharedProps, {
minHour: makeNumericProp(0),
maxHour: makeNumericProp(23),
minMinute: makeNumericProp(0),
maxMinute: makeNumericProp(59),
minSecond: makeNumericProp(0),
maxSecond: makeNumericProp(59),
minTime: {
type: String,
validator: validateTime
},
maxTime: {
type: String,
validator: validateTime
},
columnsType: {
type: Array,
default: () => ["hour", "minute"]
}
});
var stdin_default = defineComponent({
name,
props: timePickerProps,
emits: ["confirm", "cancel", "change", "update:modelValue"],
setup(props, {
emit,
slots
}) {
const currentValues = ref(props.modelValue);
const pickerRef = 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 = 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 genOptions(+minHour, +maxHour, type, formatter, filter, currentValues.value);
case "minute":
return genOptions(+minMinute, +maxMinute, type, formatter, filter, currentValues.value);
case "second":
return 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 [];
}
});
});
watch(currentValues, (newValues) => {
if (!isSameValue(newValues, props.modelValue)) {
emit("update:modelValue", newValues);
}
});
watch(() => props.modelValue, (newValues) => {
newValues = formatValueRange(newValues, columns.value);
if (!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);
useExpose({
confirm,
getSelectedTime
});
return () => _createVNode(Picker, _mergeProps({
"ref": pickerRef,
"modelValue": currentValues.value,
"onUpdate:modelValue": ($event) => currentValues.value = $event,
"columns": columns.value,
"onChange": onChange,
"onCancel": onCancel,
"onConfirm": onConfirm
}, pick(props, pickerInheritKeys)), slots);
}
});
export {
stdin_default as default,
timePickerProps
};

175
node_modules/vant/es/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;
}
}

10
node_modules/vant/es/time-picker/index.mjs generated vendored Normal file
View File

@@ -0,0 +1,10 @@
import { withInstall } from "../utils/index.mjs";
import _TimePicker from "./TimePicker.mjs";
const TimePicker = withInstall(_TimePicker);
var stdin_default = TimePicker;
import { timePickerProps } from "./TimePicker.mjs";
export {
TimePicker,
stdin_default as default,
timePickerProps
};

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

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

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

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