vue-layout-gitcode 1.0.0
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.
- package/GloabarSearch-37405ec8.js +141 -0
- package/ProjectSearch-cbd30a7b.js +131 -0
- package/SearchHistoryList-6fa78d5b.js +144 -0
- package/SearchPrefixTag-d6298d77.js +91 -0
- package/SearchRecommed-bbea8abe.js +724 -0
- package/SearchScopeList-6eba07a3.js +105 -0
- package/UserSearch-f7f1ff0d.js +129 -0
- package/formatNameSpace-d87daa04.js +75 -0
- package/index-36595f17.js +19813 -0
- package/index-a06332e6.js +106 -0
- package/index.d.ts +1010 -0
- package/index.js +56 -0
- package/notice-425401c1.js +106 -0
- package/package.json +16 -0
- package/style.css +1 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { inject, ref, watch, onMounted, openBlock, createElementBlock, createElementVNode, toDisplayString, Fragment, renderList, unref, createVNode, createCommentVNode } from "vue";
|
|
2
|
+
import { h as headRequest, R as REPO_MODULE, t as transWebUrl, I as Icon, a as useReport, b as REPO_EVENT, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-36595f17.js";
|
|
3
|
+
import { u as useReportRepo, f as formatNameSpace } from "./formatNameSpace-d87daa04.js";
|
|
4
|
+
import "vue-devui-lal/icon";
|
|
5
|
+
import "vue-devui-lal/icon/style.css";
|
|
6
|
+
import "vue-devui-lal/button";
|
|
7
|
+
import "vue-devui-lal/popover";
|
|
8
|
+
import "vue-devui-lal/tooltip";
|
|
9
|
+
import "vue-devui-lal/textarea";
|
|
10
|
+
import "vue-devui-lal/button/style.css";
|
|
11
|
+
import "vue-devui-lal/popover/style.css";
|
|
12
|
+
import "vue-devui-lal/tooltip/style.css";
|
|
13
|
+
import "vue-devui-lal/textarea/style.css";
|
|
14
|
+
import "vue-i18n";
|
|
15
|
+
import "vue-router";
|
|
16
|
+
import "@vueuse/core";
|
|
17
|
+
import "vue-devui-lal/avatar";
|
|
18
|
+
import "vue-devui-lal/avatar/style.css";
|
|
19
|
+
import "vue-devui-lal/select";
|
|
20
|
+
import "vue-devui-lal/input";
|
|
21
|
+
import "vue-devui-lal/skeleton";
|
|
22
|
+
import "vue-devui-lal/menu";
|
|
23
|
+
import "vue-devui-lal/select/style.css";
|
|
24
|
+
import "vue-devui-lal/input/style.css";
|
|
25
|
+
import "vue-devui-lal/skeleton/style.css";
|
|
26
|
+
import "vue-devui-lal/menu/style.css";
|
|
27
|
+
import "vue-devui-lal/dropdown";
|
|
28
|
+
import "vue-devui-lal/dropdown/style.css";
|
|
29
|
+
import "vue-devui-lal/drawer";
|
|
30
|
+
import "vue-devui-lal/layout";
|
|
31
|
+
import "vue-devui-lal/drawer/style.css";
|
|
32
|
+
import "vue-devui-lal/layout/style.css";
|
|
33
|
+
import "dayjs";
|
|
34
|
+
import "vue-devui-lal/message";
|
|
35
|
+
import "vue-devui-lal/message/style.css";
|
|
36
|
+
import "vue-devui-lal/badge";
|
|
37
|
+
import "vue-devui-lal/badge/style.css";
|
|
38
|
+
import "vue-devui-lal/tabs";
|
|
39
|
+
import "vue-devui-lal/tabs/style.css";
|
|
40
|
+
import "vue-devui-lal/radio";
|
|
41
|
+
import "vue-devui-lal/radio/style.css";
|
|
42
|
+
import "vue-devui-lal/form";
|
|
43
|
+
import "vue-devui-lal/form/style.css";
|
|
44
|
+
import "vue-devui-lal/checkbox";
|
|
45
|
+
import "vue-devui-lal/checkbox/style.css";
|
|
46
|
+
import "vue-devui-lal/modal";
|
|
47
|
+
import "vue-devui-lal/modal/style.css";
|
|
48
|
+
import "vue-devui-lal/notification";
|
|
49
|
+
import "vue-devui-lal/notification/style.css";
|
|
50
|
+
const GloabarSearch_vue_vue_type_style_index_0_lang = "";
|
|
51
|
+
const _hoisted_1 = {
|
|
52
|
+
key: 0,
|
|
53
|
+
class: "px-[8px] history-list-project pl-[8px]"
|
|
54
|
+
};
|
|
55
|
+
const _hoisted_2 = { class: "history-list-project-globartitle mb-[4px] mt-[16px]" };
|
|
56
|
+
const _hoisted_3 = ["href", "onClick"];
|
|
57
|
+
const _hoisted_4 = { class: "flex history-list-project-globarbox" };
|
|
58
|
+
const _hoisted_5 = { class: "ml-[8px] ellipsis" };
|
|
59
|
+
const _sfc_main = {
|
|
60
|
+
__name: "GloabarSearch",
|
|
61
|
+
props: ["searchStr"],
|
|
62
|
+
setup(__props) {
|
|
63
|
+
const API = headRequest(inject("request"));
|
|
64
|
+
const { triggerReport } = useReportRepo({ moduleName: REPO_MODULE.SEARCH_SUGGESTION_CARD }, API.viewReport);
|
|
65
|
+
const searchFileList = ref([]);
|
|
66
|
+
const origin = window.location.origin;
|
|
67
|
+
const props = __props;
|
|
68
|
+
let timer = null;
|
|
69
|
+
const handleClick = (item) => {
|
|
70
|
+
useReport(REPO_EVENT.CLICK, { module_name: REPO_MODULE.SEARCH_SUGGESTION_CARD, repo_id: item.id });
|
|
71
|
+
};
|
|
72
|
+
const getData = async () => {
|
|
73
|
+
if (!props.searchStr) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
try {
|
|
77
|
+
useReport("search-project", {});
|
|
78
|
+
const res = await API.getGloabarSearchKeyLink({ q: props.searchStr });
|
|
79
|
+
const { recommend_project = [] } = res.data || {};
|
|
80
|
+
searchFileList.value = recommend_project.slice(0, 5).map((item) => {
|
|
81
|
+
const isGitcodeRepo = REPO_TYPE.GITCODE === item.is_mirrors;
|
|
82
|
+
const repoName = (!isGitcodeRepo ? extractRepoInfoWithURL(item.import_url) : item.name_with_namespace) || item.name_with_namespace;
|
|
83
|
+
const displayName = formatNameSpace(repoName).join("/");
|
|
84
|
+
return {
|
|
85
|
+
...item,
|
|
86
|
+
path: `${origin}/${item.path_with_namespace}`,
|
|
87
|
+
displayName
|
|
88
|
+
};
|
|
89
|
+
});
|
|
90
|
+
searchFileList.value.forEach((item, index) => {
|
|
91
|
+
triggerReport("expo", { ...item, index });
|
|
92
|
+
});
|
|
93
|
+
} catch (error) {
|
|
94
|
+
console.error("Failed to fetch search results:", error);
|
|
95
|
+
searchFileList.value = [];
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
if (props.searchStr) {
|
|
99
|
+
getData();
|
|
100
|
+
}
|
|
101
|
+
watch(
|
|
102
|
+
() => props.searchStr,
|
|
103
|
+
() => {
|
|
104
|
+
if (timer) {
|
|
105
|
+
clearTimeout(timer);
|
|
106
|
+
}
|
|
107
|
+
timer = setTimeout(() => {
|
|
108
|
+
getData();
|
|
109
|
+
}, 300);
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
onMounted(() => {
|
|
113
|
+
console.log("GloabarSearch");
|
|
114
|
+
});
|
|
115
|
+
return (_ctx, _cache) => {
|
|
116
|
+
return searchFileList.value.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
117
|
+
createElementVNode("p", _hoisted_2, toDisplayString(_ctx.$t("header.repo")), 1),
|
|
118
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(searchFileList.value, (item) => {
|
|
119
|
+
return openBlock(), createElementBlock("a", {
|
|
120
|
+
href: unref(transWebUrl)(item.path, { source_module: "search_project" }),
|
|
121
|
+
key: item.path,
|
|
122
|
+
target: "_blank",
|
|
123
|
+
onClick: ($event) => handleClick(item)
|
|
124
|
+
}, [
|
|
125
|
+
createElementVNode("p", _hoisted_4, [
|
|
126
|
+
createVNode(Icon, {
|
|
127
|
+
name: "gt-line-repositories",
|
|
128
|
+
color: "var(--theme-placeholder)",
|
|
129
|
+
style: { "flex-shrink": "0" }
|
|
130
|
+
}),
|
|
131
|
+
createElementVNode("span", _hoisted_5, toDisplayString(item.displayName), 1)
|
|
132
|
+
])
|
|
133
|
+
], 8, _hoisted_3);
|
|
134
|
+
}), 128))
|
|
135
|
+
])) : createCommentVNode("", true);
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
export {
|
|
140
|
+
_sfc_main as default
|
|
141
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { ref, computed, withDirectives, openBlock, createElementBlock, createElementVNode, toDisplayString, Fragment, renderList, createVNode, vShow } from "vue";
|
|
2
|
+
import { h as headRequest, I as Icon, r as reqCatch } from "./index-36595f17.js";
|
|
3
|
+
import { useRoute, useRouter } from "vue-router";
|
|
4
|
+
import "vue-devui-lal/icon";
|
|
5
|
+
import "vue-devui-lal/icon/style.css";
|
|
6
|
+
import "vue-devui-lal/button";
|
|
7
|
+
import "vue-devui-lal/popover";
|
|
8
|
+
import "vue-devui-lal/tooltip";
|
|
9
|
+
import "vue-devui-lal/textarea";
|
|
10
|
+
import "vue-devui-lal/button/style.css";
|
|
11
|
+
import "vue-devui-lal/popover/style.css";
|
|
12
|
+
import "vue-devui-lal/tooltip/style.css";
|
|
13
|
+
import "vue-devui-lal/textarea/style.css";
|
|
14
|
+
import "vue-i18n";
|
|
15
|
+
import "@vueuse/core";
|
|
16
|
+
import "vue-devui-lal/avatar";
|
|
17
|
+
import "vue-devui-lal/avatar/style.css";
|
|
18
|
+
import "vue-devui-lal/select";
|
|
19
|
+
import "vue-devui-lal/input";
|
|
20
|
+
import "vue-devui-lal/skeleton";
|
|
21
|
+
import "vue-devui-lal/menu";
|
|
22
|
+
import "vue-devui-lal/select/style.css";
|
|
23
|
+
import "vue-devui-lal/input/style.css";
|
|
24
|
+
import "vue-devui-lal/skeleton/style.css";
|
|
25
|
+
import "vue-devui-lal/menu/style.css";
|
|
26
|
+
import "vue-devui-lal/dropdown";
|
|
27
|
+
import "vue-devui-lal/dropdown/style.css";
|
|
28
|
+
import "vue-devui-lal/drawer";
|
|
29
|
+
import "vue-devui-lal/layout";
|
|
30
|
+
import "vue-devui-lal/drawer/style.css";
|
|
31
|
+
import "vue-devui-lal/layout/style.css";
|
|
32
|
+
import "dayjs";
|
|
33
|
+
import "vue-devui-lal/message";
|
|
34
|
+
import "vue-devui-lal/message/style.css";
|
|
35
|
+
import "vue-devui-lal/badge";
|
|
36
|
+
import "vue-devui-lal/badge/style.css";
|
|
37
|
+
import "vue-devui-lal/tabs";
|
|
38
|
+
import "vue-devui-lal/tabs/style.css";
|
|
39
|
+
import "vue-devui-lal/radio";
|
|
40
|
+
import "vue-devui-lal/radio/style.css";
|
|
41
|
+
import "vue-devui-lal/form";
|
|
42
|
+
import "vue-devui-lal/form/style.css";
|
|
43
|
+
import "vue-devui-lal/checkbox";
|
|
44
|
+
import "vue-devui-lal/checkbox/style.css";
|
|
45
|
+
import "vue-devui-lal/modal";
|
|
46
|
+
import "vue-devui-lal/modal/style.css";
|
|
47
|
+
import "vue-devui-lal/notification";
|
|
48
|
+
import "vue-devui-lal/notification/style.css";
|
|
49
|
+
const ProjectSearch_vue_vue_type_style_index_0_lang = "";
|
|
50
|
+
const _hoisted_1 = { class: "px-[8px] history-list-project pl-[8px]" };
|
|
51
|
+
const _hoisted_2 = { class: "history-list-project-globartitle mb-[4px] mt-[16px]" };
|
|
52
|
+
const _hoisted_3 = ["href"];
|
|
53
|
+
const _hoisted_4 = { class: "flex history-list-project-globarbox" };
|
|
54
|
+
const _hoisted_5 = { class: "ml-[8px] ellipsis" };
|
|
55
|
+
const _sfc_main = /* @__PURE__ */ Object.assign({ name: "SearchFileList" }, {
|
|
56
|
+
__name: "ProjectSearch",
|
|
57
|
+
props: ["searchStr", "searchInfo", "isSearchPage"],
|
|
58
|
+
setup(__props) {
|
|
59
|
+
const props = __props;
|
|
60
|
+
const filedList = ref([]);
|
|
61
|
+
const route = useRoute();
|
|
62
|
+
const router = useRouter();
|
|
63
|
+
const API = headRequest(inject("request"));
|
|
64
|
+
const loadFileList = async () => {
|
|
65
|
+
var _a, _b, _c;
|
|
66
|
+
if (!((_a = props == null ? void 0 : props.searchInfo) == null ? void 0 : _a.searchScopeName))
|
|
67
|
+
return;
|
|
68
|
+
const params = {
|
|
69
|
+
repoId: encodeURIComponent(props.searchInfo.searchScopeName),
|
|
70
|
+
ref_name: ((_b = props.searchInfo) == null ? void 0 : _b.branch) || ""
|
|
71
|
+
};
|
|
72
|
+
const res = await reqCatch(API.getRepoFileList, params);
|
|
73
|
+
filedList.value = ((_c = res == null ? void 0 : res.data) == null ? void 0 : _c.data) || [];
|
|
74
|
+
};
|
|
75
|
+
loadFileList();
|
|
76
|
+
const searchFileList = computed(() => {
|
|
77
|
+
return filedList.value.filter((item) => {
|
|
78
|
+
var _a;
|
|
79
|
+
return (_a = item == null ? void 0 : item.toLowerCase()) == null ? void 0 : _a.includes(props.searchStr);
|
|
80
|
+
}).splice(0, 5);
|
|
81
|
+
});
|
|
82
|
+
const getRoutePath = (filePath) => {
|
|
83
|
+
let params = {};
|
|
84
|
+
if (props.isSearchPage) {
|
|
85
|
+
const [namespace, repoName] = decodeURIComponent(props.searchInfo.repo).split("/");
|
|
86
|
+
params.namespace = namespace;
|
|
87
|
+
params.repoName = repoName;
|
|
88
|
+
} else {
|
|
89
|
+
params = route.params;
|
|
90
|
+
}
|
|
91
|
+
const defaultBranch = props.searchInfo.branch;
|
|
92
|
+
const branchName = Array.isArray(defaultBranch) ? defaultBranch : defaultBranch == null ? void 0 : defaultBranch.split("/");
|
|
93
|
+
const routerPath = router.resolve({
|
|
94
|
+
name: "repoFile",
|
|
95
|
+
params: {
|
|
96
|
+
...params,
|
|
97
|
+
branchName,
|
|
98
|
+
filePath: filePath.split("/")
|
|
99
|
+
},
|
|
100
|
+
query: {
|
|
101
|
+
init: "initTree"
|
|
102
|
+
}
|
|
103
|
+
}).href;
|
|
104
|
+
return routerPath;
|
|
105
|
+
};
|
|
106
|
+
return (_ctx, _cache) => {
|
|
107
|
+
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [
|
|
108
|
+
createElementVNode("p", _hoisted_2, toDisplayString(_ctx.$t("header.file")), 1),
|
|
109
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(searchFileList.value, (item, index) => {
|
|
110
|
+
return openBlock(), createElementBlock("a", {
|
|
111
|
+
key: index,
|
|
112
|
+
href: getRoutePath(item)
|
|
113
|
+
}, [
|
|
114
|
+
createElementVNode("p", _hoisted_4, [
|
|
115
|
+
createVNode(Icon, {
|
|
116
|
+
name: "gt-file-c",
|
|
117
|
+
style: { "flex-shrink": "0" }
|
|
118
|
+
}),
|
|
119
|
+
createElementVNode("span", _hoisted_5, toDisplayString(item), 1)
|
|
120
|
+
])
|
|
121
|
+
], 8, _hoisted_3);
|
|
122
|
+
}), 128))
|
|
123
|
+
], 512)), [
|
|
124
|
+
[vShow, searchFileList.value.length]
|
|
125
|
+
]);
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
export {
|
|
130
|
+
_sfc_main as default
|
|
131
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, createVNode, toDisplayString, withModifiers, createCommentVNode } from "vue";
|
|
2
|
+
import { d as i18n, I as Icon, _ as _export_sfc } from "./index-36595f17.js";
|
|
3
|
+
import "vue-devui-lal/icon";
|
|
4
|
+
import "vue-devui-lal/icon/style.css";
|
|
5
|
+
import "vue-devui-lal/button";
|
|
6
|
+
import "vue-devui-lal/popover";
|
|
7
|
+
import "vue-devui-lal/tooltip";
|
|
8
|
+
import "vue-devui-lal/textarea";
|
|
9
|
+
import "vue-devui-lal/button/style.css";
|
|
10
|
+
import "vue-devui-lal/popover/style.css";
|
|
11
|
+
import "vue-devui-lal/tooltip/style.css";
|
|
12
|
+
import "vue-devui-lal/textarea/style.css";
|
|
13
|
+
import "vue-i18n";
|
|
14
|
+
import "vue-router";
|
|
15
|
+
import "@vueuse/core";
|
|
16
|
+
import "vue-devui-lal/avatar";
|
|
17
|
+
import "vue-devui-lal/avatar/style.css";
|
|
18
|
+
import "vue-devui-lal/select";
|
|
19
|
+
import "vue-devui-lal/input";
|
|
20
|
+
import "vue-devui-lal/skeleton";
|
|
21
|
+
import "vue-devui-lal/menu";
|
|
22
|
+
import "vue-devui-lal/select/style.css";
|
|
23
|
+
import "vue-devui-lal/input/style.css";
|
|
24
|
+
import "vue-devui-lal/skeleton/style.css";
|
|
25
|
+
import "vue-devui-lal/menu/style.css";
|
|
26
|
+
import "vue-devui-lal/dropdown";
|
|
27
|
+
import "vue-devui-lal/dropdown/style.css";
|
|
28
|
+
import "vue-devui-lal/drawer";
|
|
29
|
+
import "vue-devui-lal/layout";
|
|
30
|
+
import "vue-devui-lal/drawer/style.css";
|
|
31
|
+
import "vue-devui-lal/layout/style.css";
|
|
32
|
+
import "dayjs";
|
|
33
|
+
import "vue-devui-lal/message";
|
|
34
|
+
import "vue-devui-lal/message/style.css";
|
|
35
|
+
import "vue-devui-lal/badge";
|
|
36
|
+
import "vue-devui-lal/badge/style.css";
|
|
37
|
+
import "vue-devui-lal/tabs";
|
|
38
|
+
import "vue-devui-lal/tabs/style.css";
|
|
39
|
+
import "vue-devui-lal/radio";
|
|
40
|
+
import "vue-devui-lal/radio/style.css";
|
|
41
|
+
import "vue-devui-lal/form";
|
|
42
|
+
import "vue-devui-lal/form/style.css";
|
|
43
|
+
import "vue-devui-lal/checkbox";
|
|
44
|
+
import "vue-devui-lal/checkbox/style.css";
|
|
45
|
+
import "vue-devui-lal/modal";
|
|
46
|
+
import "vue-devui-lal/modal/style.css";
|
|
47
|
+
import "vue-devui-lal/notification";
|
|
48
|
+
import "vue-devui-lal/notification/style.css";
|
|
49
|
+
const _hoisted_1 = { class: "history-list" };
|
|
50
|
+
const _hoisted_2 = ["onClick", "onMouseenter"];
|
|
51
|
+
const _hoisted_3 = { class: "history-list-box__content flex items-center w-full" };
|
|
52
|
+
const _hoisted_4 = ["title"];
|
|
53
|
+
const _hoisted_5 = ["title"];
|
|
54
|
+
const _hoisted_6 = { class: "item-tx" };
|
|
55
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
56
|
+
__name: "SearchHistoryList",
|
|
57
|
+
props: {
|
|
58
|
+
searchHistoryList: {},
|
|
59
|
+
visitHistoryList: {},
|
|
60
|
+
activeIndex: {}
|
|
61
|
+
},
|
|
62
|
+
emits: [
|
|
63
|
+
"clearHistoryData",
|
|
64
|
+
"toSearch",
|
|
65
|
+
"onDeleteHistory",
|
|
66
|
+
"onDeleteVist",
|
|
67
|
+
"onVistPage",
|
|
68
|
+
"onSearchEnter",
|
|
69
|
+
"resetIndex"
|
|
70
|
+
],
|
|
71
|
+
setup(__props, { emit: __emit }) {
|
|
72
|
+
const { t } = i18n.global;
|
|
73
|
+
const props = __props;
|
|
74
|
+
const emits = __emit;
|
|
75
|
+
const historyList = computed(() => {
|
|
76
|
+
var _a;
|
|
77
|
+
return (_a = props.searchHistoryList) == null ? void 0 : _a.map((item) => {
|
|
78
|
+
const repoTitle = item.repo ? `${t("header.repo")} ${decodeURIComponent(item.repo)}:` : "";
|
|
79
|
+
const namespaceTitle = item.namespace ? `${item.scope === "group" ? t("header.org") : t("header.user")} ${decodeURIComponent(item.namespace)}:` : "";
|
|
80
|
+
return { ...item, repoTitle, namespaceTitle };
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
computed(() => {
|
|
84
|
+
return props.visitHistoryList;
|
|
85
|
+
});
|
|
86
|
+
const resetIndex = () => {
|
|
87
|
+
emits("resetIndex");
|
|
88
|
+
};
|
|
89
|
+
const toSearch = (item) => {
|
|
90
|
+
emits("toSearch", item);
|
|
91
|
+
};
|
|
92
|
+
const onDeleteHistory = (index) => {
|
|
93
|
+
emits("onDeleteHistory", index);
|
|
94
|
+
};
|
|
95
|
+
const onSearchEnter = (index) => {
|
|
96
|
+
emits("onSearchEnter", index);
|
|
97
|
+
};
|
|
98
|
+
return (_ctx, _cache) => {
|
|
99
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
100
|
+
_ctx.searchHistoryList.length ? (openBlock(), createElementBlock("ul", {
|
|
101
|
+
key: 0,
|
|
102
|
+
class: "history-list-box mt-[16px]",
|
|
103
|
+
onMouseleave: resetIndex
|
|
104
|
+
}, [
|
|
105
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(historyList.value, (item, index) => {
|
|
106
|
+
return openBlock(), createElementBlock("li", {
|
|
107
|
+
key: item,
|
|
108
|
+
class: normalizeClass(_ctx.activeIndex === index ? "hoverbg" : ""),
|
|
109
|
+
onClick: ($event) => toSearch(item),
|
|
110
|
+
onMouseenter: ($event) => onSearchEnter(index)
|
|
111
|
+
}, [
|
|
112
|
+
createElementVNode("div", _hoisted_3, [
|
|
113
|
+
createVNode(Icon, {
|
|
114
|
+
name: "gt-line-time",
|
|
115
|
+
color: "var(--devui-aide-text)",
|
|
116
|
+
class: "mr-[8px]"
|
|
117
|
+
}),
|
|
118
|
+
createElementVNode("span", {
|
|
119
|
+
class: "whitespace-nowrap overflow-hidden text-ellipsis",
|
|
120
|
+
title: item.repoTitle
|
|
121
|
+
}, toDisplayString(item.repoTitle), 9, _hoisted_4),
|
|
122
|
+
createElementVNode("span", {
|
|
123
|
+
class: "whitespace-nowrap overflow-hidden text-ellipsis",
|
|
124
|
+
title: item.namespaceTitle
|
|
125
|
+
}, toDisplayString(item.namespaceTitle), 9, _hoisted_5),
|
|
126
|
+
createElementVNode("span", _hoisted_6, toDisplayString(item.q || item), 1)
|
|
127
|
+
]),
|
|
128
|
+
createVNode(Icon, {
|
|
129
|
+
name: "gt-line-close",
|
|
130
|
+
class: "itemClose",
|
|
131
|
+
onClick: withModifiers(($event) => onDeleteHistory(index), ["stop"])
|
|
132
|
+
}, null, 8, ["onClick"])
|
|
133
|
+
], 42, _hoisted_2);
|
|
134
|
+
}), 128))
|
|
135
|
+
], 32)) : createCommentVNode("", true)
|
|
136
|
+
]);
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
const SearchHistoryList_vue_vue_type_style_index_0_scoped_09e45f4e_lang = "";
|
|
141
|
+
const SearchHistoryList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-09e45f4e"]]);
|
|
142
|
+
export {
|
|
143
|
+
SearchHistoryList as default
|
|
144
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, withDirectives, withModifiers, createVNode, vShow } from "vue";
|
|
2
|
+
import { I as Icon, _ as _export_sfc } from "./index-36595f17.js";
|
|
3
|
+
import "vue-devui-lal/icon";
|
|
4
|
+
import "vue-devui-lal/icon/style.css";
|
|
5
|
+
import "vue-devui-lal/button";
|
|
6
|
+
import "vue-devui-lal/popover";
|
|
7
|
+
import "vue-devui-lal/tooltip";
|
|
8
|
+
import "vue-devui-lal/textarea";
|
|
9
|
+
import "vue-devui-lal/button/style.css";
|
|
10
|
+
import "vue-devui-lal/popover/style.css";
|
|
11
|
+
import "vue-devui-lal/tooltip/style.css";
|
|
12
|
+
import "vue-devui-lal/textarea/style.css";
|
|
13
|
+
import "vue-i18n";
|
|
14
|
+
import "vue-router";
|
|
15
|
+
import "@vueuse/core";
|
|
16
|
+
import "vue-devui-lal/avatar";
|
|
17
|
+
import "vue-devui-lal/avatar/style.css";
|
|
18
|
+
import "vue-devui-lal/select";
|
|
19
|
+
import "vue-devui-lal/input";
|
|
20
|
+
import "vue-devui-lal/skeleton";
|
|
21
|
+
import "vue-devui-lal/menu";
|
|
22
|
+
import "vue-devui-lal/select/style.css";
|
|
23
|
+
import "vue-devui-lal/input/style.css";
|
|
24
|
+
import "vue-devui-lal/skeleton/style.css";
|
|
25
|
+
import "vue-devui-lal/menu/style.css";
|
|
26
|
+
import "vue-devui-lal/dropdown";
|
|
27
|
+
import "vue-devui-lal/dropdown/style.css";
|
|
28
|
+
import "vue-devui-lal/drawer";
|
|
29
|
+
import "vue-devui-lal/layout";
|
|
30
|
+
import "vue-devui-lal/drawer/style.css";
|
|
31
|
+
import "vue-devui-lal/layout/style.css";
|
|
32
|
+
import "dayjs";
|
|
33
|
+
import "vue-devui-lal/message";
|
|
34
|
+
import "vue-devui-lal/message/style.css";
|
|
35
|
+
import "vue-devui-lal/badge";
|
|
36
|
+
import "vue-devui-lal/badge/style.css";
|
|
37
|
+
import "vue-devui-lal/tabs";
|
|
38
|
+
import "vue-devui-lal/tabs/style.css";
|
|
39
|
+
import "vue-devui-lal/radio";
|
|
40
|
+
import "vue-devui-lal/radio/style.css";
|
|
41
|
+
import "vue-devui-lal/form";
|
|
42
|
+
import "vue-devui-lal/form/style.css";
|
|
43
|
+
import "vue-devui-lal/checkbox";
|
|
44
|
+
import "vue-devui-lal/checkbox/style.css";
|
|
45
|
+
import "vue-devui-lal/modal";
|
|
46
|
+
import "vue-devui-lal/modal/style.css";
|
|
47
|
+
import "vue-devui-lal/notification";
|
|
48
|
+
import "vue-devui-lal/notification/style.css";
|
|
49
|
+
const _hoisted_1 = { class: "ellipsis" };
|
|
50
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
51
|
+
__name: "SearchPrefixTag",
|
|
52
|
+
props: {
|
|
53
|
+
tag: {},
|
|
54
|
+
closeVisible: { type: Boolean }
|
|
55
|
+
},
|
|
56
|
+
emits: ["inputClick", "closeTag"],
|
|
57
|
+
setup(__props, { emit: __emit }) {
|
|
58
|
+
const emits = __emit;
|
|
59
|
+
const onInputClick = () => {
|
|
60
|
+
emits("inputClick");
|
|
61
|
+
};
|
|
62
|
+
const onCloseTag = () => {
|
|
63
|
+
emits("closeTag");
|
|
64
|
+
};
|
|
65
|
+
return (_ctx, _cache) => {
|
|
66
|
+
return openBlock(), createElementBlock("p", {
|
|
67
|
+
class: "g-header-search-projectname flex items-center px-[16px]",
|
|
68
|
+
onClick: onInputClick
|
|
69
|
+
}, [
|
|
70
|
+
createElementVNode("span", _hoisted_1, toDisplayString(_ctx.tag), 1),
|
|
71
|
+
withDirectives(createElementVNode("span", {
|
|
72
|
+
class: "g-header-search-projectname-close ml-[12px] flex",
|
|
73
|
+
onClick: withModifiers(onCloseTag, ["stop"])
|
|
74
|
+
}, [
|
|
75
|
+
createVNode(Icon, {
|
|
76
|
+
name: "icon-close",
|
|
77
|
+
color: "#fff",
|
|
78
|
+
size: "7px"
|
|
79
|
+
})
|
|
80
|
+
], 512), [
|
|
81
|
+
[vShow, _ctx.closeVisible]
|
|
82
|
+
])
|
|
83
|
+
]);
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
const SearchPrefixTag_vue_vue_type_style_index_0_scoped_ebf3b8a6_lang = "";
|
|
88
|
+
const SearchPrefixTag = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ebf3b8a6"]]);
|
|
89
|
+
export {
|
|
90
|
+
SearchPrefixTag as default
|
|
91
|
+
};
|