增加admin管理帐号和项目的界面--初步实现

This commit is contained in:
Cheng Zhou
2025-12-17 20:12:49 +08:00
parent 4f50237f56
commit c074c2b5bc
18933 changed files with 2088454 additions and 63 deletions
@@ -0,0 +1,21 @@
import type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue';
import type TimelineItem from './timeline-item.vue';
export declare const timelineItemProps: {
readonly timestamp: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly hideTimestamp: BooleanConstructor;
readonly center: BooleanConstructor;
readonly placement: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "top" | "bottom", unknown, "bottom", boolean>;
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "primary" | "success" | "warning" | "info" | "danger", unknown, "", boolean>;
readonly color: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly size: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "large" | "normal", unknown, "normal", boolean>;
readonly icon: {
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
readonly hollow: BooleanConstructor;
};
export type TimelineItemProps = ExtractPropTypes<typeof timelineItemProps>;
export type TimelineItemPropsPublic = __ExtractPublicPropTypes<typeof timelineItemProps>;
export type TimelineItemInstance = InstanceType<typeof TimelineItem> & unknown;
@@ -0,0 +1,41 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var runtime = require('../../../utils/vue/props/runtime.js');
var icon = require('../../../utils/vue/icon.js');
const timelineItemProps = runtime.buildProps({
timestamp: {
type: String,
default: ""
},
hideTimestamp: Boolean,
center: Boolean,
placement: {
type: String,
values: ["top", "bottom"],
default: "bottom"
},
type: {
type: String,
values: ["primary", "success", "warning", "danger", "info"],
default: ""
},
color: {
type: String,
default: ""
},
size: {
type: String,
values: ["normal", "large"],
default: "normal"
},
icon: {
type: icon.iconPropType
},
hollow: Boolean
});
exports.timelineItemProps = timelineItemProps;
//# sourceMappingURL=timeline-item.js.map
@@ -0,0 +1 @@
{"version":3,"file":"timeline-item.js","sources":["../../../../../../packages/components/timeline/src/timeline-item.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type TimelineItem from './timeline-item.vue'\n\nexport const timelineItemProps = buildProps({\n /**\n * @description timestamp content\n */\n timestamp: {\n type: String,\n default: '',\n },\n /**\n * @description whether to show timestamp\n */\n hideTimestamp: Boolean,\n /**\n * @description whether vertically centered\n */\n center: Boolean,\n /**\n * @description position of timestamp\n */\n placement: {\n type: String,\n values: ['top', 'bottom'],\n default: 'bottom',\n },\n /**\n * @description node type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'danger', 'info'],\n default: '',\n },\n /**\n * @description background color of node\n */\n color: {\n type: String,\n default: '',\n },\n /**\n * @description node size\n */\n size: {\n type: String,\n values: ['normal', 'large'],\n default: 'normal',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description icon is hollow\n */\n hollow: Boolean,\n} as const)\nexport type TimelineItemProps = ExtractPropTypes<typeof timelineItemProps>\nexport type TimelineItemPropsPublic = __ExtractPublicPropTypes<\n typeof timelineItemProps\n>\n\nexport type TimelineItemInstance = InstanceType<typeof TimelineItem> & unknown\n"],"names":["buildProps","iconPropType"],"mappings":";;;;;;;AACY,MAAC,iBAAiB,GAAGA,kBAAU,CAAC;AAC5C,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC7B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC;AAC/D,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;AAC/B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,iBAAY;AACtB,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,CAAC;;;;"}
@@ -0,0 +1,51 @@
declare function __VLS_template(): {
dot?(_: {}): any;
default?(_: {}): any;
};
declare const __VLS_component: import("vue").DefineComponent<{
readonly timestamp: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly hideTimestamp: BooleanConstructor;
readonly center: BooleanConstructor;
readonly placement: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "top" | "bottom", unknown, "bottom", boolean>;
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "primary" | "success" | "warning" | "info" | "danger", unknown, "", boolean>;
readonly color: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly size: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "large" | "normal", unknown, "normal", boolean>;
readonly icon: {
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
readonly hollow: BooleanConstructor;
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
readonly timestamp: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly hideTimestamp: BooleanConstructor;
readonly center: BooleanConstructor;
readonly placement: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "top" | "bottom", unknown, "bottom", boolean>;
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "primary" | "success" | "warning" | "info" | "danger", unknown, "", boolean>;
readonly color: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
readonly size: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "large" | "normal", unknown, "normal", boolean>;
readonly icon: {
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
readonly hollow: BooleanConstructor;
}>>, {
readonly center: boolean;
readonly color: string;
readonly size: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "large" | "normal", unknown>;
readonly type: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "primary" | "success" | "warning" | "info" | "danger", unknown>;
readonly placement: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "top" | "bottom", unknown>;
readonly timestamp: string;
readonly hideTimestamp: boolean;
readonly hollow: boolean;
}>;
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
export default _default;
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};
@@ -0,0 +1,80 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
var index$1 = require('../../icon/index.js');
var timelineItem = require('./timeline-item.js');
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
var index = require('../../../hooks/use-namespace/index.js');
const __default__ = vue.defineComponent({
name: "ElTimelineItem"
});
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
...__default__,
props: timelineItem.timelineItemProps,
setup(__props) {
const props = __props;
const ns = index.useNamespace("timeline-item");
const defaultNodeKls = vue.computed(() => [
ns.e("node"),
ns.em("node", props.size || ""),
ns.em("node", props.type || ""),
ns.is("hollow", props.hollow)
]);
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("li", {
class: vue.normalizeClass([vue.unref(ns).b(), { [vue.unref(ns).e("center")]: _ctx.center }])
}, [
vue.createElementVNode("div", {
class: vue.normalizeClass(vue.unref(ns).e("tail"))
}, null, 2),
!_ctx.$slots.dot ? (vue.openBlock(), vue.createElementBlock("div", {
key: 0,
class: vue.normalizeClass(vue.unref(defaultNodeKls)),
style: vue.normalizeStyle({
backgroundColor: _ctx.color
})
}, [
_ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
key: 0,
class: vue.normalizeClass(vue.unref(ns).e("icon"))
}, {
default: vue.withCtx(() => [
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon)))
]),
_: 1
}, 8, ["class"])) : vue.createCommentVNode("v-if", true)
], 6)) : vue.createCommentVNode("v-if", true),
_ctx.$slots.dot ? (vue.openBlock(), vue.createElementBlock("div", {
key: 1,
class: vue.normalizeClass(vue.unref(ns).e("dot"))
}, [
vue.renderSlot(_ctx.$slots, "dot")
], 2)) : vue.createCommentVNode("v-if", true),
vue.createElementVNode("div", {
class: vue.normalizeClass(vue.unref(ns).e("wrapper"))
}, [
!_ctx.hideTimestamp && _ctx.placement === "top" ? (vue.openBlock(), vue.createElementBlock("div", {
key: 0,
class: vue.normalizeClass([vue.unref(ns).e("timestamp"), vue.unref(ns).is("top")])
}, vue.toDisplayString(_ctx.timestamp), 3)) : vue.createCommentVNode("v-if", true),
vue.createElementVNode("div", {
class: vue.normalizeClass(vue.unref(ns).e("content"))
}, [
vue.renderSlot(_ctx.$slots, "default")
], 2),
!_ctx.hideTimestamp && _ctx.placement === "bottom" ? (vue.openBlock(), vue.createElementBlock("div", {
key: 1,
class: vue.normalizeClass([vue.unref(ns).e("timestamp"), vue.unref(ns).is("bottom")])
}, vue.toDisplayString(_ctx.timestamp), 3)) : vue.createCommentVNode("v-if", true)
], 2)
], 2);
};
}
});
var TimelineItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "timeline-item.vue"]]);
exports["default"] = TimelineItem;
//# sourceMappingURL=timeline-item2.js.map
@@ -0,0 +1 @@
{"version":3,"file":"timeline-item2.js","sources":["../../../../../../packages/components/timeline/src/timeline-item.vue"],"sourcesContent":["<template>\n <li :class=\"[ns.b(), { [ns.e('center')]: center }]\">\n <div :class=\"ns.e('tail')\" />\n <div\n v-if=\"!$slots.dot\"\n :class=\"defaultNodeKls\"\n :style=\"{\n backgroundColor: color,\n }\"\n >\n <el-icon v-if=\"icon\" :class=\"ns.e('icon')\">\n <component :is=\"icon\" />\n </el-icon>\n </div>\n <div v-if=\"$slots.dot\" :class=\"ns.e('dot')\">\n <slot name=\"dot\" />\n </div>\n\n <div :class=\"ns.e('wrapper')\">\n <div\n v-if=\"!hideTimestamp && placement === 'top'\"\n :class=\"[ns.e('timestamp'), ns.is('top')]\"\n >\n {{ timestamp }}\n </div>\n\n <div :class=\"ns.e('content')\">\n <slot />\n </div>\n\n <div\n v-if=\"!hideTimestamp && placement === 'bottom'\"\n :class=\"[ns.e('timestamp'), ns.is('bottom')]\"\n >\n {{ timestamp }}\n </div>\n </div>\n </li>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { timelineItemProps } from './timeline-item'\n\ndefineOptions({\n name: 'ElTimelineItem',\n})\n\nconst props = defineProps(timelineItemProps)\n\nconst ns = useNamespace('timeline-item')\nconst defaultNodeKls = computed(() => [\n ns.e('node'),\n ns.em('node', props.size || ''),\n ns.em('node', props.type || ''),\n ns.is('hollow', props.hollow),\n])\n</script>\n"],"names":["useNamespace","computed"],"mappings":";;;;;;;;;;uCA8Cc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,eAAe,CAAA,CAAA;AACvC,IAAM,MAAA,cAAA,GAAiBC,aAAS,MAAM;AAAA,MACpC,EAAA,CAAG,EAAE,MAAM,CAAA;AAAA,MACX,EAAG,CAAA,EAAA,CAAG,MAAQ,EAAA,KAAA,CAAM,QAAQ,EAAE,CAAA;AAAA,MAC9B,EAAG,CAAA,EAAA,CAAG,MAAQ,EAAA,KAAA,CAAM,QAAQ,EAAE,CAAA;AAAA,MAC9B,EAAG,CAAA,EAAA,CAAG,QAAU,EAAA,KAAA,CAAM,MAAM,CAAA;AAAA,KAC7B,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,11 @@
declare const Timeline: import("vue").DefineComponent<{
reverse: BooleanConstructor;
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
reverse: BooleanConstructor;
}>>, {
reverse: boolean;
}>;
export default Timeline;
export type TimelineInstance = InstanceType<typeof Timeline> & unknown;
@@ -0,0 +1,30 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
var tokens = require('./tokens.js');
var index = require('../../../hooks/use-namespace/index.js');
var vnode = require('../../../utils/vue/vnode.js');
const Timeline = vue.defineComponent({
name: "ElTimeline",
props: {
reverse: Boolean
},
setup(props, { slots }) {
const ns = index.useNamespace("timeline");
vue.provide(tokens.TIMELINE_INJECTION_KEY, slots);
return () => {
var _a, _b;
const children = vnode.flattedChildren((_b = (_a = slots.default) == null ? void 0 : _a.call(slots)) != null ? _b : []).filter((node) => {
var _a2;
return ((_a2 = node == null ? void 0 : node.type) == null ? void 0 : _a2.name) === "ElTimelineItem";
});
return vue.h("ul", { class: [ns.b()] }, props.reverse ? children.reverse() : children);
};
}
});
exports["default"] = Timeline;
//# sourceMappingURL=timeline.js.map
@@ -0,0 +1 @@
{"version":3,"file":"timeline.js","sources":["../../../../../../packages/components/timeline/src/timeline.ts"],"sourcesContent":["import { defineComponent, h, provide } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { TIMELINE_INJECTION_KEY } from './tokens'\nimport { flattedChildren } from '@element-plus/utils'\n\nimport type { VNodeChildAtom } from '@element-plus/utils'\n\nconst Timeline = defineComponent({\n name: 'ElTimeline',\n props: {\n reverse: Boolean,\n },\n setup(props, { slots }) {\n const ns = useNamespace('timeline')\n\n provide(TIMELINE_INJECTION_KEY, slots)\n\n return () => {\n const children = flattedChildren(slots.default?.() ?? []).filter(\n (node) => (node as any)?.type?.name === 'ElTimelineItem'\n ) as VNodeChildAtom[]\n\n return h(\n 'ul',\n { class: [ns.b()] },\n props.reverse ? children.reverse() : children\n )\n }\n },\n})\n\nexport default Timeline\nexport type TimelineInstance = InstanceType<typeof Timeline> & unknown\n"],"names":["defineComponent","useNamespace","provide","TIMELINE_INJECTION_KEY","flattedChildren","h"],"mappings":";;;;;;;;;AAIK,MAAC,QAAQ,GAAGA,mBAAe,CAAC;AACjC,EAAE,IAAI,EAAE,YAAY;AACpB,EAAE,KAAK,EAAE;AACT,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE;AAC1B,IAAI,MAAM,EAAE,GAAGC,kBAAY,CAAC,UAAU,CAAC,CAAC;AACxC,IAAIC,WAAO,CAACC,6BAAsB,EAAE,KAAK,CAAC,CAAC;AAC3C,IAAI,OAAO,MAAM;AACjB,MAAM,IAAI,EAAE,EAAE,EAAE,CAAC;AACjB,MAAM,MAAM,QAAQ,GAAGC,qBAAe,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,OAAO,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK;AACzI,QAAQ,IAAI,GAAG,CAAC;AAChB,QAAQ,OAAO,CAAC,CAAC,GAAG,GAAG,IAAI,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,IAAI,MAAM,gBAAgB,CAAC;AAC5G,OAAO,CAAC,CAAC;AACT,MAAM,OAAOC,KAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,EAAE,GAAG,QAAQ,CAAC,CAAC;AACzF,KAAK,CAAC;AACN,GAAG;AACH,CAAC;;;;"}
@@ -0,0 +1 @@
export declare const TIMELINE_INJECTION_KEY = "timeline";
@@ -0,0 +1,8 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const TIMELINE_INJECTION_KEY = "timeline";
exports.TIMELINE_INJECTION_KEY = TIMELINE_INJECTION_KEY;
//# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tokens.js","sources":["../../../../../../packages/components/timeline/src/tokens.ts"],"sourcesContent":["export const TIMELINE_INJECTION_KEY = 'timeline'\n"],"names":[],"mappings":";;;;AAAY,MAAC,sBAAsB,GAAG;;;;"}