vue-layout-gitcode 1.6.13 → 1.7.2
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-B1fNx0fK.js → GloabarSearch-b2756991.js} +47 -5
- package/{MenuItem-CJqGsBe8.js → MenuItem-1fd24e33.js} +53 -3
- package/{ProjectMenuList-EFHrpPLY.js → ProjectMenuList-2a6149ed.js} +48 -5
- package/{ProjectMenuListV2-DdIFowq8.js → ProjectMenuListV2-73185b74.js} +52 -6
- package/{ProjectSearch-x0Lh1u4S.js → ProjectSearch-9b7aa136.js} +53 -3
- package/{SearchHistoryList-DIr1OcUp.js → SearchHistoryList-10183ba2.js} +53 -3
- package/SearchPrefixTag-f8fecfca.js +96 -0
- package/{SearchRecommed-BeipCUrr.js → SearchRecommed-30a4400f.js} +55 -4
- package/{SearchScopeList-BMnDXIw7.js → SearchScopeList-0e1cd79b.js} +53 -3
- package/{UserSearch-CG96SDsU.js → UserSearch-34939b97.js} +52 -2
- package/{index-D5P2-t2Y.js → index-5bcdb26a.js} +1267 -1089
- package/{index-DcWDgmyd.js → index-628b8678.js} +32 -22
- package/index-8931db99.js +112 -0
- package/index.js +53 -1
- package/{notice-9MOGpCJA.js → notice-169ce3dc.js} +51 -6
- package/package.json +1 -1
- package/style.css +1 -1
- package/{transWebUrl-2vA_yZh2.js → transWebUrl-d207ebc7.js} +5 -3
- package/SearchPrefixTag-S1slSvR1.js +0 -46
- package/index-w6MI7kmM.js +0 -61
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { w as useLayoutConfig } from "./index-
|
|
1
|
+
import { w as useLayoutConfig } from "./index-5bcdb26a.js";
|
|
2
2
|
const layoutConfig = useLayoutConfig();
|
|
3
3
|
const transWebUrl = (url, params) => {
|
|
4
|
-
if (!url)
|
|
4
|
+
if (!url)
|
|
5
|
+
return url;
|
|
5
6
|
let processedUrl = url;
|
|
6
7
|
if (layoutConfig.VITE_ENV !== "production") {
|
|
7
8
|
const regex = /^(?:https?:\/\/)?(?:www\.)?([^\/]+)(\/.*)$/;
|
|
8
9
|
const match = url.match(regex);
|
|
9
10
|
processedUrl = match ? match[2] : url || "/";
|
|
10
11
|
}
|
|
11
|
-
if (!params)
|
|
12
|
+
if (!params)
|
|
13
|
+
return processedUrl;
|
|
12
14
|
const separator = processedUrl.includes("?") ? "&" : "?";
|
|
13
15
|
if (typeof params === "string") {
|
|
14
16
|
return `${processedUrl}${separator}${params}`;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, createElementVNode, withDirectives, toDisplayString, withModifiers, createVNode, vShow } from "vue";
|
|
2
|
-
import { G as GIcon, _ as _export_sfc } from "./index-D5P2-t2Y.js";
|
|
3
|
-
import "vue-devui-lal/icon";
|
|
4
|
-
import "vue-devui-lal/icon/style.css";
|
|
5
|
-
const _hoisted_1 = { class: "ellipsis" };
|
|
6
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
-
__name: "SearchPrefixTag",
|
|
8
|
-
props: {
|
|
9
|
-
tag: {},
|
|
10
|
-
closeVisible: { type: Boolean }
|
|
11
|
-
},
|
|
12
|
-
emits: ["inputClick", "closeTag"],
|
|
13
|
-
setup(__props, { emit: __emit }) {
|
|
14
|
-
const emits = __emit;
|
|
15
|
-
const onInputClick = () => {
|
|
16
|
-
emits("inputClick");
|
|
17
|
-
};
|
|
18
|
-
const onCloseTag = () => {
|
|
19
|
-
emits("closeTag");
|
|
20
|
-
};
|
|
21
|
-
return (_ctx, _cache) => {
|
|
22
|
-
return openBlock(), createElementBlock("p", {
|
|
23
|
-
class: "g-header-search-projectname flex items-center px-[16px]",
|
|
24
|
-
onClick: onInputClick
|
|
25
|
-
}, [
|
|
26
|
-
createElementVNode("span", _hoisted_1, toDisplayString(_ctx.tag), 1),
|
|
27
|
-
withDirectives(createElementVNode("span", {
|
|
28
|
-
class: "g-header-search-projectname-close ml-[12px] flex",
|
|
29
|
-
onClick: withModifiers(onCloseTag, ["stop"])
|
|
30
|
-
}, [
|
|
31
|
-
createVNode(GIcon, {
|
|
32
|
-
name: "icon-close",
|
|
33
|
-
color: "#fff",
|
|
34
|
-
size: "7px"
|
|
35
|
-
})
|
|
36
|
-
], 512), [
|
|
37
|
-
[vShow, _ctx.closeVisible]
|
|
38
|
-
])
|
|
39
|
-
]);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
const SearchPrefixTag = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
44
|
-
export {
|
|
45
|
-
SearchPrefixTag as default
|
|
46
|
-
};
|
package/index-w6MI7kmM.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { defineComponent, onMounted, createBlock, openBlock, unref, withCtx, createElementVNode } from "vue";
|
|
2
|
-
import { FixedOverlay } from "vue-devui-lal/overlay";
|
|
3
|
-
import { w as useLayoutConfig, _ as _export_sfc } from "./index-D5P2-t2Y.js";
|
|
4
|
-
import "vue-devui-lal/overlay/style.css";
|
|
5
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
-
__name: "index",
|
|
7
|
-
emits: ["close", "success"],
|
|
8
|
-
setup(__props, { emit: __emit }) {
|
|
9
|
-
const emits = __emit;
|
|
10
|
-
const captchaInit = () => {
|
|
11
|
-
if (!window.initTAC) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
const baseURL = useLayoutConfig().VITE_API_HOST;
|
|
15
|
-
const config = {
|
|
16
|
-
requestCaptchaDataUrl: `${baseURL}/uc/api/v1/captcha/gen`,
|
|
17
|
-
validCaptchaUrl: `${baseURL}/uc/api/v1/captcha/check`,
|
|
18
|
-
bindEl: "#captcha-box",
|
|
19
|
-
validSuccess: (res, c, tac) => {
|
|
20
|
-
tac.destroyWindow();
|
|
21
|
-
emits("success", res.data);
|
|
22
|
-
},
|
|
23
|
-
validFail: (res, c, tac) => {
|
|
24
|
-
tac.reloadCaptcha();
|
|
25
|
-
},
|
|
26
|
-
btnRefreshFun: (el, tac) => {
|
|
27
|
-
tac.reloadCaptcha();
|
|
28
|
-
},
|
|
29
|
-
btnCloseFun: (el, tac) => {
|
|
30
|
-
tac.destroyWindow();
|
|
31
|
-
emits("close");
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
const style = {
|
|
35
|
-
logoUrl: null
|
|
36
|
-
// 去除logo
|
|
37
|
-
};
|
|
38
|
-
window.initTAC("https://cdn-static.gitcode.host/js/tac/", config, style).then((tac) => {
|
|
39
|
-
tac.init();
|
|
40
|
-
}).catch((e) => {
|
|
41
|
-
console.error("初始化tac失败", e);
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
onMounted(() => {
|
|
45
|
-
captchaInit();
|
|
46
|
-
});
|
|
47
|
-
return (_ctx, _cache) => {
|
|
48
|
-
return openBlock(), createBlock(unref(FixedOverlay), { class: "captcha-overlay" }, {
|
|
49
|
-
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
50
|
-
createElementVNode("div", { id: "captcha-box" }, null, -1)
|
|
51
|
-
])),
|
|
52
|
-
_: 1,
|
|
53
|
-
__: [0]
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
59
|
-
export {
|
|
60
|
-
index as default
|
|
61
|
-
};
|