vue-layout-gitcode 1.5.4 → 1.5.6

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,8 +1,8 @@
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-FMIlpZeB.js";
5
- import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-C-k-uKnJ.js";
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-rpfv9sUu.js";
5
+ import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-CAZ8HuwO.js";
6
6
  import "vue-devui-lal/tooltip";
7
7
  import "vue-devui-lal/tooltip/style.css";
8
8
  import "vue-router";
@@ -0,0 +1,85 @@
1
+ import { ref, computed, createElementBlock, openBlock, normalizeClass, createBlock, createElementVNode, toDisplayString } from "vue";
2
+ import { _ as _export_sfc, y as ThemeType, z as currentTheme, j as LANG_ZH, A as LANG_EN, B as getLocaleLang, G as GIcon } from "./index-rpfv9sUu.js";
3
+ const _hoisted_1 = ["src"];
4
+ const _sfc_main = {
5
+ __name: "MenuItem",
6
+ props: {
7
+ item: {
8
+ type: Object,
9
+ default: () => {
10
+ }
11
+ }
12
+ },
13
+ setup(__props) {
14
+ const props = __props;
15
+ const isHover = ref(false);
16
+ const isSelected = computed(() => {
17
+ return props.item.id === 0 || isHover.value;
18
+ });
19
+ const currentImg = computed(() => {
20
+ const imgMap = {
21
+ [ThemeType.WHITE]: {
22
+ selected: props.item.left_menu_logo_hover,
23
+ unselected: props.item.left_menu_logo
24
+ },
25
+ [ThemeType.BLACK]: {
26
+ selected: props.item.left_menu_logo_hover_black,
27
+ unselected: props.item.left_menu_logo_black
28
+ }
29
+ };
30
+ if (isSelected.value) {
31
+ return imgMap[currentTheme.value].selected;
32
+ } else {
33
+ return imgMap[currentTheme.value].unselected;
34
+ }
35
+ });
36
+ const currentName = computed(() => {
37
+ const nameMap = {
38
+ [LANG_EN]: props.item.left_menu_name_en,
39
+ [LANG_ZH]: props.item.left_menu_name_cn
40
+ };
41
+ return nameMap[getLocaleLang()] || props.item.left_menu_name_cn;
42
+ });
43
+ const handleMouseEnter = () => {
44
+ isHover.value = true;
45
+ };
46
+ const handleMouseLeave = () => {
47
+ isHover.value = false;
48
+ };
49
+ const handleMenuClick = () => {
50
+ if (props.item.is_open_new_tab) {
51
+ window.open(props.item.left_menu_url, "_blank");
52
+ } else if (props.item.jump_type === 3) {
53
+ router.push(props.item.left_menu_url);
54
+ } else {
55
+ window.location.href = props.item.left_menu_url;
56
+ }
57
+ };
58
+ return (_ctx, _cache) => {
59
+ return openBlock(), createElementBlock("div", {
60
+ class: normalizeClass(["menu-item", { "menu-item__selected": isSelected.value }]),
61
+ onMouseenter: handleMouseEnter,
62
+ onMouseleave: handleMouseLeave,
63
+ onClick: handleMenuClick
64
+ }, [
65
+ props.item.isIcon ? (openBlock(), createBlock(GIcon, {
66
+ key: 0,
67
+ name: currentImg.value,
68
+ class: "default-icon",
69
+ size: "16",
70
+ color: "var(--theme-menu-icon-fill)"
71
+ }, null, 8, ["name"])) : (openBlock(), createElementBlock("img", {
72
+ key: 1,
73
+ class: "menu-item__icon",
74
+ src: currentImg.value,
75
+ alt: ""
76
+ }, null, 8, _hoisted_1)),
77
+ createElementVNode("span", null, toDisplayString(currentName.value), 1)
78
+ ], 34);
79
+ };
80
+ }
81
+ };
82
+ const MenuItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-gitcode-layout-lib"]]);
83
+ export {
84
+ MenuItem as default
85
+ };
@@ -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-FMIlpZeB.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-rpfv9sUu.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-FMIlpZeB.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-rpfv9sUu.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-FMIlpZeB.js";
2
+ import { G as GIcon, _ as _export_sfc } from "./index-rpfv9sUu.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-C-k-uKnJ.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-FMIlpZeB.js";
2
+ import { u as useReportRepo, S as SearchRepoCard } from "./index-CAZ8HuwO.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-rpfv9sUu.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-FMIlpZeB.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-rpfv9sUu.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-FMIlpZeB.js";
2
+ import { a as i18n, h as headRequest, G as GIcon } from "./index-rpfv9sUu.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,5 +1,5 @@
1
1
  import { ref, watchEffect, defineComponent, toDisplayString, unref, inject, createElementBlock, openBlock, normalizeClass, createElementVNode, withModifiers, withDirectives, vShow, createVNode, computed, createCommentVNode, normalizeStyle, createTextVNode, onMounted, onUnmounted, Fragment, createBlock, renderList, withCtx, reactive } from "vue";
2
- import { d as debounce, t as transferNumber, G as GIcon, s as setLoginTriggerSource, f as useRequestReport, r as reqCatch, h as headRequest, _ as _export_sfc, a as i18n, T as TOPIC_TYPE, g as useTimeFormat, L as LANG_KEY, j as LANG_ZH, k as usePageResize, m as isGstarRepo, n as _sfc_main$9, o as isIncubationRepo, p as highlightWords, q as transWebUrl, w as _frEventTrack, E as EVENT_NAME, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-FMIlpZeB.js";
2
+ import { d as debounce, t as transferNumber, G as GIcon, s as setLoginTriggerSource, f as useRequestReport, r as reqCatch, h as headRequest, _ as _export_sfc, a as i18n, T as TOPIC_TYPE, g as useTimeFormat, L as LANG_KEY, j as LANG_ZH, k as usePageResize, m as isGstarRepo, n as _sfc_main$9, o as isIncubationRepo, p as highlightWords, q as transWebUrl, w as _frEventTrack, E as EVENT_NAME, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-rpfv9sUu.js";
3
3
  import { useRouter } from "vue-router";
4
4
  import { Row, Col } from "vue-devui-lal/grid";
5
5
  import { Skeleton, SkeletonItem } from "vue-devui-lal/skeleton";
@@ -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 { x as useLayoutConfig, _ as _export_sfc } from "./index-FMIlpZeB.js";
3
+ import { x as useLayoutConfig, _ as _export_sfc } from "./index-rpfv9sUu.js";
4
4
  import "vue-devui-lal/overlay/style.css";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "index",