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

45
node_modules/vant/es/grid-item/GridItem.d.ts generated vendored Normal file
View File

@@ -0,0 +1,45 @@
import { type PropType, type ExtractPropTypes } from 'vue';
import { type BadgeProps } from '../badge';
export declare const gridItemProps: {
to: PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
text: StringConstructor;
icon: StringConstructor;
badge: (NumberConstructor | StringConstructor)[];
iconColor: StringConstructor;
iconPrefix: StringConstructor;
badgeProps: PropType<Partial<BadgeProps>>;
};
export type GridItemProps = ExtractPropTypes<typeof gridItemProps>;
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
to: PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
text: StringConstructor;
icon: StringConstructor;
badge: (NumberConstructor | StringConstructor)[];
iconColor: StringConstructor;
iconPrefix: StringConstructor;
badgeProps: PropType<Partial<BadgeProps>>;
}>, (() => import("vue/jsx-runtime").JSX.Element) | 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;
text: StringConstructor;
icon: StringConstructor;
badge: (NumberConstructor | StringConstructor)[];
iconColor: StringConstructor;
iconPrefix: StringConstructor;
badgeProps: PropType<Partial<BadgeProps>>;
}>> & Readonly<{}>, {
replace: boolean;
dot: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;

145
node_modules/vant/es/grid-item/GridItem.mjs generated vendored Normal file
View File

@@ -0,0 +1,145 @@
import { computed, defineComponent, mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
import { BORDER, extend, addUnit, numericProp, createNamespace } from "../utils/index.mjs";
import { GRID_KEY } from "../grid/Grid.mjs";
import { useParent } from "@vant/use";
import { useRoute, routeProps } from "../composables/use-route.mjs";
import { Icon } from "../icon/index.mjs";
import { Badge } from "../badge/index.mjs";
const [name, bem] = createNamespace("grid-item");
const gridItemProps = extend({}, routeProps, {
dot: Boolean,
text: String,
icon: String,
badge: numericProp,
iconColor: String,
iconPrefix: String,
badgeProps: Object
});
var stdin_default = defineComponent({
name,
props: gridItemProps,
setup(props, {
slots
}) {
const {
parent,
index
} = useParent(GRID_KEY);
const route = useRoute();
if (!parent) {
if (process.env.NODE_ENV !== "production") {
console.error("[Vant] <GridItem> must be a child component of <Grid>.");
}
return;
}
const rootStyle = computed(() => {
const {
square,
gutter,
columnNum
} = parent.props;
const percent = `${100 / +columnNum}%`;
const style = {
flexBasis: percent
};
if (square) {
style.paddingTop = percent;
} else if (gutter) {
const gutterValue = addUnit(gutter);
style.paddingRight = gutterValue;
if (index.value >= +columnNum) {
style.marginTop = gutterValue;
}
}
return style;
});
const contentStyle = computed(() => {
const {
square,
gutter
} = parent.props;
if (square && gutter) {
const gutterValue = addUnit(gutter);
return {
right: gutterValue,
bottom: gutterValue,
height: "auto"
};
}
});
const renderIcon = () => {
if (slots.icon) {
return _createVNode(Badge, _mergeProps({
"dot": props.dot,
"content": props.badge
}, props.badgeProps), {
default: slots.icon
});
}
if (props.icon) {
return _createVNode(Icon, {
"dot": props.dot,
"name": props.icon,
"size": parent.props.iconSize,
"badge": props.badge,
"class": bem("icon"),
"color": props.iconColor,
"badgeProps": props.badgeProps,
"classPrefix": props.iconPrefix
}, null);
}
};
const renderText = () => {
if (slots.text) {
return slots.text();
}
if (props.text) {
return _createVNode("span", {
"class": bem("text")
}, [props.text]);
}
};
const renderContent = () => {
if (slots.default) {
return slots.default();
}
return [renderIcon(), renderText()];
};
return () => {
const {
center,
border,
square,
gutter,
reverse,
direction,
clickable
} = parent.props;
const classes = [bem("content", [direction, {
center,
square,
reverse,
clickable,
surround: border && gutter
}]), {
[BORDER]: border
}];
return _createVNode("div", {
"class": [bem({
square
})],
"style": rootStyle.value
}, [_createVNode("div", {
"role": clickable ? "button" : void 0,
"class": classes,
"style": contentStyle.value,
"tabindex": clickable ? 0 : void 0,
"onClick": route
}, [renderContent()])]);
};
}
});
export {
stdin_default as default,
gridItemProps
};

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

@@ -0,0 +1 @@
:root,:host{--van-grid-item-content-padding: var(--van-padding-md) var(--van-padding-xs);--van-grid-item-content-background: var(--van-background-2);--van-grid-item-content-active-color: var(--van-active-color);--van-grid-item-icon-size: 28px;--van-grid-item-text-color: var(--van-text-color);--van-grid-item-text-font-size: var(--van-font-size-sm)}.van-grid-item{position:relative;box-sizing:border-box}.van-grid-item--square{height:0}.van-grid-item__icon{font-size:var(--van-grid-item-icon-size)}.van-grid-item__text{color:var(--van-grid-item-text-color);font-size:var(--van-grid-item-text-font-size);line-height:1.5;word-break:break-all}.van-grid-item__icon+.van-grid-item__text{margin-top:var(--van-padding-xs)}.van-grid-item__content{display:flex;flex-direction:column;box-sizing:border-box;height:100%;padding:var(--van-grid-item-content-padding);background:var(--van-grid-item-content-background)}.van-grid-item__content:after{z-index:1;border-width:0 var(--van-border-width) var(--van-border-width) 0}.van-grid-item__content--square{position:absolute;top:0;right:0;left:0}.van-grid-item__content--center{align-items:center;justify-content:center}.van-grid-item__content--horizontal{flex-direction:row}.van-grid-item__content--horizontal .van-grid-item__text{margin:0 0 0 var(--van-padding-xs)}.van-grid-item__content--reverse{flex-direction:column-reverse}.van-grid-item__content--reverse .van-grid-item__text{margin:0 0 var(--van-padding-xs)}.van-grid-item__content--horizontal.van-grid-item__content--reverse{flex-direction:row-reverse}.van-grid-item__content--horizontal.van-grid-item__content--reverse .van-grid-item__text{margin:0 var(--van-padding-xs) 0 0}.van-grid-item__content--surround:after{border-width:var(--van-border-width)}.van-grid-item__content--clickable{cursor:pointer}.van-grid-item__content--clickable:active{background-color:var(--van-grid-item-content-active-color)}

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

@@ -0,0 +1,37 @@
export declare const GridItem: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
text: StringConstructor;
icon: StringConstructor;
badge: (NumberConstructor | StringConstructor)[];
iconColor: StringConstructor;
iconPrefix: StringConstructor;
badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
}>, (() => import("vue/jsx-runtime").JSX.Element) | 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;
text: StringConstructor;
icon: StringConstructor;
badge: (NumberConstructor | StringConstructor)[];
iconColor: StringConstructor;
iconPrefix: StringConstructor;
badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
}>> & Readonly<{}>, {
replace: boolean;
dot: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
export default GridItem;
export { gridItemProps } from './GridItem';
export type { GridItemProps } from './GridItem';
export type { GridItemThemeVars } from './types';
declare module 'vue' {
interface GlobalComponents {
VanGridItem: typeof GridItem;
}
}

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

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

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

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

5
node_modules/vant/es/grid-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 "../../grid/index.css";
import "../index.css";

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

@@ -0,0 +1,8 @@
export type GridItemThemeVars = {
gridItemContentPadding?: string;
gridItemContentBackground?: string;
gridItemContentActiveColor?: string;
gridItemIconSize?: string;
gridItemTextColor?: string;
gridItemTextFontSize?: string;
};

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