@utogether/udp-core 1.0.1-beta.1 → 1.0.1-beta.11

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.
Files changed (147) hide show
  1. package/build/plugins.ts +39 -32
  2. package/dist/{403-Dp617CWX.js → 403-Dsgsr2M-.js} +1 -1
  3. package/dist/{404-Cz_Axb6Y.js → 404-DmPHEfqM.js} +1 -1
  4. package/dist/{500-BGCtRNse.js → 500-OYEgHR2a.js} +1 -1
  5. package/dist/{AuthorityInfo-DGGfm7IS.js → AuthorityInfo-B1H1txG-.js} +1 -1
  6. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-BUlmQtjQ.js +100 -0
  7. package/dist/{Company-IV3GTnzY.js → Company-C8ojgx93.js} +3 -3
  8. package/dist/{CompanyPanel-qV-_VtoL.js → CompanyPanel-Dageer1t.js} +16 -16
  9. package/dist/{Department-B3W-OxW8.js → Department-Dr94_85I.js} +3 -3
  10. package/dist/{DepartmentPanel-Cw3OWxE7.js → DepartmentPanel-Bc5r1HpT.js} +1 -1
  11. package/dist/{DesignPanel-BFxR2fHJ.js → DesignPanel-CcWt1Myp.js} +1 -1
  12. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DljbeFba.js → DesignPanel.vue_vue_type_style_index_0_lang-CKA6nx1l.js} +24 -26
  13. package/dist/DictView-BHj6wexC.js +110 -0
  14. package/dist/InvOrganization-DP3Le9g-.js +72 -0
  15. package/dist/Org-BRGHTwsw.js +39 -0
  16. package/dist/{Preview-BlDMmpdR.js → Preview-CqMaUD_3.js} +1 -1
  17. package/dist/{ReportDefine-Cub_85LA.js → ReportDefine-PEQdTCOY.js} +1 -1
  18. package/dist/{ReportDesign-hFhq5UVE.js → ReportDesign-CB4bv8ba.js} +43 -43
  19. package/dist/{ReportQuery-ChkWEyxT.js → ReportQuery-B7t4lMK0.js} +1 -1
  20. package/dist/{ReportQueryFrom-KVyD_8Dj.js → ReportQueryFrom-VBxUIMRJ.js} +1 -1
  21. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CLNODquq.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-HeLA4Qs5.js} +1 -1
  22. package/dist/{ReportTemplate-ag9NDvh2.js → ReportTemplate-DNkv7F5p.js} +28 -28
  23. package/dist/{Role-_q3lQ8CZ.js → Role-BGfTpZK4.js} +6 -6
  24. package/dist/{RoleAssign-DZb9IRsm.js → RoleAssign-DrKFWZzA.js} +8 -8
  25. package/dist/{RolePanel-CsLsz-Ds.js → RolePanel-3lvRh7aS.js} +1 -1
  26. package/dist/{RolePanel-BQb1LlhD.js → RolePanel-BRI5QYe4.js} +1 -1
  27. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-BXKZb7yt.js +132 -0
  28. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-BrnRgHEk.js → RolePanel.vue_vue_type_script_setup_true_lang-Cci_Ysty.js} +44 -38
  29. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-CaFKRwXu.js → ScrollPanel.vue_vue_type_style_index_0_lang-BmId6zzA.js} +21 -21
  30. package/dist/{Staff-BSf9Ypbk.js → Staff-Dr0dq3fW.js} +3 -3
  31. package/dist/{StaffInfo-BNKasyMF.js → StaffInfo-_N9g2hPa.js} +1 -1
  32. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-DDZ7ukd0.js → StaffInfo.vue_vue_type_script_setup_true_lang-DiTJY2ug.js} +11 -11
  33. package/dist/{StaffPanel-Bpq0WVlH.js → StaffPanel-mxJQiW3G.js} +1 -1
  34. package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-BhiJ0Q-Q.js → StaffPanel.vue_vue_type_script_setup_true_lang-GRGn-5t6.js} +2 -2
  35. package/dist/{SysUser-FAABuNti.js → SysUser-DgA19hZE.js} +2 -2
  36. package/dist/{SysUserPanel-PxJeOgHm.js → SysUserPanel-Bc85z5_K.js} +1 -1
  37. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-BHDrP1Pk.js +294 -0
  38. package/dist/{SystemMenu-C-7NAGon.js → SystemMenu-Be-gFIie.js} +26 -26
  39. package/dist/{UserInfo-ClXKtyGo.js → UserInfo-BCYuwFmr.js} +1 -1
  40. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-8N7P4Hl7.js → UserInfo.vue_vue_type_style_index_0_lang-B1lgokO6.js} +39 -37
  41. package/dist/{childView-C_HmDQNd.js → childView-DhcBr1UA.js} +1 -1
  42. package/dist/{childView-uUlBcTza.js → childView-Dk4zZoXd.js} +1 -1
  43. package/dist/{childView.vue_vue_type_style_index_0_lang-Ckjmw6wJ.js → childView.vue_vue_type_style_index_0_lang-CVnLnl03.js} +40 -40
  44. package/dist/{childView.vue_vue_type_style_index_0_lang-y0sDvYx5.js → childView.vue_vue_type_style_index_0_lang-D4GYVhOc.js} +1 -1
  45. package/dist/{code-rule-AgCVDKFy.js → code-rule-BSwPwuAL.js} +9 -10
  46. package/dist/core.es.js +14 -11
  47. package/dist/{cron-task-C6FgQxTi.js → cron-task-T1ztyra7.js} +1 -1
  48. package/dist/{frameView-BDgISK7N.js → frameView-BDgngiBq.js} +1 -1
  49. package/dist/img/l_img.svg +1 -1
  50. package/dist/img/minicolors.png +0 -0
  51. package/dist/img/v_img.svg +1 -1
  52. package/dist/index-BSj2AtVL.js +4468 -0
  53. package/dist/{layoutView-yb3DV2DQ.js → layoutView-i7dLLBzJ.js} +1181 -1176
  54. package/dist/{login-RRpljbkm.js → login-K5Ludp8x.js} +105 -113
  55. package/dist/{login-log-CvVnyGi3.js → login-log-kqKzKTto.js} +1 -1
  56. package/dist/{lov-view-C9-rjzZR.js → lov-view-lAexiucu.js} +2 -2
  57. package/dist/{menuInfo-CzPQyFhp.js → menuInfo-BaN5YZPp.js} +1 -1
  58. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-BumXunCg.js → menuInfo.vue_vue_type_style_index_0_lang-yI4QOYxG.js} +100 -97
  59. package/dist/{pda-app-Dvy3U-b6.js → pda-app-DEtDXFvM.js} +211 -197
  60. package/dist/{resource-Fy0lFkSV.js → resource-Bztmz7pn.js} +15 -15
  61. package/dist/{su-welcome-DYvSCUST.js → su-welcome-Bx8nBPi9.js} +109 -110
  62. package/dist/sys-config-nvrtYGgi.js +290 -0
  63. package/dist/udp-core.css +2 -2
  64. package/dist/{utogether-CjmJiHoE.js → utogether-yPnwDAIH.js} +1 -1
  65. package/index.ts +40 -36
  66. package/package.json +18 -18
  67. package/src/App.vue +65 -70
  68. package/src/api/index.ts +31 -31
  69. package/src/components/SuCharts/src/UserInfo.vue +78 -78
  70. package/src/components/SuScrollTree/ScrollPanel.vue +3 -3
  71. package/src/components/udp/count-down.vue +536 -0
  72. package/src/components/udp/flip-down/FlipCard/flip-card.vue +251 -0
  73. package/src/components/udp/flip-down/FlipCard/interfaces.ts +4 -0
  74. package/src/components/udp/flip-down/FlipClock/flip-clock.vue +113 -0
  75. package/src/components/udp/form-upload.vue +414 -64
  76. package/src/components/udp/form.vue +112 -0
  77. package/src/components/udp/grid.vue +495 -0
  78. package/src/components/udp/index.ts +10 -4
  79. package/src/components/udp/lov.vue +388 -0
  80. package/src/components/udp/modal-form.vue +13 -3
  81. package/src/components/udp/modal-grid.vue +298 -0
  82. package/src/components/udp/upload.vue +423 -0
  83. package/src/components/udp/utils.ts +447 -40
  84. package/src/directives/permission/index.ts +1 -1
  85. package/src/layout/components/lay-navbar/index.vue +239 -237
  86. package/src/layout/components/lay-panel/index.vue +150 -150
  87. package/src/layout/components/lay-search/index.vue +25 -25
  88. package/src/layout/components/lay-select-org/index.vue +64 -69
  89. package/src/layout/components/lay-sidebar/breadCrumb.vue +1 -1
  90. package/src/layout/components/lay-sidebar/horizontal.vue +190 -191
  91. package/src/layout/components/lay-sidebar/mixNav.vue +260 -258
  92. package/src/layout/components/lay-sidebar/sidebar-logo.vue +92 -98
  93. package/src/layout/components/lay-tag/index.vue +625 -625
  94. package/src/layout/hooks/useNav.ts +173 -173
  95. package/src/layout/layoutView.vue +215 -215
  96. package/src/main.ts +119 -109
  97. package/src/plugins/i18n/en.ts +302 -289
  98. package/src/plugins/i18n/zh.ts +349 -337
  99. package/src/plugins/vxe-table/index.ts +53 -46
  100. package/src/plugins/vxe-table/render.tsx +956 -817
  101. package/src/router/index.ts +177 -183
  102. package/src/router/modules/remaining.ts +58 -83
  103. package/src/store/modules/permission.ts +1 -4
  104. package/src/style/button.scss +85 -78
  105. package/src/style/tailwind.css +1 -68
  106. package/src/style/vxetable.scss +44 -11
  107. package/src/utils/authority/index.ts +1 -1
  108. package/src/utils/{http → udp/http}/index.ts +283 -297
  109. package/src/utils/{http → udp/http}/types.d.ts +8 -5
  110. package/src/utils/udp/useRender.ts +17 -6
  111. package/src/views/login/login-view.vue +300 -314
  112. package/src/views/organization/company/CompanyPanel.vue +259 -259
  113. package/src/views/organization/inv-org/InvOrganization.vue +68 -54
  114. package/src/views/organization/org/Org.vue +9 -5
  115. package/src/views/system/menu/SystemMenu.vue +183 -197
  116. package/src/views/system/menu/menuInfo.vue +363 -371
  117. package/src/views/system/role/AuthorityInfo.vue +19 -15
  118. package/src/views/system/role/Role.vue +1 -5
  119. package/src/views/system/role/RolePanel.vue +11 -2
  120. package/src/views/system/role/UserInfo.vue +195 -193
  121. package/src/views/system/role-assign/RoleAssign.vue +57 -57
  122. package/src/views/system/role-assign/RolePanel.vue +139 -136
  123. package/src/views/system/sys/sys-config.vue +287 -291
  124. package/src/views/system/sysUser/SysUserPanel.vue +278 -278
  125. package/src/views/uapp/pda/pda-app.vue +208 -176
  126. package/src/views/udev/dict/DictView.vue +118 -106
  127. package/src/views/udev/dict/childView.vue +7 -7
  128. package/src/views/udev/lov/lov-view.vue +91 -91
  129. package/src/views/ufile/aggregation/File.vue +5 -5
  130. package/src/views/ufile/file/water-mark.vue +14 -14
  131. package/src/views/uhome/su-welcome.vue +3 -3
  132. package/src/views/ulogin/login.vue +12 -8
  133. package/src/views/upms/user/login-log.vue +1 -1
  134. package/src/views/urpt/design/DesignPanel.vue +507 -526
  135. package/src/views/urpt/design/ReportDesign.vue +15 -19
  136. package/src/views/urpt/static-resource/resource.vue +3 -3
  137. package/src/views/urpt/template/ReportTemplate.vue +7 -7
  138. package/types/global.d.ts +2 -1
  139. package/vite.config.ts +6 -2
  140. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-BqccGW7v.js +0 -102
  141. package/dist/DictView-C-i7e4hZ.js +0 -95
  142. package/dist/InvOrganization-cfT6riGU.js +0 -260
  143. package/dist/Org-CA7vTDIF.js +0 -35
  144. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-cmW7zBLu.js +0 -126
  145. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-njefUln5.js +0 -288
  146. package/dist/index-DzOzUkf6.js +0 -3388
  147. package/dist/sys-config-DJ1vNQTy.js +0 -277
@@ -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
@@ -1,109 +1,119 @@
1
- /*
2
- * @Author: wei.li
3
- * @Date: 2022-10-18 18:13:54
4
- * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2025-04-29 15:35:32
6
- * @Description: file content
7
- */
8
- import { createApp, type Directive } from 'vue';
9
- import App from './App.vue';
10
- import router from './router';
11
- import { setViews } from './router';
12
- import { setupStore } from './store';
13
- import { setConfig, setSystemEnv } from './config';
14
- import { useI18n } from '../src/plugins/i18n';
15
- import { setTableConfig } from '../src/plugins/vxe-table';
16
- import { injectResponsiveStorage } from './utils/storage';
17
- import hasAuthority from './utils/authority';
18
- import { getServiceApi, getBaseURL, setRouter } from './api';
19
-
20
- import 'nprogress/nprogress.css';
21
- // 一定要在main.ts中导入tailwind.css,防止vite每次hmr都会请求src/style/index.scss整体css文件导致热更新慢的问题
22
- import './style/tailwind.css';
23
- // // 引入重置样式
24
- import './style/reset.scss';
25
- // 导入公共样式
26
- import './style/index.scss';
27
-
28
- import 'viewerjs/dist/viewer.css';
29
-
30
- import VueViewer from 'v-viewer';
31
-
32
- // import SuTable from './components/SuTable/SuTable.vue';
33
-
34
- // import {
35
- // UtButton,
36
- // UGrid,
37
- // UtDivider,
38
- // UtModalForm2,
39
- // FormUpload2
40
- // UtForm,
41
- // UtModalGrid,
42
- // UtContent,
43
- // UtCountdown,
44
- // UtIconSelect,
45
- // UtCalendar
46
- // uAttachment
47
- // } from './components/udp';
48
-
49
- const app = createApp(App);
50
-
51
- // 全局注册`@iconify/vue`图标库
52
- import { IconifyIconOffline, FontIcon } from './components/ReIcon';
53
- // 全局注册`vue-tippy`
54
- import 'tippy.js/dist/tippy.css';
55
- import 'tippy.js/animations/perspective.css';
56
- import VueTippy from 'vue-tippy';
57
-
58
- app.use(VueTippy, {
59
- defaultProps: { animation: 'perspective' }
60
- });
61
-
62
- // 自定义指令
63
- import * as directives from './directives';
64
-
65
- const setGlobal = app => {
66
- app.config.globalProperties.$hasAuthority = hasAuthority;
67
- app.config.globalProperties.$serviceApi = getServiceApi();
68
- app.config.globalProperties.$url = getBaseURL();
69
- };
70
-
71
- const setGlobalDirective = app => {
72
- Object.keys(directives).forEach(key => {
73
- app.directive(key, (directives as { [key: string]: Directive })[key]);
74
- });
75
- };
76
-
77
- const init = ({ config, lang, views, env, tableConfig }) => {
78
- app.use(router);
79
- setRouter(router);
80
- setConfig(app, config);
81
- setSystemEnv(env);
82
- setViews(views);
83
- setTableConfig(tableConfig);
84
- return new Promise(resolve => {
85
- useI18n(app, lang);
86
- app.component('IconifyIconOffline', IconifyIconOffline);
87
- app.component('FontIcon', FontIcon);
88
- // app.component('uAttachment', uAttachment).component('UGrid', UGrid);
89
- // .component('UtDivider', UtDivider)
90
- // .component('UtModalForm2', UtModalForm2)
91
- // .component('FormUpload2', FormUpload2);
92
- // .component('UtForm', UtForm)
93
- // .component('UtContent', UtContent)
94
- // .component('UtIconSelect', UtIconSelect)
95
- // .component('UtCountdown', UtCountdown)
96
- // .component('UtCalendar', UtCalendar)
97
- // .component('UtModalGrid', UtModalGrid);
98
- app.use(VueViewer, { defaultOptions: { zIndex: 9999 } });
99
- setGlobal(app);
100
- setGlobalDirective(app);
101
- // 全局组件
102
- setupStore(app);
103
- injectResponsiveStorage(app, config);
104
- const result = { app, router };
105
- resolve(result);
106
- });
107
- };
108
-
109
- export default init;
1
+ /*
2
+ * @Author: levi7754 levi7754@163.com
3
+ * @Date: 2025-07-25 13:38:20
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2025-08-21 17:15:41
6
+ * @FilePath: \udp-front\packages\udp-core\src\main.ts
7
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
+ */
9
+ /*
10
+ * @Author: wei.li
11
+ * @Date: 2022-10-18 18:13:54
12
+ * @LastEditors: levi7754 levi7754@163.com
13
+ * @LastEditTime: 2025-07-31 17:17:32
14
+ * @Description: file content
15
+ */
16
+ import { createApp, type Directive } from 'vue';
17
+ import App from './App.vue';
18
+ // import router from './router';
19
+ import { setViews } from './router';
20
+ import { setupStore } from './store';
21
+ import { setConfig, setSystemEnv } from './config';
22
+ import { useI18n } from '../src/plugins/i18n';
23
+ import { setTableConfig } from '../src/plugins/vxe-table';
24
+ import { injectResponsiveStorage } from './utils/storage';
25
+ import hasAuthority from './utils/authority';
26
+ import { getServiceApi, getBaseURL, setRouter } from './api';
27
+
28
+ import 'nprogress/nprogress.css';
29
+ // 一定要在main.ts中导入tailwind.css,防止vite每次hmr都会请求src/style/index.scss整体css文件导致热更新慢的问题
30
+ import './style/tailwind.css';
31
+ // // 引入重置样式
32
+ import './style/reset.scss';
33
+ // 导入公共样式
34
+ import './style/index.scss';
35
+
36
+ import 'viewerjs/dist/viewer.css';
37
+
38
+ import VueViewer from 'v-viewer';
39
+
40
+ // import SuTable from './components/SuTable/SuTable.vue';
41
+
42
+ // import {
43
+ // UtButton,
44
+ // utLov2,
45
+ // UGrid,
46
+ // UtDivider,
47
+ // UtModalForm2
48
+ // FormUpload2,
49
+ // UtForm2
50
+ // UtGrid2
51
+ // UtContent,
52
+ // UtModalGrid2
53
+ // UtUpload2
54
+ // UtIconSelect,
55
+ // UtCalendar
56
+ // uAttachment
57
+ // } from './components/udp';
58
+
59
+ const app = createApp(App);
60
+
61
+ // 全局注册`@iconify/vue`图标库
62
+ import { IconifyIconOffline, FontIcon } from './components/ReIcon';
63
+ // 全局注册`vue-tippy`
64
+ import 'tippy.js/dist/tippy.css';
65
+ import 'tippy.js/animations/perspective.css';
66
+ import VueTippy from 'vue-tippy';
67
+
68
+ app.use(VueTippy, {
69
+ defaultProps: { animation: 'perspective' }
70
+ });
71
+
72
+ // 自定义指令
73
+ import * as directives from './directives';
74
+
75
+ const setGlobal = app => {
76
+ app.config.globalProperties.$hasAuthority = hasAuthority;
77
+ app.config.globalProperties.$serviceApi = getServiceApi();
78
+ app.config.globalProperties.$url = getBaseURL();
79
+ };
80
+
81
+ const setGlobalDirective = app => {
82
+ Object.keys(directives).forEach(key => {
83
+ app.directive(key, (directives as { [key: string]: Directive })[key]);
84
+ });
85
+ };
86
+
87
+ const init = ({ router, config, lang, views, env, tableConfig }) => {
88
+ setViews(views, router);
89
+ app.use(router);
90
+ setRouter(router);
91
+ setConfig(app, config);
92
+ setSystemEnv(env);
93
+ setTableConfig(tableConfig);
94
+ return new Promise(resolve => {
95
+ useI18n(app, lang);
96
+ app.component('IconifyIconOffline', IconifyIconOffline);
97
+ app.component('FontIcon', FontIcon);
98
+ // app.component('uAttachment', uAttachment).component('UGrid', UGrid);
99
+ // .component('UtDivider', UtDivider)
100
+ // app.component('UtModalForm2', UtModalForm2);
101
+ // app.component('UtGrid2', UtGrid2);
102
+ // app.component('UtForm2', UtForm2);
103
+ // app.component('UtModalGrid2', UtModalGrid2);
104
+ // .component('UtIconSelect', UtIconSelect)
105
+ // app.component('FormUpload2', FormUpload2);
106
+ // .component('UtCalendar', UtCalendar)
107
+ // .component('UtModalGrid', UtModalGrid);
108
+ app.use(VueViewer, { defaultOptions: { zIndex: 9999 } });
109
+ setGlobal(app);
110
+ setGlobalDirective(app);
111
+ // 全局组件
112
+ setupStore(app);
113
+ injectResponsiveStorage(app, config);
114
+ const result = { app, router };
115
+ resolve(result);
116
+ });
117
+ };
118
+
119
+ export default init;