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
+11
View File
@@ -0,0 +1,11 @@
import { type ExtractPropTypes } from 'vue';
export declare const indexAnchorProps: {
index: (NumberConstructor | StringConstructor)[];
};
export type IndexAnchorProps = ExtractPropTypes<typeof indexAnchorProps>;
declare const _default: import("vue").DefineComponent<{
index: (NumberConstructor | StringConstructor)[];
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
index: (NumberConstructor | StringConstructor)[];
}>>, {}>;
export default _default;
+88
View File
@@ -0,0 +1,88 @@
import { createVNode as _createVNode } from "vue";
import { ref, reactive, computed, defineComponent } from "vue";
import { extend, numericProp, BORDER_BOTTOM, getZIndexStyle, createNamespace } from "../utils/index.mjs";
import { INDEX_BAR_KEY } from "../index-bar/IndexBar.mjs";
import { getScrollTop, getRootScrollTop } from "../utils/dom.mjs";
import { useRect, useParent } from "@vant/use";
import { useExpose } from "../composables/use-expose.mjs";
const [name, bem] = createNamespace("index-anchor");
const indexAnchorProps = {
index: numericProp
};
var stdin_default = defineComponent({
name,
props: indexAnchorProps,
setup(props, {
slots
}) {
const state = reactive({
top: 0,
left: null,
rect: {
top: 0,
height: 0
},
width: null,
active: false
});
const root = ref();
const {
parent
} = useParent(INDEX_BAR_KEY);
if (!parent) {
if (process.env.NODE_ENV !== "production") {
console.error("[Vant] <IndexAnchor> must be a child component of <IndexBar>.");
}
return;
}
const isSticky = () => state.active && parent.props.sticky;
const anchorStyle = computed(() => {
const {
zIndex,
highlightColor
} = parent.props;
if (isSticky()) {
return extend(getZIndexStyle(zIndex), {
left: state.left ? `${state.left}px` : void 0,
width: state.width ? `${state.width}px` : void 0,
transform: state.top ? `translate3d(0, ${state.top}px, 0)` : void 0,
color: highlightColor
});
}
});
const getRect = (scrollParent, scrollParentRect) => {
const rootRect = useRect(root);
state.rect.height = rootRect.height;
if (scrollParent === window || scrollParent === document.body) {
state.rect.top = rootRect.top + getRootScrollTop();
} else {
state.rect.top = rootRect.top + getScrollTop(scrollParent) - scrollParentRect.top;
}
return state.rect;
};
useExpose({
state,
getRect
});
return () => {
const sticky = isSticky();
return _createVNode("div", {
"ref": root,
"style": {
height: sticky ? `${state.rect.height}px` : void 0
}
}, [_createVNode("div", {
"style": anchorStyle.value,
"class": [bem({
sticky
}), {
[BORDER_BOTTOM]: sticky
}]
}, [slots.default ? slots.default() : props.index])]);
};
}
});
export {
stdin_default as default,
indexAnchorProps
};
+1
View File
@@ -0,0 +1 @@
:root{--van-index-anchor-z-index: 1;--van-index-anchor-padding: 0 var(--van-padding-md);--van-index-anchor-text-color: var(--van-text-color);--van-index-anchor-font-weight: var(--van-font-bold);--van-index-anchor-font-size: var(--van-font-size-md);--van-index-anchor-line-height: 32px;--van-index-anchor-background: transparent;--van-index-anchor-sticky-text-color: var(--van-primary-color);--van-index-anchor-sticky-background: var(--van-background-2)}.van-index-anchor{z-index:var(--van-index-anchor-z-index);box-sizing:border-box;padding:var(--van-index-anchor-padding);color:var(--van-index-anchor-text-color);font-weight:var(--van-index-anchor-font-weight);font-size:var(--van-index-anchor-font-size);line-height:var(--van-index-anchor-line-height);background:var(--van-index-anchor-background)}.van-index-anchor--sticky{position:fixed;top:0;right:0;left:0;color:var(--van-index-anchor-sticky-text-color);background:var(--van-index-anchor-sticky-background)}
+14
View File
@@ -0,0 +1,14 @@
export declare const IndexAnchor: import("../utils").WithInstall<import("vue").DefineComponent<{
index: (NumberConstructor | StringConstructor)[];
}, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
index: (NumberConstructor | StringConstructor)[];
}>>, {}>>;
export default IndexAnchor;
export { indexAnchorProps } from './IndexAnchor';
export type { IndexAnchorProps } from './IndexAnchor';
export type { IndexAnchorThemeVars } from './types';
declare module 'vue' {
interface GlobalComponents {
VanIndexAnchor: typeof IndexAnchor;
}
}
+10
View File
@@ -0,0 +1,10 @@
import { withInstall } from "../utils/index.mjs";
import _IndexAnchor from "./IndexAnchor.mjs";
const IndexAnchor = withInstall(_IndexAnchor);
var stdin_default = IndexAnchor;
import { indexAnchorProps } from "./IndexAnchor.mjs";
export {
IndexAnchor,
stdin_default as default,
indexAnchorProps
};
+1
View File
@@ -0,0 +1 @@
export {};
+3
View File
@@ -0,0 +1,3 @@
import "../../style/base.css";
import "../../index-bar/index.css";
import "../index.css";
+11
View File
@@ -0,0 +1,11 @@
export type IndexAnchorThemeVars = {
indexAnchorZIndex?: number | string;
indexAnchorPadding?: string;
indexAnchorTextColor?: string;
indexAnchorFontWeight?: string;
indexAnchorFontSize?: string;
indexAnchorLineHeight?: number | string;
indexAnchorBackground?: string;
indexAnchorStickyTextColor?: string;
indexAnchorStickyBackground?: string;
};
View File