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

58
node_modules/vant/lib/tab/Tab.d.ts generated vendored Normal file
View File

@@ -0,0 +1,58 @@
import { type PropType, type CSSProperties, type ExtractPropTypes } from 'vue';
export declare const tabProps: {
to: PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
name: (NumberConstructor | StringConstructor)[];
badge: (NumberConstructor | StringConstructor)[];
title: StringConstructor;
disabled: BooleanConstructor;
titleClass: PropType<unknown>;
titleStyle: PropType<string | CSSProperties>;
showZeroBadge: {
type: BooleanConstructor;
default: true;
};
};
export type TabProps = ExtractPropTypes<typeof tabProps>;
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
to: PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
name: (NumberConstructor | StringConstructor)[];
badge: (NumberConstructor | StringConstructor)[];
title: StringConstructor;
disabled: BooleanConstructor;
titleClass: PropType<unknown>;
titleStyle: PropType<string | CSSProperties>;
showZeroBadge: {
type: BooleanConstructor;
default: true;
};
}>, (() => import("vue/jsx-runtime").JSX.Element | undefined) | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
to: PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
name: (NumberConstructor | StringConstructor)[];
badge: (NumberConstructor | StringConstructor)[];
title: StringConstructor;
disabled: BooleanConstructor;
titleClass: PropType<unknown>;
titleStyle: PropType<string | CSSProperties>;
showZeroBadge: {
type: BooleanConstructor;
default: true;
};
}>> & Readonly<{}>, {
replace: boolean;
dot: boolean;
disabled: boolean;
showZeroBadge: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;

173
node_modules/vant/lib/tab/Tab.js generated vendored Normal file
View File

@@ -0,0 +1,173 @@
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,
tabProps: () => tabProps
});
module.exports = __toCommonJS(stdin_exports);
var import_vue = require("vue");
var import_shared = require("@vue/shared");
var import_utils = require("../utils");
var import_Tabs = require("../tabs/Tabs");
var import_use = require("@vant/use");
var import_use_id = require("../composables/use-id");
var import_use_expose = require("../composables/use-expose");
var import_use_route = require("../composables/use-route");
var import_use_tab_status = require("../composables/use-tab-status");
var import_TabTitle = require("./TabTitle");
var import_swipe_item = require("../swipe-item");
const [name, bem] = (0, import_utils.createNamespace)("tab");
const tabProps = (0, import_utils.extend)({}, import_use_route.routeProps, {
dot: Boolean,
name: import_utils.numericProp,
badge: import_utils.numericProp,
title: String,
disabled: Boolean,
titleClass: import_utils.unknownProp,
titleStyle: [String, Object],
showZeroBadge: import_utils.truthProp
});
var stdin_default = (0, import_vue.defineComponent)({
name,
props: tabProps,
setup(props, {
slots
}) {
const id = (0, import_use_id.useId)();
const inited = (0, import_vue.ref)(false);
const instance = (0, import_vue.getCurrentInstance)();
const {
parent,
index
} = (0, import_use.useParent)(import_Tabs.TABS_KEY);
if (!parent) {
if (process.env.NODE_ENV !== "production") {
console.error("[Vant] <Tab> must be a child component of <Tabs>.");
}
return;
}
const getName = () => {
var _a;
return (_a = props.name) != null ? _a : index.value;
};
const init = () => {
inited.value = true;
if (parent.props.lazyRender) {
(0, import_vue.nextTick)(() => {
parent.onRendered(getName(), props.title);
});
}
};
const active = (0, import_vue.computed)(() => {
const isActive = getName() === parent.currentName.value;
if (isActive && !inited.value) {
init();
}
return isActive;
});
const parsedClass = (0, import_vue.ref)("");
const parsedStyle = (0, import_vue.ref)("");
(0, import_vue.watchEffect)(() => {
const {
titleClass,
titleStyle
} = props;
parsedClass.value = titleClass ? (0, import_shared.normalizeClass)(titleClass) : "";
parsedStyle.value = titleStyle && typeof titleStyle !== "string" ? (0, import_shared.stringifyStyle)((0, import_shared.normalizeStyle)(titleStyle)) : titleStyle;
});
const renderTitle = (onClickTab) => (0, import_vue.createVNode)(import_TabTitle.TabTitle, (0, import_vue.mergeProps)({
"key": id,
"id": `${parent.id}-${index.value}`,
"ref": parent.setTitleRefs(index.value),
"style": parsedStyle.value,
"class": parsedClass.value,
"isActive": active.value,
"controls": id,
"scrollable": parent.scrollable.value,
"activeColor": parent.props.titleActiveColor,
"inactiveColor": parent.props.titleInactiveColor,
"onClick": (event) => onClickTab(instance.proxy, index.value, event)
}, (0, import_utils.pick)(parent.props, ["type", "color", "shrink"]), (0, import_utils.pick)(props, ["dot", "badge", "title", "disabled", "showZeroBadge"])), {
title: slots.title
});
const hasInactiveClass = (0, import_vue.ref)(!active.value);
(0, import_vue.watch)(active, (val) => {
if (val) {
hasInactiveClass.value = false;
} else {
(0, import_use.doubleRaf)(() => {
hasInactiveClass.value = true;
});
}
});
(0, import_vue.watch)(() => props.title, () => {
parent.setLine();
parent.scrollIntoView();
});
(0, import_use_tab_status.useProvideTabStatus)(active);
(0, import_use_expose.useExpose)({
id,
renderTitle
});
return () => {
var _a;
const label = `${parent.id}-${index.value}`;
const {
animated,
swipeable,
scrollspy,
lazyRender
} = parent.props;
if (!slots.default && !animated) {
return;
}
const show = scrollspy || active.value;
if (animated || swipeable) {
return (0, import_vue.createVNode)(import_swipe_item.SwipeItem, {
"id": id,
"role": "tabpanel",
"class": bem("panel-wrapper", {
inactive: hasInactiveClass.value
}),
"tabindex": active.value ? 0 : -1,
"aria-hidden": !active.value,
"aria-labelledby": label,
"data-allow-mismatch": "attribute"
}, {
default: () => {
var _a2;
return [(0, import_vue.createVNode)("div", {
"class": bem("panel")
}, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)])];
}
});
}
const shouldRender = inited.value || scrollspy || !lazyRender;
const Content = shouldRender ? (_a = slots.default) == null ? void 0 : _a.call(slots) : null;
return (0, import_vue.withDirectives)((0, import_vue.createVNode)("div", {
"id": id,
"role": "tabpanel",
"class": bem("panel"),
"tabindex": show ? 0 : -1,
"aria-labelledby": label,
"data-allow-mismatch": "attribute"
}, [Content]), [[import_vue.vShow, show]]);
};
}
});

44
node_modules/vant/lib/tab/TabTitle.d.ts generated vendored Normal file
View File

@@ -0,0 +1,44 @@
export declare const TabTitle: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
id: StringConstructor;
dot: BooleanConstructor;
type: StringConstructor;
color: StringConstructor;
title: StringConstructor;
badge: (NumberConstructor | StringConstructor)[];
shrink: BooleanConstructor;
isActive: BooleanConstructor;
disabled: BooleanConstructor;
controls: StringConstructor;
scrollable: BooleanConstructor;
activeColor: StringConstructor;
inactiveColor: StringConstructor;
showZeroBadge: {
type: BooleanConstructor;
default: true;
};
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
id: StringConstructor;
dot: BooleanConstructor;
type: StringConstructor;
color: StringConstructor;
title: StringConstructor;
badge: (NumberConstructor | StringConstructor)[];
shrink: BooleanConstructor;
isActive: BooleanConstructor;
disabled: BooleanConstructor;
controls: StringConstructor;
scrollable: BooleanConstructor;
activeColor: StringConstructor;
inactiveColor: StringConstructor;
showZeroBadge: {
type: BooleanConstructor;
default: true;
};
}>> & Readonly<{}>, {
dot: boolean;
disabled: boolean;
shrink: boolean;
scrollable: boolean;
isActive: boolean;
showZeroBadge: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;

109
node_modules/vant/lib/tab/TabTitle.js generated vendored Normal file
View File

@@ -0,0 +1,109 @@
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, {
TabTitle: () => TabTitle
});
module.exports = __toCommonJS(stdin_exports);
var import_vue = require("vue");
var import_utils = require("../utils");
var import_badge = require("../badge");
const [name, bem] = (0, import_utils.createNamespace)("tab");
const TabTitle = (0, import_vue.defineComponent)({
name,
props: {
id: String,
dot: Boolean,
type: String,
color: String,
title: String,
badge: import_utils.numericProp,
shrink: Boolean,
isActive: Boolean,
disabled: Boolean,
controls: String,
scrollable: Boolean,
activeColor: String,
inactiveColor: String,
showZeroBadge: import_utils.truthProp
},
setup(props, {
slots
}) {
const style = (0, import_vue.computed)(() => {
const style2 = {};
const {
type,
color,
disabled,
isActive,
activeColor,
inactiveColor
} = props;
const isCard = type === "card";
if (color && isCard) {
style2.borderColor = color;
if (!disabled) {
if (isActive) {
style2.backgroundColor = color;
} else {
style2.color = color;
}
}
}
const titleColor = isActive ? activeColor : inactiveColor;
if (titleColor) {
style2.color = titleColor;
}
return style2;
});
const renderText = () => {
const Text = (0, import_vue.createVNode)("span", {
"class": bem("text", {
ellipsis: !props.scrollable
})
}, [slots.title ? slots.title() : props.title]);
if (props.dot || (0, import_utils.isDef)(props.badge) && props.badge !== "") {
return (0, import_vue.createVNode)(import_badge.Badge, {
"dot": props.dot,
"content": props.badge,
"showZero": props.showZeroBadge
}, {
default: () => [Text]
});
}
return Text;
};
return () => (0, import_vue.createVNode)("div", {
"id": props.id,
"role": "tab",
"class": [bem([props.type, {
grow: props.scrollable && !props.shrink,
shrink: props.shrink,
active: props.isActive,
disabled: props.disabled
}])],
"style": style.value,
"tabindex": props.disabled ? void 0 : props.isActive ? 0 : -1,
"aria-selected": props.isActive,
"aria-disabled": props.disabled || void 0,
"aria-controls": props.controls,
"data-allow-mismatch": "attribute"
}, [renderText()]);
}
});

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

@@ -0,0 +1 @@
.van-tab__panel,.van-tab__panel-wrapper{flex-shrink:0;box-sizing:border-box;width:100%}.van-tab__panel-wrapper--inactive{height:0;overflow:visible}

47
node_modules/vant/lib/tab/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,47 @@
export declare const Tab: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
name: (NumberConstructor | StringConstructor)[];
badge: (NumberConstructor | StringConstructor)[];
title: StringConstructor;
disabled: BooleanConstructor;
titleClass: import("vue").PropType<unknown>;
titleStyle: import("vue").PropType<string | import("vue").CSSProperties>;
showZeroBadge: {
type: BooleanConstructor;
default: true;
};
}>, (() => import("vue/jsx-runtime").JSX.Element | undefined) | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
name: (NumberConstructor | StringConstructor)[];
badge: (NumberConstructor | StringConstructor)[];
title: StringConstructor;
disabled: BooleanConstructor;
titleClass: import("vue").PropType<unknown>;
titleStyle: import("vue").PropType<string | import("vue").CSSProperties>;
showZeroBadge: {
type: BooleanConstructor;
default: true;
};
}>> & Readonly<{}>, {
replace: boolean;
dot: boolean;
disabled: boolean;
showZeroBadge: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
export default Tab;
export { tabProps } from './Tab';
export { useTabStatus, useAllTabStatus } from '../composables/use-tab-status';
export type { TabProps } from './Tab';
declare module 'vue' {
interface GlobalComponents {
VanTab: typeof Tab;
}
}

42
node_modules/vant/lib/tab/index.js generated vendored Normal file
View File

@@ -0,0 +1,42 @@
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, {
Tab: () => Tab,
default: () => stdin_default,
tabProps: () => import_Tab2.tabProps,
useAllTabStatus: () => import_use_tab_status.useAllTabStatus,
useTabStatus: () => import_use_tab_status.useTabStatus
});
module.exports = __toCommonJS(stdin_exports);
var import_utils = require("../utils");
var import_Tab = __toESM(require("./Tab"));
var import_Tab2 = require("./Tab");
var import_use_tab_status = require("../composables/use-tab-status");
const Tab = (0, import_utils.withInstall)(import_Tab.default);
var stdin_default = Tab;

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

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

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

@@ -0,0 +1,7 @@
require("../../style/base.css");
require("../../badge/index.css");
require("../../sticky/index.css");
require("../../swipe/index.css");
require("../../swipe-item/index.css");
require("../../tabs/index.css");
require("../index.css");