vue-layout-gitcode 1.5.69 → 1.5.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,161 +0,0 @@
1
- import { defineComponent, computed, createElementBlock, openBlock, createCommentVNode, Fragment, renderList, normalizeClass, createElementVNode, createVNode, toDisplayString, withModifiers } from "vue";
2
- import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-Bxhc6nCo.js";
3
- import "vue-devui-lal/icon";
4
- import "vue-devui-lal/icon/style.css";
5
- const _hoisted_1 = { class: "history-list" };
6
- const _hoisted_2 = ["onClick", "onMouseenter"];
7
- const _hoisted_3 = { class: "history-list-box__content flex items-center justify-between w-full" };
8
- const _hoisted_4 = { class: "flex items-center" };
9
- const _hoisted_5 = ["title"];
10
- const _hoisted_6 = ["title"];
11
- const _hoisted_7 = { class: "item-tx" };
12
- const _hoisted_8 = { class: "flex items-center gap-[8px]" };
13
- const _sfc_main = /* @__PURE__ */ defineComponent({
14
- __name: "SearchHistoryList",
15
- props: {
16
- searchHistoryList: {},
17
- visitHistoryList: {},
18
- activeIndex: {}
19
- },
20
- emits: [
21
- "clearHistoryData",
22
- "toSearch",
23
- "onDeleteHistory",
24
- "onDeleteVist",
25
- "onVistPage",
26
- "onSearchEnter",
27
- "resetIndex"
28
- ],
29
- setup(__props, { emit: __emit }) {
30
- const { t } = i18n.global;
31
- const props = __props;
32
- const emits = __emit;
33
- const getRepoType = (item) => {
34
- const typeMap = {
35
- repo: {
36
- text: t("gitCodeLayout.header.repo"),
37
- icon: "gt-plane-project",
38
- hoverIcon: "gt-plane-project-red"
39
- },
40
- model: {
41
- text: t("gitCodeLayout.aihub.model"),
42
- icon: "gt-plane-Models",
43
- hoverIcon: "gt-plane-Models-red"
44
- },
45
- dataset: {
46
- text: t("gitCodeLayout.aihub.dataSet"),
47
- icon: "gt-plane-Datasets",
48
- hoverIcon: "gt-plane-Datasets-red"
49
- },
50
- issue: {
51
- text: "Issues",
52
- icon: "gt-plane-issues",
53
- hoverIcon: "gt-plane-issues-red"
54
- },
55
- pullrequest: {
56
- text: "Pull requests",
57
- icon: "gt-plane-pullRequest",
58
- hoverIcon: "gt-plane-pullRequest-red"
59
- },
60
- group: {
61
- text: t("gitCodeLayout.header.org"),
62
- icon: "gt-plane-users",
63
- hoverIcon: "gt-plane-users-red"
64
- },
65
- user: {
66
- text: t("gitCodeLayout.header.user"),
67
- icon: "gt-plane-user",
68
- hoverIcon: "gt-plane-user-red"
69
- },
70
- tag: {
71
- text: t("gitCodeLayout.header.tags"),
72
- icon: "gt-plane-topics",
73
- hoverIcon: "gt-plane-topics-red"
74
- },
75
- topic: {
76
- text: t("gitCodeLayout.header.topic"),
77
- icon: "gt-plane-topic",
78
- hoverIcon: "gt-plane-topic-red"
79
- }
80
- };
81
- return typeMap[item.type] || typeMap["repo"];
82
- };
83
- const historyList = computed(() => {
84
- var _a;
85
- return (_a = props.searchHistoryList) == null ? void 0 : _a.map((item) => {
86
- const repoTitle = item.repo ? `${t("gitCodeLayout.header.repo")} ${decodeURIComponent(item.repo)}:` : "";
87
- const namespaceTitle = item.namespace ? `${item.scope === "group" ? t("gitCodeLayout.header.org") : t("gitCodeLayout.header.user")} ${decodeURIComponent(item.namespace)}:` : "";
88
- return { ...item, repoTitle, namespaceTitle };
89
- });
90
- });
91
- computed(() => {
92
- return props.visitHistoryList;
93
- });
94
- const resetIndex = () => {
95
- emits("resetIndex");
96
- };
97
- const toSearch = (item) => {
98
- emits("toSearch", item);
99
- };
100
- const onDeleteHistory = (index) => {
101
- emits("onDeleteHistory", index);
102
- };
103
- const onSearchEnter = (index) => {
104
- emits("onSearchEnter", index);
105
- };
106
- return (_ctx, _cache) => {
107
- return openBlock(), createElementBlock("div", _hoisted_1, [
108
- _ctx.searchHistoryList.length ? (openBlock(), createElementBlock("ul", {
109
- key: 0,
110
- class: "history-list-box mt-[16px]",
111
- onMouseleave: resetIndex
112
- }, [
113
- (openBlock(true), createElementBlock(Fragment, null, renderList(historyList.value, (item, index) => {
114
- return openBlock(), createElementBlock("li", {
115
- key: item,
116
- class: normalizeClass(_ctx.activeIndex === index ? "hoverbg" : ""),
117
- onClick: ($event) => toSearch(item),
118
- onMouseenter: ($event) => onSearchEnter(index)
119
- }, [
120
- createElementVNode("div", _hoisted_3, [
121
- createElementVNode("div", _hoisted_4, [
122
- createVNode(GIcon, {
123
- name: "gt-line-time",
124
- color: "var(--devui-aide-text)",
125
- class: "mr-[8px]"
126
- }),
127
- createElementVNode("span", {
128
- class: "whitespace-nowrap overflow-hidden text-ellipsis",
129
- title: item.repoTitle
130
- }, toDisplayString(item.repoTitle), 9, _hoisted_5),
131
- createElementVNode("span", {
132
- class: "whitespace-nowrap overflow-hidden text-ellipsis",
133
- title: item.namespaceTitle
134
- }, toDisplayString(item.namespaceTitle), 9, _hoisted_6),
135
- createElementVNode("span", _hoisted_7, toDisplayString(item.q || item), 1)
136
- ]),
137
- createElementVNode("div", _hoisted_8, [
138
- createElementVNode("span", {
139
- class: normalizeClass(_ctx.activeIndex === index ? "text-[var(--theme-text)]" : "text-[var(--theme-placeholder)]")
140
- }, toDisplayString(getRepoType(item).text), 3),
141
- createVNode(GIcon, {
142
- name: _ctx.activeIndex === index ? getRepoType(item).hoverIcon : getRepoType(item).icon
143
- }, null, 8, ["name"])
144
- ])
145
- ]),
146
- createVNode(GIcon, {
147
- name: "gt-line-close",
148
- class: "itemClose",
149
- onClick: withModifiers(($event) => onDeleteHistory(index), ["stop"])
150
- }, null, 8, ["onClick"])
151
- ], 42, _hoisted_2);
152
- }), 128))
153
- ], 32)) : createCommentVNode("", true)
154
- ]);
155
- };
156
- }
157
- });
158
- const SearchHistoryList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-vue-layout-gitcode"]]);
159
- export {
160
- SearchHistoryList as default
161
- };
package/dist/index.js DELETED
@@ -1,14 +0,0 @@
1
- import { J, K, O, I, S, H, x, Q, N, P, M } from "./index-Bxhc6nCo.js";
2
- export {
3
- J as GitCodeAside,
4
- K as GitCodeHeader,
5
- O as GitCodeLayoutEmitter,
6
- I as Login,
7
- S as SceneValue,
8
- H as ToolsFloat,
9
- x as currentTheme,
10
- Q as default,
11
- N as setLayoutConfig,
12
- P as setTheme,
13
- M as useLogin
14
- };
package/dist/package.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "name": "vue-layout-gitcode",
3
- "version": "1.5.69",
4
- "description": "用于 gitcode 站点生产环境使用",
5
- "main": "index.js",
6
- "types": "./index.d.ts",
7
- "repository": {
8
- "type": "git",
9
- "url": "站内导航侧边栏"
10
- },
11
- "author": "lal,nevins",
12
- "license": "ISC"
13
- }