@utogether/udp-core 1.0.1-beta.1 → 1.0.1-beta.3
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/build/plugins.ts +6 -1
- package/dist/{403-Dp617CWX.js → 403-BuP9jvH9.js} +1 -1
- package/dist/{404-Cz_Axb6Y.js → 404-DfQk8kKl.js} +1 -1
- package/dist/{500-BGCtRNse.js → 500-OgROWdiZ.js} +1 -1
- package/dist/{AuthorityInfo-DGGfm7IS.js → AuthorityInfo-q2ksfkWH.js} +1 -1
- package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-BqccGW7v.js → AuthorityInfo.vue_vue_type_style_index_0_lang-Bwsf6lMH.js} +1 -1
- package/dist/{Company-IV3GTnzY.js → Company-DgqowAxc.js} +3 -3
- package/dist/{CompanyPanel-qV-_VtoL.js → CompanyPanel-BNb1rUhD.js} +16 -16
- package/dist/{Department-B3W-OxW8.js → Department-Cl8CROSU.js} +3 -3
- package/dist/{DepartmentPanel-Cw3OWxE7.js → DepartmentPanel-D5VkqKeP.js} +1 -1
- package/dist/{DesignPanel-BFxR2fHJ.js → DesignPanel-BGvEusHC.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DljbeFba.js → DesignPanel.vue_vue_type_style_index_0_lang-BQF1uQ7w.js} +2 -2
- package/dist/{DictView-C-i7e4hZ.js → DictView-BnxfaOBv.js} +13 -12
- package/dist/InvOrganization-5y79ZLdY.js +66 -0
- package/dist/{Org-CA7vTDIF.js → Org-2oBAXN2r.js} +1 -1
- package/dist/{Preview-BlDMmpdR.js → Preview-BaGmXH7r.js} +1 -1
- package/dist/{ReportDefine-Cub_85LA.js → ReportDefine-DkQdBErt.js} +1 -1
- package/dist/{ReportDesign-hFhq5UVE.js → ReportDesign-DzB_A_G6.js} +2 -2
- package/dist/{ReportQuery-ChkWEyxT.js → ReportQuery-DRcMb6ya.js} +1 -1
- package/dist/{ReportQueryFrom-KVyD_8Dj.js → ReportQueryFrom-CeA9xhR4.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CLNODquq.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-CgGtcs5V.js} +1 -1
- package/dist/{ReportTemplate-ag9NDvh2.js → ReportTemplate-qaiTMQuT.js} +1 -1
- package/dist/{Role-_q3lQ8CZ.js → Role-DsFulAjq.js} +3 -3
- package/dist/{RoleAssign-DZb9IRsm.js → RoleAssign-DMRdocpa.js} +3 -3
- package/dist/{RolePanel-CsLsz-Ds.js → RolePanel-B9POS_pg.js} +1 -1
- package/dist/{RolePanel-BQb1LlhD.js → RolePanel-wXVysDHM.js} +1 -1
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-BrnRgHEk.js → RolePanel.vue_vue_type_script_setup_true_lang-CleVvkcY.js} +3 -3
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-cmW7zBLu.js → RolePanel.vue_vue_type_script_setup_true_lang-t6S_0zmJ.js} +1 -1
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-CaFKRwXu.js → ScrollPanel.vue_vue_type_style_index_0_lang-DlXUs0j9.js} +1 -1
- package/dist/{Staff-BSf9Ypbk.js → Staff-Cq4V7ruC.js} +3 -3
- package/dist/{StaffInfo-BNKasyMF.js → StaffInfo-CJDKMbud.js} +1 -1
- package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-DDZ7ukd0.js → StaffInfo.vue_vue_type_script_setup_true_lang-DQ4DL1KY.js} +1 -1
- package/dist/{StaffPanel-Bpq0WVlH.js → StaffPanel-CG-uggdr.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-BhiJ0Q-Q.js → StaffPanel.vue_vue_type_script_setup_true_lang-DAgN7zN2.js} +2 -2
- package/dist/{SysUser-FAABuNti.js → SysUser-kwnzRNdD.js} +2 -2
- package/dist/{SysUserPanel-PxJeOgHm.js → SysUserPanel-DTlZf3vk.js} +1 -1
- package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-njefUln5.js → SysUserPanel.vue_vue_type_script_setup_true_lang-BW6PlGjM.js} +1 -1
- package/dist/{SystemMenu-C-7NAGon.js → SystemMenu-BVT0n-L2.js} +21 -21
- package/dist/{UserInfo-ClXKtyGo.js → UserInfo-BbTQ9Zat.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-8N7P4Hl7.js → UserInfo.vue_vue_type_style_index_0_lang-D_bpYDmI.js} +1 -1
- package/dist/{childView-C_HmDQNd.js → childView-BJbIhjmf.js} +1 -1
- package/dist/{childView-uUlBcTza.js → childView-DCsGFrG-.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-y0sDvYx5.js → childView.vue_vue_type_style_index_0_lang-BCDxpVoD.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-Ckjmw6wJ.js → childView.vue_vue_type_style_index_0_lang-CDtsalCm.js} +1 -1
- package/dist/{code-rule-AgCVDKFy.js → code-rule-DePU6cdp.js} +1 -1
- package/dist/core.es.js +1 -1
- package/dist/{cron-task-C6FgQxTi.js → cron-task-DUM1SIGL.js} +1 -1
- package/dist/{frameView-BDgISK7N.js → frameView-CEUTDtSm.js} +1 -1
- package/dist/img/l_img.svg +1 -1
- package/dist/img/minicolors.png +0 -0
- package/dist/img/v_img.svg +1 -1
- package/dist/{index-DzOzUkf6.js → index-ZdgOD7cF.js} +59 -48
- package/dist/{layoutView-yb3DV2DQ.js → layoutView-PCjwVwkX.js} +109 -108
- package/dist/{login-RRpljbkm.js → login-B1CjWVKu.js} +2 -2
- package/dist/{lov-view-C9-rjzZR.js → lov-view-D8wwkxFJ.js} +2 -2
- package/dist/{menuInfo-CzPQyFhp.js → menuInfo-B5JKVwrB.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-BumXunCg.js → menuInfo.vue_vue_type_style_index_0_lang-CcM9WX4n.js} +97 -96
- package/dist/{pda-app-Dvy3U-b6.js → pda-app-DIa1p1Ww.js} +1 -1
- package/dist/{resource-Fy0lFkSV.js → resource-CCQ7Dd-5.js} +1 -1
- package/dist/{su-welcome-DYvSCUST.js → su-welcome-CLp9YaJa.js} +1 -1
- package/dist/{sys-config-DJ1vNQTy.js → sys-config-BBmf_SqF.js} +1 -1
- package/dist/udp-core.css +2 -2
- package/dist/{utogether-CjmJiHoE.js → utogether-Bkptx2lB.js} +1 -1
- package/package.json +18 -18
- package/src/App.vue +70 -70
- package/src/components/udp/form-upload.vue +71 -20
- package/src/components/udp/grid.vue +500 -0
- package/src/components/udp/index.ts +7 -4
- package/src/components/udp/lov.vue +410 -0
- package/src/components/udp/modal-form.vue +2 -2
- package/src/components/udp/modal-grid.vue +297 -0
- package/src/components/udp/utils.ts +379 -40
- package/src/layout/components/lay-navbar/index.vue +1 -1
- package/src/layout/components/lay-panel/index.vue +150 -150
- package/src/layout/components/lay-sidebar/breadCrumb.vue +1 -1
- package/src/layout/components/lay-tag/index.vue +625 -625
- package/src/layout/layoutView.vue +215 -215
- package/src/main.ts +4 -3
- package/src/plugins/i18n/en.ts +291 -289
- package/src/plugins/i18n/zh.ts +338 -337
- package/src/plugins/vxe-table/index.ts +53 -46
- package/src/plugins/vxe-table/render.tsx +4 -2
- package/src/style/button.scss +85 -78
- package/src/style/tailwind.css +1 -68
- package/src/style/vxetable.scss +258 -256
- package/src/views/organization/company/CompanyPanel.vue +259 -259
- package/src/views/organization/inv-org/InvOrganization.vue +2 -3
- package/src/views/system/menu/SystemMenu.vue +197 -197
- package/src/views/system/menu/menuInfo.vue +372 -371
- package/src/views/udev/dict/DictView.vue +106 -106
- package/src/views/udev/lov/lov-view.vue +91 -91
- package/vite.config.ts +4 -1
- package/dist/InvOrganization-cfT6riGU.js +0 -260
|
@@ -1,215 +1,215 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import 'animate.css';
|
|
3
|
-
import { ref, h, reactive, computed, onMounted, onBeforeMount, defineComponent } from 'vue';
|
|
4
|
-
// 引入 src/components/ReIcon/src/offlineIcon.ts 文件中所有使用addIcon添加过的本地图标
|
|
5
|
-
import '../components/ReIcon/src/offlineIcon';
|
|
6
|
-
import { setType } from './types';
|
|
7
|
-
import { useI18n } from 'vue-i18n';
|
|
8
|
-
import { deviceDetection, useDark, useGlobal } from '@utogether/utils';
|
|
9
|
-
import { useResizeObserver } from '@vueuse/core';
|
|
10
|
-
import { useLayout } from './hooks/useLayout';
|
|
11
|
-
import { useAppStoreHook } from '../store/modules/app';
|
|
12
|
-
import { useSettingStoreHook } from '../store/modules/settings';
|
|
13
|
-
import { useDataThemeChange } from './hooks/useDataThemeChange';
|
|
14
|
-
|
|
15
|
-
import navbar from './components/lay-navbar/index.vue';
|
|
16
|
-
import tag from './components/lay-tag/index.vue';
|
|
17
|
-
import appMain from './components/lay-content/index.vue';
|
|
18
|
-
import setting from './components/lay-setting/index.vue';
|
|
19
|
-
import Vertical from './components/lay-sidebar/vertical.vue';
|
|
20
|
-
import Horizontal from './components/lay-sidebar/horizontal.vue';
|
|
21
|
-
import backTop from '../assets/svg/back_top.svg?component';
|
|
22
|
-
|
|
23
|
-
const appWrapperRef = ref();
|
|
24
|
-
const { t } = useI18n();
|
|
25
|
-
const isMobile = deviceDetection();
|
|
26
|
-
const settingHook = useSettingStoreHook();
|
|
27
|
-
const { isDark } = useDark();
|
|
28
|
-
|
|
29
|
-
const { $storage } = useGlobal();
|
|
30
|
-
const { layout } = useLayout();
|
|
31
|
-
|
|
32
|
-
const inIframe = window.self === window.top;
|
|
33
|
-
|
|
34
|
-
const set: setType = reactive({
|
|
35
|
-
sidebar: computed(() => {
|
|
36
|
-
return useAppStoreHook().sidebar;
|
|
37
|
-
}),
|
|
38
|
-
|
|
39
|
-
device: computed(() => {
|
|
40
|
-
return useAppStoreHook().device;
|
|
41
|
-
}),
|
|
42
|
-
|
|
43
|
-
fixedHeader: computed(() => {
|
|
44
|
-
return settingHook.fixedHeader;
|
|
45
|
-
}),
|
|
46
|
-
|
|
47
|
-
classes: computed(() => {
|
|
48
|
-
return {
|
|
49
|
-
hideSidebar: !set.sidebar.opened,
|
|
50
|
-
openSidebar: set.sidebar.opened,
|
|
51
|
-
withoutAnimation: set.sidebar.withoutAnimation,
|
|
52
|
-
mobile: set.device === 'mobile'
|
|
53
|
-
};
|
|
54
|
-
}),
|
|
55
|
-
|
|
56
|
-
hideTabs: computed(() => {
|
|
57
|
-
return $storage?.configure.hideTabs;
|
|
58
|
-
})
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
function setTheme(layoutModel: string) {
|
|
62
|
-
window.document.body.setAttribute('layout', layoutModel);
|
|
63
|
-
$storage.layout = {
|
|
64
|
-
layout: `${layoutModel}`,
|
|
65
|
-
theme: $storage.layout?.theme,
|
|
66
|
-
darkMode: $storage.layout?.darkMode,
|
|
67
|
-
sidebarStatus: $storage.layout?.sidebarStatus,
|
|
68
|
-
epThemeColor: $storage.layout?.epThemeColor,
|
|
69
|
-
overallStyle: $storage.layout?.overallStyle
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function toggle(device: string, bool: boolean) {
|
|
74
|
-
useAppStoreHook().toggleDevice(device);
|
|
75
|
-
useAppStoreHook().toggleSideBar(bool, 'resize');
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// 判断是否可自动关闭菜单栏
|
|
79
|
-
let isAutoCloseSidebar = true;
|
|
80
|
-
|
|
81
|
-
// 监听容器
|
|
82
|
-
useResizeObserver(appWrapperRef, entries => {
|
|
83
|
-
if (isMobile) return;
|
|
84
|
-
const entry = entries[0];
|
|
85
|
-
const { width } = entry.contentRect;
|
|
86
|
-
width <= 670 ? setTheme('vertical') : setTheme(useAppStoreHook().layout);
|
|
87
|
-
/** width app-wrapper类容器宽度
|
|
88
|
-
* 0 < width <= 760 隐藏侧边栏
|
|
89
|
-
* 760 < width <= 990 折叠侧边栏
|
|
90
|
-
* width > 990 展开侧边栏
|
|
91
|
-
*/
|
|
92
|
-
if (width > 0 && width <= 760) {
|
|
93
|
-
toggle('mobile', false);
|
|
94
|
-
isAutoCloseSidebar = true;
|
|
95
|
-
} else if (width > 760 && width <= 990) {
|
|
96
|
-
if (isAutoCloseSidebar) {
|
|
97
|
-
toggle('desktop', false);
|
|
98
|
-
isAutoCloseSidebar = false;
|
|
99
|
-
}
|
|
100
|
-
} else if (width > 990 && !set.sidebar.isClickCollapse) {
|
|
101
|
-
toggle('desktop', true);
|
|
102
|
-
isAutoCloseSidebar = true;
|
|
103
|
-
} else {
|
|
104
|
-
toggle('desktop', false);
|
|
105
|
-
isAutoCloseSidebar = false;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
onMounted(() => {
|
|
110
|
-
if (isMobile) {
|
|
111
|
-
toggle('mobile', false);
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
onBeforeMount(() => {
|
|
116
|
-
useDataThemeChange().dataThemeChange($storage.layout?.overallStyle);
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
const layoutHeader = defineComponent({
|
|
120
|
-
render() {
|
|
121
|
-
return h(
|
|
122
|
-
'div',
|
|
123
|
-
{
|
|
124
|
-
class: { 'fixed-header': set.fixedHeader },
|
|
125
|
-
style: [
|
|
126
|
-
set.hideTabs && layout.value.includes('horizontal')
|
|
127
|
-
? isDark.value
|
|
128
|
-
? 'box-shadow: 0 1px 4px #0d0d0d'
|
|
129
|
-
: 'box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08)'
|
|
130
|
-
: ''
|
|
131
|
-
]
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
default: () => [
|
|
135
|
-
!settingHook.hiddenSideBar &&
|
|
136
|
-
(layout.value.includes('vertical') || layout.value.includes('mix'))
|
|
137
|
-
? h(navbar)
|
|
138
|
-
: null,
|
|
139
|
-
!settingHook.hiddenSideBar && layout.value.includes('horizontal') ? h(Horizontal) : null,
|
|
140
|
-
h(tag)
|
|
141
|
-
]
|
|
142
|
-
}
|
|
143
|
-
);
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
</script>
|
|
147
|
-
|
|
148
|
-
<template>
|
|
149
|
-
<div ref="appWrapperRef" :class="['app-wrapper', set.classes]">
|
|
150
|
-
<div
|
|
151
|
-
v-show="set.device === 'mobile' && set.sidebar.opened && layout.includes('vertical')"
|
|
152
|
-
class="app-mask"
|
|
153
|
-
@click="useAppStoreHook().toggleSideBar()"
|
|
154
|
-
/>
|
|
155
|
-
<Vertical
|
|
156
|
-
v-show="
|
|
157
|
-
inIframe && !settingHook.hiddenSideBar && (layout.includes('vertical') || layout.includes('mix'))
|
|
158
|
-
"
|
|
159
|
-
/>
|
|
160
|
-
<div :class="['main-container', settingHook.hiddenSideBar ? 'main-hidden' : '']">
|
|
161
|
-
<div v-if="set.fixedHeader">
|
|
162
|
-
<layout-header v-if="inIframe" />
|
|
163
|
-
<!-- 主体内容 -->
|
|
164
|
-
<app-main :fixed-header="set.fixedHeader" />
|
|
165
|
-
</div>
|
|
166
|
-
<el-scrollbar v-else>
|
|
167
|
-
<template #default>
|
|
168
|
-
<div class="h-full">
|
|
169
|
-
<el-backtop :title="t('message.udp.backtop')" target=".main-container .el-scrollbar__wrap">
|
|
170
|
-
<backTop />
|
|
171
|
-
</el-backtop>
|
|
172
|
-
<layout-header v-if="inIframe" />
|
|
173
|
-
<!-- 主体内容 -->
|
|
174
|
-
<app-main :fixed-header="set.fixedHeader" />
|
|
175
|
-
</div>
|
|
176
|
-
</template>
|
|
177
|
-
</el-scrollbar>
|
|
178
|
-
</div>
|
|
179
|
-
<!-- 系统设置 -->
|
|
180
|
-
<setting />
|
|
181
|
-
</div>
|
|
182
|
-
</template>
|
|
183
|
-
|
|
184
|
-
<style lang="scss" scoped>
|
|
185
|
-
.app-wrapper {
|
|
186
|
-
position: relative;
|
|
187
|
-
width: 100%;
|
|
188
|
-
height: 100%;
|
|
189
|
-
|
|
190
|
-
&::after {
|
|
191
|
-
clear: both;
|
|
192
|
-
display: table;
|
|
193
|
-
content: '';
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
&.mobile.openSidebar {
|
|
197
|
-
position: fixed;
|
|
198
|
-
top: 0;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.app-mask {
|
|
203
|
-
position: absolute;
|
|
204
|
-
top: 0;
|
|
205
|
-
z-index: 999;
|
|
206
|
-
width: 100%;
|
|
207
|
-
height: 100%;
|
|
208
|
-
background: #000;
|
|
209
|
-
opacity: 0.3;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.re-screen {
|
|
213
|
-
margin-top: 12px;
|
|
214
|
-
}
|
|
215
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import 'animate.css';
|
|
3
|
+
import { ref, h, reactive, computed, onMounted, onBeforeMount, defineComponent } from 'vue';
|
|
4
|
+
// 引入 src/components/ReIcon/src/offlineIcon.ts 文件中所有使用addIcon添加过的本地图标
|
|
5
|
+
import '../components/ReIcon/src/offlineIcon';
|
|
6
|
+
import { setType } from './types';
|
|
7
|
+
import { useI18n } from 'vue-i18n';
|
|
8
|
+
import { deviceDetection, useDark, useGlobal } from '@utogether/utils';
|
|
9
|
+
import { useResizeObserver } from '@vueuse/core';
|
|
10
|
+
import { useLayout } from './hooks/useLayout';
|
|
11
|
+
import { useAppStoreHook } from '../store/modules/app';
|
|
12
|
+
import { useSettingStoreHook } from '../store/modules/settings';
|
|
13
|
+
import { useDataThemeChange } from './hooks/useDataThemeChange';
|
|
14
|
+
|
|
15
|
+
import navbar from './components/lay-navbar/index.vue';
|
|
16
|
+
import tag from './components/lay-tag/index.vue';
|
|
17
|
+
import appMain from './components/lay-content/index.vue';
|
|
18
|
+
import setting from './components/lay-setting/index.vue';
|
|
19
|
+
import Vertical from './components/lay-sidebar/vertical.vue';
|
|
20
|
+
import Horizontal from './components/lay-sidebar/horizontal.vue';
|
|
21
|
+
import backTop from '../assets/svg/back_top.svg?component';
|
|
22
|
+
|
|
23
|
+
const appWrapperRef = ref();
|
|
24
|
+
const { t } = useI18n();
|
|
25
|
+
const isMobile = deviceDetection();
|
|
26
|
+
const settingHook = useSettingStoreHook();
|
|
27
|
+
const { isDark } = useDark();
|
|
28
|
+
|
|
29
|
+
const { $storage } = useGlobal();
|
|
30
|
+
const { layout } = useLayout();
|
|
31
|
+
|
|
32
|
+
const inIframe = window.self === window.top;
|
|
33
|
+
|
|
34
|
+
const set: setType = reactive({
|
|
35
|
+
sidebar: computed(() => {
|
|
36
|
+
return useAppStoreHook().sidebar;
|
|
37
|
+
}),
|
|
38
|
+
|
|
39
|
+
device: computed(() => {
|
|
40
|
+
return useAppStoreHook().device;
|
|
41
|
+
}),
|
|
42
|
+
|
|
43
|
+
fixedHeader: computed(() => {
|
|
44
|
+
return settingHook.fixedHeader;
|
|
45
|
+
}),
|
|
46
|
+
|
|
47
|
+
classes: computed(() => {
|
|
48
|
+
return {
|
|
49
|
+
hideSidebar: !set.sidebar.opened,
|
|
50
|
+
openSidebar: set.sidebar.opened,
|
|
51
|
+
withoutAnimation: set.sidebar.withoutAnimation,
|
|
52
|
+
mobile: set.device === 'mobile'
|
|
53
|
+
};
|
|
54
|
+
}),
|
|
55
|
+
|
|
56
|
+
hideTabs: computed(() => {
|
|
57
|
+
return $storage?.configure.hideTabs;
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
function setTheme(layoutModel: string) {
|
|
62
|
+
window.document.body.setAttribute('layout', layoutModel);
|
|
63
|
+
$storage.layout = {
|
|
64
|
+
layout: `${layoutModel}`,
|
|
65
|
+
theme: $storage.layout?.theme,
|
|
66
|
+
darkMode: $storage.layout?.darkMode,
|
|
67
|
+
sidebarStatus: $storage.layout?.sidebarStatus,
|
|
68
|
+
epThemeColor: $storage.layout?.epThemeColor,
|
|
69
|
+
overallStyle: $storage.layout?.overallStyle
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function toggle(device: string, bool: boolean) {
|
|
74
|
+
useAppStoreHook().toggleDevice(device);
|
|
75
|
+
useAppStoreHook().toggleSideBar(bool, 'resize');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// 判断是否可自动关闭菜单栏
|
|
79
|
+
let isAutoCloseSidebar = true;
|
|
80
|
+
|
|
81
|
+
// 监听容器
|
|
82
|
+
useResizeObserver(appWrapperRef, entries => {
|
|
83
|
+
if (isMobile) return;
|
|
84
|
+
const entry = entries[0];
|
|
85
|
+
const { width } = entry.contentRect;
|
|
86
|
+
width <= 670 ? setTheme('vertical') : setTheme(useAppStoreHook().layout);
|
|
87
|
+
/** width app-wrapper类容器宽度
|
|
88
|
+
* 0 < width <= 760 隐藏侧边栏
|
|
89
|
+
* 760 < width <= 990 折叠侧边栏
|
|
90
|
+
* width > 990 展开侧边栏
|
|
91
|
+
*/
|
|
92
|
+
if (width > 0 && width <= 760) {
|
|
93
|
+
toggle('mobile', false);
|
|
94
|
+
isAutoCloseSidebar = true;
|
|
95
|
+
} else if (width > 760 && width <= 990) {
|
|
96
|
+
if (isAutoCloseSidebar) {
|
|
97
|
+
toggle('desktop', false);
|
|
98
|
+
isAutoCloseSidebar = false;
|
|
99
|
+
}
|
|
100
|
+
} else if (width > 990 && !set.sidebar.isClickCollapse) {
|
|
101
|
+
toggle('desktop', true);
|
|
102
|
+
isAutoCloseSidebar = true;
|
|
103
|
+
} else {
|
|
104
|
+
toggle('desktop', false);
|
|
105
|
+
isAutoCloseSidebar = false;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
onMounted(() => {
|
|
110
|
+
if (isMobile) {
|
|
111
|
+
toggle('mobile', false);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
onBeforeMount(() => {
|
|
116
|
+
useDataThemeChange().dataThemeChange($storage.layout?.overallStyle);
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
const layoutHeader = defineComponent({
|
|
120
|
+
render() {
|
|
121
|
+
return h(
|
|
122
|
+
'div',
|
|
123
|
+
{
|
|
124
|
+
class: { 'fixed-header': set.fixedHeader },
|
|
125
|
+
style: [
|
|
126
|
+
set.hideTabs && layout.value.includes('horizontal')
|
|
127
|
+
? isDark.value
|
|
128
|
+
? 'box-shadow: 0 1px 4px #0d0d0d'
|
|
129
|
+
: 'box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08)'
|
|
130
|
+
: ''
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
default: () => [
|
|
135
|
+
!settingHook.hiddenSideBar &&
|
|
136
|
+
(layout.value.includes('vertical') || layout.value.includes('mix'))
|
|
137
|
+
? h(navbar)
|
|
138
|
+
: null,
|
|
139
|
+
!settingHook.hiddenSideBar && layout.value.includes('horizontal') ? h(Horizontal) : null,
|
|
140
|
+
h(tag)
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
</script>
|
|
147
|
+
|
|
148
|
+
<template>
|
|
149
|
+
<div ref="appWrapperRef" :class="['app-wrapper', set.classes]">
|
|
150
|
+
<div
|
|
151
|
+
v-show="set.device === 'mobile' && set.sidebar.opened && layout.includes('vertical')"
|
|
152
|
+
class="app-mask"
|
|
153
|
+
@click="useAppStoreHook().toggleSideBar()"
|
|
154
|
+
/>
|
|
155
|
+
<Vertical
|
|
156
|
+
v-show="
|
|
157
|
+
inIframe && !settingHook.hiddenSideBar && (layout.includes('vertical') || layout.includes('mix'))
|
|
158
|
+
"
|
|
159
|
+
/>
|
|
160
|
+
<div :class="['main-container', settingHook.hiddenSideBar ? 'main-hidden' : '']">
|
|
161
|
+
<div v-if="set.fixedHeader">
|
|
162
|
+
<layout-header v-if="inIframe" />
|
|
163
|
+
<!-- 主体内容 -->
|
|
164
|
+
<app-main :fixed-header="set.fixedHeader" />
|
|
165
|
+
</div>
|
|
166
|
+
<el-scrollbar v-else>
|
|
167
|
+
<template #default>
|
|
168
|
+
<div class="h-full">
|
|
169
|
+
<el-backtop :title="t('message.udp.backtop')" target=".main-container .el-scrollbar__wrap">
|
|
170
|
+
<backTop />
|
|
171
|
+
</el-backtop>
|
|
172
|
+
<layout-header v-if="inIframe" />
|
|
173
|
+
<!-- 主体内容 -->
|
|
174
|
+
<app-main :fixed-header="set.fixedHeader" />
|
|
175
|
+
</div>
|
|
176
|
+
</template>
|
|
177
|
+
</el-scrollbar>
|
|
178
|
+
</div>
|
|
179
|
+
<!-- 系统设置 -->
|
|
180
|
+
<setting />
|
|
181
|
+
</div>
|
|
182
|
+
</template>
|
|
183
|
+
|
|
184
|
+
<style lang="scss" scoped>
|
|
185
|
+
.app-wrapper {
|
|
186
|
+
position: relative;
|
|
187
|
+
width: 100%;
|
|
188
|
+
height: 100%;
|
|
189
|
+
|
|
190
|
+
&::after {
|
|
191
|
+
clear: both;
|
|
192
|
+
display: table;
|
|
193
|
+
content: '';
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&.mobile.openSidebar {
|
|
197
|
+
position: fixed;
|
|
198
|
+
top: 0;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.app-mask {
|
|
203
|
+
position: absolute;
|
|
204
|
+
top: 0;
|
|
205
|
+
z-index: 999;
|
|
206
|
+
width: 100%;
|
|
207
|
+
height: 100%;
|
|
208
|
+
background: #000;
|
|
209
|
+
opacity: 0.3;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.re-screen {
|
|
213
|
+
margin-top: 12px;
|
|
214
|
+
}
|
|
215
|
+
</style>
|
package/src/main.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: wei.li
|
|
3
3
|
* @Date: 2022-10-18 18:13:54
|
|
4
4
|
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-
|
|
5
|
+
* @LastEditTime: 2025-07-21 11:28:01
|
|
6
6
|
* @Description: file content
|
|
7
7
|
*/
|
|
8
8
|
import { createApp, type Directive } from 'vue';
|
|
@@ -33,12 +33,13 @@ import VueViewer from 'v-viewer';
|
|
|
33
33
|
|
|
34
34
|
// import {
|
|
35
35
|
// UtButton,
|
|
36
|
+
// utLov2,
|
|
36
37
|
// UGrid,
|
|
37
38
|
// UtDivider,
|
|
38
39
|
// UtModalForm2,
|
|
39
40
|
// FormUpload2
|
|
40
41
|
// UtForm,
|
|
41
|
-
//
|
|
42
|
+
// UtGrid2
|
|
42
43
|
// UtContent,
|
|
43
44
|
// UtCountdown,
|
|
44
45
|
// UtIconSelect,
|
|
@@ -88,7 +89,7 @@ const init = ({ config, lang, views, env, tableConfig }) => {
|
|
|
88
89
|
// app.component('uAttachment', uAttachment).component('UGrid', UGrid);
|
|
89
90
|
// .component('UtDivider', UtDivider)
|
|
90
91
|
// .component('UtModalForm2', UtModalForm2)
|
|
91
|
-
// .component('
|
|
92
|
+
// app.component('UtGrid2', UtGrid2);
|
|
92
93
|
// .component('UtForm', UtForm)
|
|
93
94
|
// .component('UtContent', UtContent)
|
|
94
95
|
// .component('UtIconSelect', UtIconSelect)
|