Initial commit: GamePortrait 竖屏版 - 深色豪华主题

This commit is contained in:
li
2026-01-16 17:47:53 +08:00
commit 40976e4b45
26611 changed files with 2843638 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
import { type PropType, type ExtractPropTypes } from 'vue';
import { type BadgeProps } from '../badge';
export declare const sidebarItemProps: {
to: PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
title: StringConstructor;
badge: (NumberConstructor | StringConstructor)[];
disabled: BooleanConstructor;
badgeProps: PropType<Partial<BadgeProps>>;
};
export type SidebarItemProps = ExtractPropTypes<typeof sidebarItemProps>;
declare const _default: import("vue").DefineComponent<{
to: PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
title: StringConstructor;
badge: (NumberConstructor | StringConstructor)[];
disabled: BooleanConstructor;
badgeProps: PropType<Partial<BadgeProps>>;
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
to: PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
title: StringConstructor;
badge: (NumberConstructor | StringConstructor)[];
disabled: BooleanConstructor;
badgeProps: PropType<Partial<BadgeProps>>;
}>> & {
onClick?: ((...args: any[]) => any) | undefined;
}, {
replace: boolean;
dot: boolean;
disabled: boolean;
}>;
export default _default;
+73
View File
@@ -0,0 +1,73 @@
import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
import { defineComponent } from "vue";
import { extend, numericProp, createNamespace } from "../utils/index.mjs";
import { SIDEBAR_KEY } from "../sidebar/Sidebar.mjs";
import { useParent } from "@vant/use";
import { useRoute, routeProps } from "../composables/use-route.mjs";
import { Badge } from "../badge/index.mjs";
const [name, bem] = createNamespace("sidebar-item");
const sidebarItemProps = extend({}, routeProps, {
dot: Boolean,
title: String,
badge: numericProp,
disabled: Boolean,
badgeProps: Object
});
var stdin_default = defineComponent({
name,
props: sidebarItemProps,
emits: ["click"],
setup(props, {
emit,
slots
}) {
const route = useRoute();
const {
parent,
index
} = useParent(SIDEBAR_KEY);
if (!parent) {
if (process.env.NODE_ENV !== "production") {
console.error("[Vant] <SidebarItem> must be a child component of <Sidebar>.");
}
return;
}
const onClick = () => {
if (props.disabled) {
return;
}
emit("click", index.value);
parent.setActive(index.value);
route();
};
return () => {
const {
dot,
badge,
title,
disabled
} = props;
const selected = index.value === parent.getActive();
return _createVNode("div", {
"role": "tab",
"class": bem({
select: selected,
disabled
}),
"tabindex": disabled ? void 0 : 0,
"aria-selected": selected,
"onClick": onClick
}, [_createVNode(Badge, _mergeProps({
"dot": dot,
"class": bem("text"),
"content": badge
}, props.badgeProps), {
default: () => [slots.title ? slots.title() : title]
})]);
};
}
});
export {
stdin_default as default,
sidebarItemProps
};
+1
View File
@@ -0,0 +1 @@
:root{--van-sidebar-font-size: var(--van-font-size-md);--van-sidebar-line-height: var(--van-line-height-md);--van-sidebar-text-color: var(--van-text-color);--van-sidebar-disabled-text-color: var(--van-text-color-3);--van-sidebar-padding: 20px var(--van-padding-sm);--van-sidebar-active-color: var(--van-active-color);--van-sidebar-background: var(--van-background);--van-sidebar-selected-font-weight: var(--van-font-bold);--van-sidebar-selected-text-color: var(--van-text-color);--van-sidebar-selected-border-width: 4px;--van-sidebar-selected-border-height: 16px;--van-sidebar-selected-border-color: var(--van-primary-color);--van-sidebar-selected-background: var(--van-background-2)}.van-sidebar-item{position:relative;display:block;box-sizing:border-box;padding:var(--van-sidebar-padding);overflow:hidden;color:var(--van-sidebar-text-color);font-size:var(--van-sidebar-font-size);line-height:var(--van-sidebar-line-height);background:var(--van-sidebar-background);cursor:pointer;-webkit-user-select:none;user-select:none}.van-sidebar-item:active{background-color:var(--van-sidebar-active-color)}.van-sidebar-item:not(:last-child):after{border-bottom-width:1px}.van-sidebar-item__text{word-break:break-all}.van-sidebar-item--select{color:var(--van-sidebar-selected-text-color);font-weight:var(--van-sidebar-selected-font-weight)}.van-sidebar-item--select,.van-sidebar-item--select:active{background-color:var(--van-sidebar-selected-background)}.van-sidebar-item--select:before{position:absolute;top:50%;left:0;width:var(--van-sidebar-selected-border-width);height:var(--van-sidebar-selected-border-height);background-color:var(--van-sidebar-selected-border-color);transform:translateY(-50%);content:""}.van-sidebar-item--disabled{color:var(--van-sidebar-disabled-text-color);cursor:not-allowed}.van-sidebar-item--disabled:active{background-color:var(--van-sidebar-background)}
+36
View File
@@ -0,0 +1,36 @@
export declare const SidebarItem: import("../utils").WithInstall<import("vue").DefineComponent<{
to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
title: StringConstructor;
badge: (NumberConstructor | StringConstructor)[];
disabled: BooleanConstructor;
badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
url: StringConstructor;
replace: BooleanConstructor;
} & {
dot: BooleanConstructor;
title: StringConstructor;
badge: (NumberConstructor | StringConstructor)[];
disabled: BooleanConstructor;
badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
}>> & {
onClick?: ((...args: any[]) => any) | undefined;
}, {
replace: boolean;
dot: boolean;
disabled: boolean;
}>>;
export default SidebarItem;
export { sidebarItemProps } from './SidebarItem';
export type { SidebarItemProps } from './SidebarItem';
export type { SidebarItemThemeVars } from './types';
declare module 'vue' {
interface GlobalComponents {
VanSidebarItem: typeof SidebarItem;
}
}
+10
View File
@@ -0,0 +1,10 @@
import { withInstall } from "../utils/index.mjs";
import _SidebarItem from "./SidebarItem.mjs";
const SidebarItem = withInstall(_SidebarItem);
var stdin_default = SidebarItem;
import { sidebarItemProps } from "./SidebarItem.mjs";
export {
SidebarItem,
stdin_default as default,
sidebarItemProps
};
+1
View File
@@ -0,0 +1 @@
export {};
+4
View File
@@ -0,0 +1,4 @@
import "../../style/base.css";
import "../../badge/index.css";
import "../../sidebar/index.css";
import "../index.css";
+15
View File
@@ -0,0 +1,15 @@
export type SidebarItemThemeVars = {
sidebarFontSize?: string;
sidebarLineHeight?: number | string;
sidebarTextColor?: string;
sidebarDisabledTextColor?: string;
sidebarPadding?: string;
sidebarActiveColor?: string;
sidebarBackground?: string;
sidebarSelectedFontWeight?: string;
sidebarSelectedTextColor?: string;
sidebarSelectedBorderWidth?: string;
sidebarSelectedBorderHeight?: string;
sidebarSelectedBorderColor?: string;
sidebarSelectedBackground?: string;
};
View File