vue-layout-gitcode 1.5.31 → 1.5.33
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-cxWyqOVq.js → GloabarSearch-DyXek_c3.js} +2 -3
- package/MenuItem-BDzZzccs.js +118 -0
- package/{ProjectSearch-DJtzeNQN.js → ProjectSearch-DSCVf10K.js} +1 -1
- package/{SearchHistoryList-DNvb17Qu.js → SearchHistoryList-B6ncq5XA.js} +1 -1
- package/{SearchPrefixTag-CC8I_pnR.js → SearchPrefixTag-D1k6RCqo.js} +1 -1
- package/{SearchRecommed-BLmzGc3n.js → SearchRecommed-CgOR7LGf.js} +2 -2
- package/{SearchScopeList-CNe-HOsm.js → SearchScopeList-CJ254tKx.js} +1 -1
- package/{UserSearch-Bk4Jz9BI.js → UserSearch-CenBgj0a.js} +1 -1
- package/{index-D9MQVvdv.js → index-CSJinS1c.js} +1 -1
- package/{index-BCg43fjZ.js → index-DMsSwmUp.js} +2293 -1110
- package/{index-Cb2YYDY6.js → index-QlmVZGjv.js} +1 -2
- package/index.js +10 -10
- package/{notice-DVT7BIKA.js → notice-BytURrNu.js} +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/MenuItem-6YbszpJN.js +0 -150
- package/ProjectMenuList-DzZpKwlT.js +0 -389
- package/ProjectMenuListV2-Fbjuk-WR.js +0 -209
- package/transWebUrl-DBQrAHwN.js +0 -21
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { defineComponent, inject, createElementBlock, openBlock, Fragment, createElementVNode, toDisplayString, createVNode, unref, renderList, withDirectives, createBlock, ref, watch, onMounted, createCommentVNode } from "vue";
|
|
2
2
|
import "vue-devui-lal/icon";
|
|
3
3
|
import "vue-devui-lal/icon/style.css";
|
|
4
|
-
import { h as headRequest, R as REPO_MODULE, a as i18n, G as GIcon, v as vElementExposure, b as REPO_EVENT, _ as _export_sfc, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-
|
|
4
|
+
import { h as headRequest, R as REPO_MODULE, a as i18n, G as GIcon, v as vElementExposure, b as REPO_EVENT, _ as _export_sfc, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-DMsSwmUp.js";
|
|
5
5
|
import "lodash/debounce";
|
|
6
|
-
import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-
|
|
7
|
-
import "./transWebUrl-DBQrAHwN.js";
|
|
6
|
+
import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-QlmVZGjv.js";
|
|
8
7
|
import "vue-devui-lal/tooltip";
|
|
9
8
|
import "vue-devui-lal/tooltip/style.css";
|
|
10
9
|
import "vue-router";
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { defineComponent, inject, ref, computed, createElementBlock, openBlock, normalizeClass, createBlock, createElementVNode, toDisplayString } from "vue";
|
|
2
|
+
import { x as currentTheme, y as ThemeType, g as LANG_ZH, z as LANG_EN, A as getLocaleLang, G as GIcon, B as isHttps, C as emitEvent, b as REPO_EVENT, _ as _export_sfc } from "./index-DMsSwmUp.js";
|
|
3
|
+
import { useRouter } from "vue-router";
|
|
4
|
+
const _hoisted_1 = ["src"];
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "MenuItem",
|
|
7
|
+
props: {
|
|
8
|
+
item: {
|
|
9
|
+
type: Object,
|
|
10
|
+
default: () => {
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
active: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false
|
|
16
|
+
},
|
|
17
|
+
isLogin: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
setup(__props) {
|
|
23
|
+
const useReport = inject("useReport");
|
|
24
|
+
const router = useRouter();
|
|
25
|
+
const props = __props;
|
|
26
|
+
const isHover = ref(false);
|
|
27
|
+
const isSelected = computed(() => {
|
|
28
|
+
return props.active || isHover.value;
|
|
29
|
+
});
|
|
30
|
+
const currentImg = computed(() => {
|
|
31
|
+
console.log("currentTheme", currentTheme.value, "left_menu_logo_black", props.item.left_menu_logo_black);
|
|
32
|
+
const imgMap = {
|
|
33
|
+
[ThemeType.WHITE]: {
|
|
34
|
+
selected: props.item.left_menu_logo_hover,
|
|
35
|
+
unselected: props.item.left_menu_logo
|
|
36
|
+
},
|
|
37
|
+
[ThemeType.BLACK]: {
|
|
38
|
+
selected: props.item.left_menu_logo_hover_black,
|
|
39
|
+
unselected: props.item.left_menu_logo_black
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
if (isSelected.value) {
|
|
43
|
+
return imgMap[currentTheme.value].selected;
|
|
44
|
+
} else {
|
|
45
|
+
return imgMap[currentTheme.value].unselected;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
console.log("currentImg", currentImg.value);
|
|
49
|
+
const currentName = computed(() => {
|
|
50
|
+
const nameMap = {
|
|
51
|
+
[LANG_EN]: props.item.left_menu_name_en,
|
|
52
|
+
[LANG_ZH]: props.item.left_menu_name_cn
|
|
53
|
+
};
|
|
54
|
+
return nameMap[getLocaleLang()] || props.item.left_menu_name_cn;
|
|
55
|
+
});
|
|
56
|
+
const handleMouseEnter = () => {
|
|
57
|
+
isHover.value = true;
|
|
58
|
+
};
|
|
59
|
+
const handleMouseLeave = () => {
|
|
60
|
+
isHover.value = false;
|
|
61
|
+
};
|
|
62
|
+
const clickMenuReport = () => {
|
|
63
|
+
if (!useReport) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const reportName = props.item.left_menu_name_cn;
|
|
67
|
+
if (reportName) {
|
|
68
|
+
useReport(REPO_EVENT.CLICK, { module_name: `侧边栏_${reportName}` });
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const handleMenuClick = () => {
|
|
72
|
+
const currentHref = window.location.href;
|
|
73
|
+
if (props.item.left_menu_url === currentHref) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (props.item.is_open_new_tab) {
|
|
77
|
+
window.open(props.item.left_menu_url, "_blank");
|
|
78
|
+
} else if (isHttps(props.item.left_menu_url)) {
|
|
79
|
+
window.location.href = props.item.left_menu_url;
|
|
80
|
+
} else {
|
|
81
|
+
if (props.item.left_menu_url != "/" && !props.isLogin) {
|
|
82
|
+
emitEvent("login", { loginTriggerSource: `aside_${props.item.left_menu_url}` });
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
router.push({
|
|
86
|
+
path: props.item.left_menu_url
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
clickMenuReport();
|
|
90
|
+
};
|
|
91
|
+
return (_ctx, _cache) => {
|
|
92
|
+
return openBlock(), createElementBlock("div", {
|
|
93
|
+
class: normalizeClass(["menu-item", { "menu-item__selected": isSelected.value }]),
|
|
94
|
+
onMouseenter: handleMouseEnter,
|
|
95
|
+
onMouseleave: handleMouseLeave,
|
|
96
|
+
onClick: handleMenuClick
|
|
97
|
+
}, [
|
|
98
|
+
props.item.isIcon ? (openBlock(), createBlock(GIcon, {
|
|
99
|
+
key: 0,
|
|
100
|
+
name: currentImg.value,
|
|
101
|
+
class: "default-icon",
|
|
102
|
+
size: "16",
|
|
103
|
+
color: "var(--theme-menu-icon-fill)"
|
|
104
|
+
}, null, 8, ["name"])) : (openBlock(), createElementBlock("img", {
|
|
105
|
+
key: 1,
|
|
106
|
+
class: "menu-item__icon",
|
|
107
|
+
src: currentImg.value,
|
|
108
|
+
alt: ""
|
|
109
|
+
}, null, 8, _hoisted_1)),
|
|
110
|
+
createElementVNode("span", null, toDisplayString(currentName.value), 1)
|
|
111
|
+
], 34);
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
const MenuItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-gitcode-layout-lib"]]);
|
|
116
|
+
export {
|
|
117
|
+
MenuItem as default
|
|
118
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, inject, computed, withDirectives, createElementBlock, openBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, createVNode, vShow } from "vue";
|
|
2
|
-
import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-
|
|
2
|
+
import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-DMsSwmUp.js";
|
|
3
3
|
import { useRoute, useRouter } from "vue-router";
|
|
4
4
|
import "vue-devui-lal/icon";
|
|
5
5
|
import "vue-devui-lal/icon/style.css";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
2
|
+
import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-DMsSwmUp.js";
|
|
3
3
|
import "vue-devui-lal/icon";
|
|
4
4
|
import "vue-devui-lal/icon/style.css";
|
|
5
5
|
const _hoisted_1 = { class: "history-list" };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createElementBlock, openBlock, createElementVNode, withDirectives, toDisplayString, withModifiers, createVNode, vShow } from "vue";
|
|
2
|
-
import { G as GIcon, _ as _export_sfc } from "./index-
|
|
2
|
+
import { G as GIcon, _ as _export_sfc } from "./index-DMsSwmUp.js";
|
|
3
3
|
import "vue-devui-lal/icon";
|
|
4
4
|
import "vue-devui-lal/icon/style.css";
|
|
5
5
|
const _hoisted_1 = { class: "ellipsis" };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, inject, ref, onMounted, createElementBlock, openBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, createBlock, createVNode, withCtx } from "vue";
|
|
2
|
-
import { u as useReportRepo, S as SearchRepoCard } from "./index-
|
|
3
|
-
import { a as i18n, h as headRequest, R as REPO_MODULE, b as REPO_EVENT, l as localStorage, _ as _export_sfc } from "./index-
|
|
2
|
+
import { u as useReportRepo, S as SearchRepoCard } from "./index-QlmVZGjv.js";
|
|
3
|
+
import { a as i18n, h as headRequest, R as REPO_MODULE, b as REPO_EVENT, l as localStorage, _ as _export_sfc } from "./index-DMsSwmUp.js";
|
|
4
4
|
import { Row, Col } from "vue-devui-lal/grid";
|
|
5
5
|
import { SkeletonItem } from "vue-devui-lal/skeleton";
|
|
6
6
|
import "vue-devui-lal/grid/style.css";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createElementBlock, openBlock, Fragment, renderList, createElementVNode, createVNode, createCommentVNode, toDisplayString, unref } from "vue";
|
|
2
|
-
import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-
|
|
2
|
+
import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-DMsSwmUp.js";
|
|
3
3
|
import "vue-devui-lal/icon";
|
|
4
4
|
import "vue-devui-lal/icon/style.css";
|
|
5
5
|
const _hoisted_1 = ["onClick"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inject, ref, watch, withDirectives, createElementBlock, openBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, createVNode, vShow } from "vue";
|
|
2
|
-
import { a as i18n, h as headRequest, G as GIcon } from "./index-
|
|
2
|
+
import { a as i18n, h as headRequest, G as GIcon } from "./index-DMsSwmUp.js";
|
|
3
3
|
import "vue-devui-lal/icon";
|
|
4
4
|
import "vue-devui-lal/icon/style.css";
|
|
5
5
|
const _hoisted_1 = { class: "px-[8px] history-list-project pl-[8px]" };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, onMounted, createBlock, openBlock, unref, withCtx, createElementVNode } from "vue";
|
|
2
2
|
import { FixedOverlay } from "vue-devui-lal/overlay";
|
|
3
|
-
import {
|
|
3
|
+
import { w as useLayoutConfig, _ as _export_sfc } from "./index-DMsSwmUp.js";
|
|
4
4
|
import "vue-devui-lal/overlay/style.css";
|
|
5
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
6
|
__name: "index",
|