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

44
node_modules/vant/es/tabbar-item/TabbarItem.d.ts generated vendored Normal file
View File

@@ -0,0 +1,44 @@
import { type PropType, type ExtractPropTypes } from 'vue';
import { type BadgeProps } from '../badge';
export declare const tabbarItemProps: {
to: PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
icon: StringConstructor;
name: (NumberConstructor | StringConstructor)[];
badge: (NumberConstructor | StringConstructor)[];
badgeProps: PropType<Partial<BadgeProps>>;
iconPrefix: StringConstructor;
};
export type TabbarItemProps = ExtractPropTypes<typeof tabbarItemProps>;
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
to: PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
icon: StringConstructor;
name: (NumberConstructor | StringConstructor)[];
badge: (NumberConstructor | StringConstructor)[];
badgeProps: PropType<Partial<BadgeProps>>;
iconPrefix: StringConstructor;
}>, (() => import("vue/jsx-runtime").JSX.Element) | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<ExtractPropTypes<{
to: PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
icon: StringConstructor;
name: (NumberConstructor | StringConstructor)[];
badge: (NumberConstructor | StringConstructor)[];
badgeProps: PropType<Partial<BadgeProps>>;
iconPrefix: StringConstructor;
}>> & Readonly<{
onClick?: ((...args: any[]) => any) | undefined;
}>, {
replace: boolean;
dot: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;

120
node_modules/vant/es/tabbar-item/TabbarItem.mjs generated vendored Normal file
View File

@@ -0,0 +1,120 @@
import { computed, defineComponent, getCurrentInstance, createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
import { createNamespace, extend, isObject, numericProp } from "../utils/index.mjs";
import { TABBAR_KEY } from "../tabbar/Tabbar.mjs";
import { useParent } from "@vant/use";
import { routeProps, useRoute } from "../composables/use-route.mjs";
import { Icon } from "../icon/index.mjs";
import { Badge } from "../badge/index.mjs";
const [name, bem] = createNamespace("tabbar-item");
const tabbarItemProps = extend({}, routeProps, {
dot: Boolean,
icon: String,
name: numericProp,
badge: numericProp,
badgeProps: Object,
iconPrefix: String
});
var stdin_default = defineComponent({
name,
props: tabbarItemProps,
emits: ["click"],
setup(props, {
emit,
slots
}) {
const route = useRoute();
const vm = getCurrentInstance().proxy;
const {
parent,
index
} = useParent(TABBAR_KEY);
if (!parent) {
if (process.env.NODE_ENV !== "production") {
console.error("[Vant] <TabbarItem> must be a child component of <Tabbar>.");
}
return;
}
const active = computed(() => {
var _a;
const {
route: route2,
modelValue
} = parent.props;
if (route2 && "$route" in vm) {
const {
$route
} = vm;
const {
to
} = props;
const config = isObject(to) ? to : {
path: to
};
return $route.matched.some((val) => {
const pathMatched = "path" in config && config.path === val.path;
const nameMatched = "name" in config && config.name === val.name;
return pathMatched || nameMatched;
});
}
return ((_a = props.name) != null ? _a : index.value) === modelValue;
});
const onClick = (event) => {
var _a;
if (!active.value) {
parent.setActive((_a = props.name) != null ? _a : index.value, route);
}
emit("click", event);
};
const renderIcon = () => {
if (slots.icon) {
return slots.icon({
active: active.value
});
}
if (props.icon) {
return _createVNode(Icon, {
"name": props.icon,
"classPrefix": props.iconPrefix
}, null);
}
};
return () => {
var _a;
const {
dot,
badge
} = props;
const {
activeColor,
inactiveColor
} = parent.props;
const color = active.value ? activeColor : inactiveColor;
return _createVNode("div", {
"role": "tab",
"class": bem({
active: active.value
}),
"style": {
color
},
"tabindex": 0,
"aria-selected": active.value,
"onClick": onClick
}, [_createVNode(Badge, _mergeProps({
"dot": dot,
"class": bem("icon"),
"content": badge
}, props.badgeProps), {
default: renderIcon
}), _createVNode("div", {
"class": bem("text")
}, [(_a = slots.default) == null ? void 0 : _a.call(slots, {
active: active.value
})])]);
};
}
});
export {
stdin_default as default,
tabbarItemProps
};

1
node_modules/vant/es/tabbar-item/index.css generated vendored Normal file
View File

@@ -0,0 +1 @@
:root,:host{--van-tabbar-item-font-size: var(--van-font-size-sm);--van-tabbar-item-text-color: var(--van-text-color);--van-tabbar-item-active-color: var(--van-primary-color);--van-tabbar-item-active-background: var(--van-background-2);--van-tabbar-item-line-height: 1;--van-tabbar-item-icon-size: 22px;--van-tabbar-item-icon-margin-bottom: var(--van-padding-base)}.van-tabbar-item{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;color:var(--van-tabbar-item-text-color);font-size:var(--van-tabbar-item-font-size);line-height:var(--van-tabbar-item-line-height);cursor:pointer}.van-tabbar-item__icon{margin-bottom:var(--van-tabbar-item-icon-margin-bottom);font-size:var(--van-tabbar-item-icon-size)}.van-tabbar-item__icon .van-icon{display:block}.van-tabbar-item__icon .van-badge{margin-top:var(--van-padding-base)}.van-tabbar-item__icon img{display:block;height:20px}.van-tabbar-item--active{color:var(--van-tabbar-item-active-color);background-color:var(--van-tabbar-item-active-background)}

37
node_modules/vant/es/tabbar-item/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,37 @@
export declare const TabbarItem: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
icon: StringConstructor;
name: (NumberConstructor | StringConstructor)[];
badge: (NumberConstructor | StringConstructor)[];
badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
iconPrefix: StringConstructor;
}>, (() => import("vue/jsx-runtime").JSX.Element) | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
icon: StringConstructor;
name: (NumberConstructor | StringConstructor)[];
badge: (NumberConstructor | StringConstructor)[];
badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
iconPrefix: StringConstructor;
}>> & Readonly<{
onClick?: ((...args: any[]) => any) | undefined;
}>, {
replace: boolean;
dot: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
export default TabbarItem;
export { tabbarItemProps } from './TabbarItem';
export type { TabbarItemProps } from './TabbarItem';
export type { TabbarItemThemeVars } from './types';
declare module 'vue' {
interface GlobalComponents {
VanTabbarItem: typeof TabbarItem;
}
}

10
node_modules/vant/es/tabbar-item/index.mjs generated vendored Normal file
View File

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

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

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

5
node_modules/vant/es/tabbar-item/style/index.mjs generated vendored Normal file
View File

@@ -0,0 +1,5 @@
import "../../style/base.css";
import "../../badge/index.css";
import "../../icon/index.css";
import "../../tabbar/index.css";
import "../index.css";

9
node_modules/vant/es/tabbar-item/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,9 @@
export type TabbarItemThemeVars = {
tabbarItemFontSize?: string;
tabbarItemTextColor?: string;
tabbarItemActiveColor?: string;
tabbarItemActiveBackground?: string;
tabbarItemLineHeight?: number | string;
tabbarItemIconSize?: string;
tabbarItemIconMarginBottom?: string;
};

0
node_modules/vant/es/tabbar-item/types.mjs generated vendored Normal file
View File