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
+66
View File
@@ -0,0 +1,66 @@
import { type ExtractPropTypes } from 'vue';
export declare const navBarProps: {
title: StringConstructor;
fixed: BooleanConstructor;
zIndex: (NumberConstructor | StringConstructor)[];
border: {
type: BooleanConstructor;
default: true;
};
leftText: StringConstructor;
rightText: StringConstructor;
leftArrow: BooleanConstructor;
placeholder: BooleanConstructor;
safeAreaInsetTop: BooleanConstructor;
clickable: {
type: BooleanConstructor;
default: true;
};
};
export type NavBarProps = ExtractPropTypes<typeof navBarProps>;
declare const _default: import("vue").DefineComponent<{
title: StringConstructor;
fixed: BooleanConstructor;
zIndex: (NumberConstructor | StringConstructor)[];
border: {
type: BooleanConstructor;
default: true;
};
leftText: StringConstructor;
rightText: StringConstructor;
leftArrow: BooleanConstructor;
placeholder: BooleanConstructor;
safeAreaInsetTop: BooleanConstructor;
clickable: {
type: BooleanConstructor;
default: true;
};
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickLeft" | "clickRight")[], "clickLeft" | "clickRight", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
title: StringConstructor;
fixed: BooleanConstructor;
zIndex: (NumberConstructor | StringConstructor)[];
border: {
type: BooleanConstructor;
default: true;
};
leftText: StringConstructor;
rightText: StringConstructor;
leftArrow: BooleanConstructor;
placeholder: BooleanConstructor;
safeAreaInsetTop: BooleanConstructor;
clickable: {
type: BooleanConstructor;
default: true;
};
}>> & {
onClickLeft?: ((...args: any[]) => any) | undefined;
onClickRight?: ((...args: any[]) => any) | undefined;
}, {
fixed: boolean;
border: boolean;
clickable: boolean;
placeholder: boolean;
safeAreaInsetTop: boolean;
leftArrow: boolean;
}>;
export default _default;
+92
View File
@@ -0,0 +1,92 @@
import { createVNode as _createVNode } from "vue";
import { ref, defineComponent } from "vue";
import { truthProp, numericProp, BORDER_BOTTOM, getZIndexStyle, createNamespace, HAPTICS_FEEDBACK } from "../utils/index.mjs";
import { usePlaceholder } from "../composables/use-placeholder.mjs";
import { Icon } from "../icon/index.mjs";
const [name, bem] = createNamespace("nav-bar");
const navBarProps = {
title: String,
fixed: Boolean,
zIndex: numericProp,
border: truthProp,
leftText: String,
rightText: String,
leftArrow: Boolean,
placeholder: Boolean,
safeAreaInsetTop: Boolean,
clickable: truthProp
};
var stdin_default = defineComponent({
name,
props: navBarProps,
emits: ["clickLeft", "clickRight"],
setup(props, {
emit,
slots
}) {
const navBarRef = ref();
const renderPlaceholder = usePlaceholder(navBarRef, bem);
const onClickLeft = (event) => emit("clickLeft", event);
const onClickRight = (event) => emit("clickRight", event);
const renderLeft = () => {
if (slots.left) {
return slots.left();
}
return [props.leftArrow && _createVNode(Icon, {
"class": bem("arrow"),
"name": "arrow-left"
}, null), props.leftText && _createVNode("span", {
"class": bem("text")
}, [props.leftText])];
};
const renderRight = () => {
if (slots.right) {
return slots.right();
}
return _createVNode("span", {
"class": bem("text")
}, [props.rightText]);
};
const renderNavBar = () => {
const {
title,
fixed,
border,
zIndex
} = props;
const style = getZIndexStyle(zIndex);
const hasLeft = props.leftArrow || props.leftText || slots.left;
const hasRight = props.rightText || slots.right;
return _createVNode("div", {
"ref": navBarRef,
"style": style,
"class": [bem({
fixed
}), {
[BORDER_BOTTOM]: border,
"van-safe-area-top": props.safeAreaInsetTop
}]
}, [_createVNode("div", {
"class": bem("content")
}, [hasLeft && _createVNode("div", {
"class": [bem("left"), props.clickable ? HAPTICS_FEEDBACK : ""],
"onClick": onClickLeft
}, [renderLeft()]), _createVNode("div", {
"class": [bem("title"), "van-ellipsis"]
}, [slots.title ? slots.title() : title]), hasRight && _createVNode("div", {
"class": [bem("right"), props.clickable ? HAPTICS_FEEDBACK : ""],
"onClick": onClickRight
}, [renderRight()])])]);
};
return () => {
if (props.fixed && props.placeholder) {
return renderPlaceholder(renderNavBar);
}
return renderNavBar();
};
}
});
export {
stdin_default as default,
navBarProps
};
+1
View File
@@ -0,0 +1 @@
:root{--van-nav-bar-height: 46px;--van-nav-bar-background: var(--van-background-2);--van-nav-bar-arrow-size: 16px;--van-nav-bar-icon-color: var(--van-primary-color);--van-nav-bar-text-color: var(--van-primary-color);--van-nav-bar-title-font-size: var(--van-font-size-lg);--van-nav-bar-title-text-color: var(--van-text-color);--van-nav-bar-z-index: 1}.van-nav-bar{position:relative;z-index:var(--van-nav-bar-z-index);line-height:var(--van-line-height-lg);text-align:center;background:var(--van-nav-bar-background);-webkit-user-select:none;user-select:none}.van-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.van-nav-bar--safe-area-inset-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.van-nav-bar .van-icon{color:var(--van-nav-bar-icon-color)}.van-nav-bar__content{position:relative;display:flex;align-items:center;height:var(--van-nav-bar-height)}.van-nav-bar__arrow{margin-right:var(--van-padding-base);font-size:var(--van-nav-bar-arrow-size)}.van-nav-bar__title{max-width:60%;margin:0 auto;color:var(--van-nav-bar-title-text-color);font-weight:var(--van-font-bold);font-size:var(--van-nav-bar-title-font-size)}.van-nav-bar__left,.van-nav-bar__right{position:absolute;top:0;bottom:0;display:flex;align-items:center;padding:0 var(--van-padding-md);font-size:var(--van-font-size-md)}.van-nav-bar__left{left:0}.van-nav-bar__right{right:0}.van-nav-bar__text{color:var(--van-nav-bar-text-color)}
+54
View File
@@ -0,0 +1,54 @@
export declare const NavBar: import("../utils").WithInstall<import("vue").DefineComponent<{
title: StringConstructor;
fixed: BooleanConstructor;
zIndex: (NumberConstructor | StringConstructor)[];
border: {
type: BooleanConstructor;
default: true;
};
leftText: StringConstructor;
rightText: StringConstructor;
leftArrow: BooleanConstructor;
placeholder: BooleanConstructor;
safeAreaInsetTop: BooleanConstructor;
clickable: {
type: BooleanConstructor;
default: true;
};
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clickLeft" | "clickRight")[], "clickLeft" | "clickRight", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
title: StringConstructor;
fixed: BooleanConstructor;
zIndex: (NumberConstructor | StringConstructor)[];
border: {
type: BooleanConstructor;
default: true;
};
leftText: StringConstructor;
rightText: StringConstructor;
leftArrow: BooleanConstructor;
placeholder: BooleanConstructor;
safeAreaInsetTop: BooleanConstructor;
clickable: {
type: BooleanConstructor;
default: true;
};
}>> & {
onClickLeft?: ((...args: any[]) => any) | undefined;
onClickRight?: ((...args: any[]) => any) | undefined;
}, {
fixed: boolean;
border: boolean;
clickable: boolean;
placeholder: boolean;
safeAreaInsetTop: boolean;
leftArrow: boolean;
}>>;
export default NavBar;
export { navBarProps } from './NavBar';
export type { NavBarProps } from './NavBar';
export type { NavBarThemeVars } from './types';
declare module 'vue' {
interface GlobalComponents {
VanNavBar: typeof NavBar;
}
}
+10
View File
@@ -0,0 +1,10 @@
import { withInstall } from "../utils/index.mjs";
import _NavBar from "./NavBar.mjs";
const NavBar = withInstall(_NavBar);
var stdin_default = NavBar;
import { navBarProps } from "./NavBar.mjs";
export {
NavBar,
stdin_default as default,
navBarProps
};
+1
View File
@@ -0,0 +1 @@
export {};
+4
View File
@@ -0,0 +1,4 @@
import "../../style/base.css";
import "../../badge/index.css";
import "../../icon/index.css";
import "../index.css";
+10
View File
@@ -0,0 +1,10 @@
export type NavBarThemeVars = {
navBarHeight?: string;
navBarBackground?: string;
navBarArrowSize?: string;
navBarIconColor?: string;
navBarTextColor?: string;
navBarTitleFontSize?: string;
navBarTitleTextColor?: string;
navBarZIndex?: number | string;
};
View File