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
+61
View File
@@ -0,0 +1,61 @@
import { type ExtractPropTypes } from 'vue';
import { type Numeric } from '../utils';
export declare const progressProps: {
color: StringConstructor;
inactive: BooleanConstructor;
pivotText: StringConstructor;
textColor: StringConstructor;
showPivot: {
type: BooleanConstructor;
default: true;
};
pivotColor: StringConstructor;
trackColor: StringConstructor;
strokeWidth: (NumberConstructor | StringConstructor)[];
percentage: {
type: (NumberConstructor | StringConstructor)[];
default: number;
validator: (value: Numeric) => boolean;
};
};
export type ProgressProps = ExtractPropTypes<typeof progressProps>;
declare const _default: import("vue").DefineComponent<{
color: StringConstructor;
inactive: BooleanConstructor;
pivotText: StringConstructor;
textColor: StringConstructor;
showPivot: {
type: BooleanConstructor;
default: true;
};
pivotColor: StringConstructor;
trackColor: StringConstructor;
strokeWidth: (NumberConstructor | StringConstructor)[];
percentage: {
type: (NumberConstructor | StringConstructor)[];
default: number;
validator: (value: Numeric) => boolean;
};
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
color: StringConstructor;
inactive: BooleanConstructor;
pivotText: StringConstructor;
textColor: StringConstructor;
showPivot: {
type: BooleanConstructor;
default: true;
};
pivotColor: StringConstructor;
trackColor: StringConstructor;
strokeWidth: (NumberConstructor | StringConstructor)[];
percentage: {
type: (NumberConstructor | StringConstructor)[];
default: number;
validator: (value: Numeric) => boolean;
};
}>>, {
inactive: boolean;
showPivot: boolean;
percentage: string | number;
}>;
export default _default;
+77
View File
@@ -0,0 +1,77 @@
import { createVNode as _createVNode } from "vue";
import { computed, defineComponent } from "vue";
import { addUnit, truthProp, numericProp, createNamespace } from "../utils/index.mjs";
const [name, bem] = createNamespace("progress");
const progressProps = {
color: String,
inactive: Boolean,
pivotText: String,
textColor: String,
showPivot: truthProp,
pivotColor: String,
trackColor: String,
strokeWidth: numericProp,
percentage: {
type: numericProp,
default: 0,
validator: (value) => +value >= 0 && +value <= 100
}
};
var stdin_default = defineComponent({
name,
props: progressProps,
setup(props) {
const background = computed(() => props.inactive ? void 0 : props.color);
const renderPivot = () => {
const {
textColor,
pivotText,
pivotColor,
percentage
} = props;
const text = pivotText != null ? pivotText : `${percentage}%`;
if (props.showPivot && text) {
const style = {
color: textColor,
left: `${+percentage}%`,
transform: `translate(-${+percentage}%,-50%)`,
background: pivotColor || background.value
};
return _createVNode("span", {
"style": style,
"class": bem("pivot", {
inactive: props.inactive
})
}, [text]);
}
};
return () => {
const {
trackColor,
percentage,
strokeWidth
} = props;
const rootStyle = {
background: trackColor,
height: addUnit(strokeWidth)
};
const portionStyle = {
width: `${percentage}%`,
background: background.value
};
return _createVNode("div", {
"class": bem(),
"style": rootStyle
}, [_createVNode("span", {
"class": bem("portion", {
inactive: props.inactive
}),
"style": portionStyle
}, null), renderPivot()]);
};
}
});
export {
stdin_default as default,
progressProps
};
+1
View File
@@ -0,0 +1 @@
:root{--van-progress-height: 4px;--van-progress-color: var(--van-primary-color);--van-progress-inactive-color: var(--van-gray-5);--van-progress-background: var(--van-gray-3);--van-progress-pivot-padding: 0 5px;--van-progress-pivot-text-color: var(--van-white);--van-progress-pivot-font-size: var(--van-font-size-xs);--van-progress-pivot-line-height: 1.6;--van-progress-pivot-background: var(--van-primary-color)}.van-progress{position:relative;height:var(--van-progress-height);background:var(--van-progress-background);border-radius:var(--van-progress-height)}.van-progress__portion{position:absolute;left:0;width:100%;height:100%;background:var(--van-progress-color);border-radius:inherit;transform-origin:0;transition:all var(--van-duration-base) var(--van-ease-out)}.van-progress__portion--inactive{background:var(--van-progress-inactive-color)}.van-progress__pivot{position:absolute;top:50%;box-sizing:border-box;min-width:3.6em;padding:var(--van-progress-pivot-padding);color:var(--van-progress-pivot-text-color);font-size:var(--van-progress-pivot-font-size);line-height:var(--van-progress-pivot-line-height);text-align:center;word-break:keep-all;background:var(--van-progress-pivot-background);border-radius:1em;transition:all var(--van-duration-base) var(--van-ease-out)}.van-progress__pivot--inactive{background:var(--van-progress-inactive-color)}
+49
View File
@@ -0,0 +1,49 @@
import { ProgressProps } from './Progress';
export declare const Progress: import("../utils").WithInstall<import("vue").DefineComponent<{
color: StringConstructor;
inactive: BooleanConstructor;
pivotText: StringConstructor;
textColor: StringConstructor;
showPivot: {
type: BooleanConstructor;
default: true;
};
pivotColor: StringConstructor;
trackColor: StringConstructor;
strokeWidth: (NumberConstructor | StringConstructor)[];
percentage: {
type: (NumberConstructor | StringConstructor)[];
default: number;
validator: (value: import("../utils").Numeric) => boolean;
};
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
color: StringConstructor;
inactive: BooleanConstructor;
pivotText: StringConstructor;
textColor: StringConstructor;
showPivot: {
type: BooleanConstructor;
default: true;
};
pivotColor: StringConstructor;
trackColor: StringConstructor;
strokeWidth: (NumberConstructor | StringConstructor)[];
percentage: {
type: (NumberConstructor | StringConstructor)[];
default: number;
validator: (value: import("../utils").Numeric) => boolean;
};
}>>, {
inactive: boolean;
showPivot: boolean;
percentage: string | number;
}>>;
export default Progress;
export { progressProps } from './Progress';
export type { ProgressProps };
export type { ProgressInstance, ProgressThemeVars } from './types';
declare module 'vue' {
interface GlobalComponents {
VanProgress: typeof Progress;
}
}
+10
View File
@@ -0,0 +1,10 @@
import { withInstall } from "../utils/index.mjs";
import _Progress from "./Progress.mjs";
const Progress = withInstall(_Progress);
var stdin_default = Progress;
import { progressProps } from "./Progress.mjs";
export {
Progress,
stdin_default as default,
progressProps
};
+1
View File
@@ -0,0 +1 @@
export {};
+2
View File
@@ -0,0 +1,2 @@
import "../../style/base.css";
import "../index.css";
+17
View File
@@ -0,0 +1,17 @@
import type { ComponentPublicInstance } from 'vue';
import type { ProgressProps } from './Progress';
export type ProgressExpose = {
resize: () => void;
};
export type ProgressInstance = ComponentPublicInstance<ProgressProps, ProgressExpose>;
export type ProgressThemeVars = {
progressHeight?: string;
progressColor?: string;
progressInactiveColor?: string;
progressBackground?: string;
progressPivotPadding?: string;
progressPivotTextColor?: string;
progressPivotFontSize?: string;
progressPivotLineHeight?: number | string;
progressPivotBackground?: string;
};
View File