@pubinfo/core 2.0.13 → 2.0.15
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/dist/{AppSetting-Df8mPhxN.js → AppSetting-CF0Y36Kx.js} +27 -27
- package/dist/{HCheckList.vue_vue_type_script_setup_true_lang-CD2VmdPG.js → HCheckList.vue_vue_type_script_setup_true_lang-B7ZyR4n6.js} +1 -1
- package/dist/{HToggle-CcxWxVmB.js → HToggle-Dap0xf8L.js} +1 -1
- package/dist/HeaderThinMenu-Bu4X2-vs.js +4 -0
- package/dist/{PreferencesContent-Bu8-g2qs.js → PreferencesContent-DWHQ2EOo.js} +57 -57
- package/dist/{SettingBreadcrumb-CTLEf4nt.js → SettingBreadcrumb-P-C21e5U.js} +5 -5
- package/dist/{SettingCopyright-B_ZS9FXO.js → SettingCopyright-XUQuMUND.js} +4 -4
- package/dist/{SettingEnableTransition-DgZyY8Rh.js → SettingEnableTransition-hJTXOtuP.js} +14 -14
- package/dist/{SettingHome-BN6WzWxX.js → SettingHome-1C9Ph1Dl.js} +4 -4
- package/dist/{SettingMenu-CNgEpRN_.js → SettingMenu-B2h4e61Z.js} +4 -4
- package/dist/{SettingMode-B_Sf7CqN.js → SettingMode-bStWvnHg.js} +9 -9
- package/dist/{SettingNavSearch-SQuD6lr7.js → SettingNavSearch-BvTlahqj.js} +4 -4
- package/dist/{SettingOther-CrgOHNra.js → SettingOther-ihHycIPn.js} +10 -10
- package/dist/{SettingPage-B4hfRME8.js → SettingPage-d8HGOfhZ.js} +2 -2
- package/dist/{SettingTabbar-7EcsmyZo.js → SettingTabbar-YLshyP8G.js} +25 -25
- package/dist/{SettingThemes-CVjQoEk4.js → SettingThemes-Do-SwCzx.js} +16 -16
- package/dist/{SettingToolbar-Bls_SdlL.js → SettingToolbar-DHbr1d6B.js} +7 -7
- package/dist/{SettingTopbar-jqUqG5vW.js → SettingTopbar-QwqH9maD.js} +5 -5
- package/dist/{SettingWidthMode-8LFo6UKy.js → SettingWidthMode-CGmv4JQk.js} +3 -3
- package/dist/core/resolver/layout.d.ts +1 -1
- package/dist/features/api/modules/auth/renzhengfuwu.d.ts +43 -1
- package/dist/features/api/modules/rbac/index.d.ts +1 -0
- package/dist/features/api/modules/rbac/yonghujiekou.d.ts +7 -0
- package/dist/features/api/modules/rbac/ziyuandaorudaochuxiangguanjiekou.d.ts +43 -0
- package/dist/features/api/modules/rbac/ziyuanjiekou.d.ts +7 -0
- package/dist/features/enum.d.ts +0 -1
- package/dist/features/stores/modules/iframe.d.ts +3 -3
- package/dist/{index-BX0RSX9i.js → index-B69sIuLj.js} +1 -1
- package/dist/{index-Bl4PBBmY.js → index-B8wbywmR.js} +1 -1
- package/dist/{index-Cc8zVLOC.js → index-CEodMjIg.js} +4 -4
- package/dist/{index-Dalsj2EI.js → index-Ctu3_aXu.js} +12229 -12106
- package/dist/{index-C6HIzbdv.js → index-Da79wYQP.js} +1 -1
- package/dist/{index-Cjl98Ty_.js → index-WLA0JU4Y.js} +17 -17
- package/dist/{index-Dw9-vGGZ.js → index-egA-td8O.js} +8551 -7697
- package/dist/index-ondkWqUz.js +4 -0
- package/dist/index.js +27 -27
- package/dist/{pick-Cghe_Z7L.js → pick-BS5wr8z9.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +14 -9
- package/runtime/components/PubinfoDev/index.d.ts +18 -0
- package/runtime/components/PubinfoDev/index.js +15 -0
- package/runtime/components/index.d.ts +1 -0
- package/runtime/components/index.js +1 -0
- package/runtime/index.d.ts +1 -0
- package/runtime/index.js +1 -0
- package/src/built-in/authorization/router.ts +1 -1
- package/src/built-in/layout-component/components/Content/IframeView.vue +16 -11
- package/src/built-in/layout-component/components/Content/index.vue +2 -1
- package/src/built-in/layout-component/components/Header/HeaderFullMenu/index.vue +8 -4
- package/src/built-in/settings/router.ts +15 -4
- package/src/built-in/system-info/components/SystemInfo.vue +67 -37
- package/src/core/resolver/layout.ts +13 -3
- package/src/features/api/modules/auth/index.ts +0 -2
- package/src/features/api/modules/auth/renzhengfuwu.ts +132 -1
- package/src/features/api/modules/auth/typings.d.ts +75 -1
- package/src/features/api/modules/configData/heibaimingdanfuwu.ts +2 -0
- package/src/features/api/modules/configData/index.ts +0 -2
- package/src/features/api/modules/configData/zidifuwu.ts +4 -0
- package/src/features/api/modules/rbac/gangweijiekou.ts +3 -0
- package/src/features/api/modules/rbac/index.ts +1 -2
- package/src/features/api/modules/rbac/typings.d.ts +97 -1
- package/src/features/api/modules/rbac/yonghujiekou.ts +25 -0
- package/src/features/api/modules/rbac/yonghushoucangbiaojiekou.ts +2 -0
- package/src/features/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.ts +1 -0
- package/src/features/api/modules/rbac/ziyuandaorudaochuxiangguanjiekou.ts +158 -0
- package/src/features/api/modules/rbac/ziyuanjiekou.ts +21 -0
- package/src/features/enum.ts +1 -1
- package/src/features/stores/modules/iframe.ts +12 -3
- package/src/features/stores/modules/menu.ts +20 -13
- package/src/features/stores/modules/route.ts +4 -3
- package/src/index.ts +1 -0
- package/types/global.d.ts +5 -0
- package/types/vue-router.d.ts +2 -2
- package/dist/HeaderThinMenu-BMjyPDYS.js +0 -4
- package/dist/index-CUbMQSBZ.js +0 -4
- package/src/features/components/MicroAppContainer/index.vue +0 -9
package/package.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pubinfo/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.15",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"default": "./dist/index.js"
|
|
9
9
|
},
|
|
10
|
+
"./runtime": {
|
|
11
|
+
"types": "./runtime/index.d.ts",
|
|
12
|
+
"default": "./runtime/index.js"
|
|
13
|
+
},
|
|
10
14
|
"./style.css": "./dist/style.css",
|
|
11
15
|
"./types": "./dist/index.d.ts"
|
|
12
16
|
},
|
|
@@ -15,6 +19,7 @@
|
|
|
15
19
|
"types": "./dist/index.d.ts",
|
|
16
20
|
"files": [
|
|
17
21
|
"dist",
|
|
22
|
+
"runtime",
|
|
18
23
|
"src",
|
|
19
24
|
"types"
|
|
20
25
|
],
|
|
@@ -26,9 +31,9 @@
|
|
|
26
31
|
"pinia": "^3.0.3",
|
|
27
32
|
"vue": "^3.5.17",
|
|
28
33
|
"vue-router": "^4.5.1",
|
|
29
|
-
"@pubinfo/config": "2.0.
|
|
30
|
-
"@pubinfo/
|
|
31
|
-
"@pubinfo/
|
|
34
|
+
"@pubinfo/config": "2.0.15",
|
|
35
|
+
"@pubinfo/vite": "2.0.15",
|
|
36
|
+
"@pubinfo/devtools": "2.0.15"
|
|
32
37
|
},
|
|
33
38
|
"dependencies": {
|
|
34
39
|
"@alova/adapter-axios": "^2.0.16",
|
|
@@ -36,7 +41,7 @@
|
|
|
36
41
|
"@ant-design/icons-vue": "^7.0.1",
|
|
37
42
|
"@headlessui/vue": "^1.7.23",
|
|
38
43
|
"@imengyu/vue3-context-menu": "^1.5.1",
|
|
39
|
-
"@pubinfo/pro-components": "^1.
|
|
44
|
+
"@pubinfo/pro-components": "^1.8.0",
|
|
40
45
|
"@unocss/reset": "^66.4.2",
|
|
41
46
|
"@vueuse/core": "^13.7.0",
|
|
42
47
|
"@vueuse/integrations": "^13.5.0",
|
|
@@ -65,8 +70,8 @@
|
|
|
65
70
|
"@alova/mock": "^2.0.17",
|
|
66
71
|
"@iconify/json": "^2.2.354",
|
|
67
72
|
"@iconify/vue": "^5.0.0",
|
|
68
|
-
"@pubinfo/openapi": "^0.9.
|
|
69
|
-
"@pubinfo/preset-openapi": "^0.9.
|
|
73
|
+
"@pubinfo/openapi": "^0.9.1",
|
|
74
|
+
"@pubinfo/preset-openapi": "^0.9.1",
|
|
70
75
|
"@types/lodash-es": "^4.17.12",
|
|
71
76
|
"@types/md5": "^2.3.5",
|
|
72
77
|
"@types/nprogress": "^0.2.3",
|
|
@@ -87,8 +92,8 @@
|
|
|
87
92
|
"vite-plugin-dts": "^4.5.4",
|
|
88
93
|
"vue": "^3.5.17",
|
|
89
94
|
"vue-router": "^4.5.1",
|
|
90
|
-
"@pubinfo/config": "2.0.
|
|
91
|
-
"@pubinfo/vite": "2.0.
|
|
95
|
+
"@pubinfo/config": "2.0.15",
|
|
96
|
+
"@pubinfo/vite": "2.0.15"
|
|
92
97
|
},
|
|
93
98
|
"scripts": {
|
|
94
99
|
"dev": "vite build -w -m watch",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* prettier-ignore */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
// noinspection JSUnusedGlobalSymbols
|
|
5
|
+
// biome-ignore lint: disable
|
|
6
|
+
|
|
7
|
+
import type { SlotsType, VNode } from 'vue';
|
|
8
|
+
|
|
9
|
+
declare const _default: import('vue').DefineComponent<{}, () => VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
10
|
+
[key: string]: any
|
|
11
|
+
}>[] | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, SlotsType<{
|
|
12
|
+
default?: () => VNode[]
|
|
13
|
+
/**
|
|
14
|
+
* If you ever require to have a replacement during production.
|
|
15
|
+
*/
|
|
16
|
+
fallback?: () => VNode[]
|
|
17
|
+
}>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineComponent } from 'vue';
|
|
2
|
+
|
|
3
|
+
export default defineComponent({
|
|
4
|
+
name: 'PubinfoDev',
|
|
5
|
+
inheritAttrs: false,
|
|
6
|
+
...import.meta.env.DEV && {
|
|
7
|
+
slots: Object,
|
|
8
|
+
},
|
|
9
|
+
setup(_, props) {
|
|
10
|
+
if (import.meta.env.DEV) {
|
|
11
|
+
return () => props.slots.default?.();
|
|
12
|
+
}
|
|
13
|
+
return () => props.slots.fallback?.();
|
|
14
|
+
},
|
|
15
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as PubinfoDev } from './PubinfoDev/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as PubinfoDev } from './PubinfoDev/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
package/runtime/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -13,8 +13,9 @@ const { settingsStore, iframeStore } = useContext();
|
|
|
13
13
|
|
|
14
14
|
const iframeRef = ref();
|
|
15
15
|
|
|
16
|
-
//
|
|
17
|
-
|
|
16
|
+
// 第三方登录后的实际地址(仅首次初始化)
|
|
17
|
+
// key: route.fullPath, value: 登录后实际跳转的 url
|
|
18
|
+
const partyLoginUrlMap = reactive(new Map<string, string>());
|
|
18
19
|
|
|
19
20
|
watch(() => route.fullPath, async (val) => {
|
|
20
21
|
nextTick(() => {
|
|
@@ -31,25 +32,29 @@ watch(() => route.fullPath, async (val) => {
|
|
|
31
32
|
const partyLogin = route.meta?.partyLogin as PartyLoginConfig | undefined;
|
|
32
33
|
const iframeUrl = route.meta?.iframe as string | undefined;
|
|
33
34
|
|
|
35
|
+
// 如果已经初始化过该路由的 URL,直接使用(避免重复触发第三方登录)
|
|
36
|
+
if (partyLoginUrlMap.has(val)) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// 第一次进入:处理第三方登录
|
|
34
41
|
if (partyLogin && Array.isArray(partyLogin) && partyLogin.length > 0 && iframeUrl) {
|
|
35
42
|
const { url } = await usePartyLogin(partyLogin, iframeUrl);
|
|
36
43
|
watch(url, (newUrl) => {
|
|
37
|
-
if (newUrl) {
|
|
38
|
-
|
|
44
|
+
if (newUrl && !partyLoginUrlMap.has(val)) {
|
|
45
|
+
// 仅初始化一次,后续不再变更
|
|
46
|
+
partyLoginUrlMap.set(val, newUrl);
|
|
39
47
|
}
|
|
40
48
|
}, { immediate: true });
|
|
41
49
|
}
|
|
42
|
-
else {
|
|
43
|
-
partyLoginUrl.value = '';
|
|
44
|
-
}
|
|
45
50
|
},
|
|
46
51
|
{
|
|
47
52
|
immediate: true,
|
|
48
53
|
});
|
|
49
54
|
|
|
50
|
-
// 计算 iframe 的实际 src
|
|
51
|
-
function getIframeSrc(itemSrc: string): string {
|
|
52
|
-
return
|
|
55
|
+
// 计算 iframe 的实际 src(仅返回初始地址或第三方登录后的地址)
|
|
56
|
+
function getIframeSrc(itemSrc: string, path: string): string {
|
|
57
|
+
return partyLoginUrlMap.get(path) || itemSrc;
|
|
53
58
|
}
|
|
54
59
|
</script>
|
|
55
60
|
|
|
@@ -66,7 +71,7 @@ function getIframeSrc(itemSrc: string): string {
|
|
|
66
71
|
v-show="route.fullPath === item.path"
|
|
67
72
|
ref="iframeRef"
|
|
68
73
|
:data-path="item.path"
|
|
69
|
-
:src="getIframeSrc(item.src)"
|
|
74
|
+
:src="getIframeSrc(item.src, item.path)"
|
|
70
75
|
frameborder="0"
|
|
71
76
|
class="h-full w-full flex-1"
|
|
72
77
|
/>
|
|
@@ -69,7 +69,8 @@ watch(
|
|
|
69
69
|
mode="out-in" appear
|
|
70
70
|
>
|
|
71
71
|
<KeepAlive :include="keepAliveStore.list">
|
|
72
|
-
|
|
72
|
+
<!-- 为了解决 micro-app 的问题,key 只能为 route.name -->
|
|
73
|
+
<component :is="Component" v-show="!(isIframe || isLink)" :key="route.name" class="page-container" />
|
|
73
74
|
</KeepAlive>
|
|
74
75
|
</Transition>
|
|
75
76
|
</component>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { MenuData } from '@/features';
|
|
3
3
|
import { useElementSize } from '@vueuse/core';
|
|
4
4
|
import SolarWidget5BoldDuotone from '~icons/solar/widget-5-bold-duotone';
|
|
5
5
|
import { PubinfoIcon } from '@/features/components';
|
|
@@ -35,7 +35,7 @@ const moreApple = computed(() => {
|
|
|
35
35
|
return menuHideIndex.value === menuStore.allMenus.length - 1;
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
function moreApplyClick(index: number, item:
|
|
38
|
+
function moreApplyClick(index: number, item: MenuData) {
|
|
39
39
|
const menuIndex = index + menuHideIndex.value + 1;
|
|
40
40
|
switchTo(menuIndex, item);
|
|
41
41
|
}
|
|
@@ -75,6 +75,10 @@ function fitMenus() {
|
|
|
75
75
|
return restrictedIndex;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
function showMenu(item: MenuData) {
|
|
79
|
+
return (item.children && item.children.length !== 0) || item?.meta?.isDev;
|
|
80
|
+
}
|
|
81
|
+
|
|
78
82
|
onMounted(() => {
|
|
79
83
|
watch(
|
|
80
84
|
width,
|
|
@@ -101,13 +105,13 @@ onMounted(() => {
|
|
|
101
105
|
invisible
|
|
102
106
|
:class="{
|
|
103
107
|
'active': index === menuStore.actived,
|
|
104
|
-
'px-1 py-2': settingsStore.settings.menu.isRounded,
|
|
108
|
+
'px-1 py-2': showMenu(item) && settingsStore.settings.menu.isRounded,
|
|
105
109
|
'is-dev': item.meta?.isDev,
|
|
106
110
|
}"
|
|
107
111
|
>
|
|
108
112
|
<NotCursor :is-cursor="item.meta?.isDev" :dev-text="item.meta?.devText">
|
|
109
113
|
<div
|
|
110
|
-
v-if="(item
|
|
114
|
+
v-if="showMenu(item)"
|
|
111
115
|
class="group menu-item-container h-full w-full flex cursor-pointer items-center justify-between gap-1 px-5 py-4 text-[var(--g-header-menu-color)] transition-all hover:(bg-[var(--g-header-menu-hover-bg)] text-[var(--g-header-menu-hover-color)])"
|
|
112
116
|
:class="{
|
|
113
117
|
'text-[var(--g-header-menu-active-color)]! bg-[var(--g-header-menu-active-bg)]!': index === menuStore.actived,
|
|
@@ -90,11 +90,22 @@ export function createRouterGuard(router: Router) {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
if (from.meta.iframe) {
|
|
93
|
-
|
|
94
|
-
const
|
|
93
|
+
// 判断是否启用 iframe 缓存(保留 DOM 实例)
|
|
94
|
+
const shouldCacheIframe = from.meta.iframeCache === true;
|
|
95
95
|
|
|
96
|
-
if (
|
|
97
|
-
|
|
96
|
+
if (shouldCacheIframe) {
|
|
97
|
+
// 启用缓存:不销毁 iframe,仅标记为非激活(保留 DOM)
|
|
98
|
+
// 不调用 close,让 iframe 保持在 openedList 中
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
// 未启用缓存:根据常规缓存规则判断是否销毁
|
|
102
|
+
const isCache = hitCache(to.name as string, from.meta.cache, from.meta.noCache);
|
|
103
|
+
const toReload = to.name === 'Reload';
|
|
104
|
+
|
|
105
|
+
if (!isCache || toReload) {
|
|
106
|
+
// 真正销毁 iframe(destroy = true)
|
|
107
|
+
iframeStore.close(from.fullPath, true);
|
|
108
|
+
}
|
|
98
109
|
}
|
|
99
110
|
}
|
|
100
111
|
});
|
|
@@ -5,49 +5,79 @@ import HSlideover from '@/built-in/layout-component/components/ui/HSlideover.vue
|
|
|
5
5
|
|
|
6
6
|
const [visible, toggle] = useToggle(false);
|
|
7
7
|
|
|
8
|
-
const { pkg, buildTime } = __SYSTEM_INFO__;
|
|
8
|
+
const { pkg, buildTime, git } = __SYSTEM_INFO__;
|
|
9
9
|
hotkeys('alt+i', () => toggle());
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
13
13
|
<HSlideover v-model="visible" title="系统信息">
|
|
14
|
-
<div class="
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
<div class="text-dark dark:text-light">
|
|
15
|
+
<div class="px-4">
|
|
16
|
+
<h2 class="m-0 text-lg font-bold">
|
|
17
|
+
最后编译时间
|
|
18
|
+
</h2>
|
|
19
|
+
<div class="my-4 text-center text-lg font-sans">
|
|
20
|
+
{{ buildTime }}
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="px-4">
|
|
24
|
+
<h2 class="m-0 text-lg font-bold">
|
|
25
|
+
生产环境依赖
|
|
26
|
+
</h2>
|
|
27
|
+
<ul class="list-none pl-0 text-sm">
|
|
28
|
+
<li v-for="(val, key) in (pkg.dependencies as object)" :key="key" class="flex items-center justify-between rounded px-2 py-1.5 hover:bg-stone-1 dark:hover:bg-stone-9">
|
|
29
|
+
<div class="font-bold">
|
|
30
|
+
{{ key }}
|
|
31
|
+
</div>
|
|
32
|
+
<div class="font-sans">
|
|
33
|
+
{{ val }}
|
|
34
|
+
</div>
|
|
35
|
+
</li>
|
|
36
|
+
</ul>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="px-4">
|
|
39
|
+
<h2 class="m-0 text-lg font-bold">
|
|
40
|
+
开发环境依赖
|
|
41
|
+
</h2>
|
|
42
|
+
<ul class="list-none pl-0 text-sm">
|
|
43
|
+
<li v-for="(val, key) in (pkg.devDependencies as object)" :key="key" class="flex items-center justify-between rounded px-2 py-1.5 hover:bg-stone-1 dark:hover:bg-stone-9">
|
|
44
|
+
<div class="font-bold">
|
|
45
|
+
{{ key }}
|
|
46
|
+
</div>
|
|
47
|
+
<div class="font-sans">
|
|
48
|
+
{{ val }}
|
|
49
|
+
</div>
|
|
50
|
+
</li>
|
|
51
|
+
</ul>
|
|
52
|
+
</div>
|
|
53
|
+
<div v-if="git" class="px-4">
|
|
54
|
+
<h2 class="m-0 text-lg font-bold">
|
|
55
|
+
Git 信息
|
|
56
|
+
</h2>
|
|
57
|
+
<ul class="list-none pl-0 text-sm">
|
|
58
|
+
<li class="flex items-center justify-between rounded px-2 py-1.5 hover:bg-stone-1 dark:hover:bg-stone-9">
|
|
59
|
+
<div class="font-bold">
|
|
60
|
+
编译分支
|
|
61
|
+
</div>
|
|
62
|
+
<div class="font-sans">
|
|
63
|
+
{{ git.branch }}
|
|
64
|
+
</div>
|
|
65
|
+
</li>
|
|
66
|
+
<li class="flex items-center justify-between rounded px-2 py-1.5 hover:bg-stone-1 dark:hover:bg-stone-9">
|
|
67
|
+
<div class="font-bold">
|
|
68
|
+
最新提交提交哈希
|
|
69
|
+
</div>
|
|
70
|
+
<a-tooltip>
|
|
71
|
+
<template #title>
|
|
72
|
+
{{ git.commit }}
|
|
73
|
+
</template>
|
|
74
|
+
<div class="font-sans">
|
|
75
|
+
{{ git.commitShort }}
|
|
76
|
+
</div>
|
|
77
|
+
</a-tooltip>
|
|
78
|
+
</li>
|
|
79
|
+
</ul>
|
|
20
80
|
</div>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="px-4">
|
|
23
|
-
<h2 class="m-0 text-lg font-bold">
|
|
24
|
-
生产环境依赖
|
|
25
|
-
</h2>
|
|
26
|
-
<ul class="list-none pl-0 text-sm">
|
|
27
|
-
<li v-for="(val, key) in (pkg.dependencies as object)" :key="key" class="flex items-center justify-between rounded px-2 py-1.5 hover:bg-stone-1 dark:hover:bg-stone-9">
|
|
28
|
-
<div class="font-bold">
|
|
29
|
-
{{ key }}
|
|
30
|
-
</div>
|
|
31
|
-
<div class="font-sans">
|
|
32
|
-
{{ val }}
|
|
33
|
-
</div>
|
|
34
|
-
</li>
|
|
35
|
-
</ul>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="px-4">
|
|
38
|
-
<h2 class="m-0 text-lg font-bold">
|
|
39
|
-
开发环境依赖
|
|
40
|
-
</h2>
|
|
41
|
-
<ul class="list-none pl-0 text-sm">
|
|
42
|
-
<li v-for="(val, key) in (pkg.devDependencies as object)" :key="key" class="flex items-center justify-between rounded px-2 py-1.5 hover:bg-stone-1 dark:hover:bg-stone-9">
|
|
43
|
-
<div class="font-bold">
|
|
44
|
-
{{ key }}
|
|
45
|
-
</div>
|
|
46
|
-
<div class="font-sans">
|
|
47
|
-
{{ val }}
|
|
48
|
-
</div>
|
|
49
|
-
</li>
|
|
50
|
-
</ul>
|
|
51
81
|
</div>
|
|
52
82
|
</HSlideover>
|
|
53
83
|
</template>
|
|
@@ -2,12 +2,22 @@ import type { ProjectModules } from './resolver';
|
|
|
2
2
|
import { readProjectModules } from './resolver';
|
|
3
3
|
|
|
4
4
|
/** 选择默认的布局组件 */
|
|
5
|
-
function selectDefaultLayout(layouts: ProjectModules['layouts']): (() => Promise<any>) | null {
|
|
5
|
+
function selectDefaultLayout(layouts: ProjectModules['layouts'], name?: string): (() => Promise<any>) | null {
|
|
6
6
|
const entries = Object.entries(layouts ?? {});
|
|
7
7
|
if (entries.length === 0) {
|
|
8
8
|
return null;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
if (name) {
|
|
12
|
+
const match = entries.find(([path]) => {
|
|
13
|
+
const filename = path.split('/').pop()?.replace(/\.vue$/, '');
|
|
14
|
+
return filename === name;
|
|
15
|
+
});
|
|
16
|
+
if (match) {
|
|
17
|
+
return match[1];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
11
21
|
if (entries.length === 1) {
|
|
12
22
|
return entries[0][1];
|
|
13
23
|
}
|
|
@@ -17,7 +27,7 @@ function selectDefaultLayout(layouts: ProjectModules['layouts']): (() => Promise
|
|
|
17
27
|
}
|
|
18
28
|
|
|
19
29
|
/** 设置默认布局组件 */
|
|
20
|
-
export function setupDefaultLayout() {
|
|
30
|
+
export function setupDefaultLayout(name?: string) {
|
|
21
31
|
const modules = readProjectModules();
|
|
22
|
-
return selectDefaultLayout(modules?.layouts);
|
|
32
|
+
return selectDefaultLayout(modules?.layouts, name);
|
|
23
33
|
}
|
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
import { auth as request } from '@/features/api/request';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @description 验证码-前端校验 需要校验的验证码类型:blockPuzzle、clickWord
|
|
5
|
+
* @url /auth/captcha/check
|
|
6
|
+
* @method POST
|
|
7
|
+
* @author @pubinfo/openapi
|
|
8
|
+
*/
|
|
9
|
+
export function postAuthCaptchaCheck<
|
|
10
|
+
R = API.ResponseDataValidCodeVo,
|
|
11
|
+
T = API.ResponseDataValidCodeVo,
|
|
12
|
+
>(
|
|
13
|
+
body: API.CaptchaCheckDto,
|
|
14
|
+
options?: Parameters<typeof request.Post<R, T>>[2],
|
|
15
|
+
) {
|
|
16
|
+
return request.Post<R, T>('/auth/captcha/check', body, {
|
|
17
|
+
headers: {
|
|
18
|
+
'Content-Type': 'application/json',
|
|
19
|
+
},
|
|
20
|
+
...(options || {}),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @description 验证码-获取验证码图片
|
|
26
|
+
* @url /auth/captcha/get
|
|
27
|
+
* @method POST
|
|
28
|
+
* @author @pubinfo/openapi
|
|
29
|
+
*/
|
|
30
|
+
export function postAuthCaptchaGet<
|
|
31
|
+
R = API.ResponseDataValidCodeVo,
|
|
32
|
+
T = API.ResponseDataValidCodeVo,
|
|
33
|
+
>(body: API.CaptchaGetDto, options?: Parameters<typeof request.Post<R, T>>[2]) {
|
|
34
|
+
return request.Post<R, T>('/auth/captcha/get', body, {
|
|
35
|
+
headers: {
|
|
36
|
+
'Content-Type': 'application/json',
|
|
37
|
+
},
|
|
38
|
+
...(options || {}),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
3
42
|
/**
|
|
4
43
|
* @description 切换登录组织
|
|
5
44
|
* @url /auth/changeLoginOrg
|
|
@@ -46,6 +85,27 @@ export function getAuthCheckCacheToken<
|
|
|
46
85
|
});
|
|
47
86
|
}
|
|
48
87
|
|
|
88
|
+
/**
|
|
89
|
+
* @description 根据用户id获取用户token列表
|
|
90
|
+
* @url /auth/getTokenListByUserId
|
|
91
|
+
* @method GET
|
|
92
|
+
* @author @pubinfo/openapi
|
|
93
|
+
*/
|
|
94
|
+
export function getAuthGetTokenListByUserId<
|
|
95
|
+
R = API.ResponseDataListPubLoginTokenVo,
|
|
96
|
+
T = API.ResponseDataListPubLoginTokenVo,
|
|
97
|
+
>(
|
|
98
|
+
params: API.getAuthGetTokenListByUserIdParams,
|
|
99
|
+
options?: Parameters<typeof request.Get<R, T>>[1],
|
|
100
|
+
) {
|
|
101
|
+
return request.Get<R, T>('/auth/getTokenListByUserId', {
|
|
102
|
+
params: {
|
|
103
|
+
...params,
|
|
104
|
+
},
|
|
105
|
+
...(options || {}),
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
49
109
|
/**
|
|
50
110
|
* @description 密码登录
|
|
51
111
|
* @url /auth/login
|
|
@@ -101,7 +161,28 @@ export function getAuthLoginValidCode<
|
|
|
101
161
|
}
|
|
102
162
|
|
|
103
163
|
/**
|
|
104
|
-
* @description
|
|
164
|
+
* @description 验证码-密码登录
|
|
165
|
+
* @url /auth/loginNew
|
|
166
|
+
* @method POST
|
|
167
|
+
* @author @pubinfo/openapi
|
|
168
|
+
*/
|
|
169
|
+
export function postAuthLoginNew<
|
|
170
|
+
R = API.ResponseDataLoginTokenVo,
|
|
171
|
+
T = API.ResponseDataLoginTokenVo,
|
|
172
|
+
>(
|
|
173
|
+
body: API.LoginByPwdCaptchaDto,
|
|
174
|
+
options?: Parameters<typeof request.Post<R, T>>[2],
|
|
175
|
+
) {
|
|
176
|
+
return request.Post<R, T>('/auth/loginNew', body, {
|
|
177
|
+
headers: {
|
|
178
|
+
'Content-Type': 'application/json',
|
|
179
|
+
},
|
|
180
|
+
...(options || {}),
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @description 当前用户登出
|
|
105
186
|
* @url /auth/loginOut
|
|
106
187
|
* @method POST
|
|
107
188
|
* @author @pubinfo/openapi
|
|
@@ -119,6 +200,56 @@ export function postAuthLoginOut<
|
|
|
119
200
|
);
|
|
120
201
|
}
|
|
121
202
|
|
|
203
|
+
/**
|
|
204
|
+
* @description 用户id登出
|
|
205
|
+
* @url /auth/loginOutByUserId
|
|
206
|
+
* @method POST
|
|
207
|
+
* @author @pubinfo/openapi
|
|
208
|
+
*/
|
|
209
|
+
export function postAuthLoginOutByUserId<
|
|
210
|
+
R = API.ResponseDataVoid,
|
|
211
|
+
T = API.ResponseDataVoid,
|
|
212
|
+
>(
|
|
213
|
+
params: API.postAuthLoginOutByUserIdParams,
|
|
214
|
+
options?: Parameters<typeof request.Post<R, T>>[2],
|
|
215
|
+
) {
|
|
216
|
+
return request.Post<R, T>(
|
|
217
|
+
'/auth/loginOutByUserId',
|
|
218
|
+
{},
|
|
219
|
+
{
|
|
220
|
+
params: {
|
|
221
|
+
...params,
|
|
222
|
+
},
|
|
223
|
+
...(options || {}),
|
|
224
|
+
},
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* @description 用户id和设备类型登出
|
|
230
|
+
* @url /auth/loginOutByUserIdAndDevType
|
|
231
|
+
* @method POST
|
|
232
|
+
* @author @pubinfo/openapi
|
|
233
|
+
*/
|
|
234
|
+
export function postAuthLoginOutByUserIdAndDevType<
|
|
235
|
+
R = API.ResponseDataVoid,
|
|
236
|
+
T = API.ResponseDataVoid,
|
|
237
|
+
>(
|
|
238
|
+
params: API.postAuthLoginOutByUserIdAndDevTypeParams,
|
|
239
|
+
options?: Parameters<typeof request.Post<R, T>>[2],
|
|
240
|
+
) {
|
|
241
|
+
return request.Post<R, T>(
|
|
242
|
+
'/auth/loginOutByUserIdAndDevType',
|
|
243
|
+
{},
|
|
244
|
+
{
|
|
245
|
+
params: {
|
|
246
|
+
...params,
|
|
247
|
+
},
|
|
248
|
+
...(options || {}),
|
|
249
|
+
},
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
|
|
122
253
|
/**
|
|
123
254
|
* @description 单点免密登录接口
|
|
124
255
|
* @url /auth/ssoLogin
|