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

106
node_modules/vant/es/tree-select/TreeSelect.d.ts generated vendored Normal file
View File

@@ -0,0 +1,106 @@
import { type PropType, type ExtractPropTypes } from 'vue';
import { type Numeric } from '../utils';
export type TreeSelectChild = {
id: Numeric;
text: string;
disabled?: boolean;
};
export type TreeSelectItem = {
dot?: boolean;
text: string;
badge?: Numeric;
children?: TreeSelectChild[];
disabled?: boolean;
className?: unknown;
};
export declare const treeSelectProps: {
max: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
items: {
type: PropType<TreeSelectItem[]>;
default: () => never[];
};
height: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
selectedIcon: {
type: PropType<string>;
default: string;
};
mainActiveIndex: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
activeId: {
type: PropType<Numeric | Numeric[]>;
default: number;
};
};
export type TreeSelectProps = ExtractPropTypes<typeof treeSelectProps>;
declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
max: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
items: {
type: PropType<TreeSelectItem[]>;
default: () => never[];
};
height: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
selectedIcon: {
type: PropType<string>;
default: string;
};
mainActiveIndex: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
activeId: {
type: PropType<Numeric | Numeric[]>;
default: number;
};
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickItem" | "clickNav" | "update:activeId" | "update:mainActiveIndex")[], "clickItem" | "clickNav" | "update:activeId" | "update:mainActiveIndex", import("vue").PublicProps, Readonly<ExtractPropTypes<{
max: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
items: {
type: PropType<TreeSelectItem[]>;
default: () => never[];
};
height: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
selectedIcon: {
type: PropType<string>;
default: string;
};
mainActiveIndex: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
activeId: {
type: PropType<Numeric | Numeric[]>;
default: number;
};
}>> & Readonly<{
onClickItem?: ((...args: any[]) => any) | undefined;
onClickNav?: ((...args: any[]) => any) | undefined;
"onUpdate:activeId"?: ((...args: any[]) => any) | undefined;
"onUpdate:mainActiveIndex"?: ((...args: any[]) => any) | undefined;
}>, {
height: string | number;
max: string | number;
items: TreeSelectItem[];
selectedIcon: string;
mainActiveIndex: string | number;
activeId: Numeric | Numeric[];
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
export default _default;

103
node_modules/vant/es/tree-select/TreeSelect.mjs generated vendored Normal file
View File

@@ -0,0 +1,103 @@
import { defineComponent, createVNode as _createVNode } from "vue";
import { addUnit, makeArrayProp, makeStringProp, makeNumericProp, createNamespace } from "../utils/index.mjs";
import { Icon } from "../icon/index.mjs";
import { Sidebar } from "../sidebar/index.mjs";
import { SidebarItem } from "../sidebar-item/index.mjs";
const [name, bem] = createNamespace("tree-select");
const treeSelectProps = {
max: makeNumericProp(Infinity),
items: makeArrayProp(),
height: makeNumericProp(300),
selectedIcon: makeStringProp("success"),
mainActiveIndex: makeNumericProp(0),
activeId: {
type: [Number, String, Array],
default: 0
}
};
var stdin_default = defineComponent({
name,
props: treeSelectProps,
emits: ["clickNav", "clickItem", "update:activeId", "update:mainActiveIndex"],
setup(props, {
emit,
slots
}) {
const isActiveItem = (id) => Array.isArray(props.activeId) ? props.activeId.includes(id) : props.activeId === id;
const renderSubItem = (item) => {
const onClick = () => {
if (item.disabled) {
return;
}
let activeId;
if (Array.isArray(props.activeId)) {
activeId = props.activeId.slice();
const index = activeId.indexOf(item.id);
if (index !== -1) {
activeId.splice(index, 1);
} else if (activeId.length < +props.max) {
activeId.push(item.id);
}
} else {
activeId = item.id;
}
emit("update:activeId", activeId);
emit("clickItem", item);
};
return _createVNode("div", {
"key": item.id,
"class": ["van-ellipsis", bem("item", {
active: isActiveItem(item.id),
disabled: item.disabled
})],
"onClick": onClick
}, [item.text, isActiveItem(item.id) && _createVNode(Icon, {
"name": props.selectedIcon,
"class": bem("selected")
}, null)]);
};
const onSidebarChange = (index) => {
emit("update:mainActiveIndex", index);
};
const onClickSidebarItem = (index) => emit("clickNav", index);
const renderSidebar = () => {
const Items = props.items.map((item) => _createVNode(SidebarItem, {
"dot": item.dot,
"badge": item.badge,
"class": [bem("nav-item"), item.className],
"disabled": item.disabled,
"onClick": onClickSidebarItem
}, {
title: () => slots["nav-text"] ? slots["nav-text"](item) : item.text
}));
return _createVNode(Sidebar, {
"class": bem("nav"),
"modelValue": props.mainActiveIndex,
"onChange": onSidebarChange
}, {
default: () => [Items]
});
};
const renderContent = () => {
if (slots.content) {
return slots.content();
}
const selected = props.items[+props.mainActiveIndex] || {};
if (selected.children) {
return selected.children.map(renderSubItem);
}
};
return () => _createVNode("div", {
"class": bem(),
"style": {
height: addUnit(props.height)
}
}, [renderSidebar(), _createVNode("div", {
"class": bem("content")
}, [renderContent()])]);
}
});
export {
stdin_default as default,
treeSelectProps
};

1
node_modules/vant/es/tree-select/index.css generated vendored Normal file
View File

@@ -0,0 +1 @@
:root,:host{--van-tree-select-font-size: var(--van-font-size-md);--van-tree-select-nav-background: var(--van-background);--van-tree-select-content-background: var(--van-background-2);--van-tree-select-nav-item-padding: 14px var(--van-padding-sm);--van-tree-select-item-height: 48px;--van-tree-select-item-active-color: var(--van-primary-color);--van-tree-select-item-disabled-color: var(--van-gray-5);--van-tree-select-item-selected-size: 16px}.van-tree-select{position:relative;display:flex;font-size:var(--van-tree-select-font-size)}.van-tree-select__nav{flex:1;overflow-y:auto;background:var(--van-tree-select-nav-background);-webkit-overflow-scrolling:touch}.van-tree-select__nav-item{padding:var(--van-tree-select-nav-item-padding)}.van-tree-select__content{flex:2;overflow-y:auto;background:var(--van-tree-select-content-background);-webkit-overflow-scrolling:touch}.van-tree-select__item{position:relative;padding:0 32px 0 var(--van-padding-md);font-weight:var(--van-font-bold);line-height:var(--van-tree-select-item-height);-webkit-user-select:none;user-select:none;cursor:pointer}.van-tree-select__item--active{color:var(--van-tree-select-item-active-color)}.van-tree-select__item:active{background-color:var(--van-active-color)}.van-tree-select__item--disabled{color:var(--van-tree-select-item-disabled-color);cursor:not-allowed}.van-tree-select__item--disabled:active{background-color:transparent}.van-tree-select__selected{position:absolute;top:50%;right:var(--van-padding-md);margin-top:calc(var(--van-padding-xs) * -1);font-size:var(--van-tree-select-item-selected-size)}

72
node_modules/vant/es/tree-select/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,72 @@
export declare const TreeSelect: import("../utils").WithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
max: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
items: {
type: import("vue").PropType<import("./TreeSelect").TreeSelectItem[]>;
default: () => never[];
};
height: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
selectedIcon: {
type: import("vue").PropType<string>;
default: string;
};
mainActiveIndex: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
activeId: {
type: import("vue").PropType<import("../utils").Numeric | import("../utils").Numeric[]>;
default: number;
};
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickItem" | "clickNav" | "update:activeId" | "update:mainActiveIndex")[], "clickItem" | "clickNav" | "update:activeId" | "update:mainActiveIndex", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
max: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
items: {
type: import("vue").PropType<import("./TreeSelect").TreeSelectItem[]>;
default: () => never[];
};
height: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
selectedIcon: {
type: import("vue").PropType<string>;
default: string;
};
mainActiveIndex: {
type: (NumberConstructor | StringConstructor)[];
default: number;
};
activeId: {
type: import("vue").PropType<import("../utils").Numeric | import("../utils").Numeric[]>;
default: number;
};
}>> & Readonly<{
onClickItem?: ((...args: any[]) => any) | undefined;
onClickNav?: ((...args: any[]) => any) | undefined;
"onUpdate:activeId"?: ((...args: any[]) => any) | undefined;
"onUpdate:mainActiveIndex"?: ((...args: any[]) => any) | undefined;
}>, {
height: string | number;
max: string | number;
items: import("./TreeSelect").TreeSelectItem[];
selectedIcon: string;
mainActiveIndex: string | number;
activeId: import("../utils").Numeric | import("../utils").Numeric[];
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
export default TreeSelect;
export { treeSelectProps } from './TreeSelect';
export type { TreeSelectItem, TreeSelectChild, TreeSelectProps, } from './TreeSelect';
export type { TreeSelectThemeVars } from './types';
declare module 'vue' {
interface GlobalComponents {
VanTreeSelect: typeof TreeSelect;
}
}

10
node_modules/vant/es/tree-select/index.mjs generated vendored Normal file
View File

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

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

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

6
node_modules/vant/es/tree-select/style/index.mjs generated vendored Normal file
View File

@@ -0,0 +1,6 @@
import "../../style/base.css";
import "../../badge/index.css";
import "../../icon/index.css";
import "../../sidebar/index.css";
import "../../sidebar-item/index.css";
import "../index.css";

10
node_modules/vant/es/tree-select/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
export type TreeSelectThemeVars = {
treeSelectFontSize?: string;
treeSelectNavBackground?: string;
treeSelectContentBackground?: string;
treeSelectNavItemPadding?: string;
treeSelectItemHeight?: string;
treeSelectItemActiveColor?: string;
treeSelectItemDisabledColor?: string;
treeSelectItemSelectedSize?: string;
};

0
node_modules/vant/es/tree-select/types.mjs generated vendored Normal file
View File