befly-admin 3.12.5 → 3.12.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.
- package/package.json +6 -7
- package/src/App.vue +2 -4
- package/src/components/{DetailPanel.vue → detailPanel.vue} +71 -36
- package/src/components/pageDialog.vue +223 -0
- package/src/components/{PagedTableDetailPage.vue → pagedTableDetail.vue} +157 -56
- package/src/layouts/default.vue +151 -166
- package/src/plugins/config.ts +6 -6
- package/src/plugins/http.ts +3 -4
- package/src/plugins/storage.ts +1 -1
- package/src/styles/global.scss +0 -11
- package/src/types/auto-imports.d.ts +14 -2
- package/src/types/components.d.ts +7 -3
- package/src/types/typed-router.d.ts +18 -13
- package/src/utils/tdesignPlugins.ts +57 -0
package/src/layouts/default.vue
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
<!-- 菜单区域 -->
|
|
14
14
|
<div class="sidebar-menu">
|
|
15
|
-
<t-menu v-model:value="$Data.currentMenuKey" v-model:expanded="$Data.expandedKeys" width="220px" @change="
|
|
15
|
+
<t-menu v-model:value="$Data.currentMenuKey" v-model:expanded="$Data.expandedKeys" width="220px" @change="onMenuClick">
|
|
16
16
|
<template v-for="menu in $Data.userMenus" :key="menu.id">
|
|
17
17
|
<!-- 无子菜单 -->
|
|
18
18
|
<t-menu-item v-if="!menu.children || menu.children.length === 0" :value="menu.path">
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
|
|
41
41
|
<!-- 底部操作区域 -->
|
|
42
42
|
<div class="sidebar-footer">
|
|
43
|
-
<div class="footer-item" @click="
|
|
43
|
+
<div class="footer-item" @click="handleSettings">
|
|
44
44
|
<i-lucide:settings style="width: 18px; height: 18px" />
|
|
45
45
|
<span>系统设置</span>
|
|
46
46
|
</div>
|
|
47
47
|
<div class="footer-user">
|
|
48
|
-
<t-upload :action="$Config.uploadUrl" :headers="{ Authorization: $Storage.local.get('token') }" :show-upload-list="false" accept="image/*" @success="
|
|
48
|
+
<t-upload :action="$Config.uploadUrl" :headers="{ Authorization: $Storage.local.get('token') }" :show-upload-list="false" accept="image/*" @success="onAvatarUploadSuccess">
|
|
49
49
|
<div class="user-avatar" :class="{ 'has-avatar': $Data.userInfo.avatar }">
|
|
50
50
|
<img v-if="$Data.userInfo.avatar" :src="$Data.userInfo.avatar" alt="avatar" />
|
|
51
51
|
<i-lucide:user v-else style="width: 16px; height: 16px; color: #fff" />
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
<span class="user-name">{{ $Data.userInfo.nickname || "管理员" }}</span>
|
|
59
59
|
<span class="user-role">{{ $Data.userInfo.role || "超级管理员" }}</span>
|
|
60
60
|
</div>
|
|
61
|
-
<t-button theme="default" variant="text" size="small" @click="
|
|
61
|
+
<t-button theme="default" variant="text" size="small" @click="handleLogout">
|
|
62
62
|
<template #icon>
|
|
63
63
|
<i-lucide:log-out style="width: 16px; height: 16px" />
|
|
64
64
|
</template>
|
|
@@ -75,7 +75,6 @@
|
|
|
75
75
|
</template>
|
|
76
76
|
|
|
77
77
|
<script setup lang="ts">
|
|
78
|
-
import { DialogPlugin } from "tdesign-vue-next";
|
|
79
78
|
import { arrayToTree } from "befly-shared/utils/arrayToTree";
|
|
80
79
|
|
|
81
80
|
const router = useRouter();
|
|
@@ -130,202 +129,188 @@ const $Data = $ref({
|
|
|
130
129
|
}
|
|
131
130
|
});
|
|
132
131
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
try {
|
|
138
|
-
const { data } = await $Http.post("/addon/admin/menu/all");
|
|
139
|
-
const lists = Array.isArray(data?.lists) ? data.lists : [];
|
|
132
|
+
async function fetchUserMenus() {
|
|
133
|
+
try {
|
|
134
|
+
const { data } = await $Http.post("/addon/admin/menu/all");
|
|
135
|
+
const lists = Array.isArray(data?.lists) ? data.lists : [];
|
|
140
136
|
|
|
141
|
-
|
|
142
|
-
|
|
137
|
+
const bizMenus = [];
|
|
138
|
+
const routeRecords = router.getRoutes();
|
|
143
139
|
|
|
144
|
-
|
|
145
|
-
|
|
140
|
+
for (const record of routeRecords) {
|
|
141
|
+
const path = normalizePath(record.path);
|
|
146
142
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
if (path === "/") {
|
|
152
|
-
continue;
|
|
153
|
-
}
|
|
143
|
+
if (typeof path !== "string") {
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
154
146
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
147
|
+
if (path === "/") {
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
158
150
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
151
|
+
if (path === normalizePath(loginPath)) {
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
162
154
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
155
|
+
if (path.startsWith("/addon/")) {
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
167
158
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
159
|
+
const title = typeof record.meta?.title === "string" ? record.meta.title : "";
|
|
160
|
+
if (title.length === 0) {
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
171
163
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
parentPath: "__biz__",
|
|
175
|
-
name: title,
|
|
176
|
-
path: path
|
|
177
|
-
});
|
|
164
|
+
if (bizMenus.some((m) => m.path === path)) {
|
|
165
|
+
continue;
|
|
178
166
|
}
|
|
179
167
|
|
|
180
|
-
bizMenus.
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
{
|
|
186
|
-
id: "biz",
|
|
187
|
-
parentPath: "",
|
|
188
|
-
name: "业务",
|
|
189
|
-
path: "__biz__",
|
|
190
|
-
sort: 2
|
|
191
|
-
}
|
|
192
|
-
].concat(
|
|
193
|
-
bizMenus.map((m) => {
|
|
194
|
-
return Object.assign({}, m, { sort: 2 });
|
|
195
|
-
})
|
|
196
|
-
)
|
|
197
|
-
: [];
|
|
198
|
-
|
|
199
|
-
const normalizedLists = lists.map((menu) => {
|
|
200
|
-
const menuPath = normalizePath(menu?.path);
|
|
201
|
-
const menuParentPath = normalizeParentPath(menu?.parentPath);
|
|
202
|
-
return Object.assign({}, menu, { path: menuPath, parentPath: menuParentPath });
|
|
168
|
+
bizMenus.push({
|
|
169
|
+
id: `biz_${path.replace(/[^a-zA-Z0-9]+/g, "_")}`,
|
|
170
|
+
parentPath: "__biz__",
|
|
171
|
+
name: title,
|
|
172
|
+
path: path
|
|
203
173
|
});
|
|
174
|
+
}
|
|
204
175
|
|
|
205
|
-
|
|
176
|
+
bizMenus.sort((a, b) => String(a.path).localeCompare(String(b.path)));
|
|
177
|
+
|
|
178
|
+
const bizMenusFlat =
|
|
179
|
+
bizMenus.length > 0
|
|
180
|
+
? [
|
|
181
|
+
{
|
|
182
|
+
id: "biz",
|
|
183
|
+
parentPath: "",
|
|
184
|
+
name: "业务",
|
|
185
|
+
path: "__biz__",
|
|
186
|
+
sort: 2
|
|
187
|
+
}
|
|
188
|
+
].concat(
|
|
189
|
+
bizMenus.map((m) => {
|
|
190
|
+
return Object.assign({}, m, { sort: 2 });
|
|
191
|
+
})
|
|
192
|
+
)
|
|
193
|
+
: [];
|
|
194
|
+
|
|
195
|
+
const normalizedLists = lists.map((menu) => {
|
|
196
|
+
const menuPath = normalizePath(menu?.path);
|
|
197
|
+
const menuParentPath = normalizeParentPath(menu?.parentPath);
|
|
198
|
+
return Object.assign({}, menu, { path: menuPath, parentPath: menuParentPath });
|
|
199
|
+
});
|
|
206
200
|
|
|
207
|
-
|
|
201
|
+
const mergedLists = bizMenusFlat.concat(normalizedLists);
|
|
208
202
|
|
|
209
|
-
|
|
210
|
-
$Data.userMenus = treeResult.tree;
|
|
211
|
-
$Method.setActiveMenu();
|
|
212
|
-
} catch (error) {
|
|
213
|
-
MessagePlugin.error("获取用户菜单失败");
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
|
|
217
|
-
// 设置当前激活的菜单(从一维数据查找并构建父级链)
|
|
218
|
-
setActiveMenu() {
|
|
219
|
-
const currentPath = route.path;
|
|
220
|
-
const normalizedCurrentPath = normalizePath(currentPath);
|
|
221
|
-
|
|
222
|
-
// 在一维数据中查找当前路径对应的菜单
|
|
223
|
-
const currentMenu = $Data.userMenusFlat.find((menu) => {
|
|
224
|
-
const menuPath = menu.path;
|
|
225
|
-
const normalizedMenuPath = normalizePath(menuPath);
|
|
226
|
-
return normalizedMenuPath === normalizedCurrentPath;
|
|
227
|
-
});
|
|
203
|
+
const treeResult = arrayToTree(mergedLists, "path", "parentPath", "children", "sort");
|
|
228
204
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
205
|
+
$Data.userMenusFlat = treeResult.flat;
|
|
206
|
+
$Data.userMenus = treeResult.tree;
|
|
207
|
+
setActiveMenu();
|
|
208
|
+
} catch (error) {
|
|
209
|
+
void showMessageError("获取用户菜单失败");
|
|
210
|
+
}
|
|
211
|
+
}
|
|
232
212
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
213
|
+
function setActiveMenu() {
|
|
214
|
+
const currentPath = route.path;
|
|
215
|
+
const normalizedCurrentPath = normalizePath(currentPath);
|
|
236
216
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
return parentMenuPath === currentParentPath;
|
|
243
|
-
});
|
|
217
|
+
const currentMenu = $Data.userMenusFlat.find((menu) => {
|
|
218
|
+
const menuPath = menu.path;
|
|
219
|
+
const normalizedMenuPath = normalizePath(menuPath);
|
|
220
|
+
return normalizedMenuPath === normalizedCurrentPath;
|
|
221
|
+
});
|
|
244
222
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
223
|
+
if (!currentMenu) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
const expandedKeys = [];
|
|
228
|
+
let menu = currentMenu;
|
|
250
229
|
|
|
251
|
-
|
|
230
|
+
while (typeof menu.parentPath === "string" && menu.parentPath.length > 0) {
|
|
231
|
+
const parent = $Data.userMenusFlat.find((m) => {
|
|
232
|
+
const parentMenuPath = normalizePath(m?.path);
|
|
233
|
+
const currentParentPath = normalizeParentPath(menu?.parentPath);
|
|
234
|
+
return parentMenuPath === currentParentPath;
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
if (parent) {
|
|
238
|
+
expandedKeys.unshift(String(parent.id));
|
|
239
|
+
menu = parent;
|
|
240
|
+
continue;
|
|
252
241
|
}
|
|
253
242
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
$Data.expandedKeys = expandedKeys;
|
|
247
|
+
$Data.currentMenuKey = currentPath;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
function onMenuClick(path) {
|
|
251
|
+
if (typeof path === "string" && path.startsWith("/")) {
|
|
252
|
+
router.push(path);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
async function handleLogout() {
|
|
257
|
+
let dialog = null;
|
|
258
|
+
let destroyed = false;
|
|
258
259
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
260
|
+
const destroy = () => {
|
|
261
|
+
if (destroyed) return;
|
|
262
|
+
destroyed = true;
|
|
263
|
+
if (dialog && typeof dialog.destroy === "function") {
|
|
264
|
+
dialog.destroy();
|
|
263
265
|
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
destroyed = true;
|
|
274
|
-
if (dialog && typeof dialog.destroy === "function") {
|
|
275
|
-
dialog.destroy();
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
dialog = await openConfirmDialog({
|
|
269
|
+
header: "确认退出登录",
|
|
270
|
+
body: "确定要退出登录吗?",
|
|
271
|
+
status: "warning",
|
|
272
|
+
onConfirm: async () => {
|
|
273
|
+
if (dialog && typeof dialog.setConfirmLoading === "function") {
|
|
274
|
+
dialog.setConfirmLoading(true);
|
|
276
275
|
}
|
|
277
|
-
};
|
|
278
276
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
277
|
+
try {
|
|
278
|
+
$Storage.local.remove("token");
|
|
279
|
+
await router.push(loginPath);
|
|
280
|
+
await showMessageSuccess("退出成功");
|
|
281
|
+
destroy();
|
|
282
|
+
} catch (error) {
|
|
283
|
+
await showMessageError("退出失败");
|
|
284
|
+
destroy();
|
|
285
|
+
} finally {
|
|
284
286
|
if (dialog && typeof dialog.setConfirmLoading === "function") {
|
|
285
|
-
dialog.setConfirmLoading(
|
|
287
|
+
dialog.setConfirmLoading(false);
|
|
286
288
|
}
|
|
287
|
-
|
|
288
|
-
try {
|
|
289
|
-
$Storage.local.remove("token");
|
|
290
|
-
await router.push(loginPath);
|
|
291
|
-
MessagePlugin.success("退出成功");
|
|
292
|
-
destroy();
|
|
293
|
-
} catch (error) {
|
|
294
|
-
MessagePlugin.error("退出失败");
|
|
295
|
-
destroy();
|
|
296
|
-
} finally {
|
|
297
|
-
if (dialog && typeof dialog.setConfirmLoading === "function") {
|
|
298
|
-
dialog.setConfirmLoading(false);
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
},
|
|
302
|
-
onClose: () => {
|
|
303
|
-
destroy();
|
|
304
289
|
}
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
// 处理系统设置
|
|
309
|
-
handleSettings() {
|
|
310
|
-
router.push("/addon/admin/settings");
|
|
311
|
-
},
|
|
312
|
-
|
|
313
|
-
// 头像上传成功
|
|
314
|
-
onAvatarUploadSuccess(res) {
|
|
315
|
-
if (res.response?.code === 0 && res.response?.data?.url) {
|
|
316
|
-
$Data.userInfo.avatar = res.response.data.url;
|
|
317
|
-
MessagePlugin.success("头像上传成功");
|
|
318
|
-
// TODO: 可以调用接口保存用户头像
|
|
290
|
+
},
|
|
291
|
+
onClose: () => {
|
|
292
|
+
destroy();
|
|
319
293
|
}
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
function handleSettings() {
|
|
298
|
+
router.push("/addon/admin/settings");
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
function onAvatarUploadSuccess(res) {
|
|
302
|
+
if (res.response?.code === 0 && res.response?.data?.url) {
|
|
303
|
+
$Data.userInfo.avatar = res.response.data.url;
|
|
304
|
+
void showMessageSuccess("头像上传成功");
|
|
320
305
|
}
|
|
321
|
-
}
|
|
306
|
+
}
|
|
322
307
|
|
|
323
|
-
|
|
308
|
+
fetchUserMenus();
|
|
324
309
|
|
|
325
310
|
watch(
|
|
326
311
|
() => route.path,
|
|
327
312
|
() => {
|
|
328
|
-
|
|
313
|
+
setActiveMenu();
|
|
329
314
|
}
|
|
330
315
|
);
|
|
331
316
|
</script>
|
package/src/plugins/config.ts
CHANGED
|
@@ -18,14 +18,14 @@ export type BeflyAdminConfig = {
|
|
|
18
18
|
* 内置配置对象
|
|
19
19
|
*/
|
|
20
20
|
export const $Config: BeflyAdminConfig = {
|
|
21
|
-
appTitle: import.meta.env
|
|
22
|
-
apiBaseUrl: import.meta.env
|
|
21
|
+
appTitle: import.meta.env["VITE_APP_TITLE"] || "野蜂飞舞",
|
|
22
|
+
apiBaseUrl: import.meta.env["VITE_API_BASE_URL"] || "",
|
|
23
23
|
|
|
24
|
-
uploadUrl: import.meta.env
|
|
25
|
-
storageNamespace: import.meta.env
|
|
24
|
+
uploadUrl: import.meta.env["VITE_UPLOAD_URL"] || ((import.meta.env["VITE_API_BASE_URL"] || "").length > 0 ? `${import.meta.env["VITE_API_BASE_URL"]}/upload` : "/upload"),
|
|
25
|
+
storageNamespace: import.meta.env["VITE_STORAGE_NAMESPACE"] || "befly_admin",
|
|
26
26
|
|
|
27
|
-
loginPath: import.meta.env
|
|
28
|
-
homePath: import.meta.env
|
|
27
|
+
loginPath: import.meta.env["VITE_LOGIN_PATH"] || "/addon/admin/login",
|
|
28
|
+
homePath: import.meta.env["VITE_HOME_PATH"] || "/addon/admin",
|
|
29
29
|
isDev: import.meta.env.DEV,
|
|
30
30
|
isProd: import.meta.env.PROD
|
|
31
31
|
};
|
package/src/plugins/http.ts
CHANGED
|
@@ -71,10 +71,9 @@ function isNormalizedHttpError(value: unknown): value is HttpError {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
async function showNetworkErrorToast(): Promise<void> {
|
|
74
|
-
// 在测试/非浏览器环境下,tdesign-vue-next 可能不可用;仅在需要展示提示时再加载。
|
|
75
74
|
try {
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
// 在测试/非浏览器环境下,提示组件可能不可用;仅在需要展示提示时再加载。
|
|
76
|
+
await showMessageError("网络连接失败");
|
|
78
77
|
} catch {
|
|
79
78
|
// ignore
|
|
80
79
|
}
|
|
@@ -103,7 +102,7 @@ async function unwrapApiResponse<TData>(promise: Promise<AxiosResponse<HttpApiRe
|
|
|
103
102
|
|
|
104
103
|
// 创建 axios 实例
|
|
105
104
|
const request = axios.create({
|
|
106
|
-
baseURL: (import.meta as unknown as { env?: Record<string, string> }).env?.VITE_API_BASE_URL || "",
|
|
105
|
+
baseURL: (import.meta as unknown as { env?: Record<string, string> }).env?.["VITE_API_BASE_URL"] || "",
|
|
107
106
|
timeout: 10000,
|
|
108
107
|
headers: {
|
|
109
108
|
"Content-Type": "application/json"
|
package/src/plugins/storage.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// 获取命名空间
|
|
7
|
-
const NAMESPACE = (import.meta as unknown as { env?: Record<string, string> }).env?.VITE_STORAGE_NAMESPACE || "befly";
|
|
7
|
+
const NAMESPACE = (import.meta as unknown as { env?: Record<string, string> }).env?.["VITE_STORAGE_NAMESPACE"] || "befly";
|
|
8
8
|
|
|
9
9
|
class MemoryStorage implements Storage {
|
|
10
10
|
private map: Map<string, string>;
|
package/src/styles/global.scss
CHANGED
|
@@ -115,17 +115,6 @@ body {
|
|
|
115
115
|
// }
|
|
116
116
|
// }
|
|
117
117
|
|
|
118
|
-
.dialog-wrapper {
|
|
119
|
-
background-color: var(--bg-color-page);
|
|
120
|
-
padding: var(--spacing-md);
|
|
121
|
-
border-radius: var(--border-radius);
|
|
122
|
-
}
|
|
123
|
-
.dialog-footer {
|
|
124
|
-
width: 100%;
|
|
125
|
-
display: flex;
|
|
126
|
-
justify-content: center;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
118
|
// 通用卡片样式
|
|
130
119
|
.section-block {
|
|
131
120
|
background: var(--bg-color-container);
|
|
@@ -10,7 +10,7 @@ declare global {
|
|
|
10
10
|
const $Http: typeof import('../plugins/http').$Http
|
|
11
11
|
const $Router: typeof import('../plugins/router').$Router
|
|
12
12
|
const $Storage: typeof import('../plugins/storage').$Storage
|
|
13
|
-
const DialogPlugin: typeof import(
|
|
13
|
+
const DialogPlugin: typeof import('tdesign-vue-next').DialogPlugin
|
|
14
14
|
const EffectScope: typeof import('vue').EffectScope
|
|
15
15
|
const MessagePlugin: typeof import('tdesign-vue-next').MessagePlugin
|
|
16
16
|
const acceptHMRUpdate: typeof import('pinia').acceptHMRUpdate
|
|
@@ -22,6 +22,7 @@ declare global {
|
|
|
22
22
|
const customRef: typeof import('vue').customRef
|
|
23
23
|
const defineAsyncComponent: typeof import('vue').defineAsyncComponent
|
|
24
24
|
const defineComponent: typeof import('vue').defineComponent
|
|
25
|
+
const definePage: typeof import('vue-router/experimental').definePage
|
|
25
26
|
const defineStore: typeof import('pinia').defineStore
|
|
26
27
|
const effectScope: typeof import('vue').effectScope
|
|
27
28
|
const getActivePinia: typeof import('pinia').getActivePinia
|
|
@@ -58,6 +59,7 @@ declare global {
|
|
|
58
59
|
const onUnmounted: typeof import('vue').onUnmounted
|
|
59
60
|
const onUpdated: typeof import('vue').onUpdated
|
|
60
61
|
const onWatcherCleanup: typeof import('vue').onWatcherCleanup
|
|
62
|
+
const openConfirmDialog: typeof import('../utils/tdesignPlugins').openConfirmDialog
|
|
61
63
|
const provide: typeof import('vue').provide
|
|
62
64
|
const reactive: typeof import('vue').reactive
|
|
63
65
|
const readonly: typeof import('vue').readonly
|
|
@@ -69,6 +71,9 @@ declare global {
|
|
|
69
71
|
const shallowReactive: typeof import('vue').shallowReactive
|
|
70
72
|
const shallowReadonly: typeof import('vue').shallowReadonly
|
|
71
73
|
const shallowRef: typeof import('vue').shallowRef
|
|
74
|
+
const showMessageError: typeof import('../utils/tdesignPlugins').showMessageError
|
|
75
|
+
const showMessageSuccess: typeof import('../utils/tdesignPlugins').showMessageSuccess
|
|
76
|
+
const showMessageWarning: typeof import('../utils/tdesignPlugins').showMessageWarning
|
|
72
77
|
const storeToRefs: typeof import('pinia').storeToRefs
|
|
73
78
|
const toRaw: typeof import('vue').toRaw
|
|
74
79
|
const toRef: typeof import('vue').toRef
|
|
@@ -97,6 +102,9 @@ declare global {
|
|
|
97
102
|
export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, ShallowRef, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
|
|
98
103
|
import('vue')
|
|
99
104
|
// @ts-ignore
|
|
105
|
+
export type { ConfirmDialogStatus, ConfirmDialogOptions, ConfirmDialogInstance } from '../utils/tdesignPlugins'
|
|
106
|
+
import('../utils/tdesignPlugins')
|
|
107
|
+
// @ts-ignore
|
|
100
108
|
export type { BeflyAdminConfig } from '../plugins/config'
|
|
101
109
|
import('../plugins/config')
|
|
102
110
|
// @ts-ignore
|
|
@@ -114,7 +122,6 @@ declare module 'vue' {
|
|
|
114
122
|
readonly $Router: UnwrapRef<typeof import('../plugins/router')['$Router']>
|
|
115
123
|
readonly $Storage: UnwrapRef<typeof import('../plugins/storage')['$Storage']>
|
|
116
124
|
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
|
117
|
-
readonly MessagePlugin: UnwrapRef<typeof import('tdesign-vue-next')['MessagePlugin']>
|
|
118
125
|
readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
|
|
119
126
|
readonly computed: UnwrapRef<typeof import('vue')['computed']>
|
|
120
127
|
readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
|
|
@@ -122,6 +129,7 @@ declare module 'vue' {
|
|
|
122
129
|
readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
|
|
123
130
|
readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
|
|
124
131
|
readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
|
|
132
|
+
readonly definePage: UnwrapRef<typeof import('vue-router/experimental')['definePage']>
|
|
125
133
|
readonly defineStore: UnwrapRef<typeof import('pinia')['defineStore']>
|
|
126
134
|
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
|
|
127
135
|
readonly getActivePinia: UnwrapRef<typeof import('pinia')['getActivePinia']>
|
|
@@ -158,6 +166,7 @@ declare module 'vue' {
|
|
|
158
166
|
readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']>
|
|
159
167
|
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
|
|
160
168
|
readonly onWatcherCleanup: UnwrapRef<typeof import('vue')['onWatcherCleanup']>
|
|
169
|
+
readonly openConfirmDialog: UnwrapRef<typeof import('../utils/tdesignPlugins')['openConfirmDialog']>
|
|
161
170
|
readonly provide: UnwrapRef<typeof import('vue')['provide']>
|
|
162
171
|
readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
|
|
163
172
|
readonly readonly: UnwrapRef<typeof import('vue')['readonly']>
|
|
@@ -168,6 +177,9 @@ declare module 'vue' {
|
|
|
168
177
|
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
|
|
169
178
|
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
|
|
170
179
|
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
|
|
180
|
+
readonly showMessageError: UnwrapRef<typeof import('../utils/tdesignPlugins')['showMessageError']>
|
|
181
|
+
readonly showMessageSuccess: UnwrapRef<typeof import('../utils/tdesignPlugins')['showMessageSuccess']>
|
|
182
|
+
readonly showMessageWarning: UnwrapRef<typeof import('../utils/tdesignPlugins')['showMessageWarning']>
|
|
171
183
|
readonly storeToRefs: UnwrapRef<typeof import('pinia')['storeToRefs']>
|
|
172
184
|
readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']>
|
|
173
185
|
readonly toRef: UnwrapRef<typeof import('vue')['toRef']>
|
|
@@ -11,7 +11,7 @@ export {}
|
|
|
11
11
|
/* prettier-ignore */
|
|
12
12
|
declare module 'vue' {
|
|
13
13
|
export interface GlobalComponents {
|
|
14
|
-
DetailPanel: typeof import('./../components/
|
|
14
|
+
DetailPanel: typeof import('./../components/detailPanel.vue')['default']
|
|
15
15
|
'ILucide:box': typeof import('~icons/lucide/box')['default']
|
|
16
16
|
'ILucide:camera': typeof import('~icons/lucide/camera')['default']
|
|
17
17
|
'ILucide:fileText': typeof import('~icons/lucide/file-text')['default']
|
|
@@ -20,14 +20,18 @@ declare module 'vue' {
|
|
|
20
20
|
'ILucide:logOut': typeof import('~icons/lucide/log-out')['default']
|
|
21
21
|
'ILucide:settings': typeof import('~icons/lucide/settings')['default']
|
|
22
22
|
'ILucide:user': typeof import('~icons/lucide/user')['default']
|
|
23
|
-
|
|
23
|
+
PageDialog: typeof import('./../components/pageDialog.vue')['default']
|
|
24
|
+
PagedTableDetail: typeof import('./../components/pagedTableDetail.vue')['default']
|
|
24
25
|
RouterLink: typeof import('vue-router')['RouterLink']
|
|
25
26
|
RouterView: typeof import('vue-router')['RouterView']
|
|
26
27
|
TButton: typeof import('tdesign-vue-next')['Button']
|
|
28
|
+
TConfigProvider: typeof import('tdesign-vue-next')['ConfigProvider']
|
|
27
29
|
TMenu: typeof import('tdesign-vue-next')['Menu']
|
|
28
30
|
TMenuItem: typeof import('tdesign-vue-next')['MenuItem']
|
|
29
|
-
|
|
31
|
+
TPagination: typeof import('tdesign-vue-next')['Pagination']
|
|
30
32
|
TSubmenu: typeof import('tdesign-vue-next')['Submenu']
|
|
33
|
+
TTable: typeof import('tdesign-vue-next')['Table']
|
|
34
|
+
TTag: typeof import('tdesign-vue-next')['Tag']
|
|
31
35
|
TUpload: typeof import('tdesign-vue-next')['Upload']
|
|
32
36
|
}
|
|
33
37
|
}
|
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
/* prettier-ignore */
|
|
3
|
+
// oxfmt-ignore
|
|
3
4
|
// @ts-nocheck
|
|
4
5
|
// noinspection ES6UnusedImports
|
|
5
|
-
// Generated by
|
|
6
|
+
// Generated by vue-router. !! DO NOT MODIFY THIS FILE !!
|
|
6
7
|
// It's recommended to commit this file.
|
|
7
8
|
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
import type {
|
|
11
|
+
RouteRecordInfo,
|
|
12
|
+
ParamValue,
|
|
13
|
+
ParamValueOneOrMore,
|
|
14
|
+
ParamValueZeroOrMore,
|
|
15
|
+
ParamValueZeroOrOne,
|
|
16
|
+
} from 'vue-router'
|
|
17
|
+
|
|
18
|
+
declare module 'vue-router' {
|
|
19
|
+
interface TypesConfig {
|
|
20
|
+
ParamParsers: never
|
|
21
|
+
}
|
|
11
22
|
}
|
|
12
23
|
|
|
13
24
|
declare module 'vue-router/auto-routes' {
|
|
14
|
-
import type {
|
|
15
|
-
RouteRecordInfo,
|
|
16
|
-
ParamValue,
|
|
17
|
-
ParamValueOneOrMore,
|
|
18
|
-
ParamValueZeroOrMore,
|
|
19
|
-
ParamValueZeroOrOne,
|
|
20
|
-
} from 'vue-router'
|
|
21
|
-
|
|
22
25
|
/**
|
|
23
|
-
* Route name map generated by
|
|
26
|
+
* Route name map generated by vue-router
|
|
24
27
|
*/
|
|
25
28
|
export interface RouteNamedMap {
|
|
26
29
|
'/addon/admin//': RouteRecordInfo<
|
|
@@ -152,7 +155,7 @@ declare module 'vue-router/auto-routes' {
|
|
|
152
155
|
}
|
|
153
156
|
|
|
154
157
|
/**
|
|
155
|
-
* Route file to route info map by
|
|
158
|
+
* Route file to route info map by vue-router.
|
|
156
159
|
* Used by the \`sfc-typed-router\` Volar plugin to automatically type \`useRoute()\`.
|
|
157
160
|
*
|
|
158
161
|
* Each key is a file path relative to the project root with 2 properties:
|
|
@@ -283,3 +286,5 @@ declare module 'vue-router/auto-routes' {
|
|
|
283
286
|
? Info['routes']
|
|
284
287
|
: keyof RouteNamedMap
|
|
285
288
|
}
|
|
289
|
+
|
|
290
|
+
export {}
|