vome-core 0.1.76 → 0.1.78
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/admin/api/client.js +2 -3
- package/dist/admin/components/layout/vm-app-header.vue +341 -0
- package/dist/admin/components/layout/vm-app-sidebar.vue +187 -0
- package/dist/admin/components/layout/vm-sidebar-flyout.vue +268 -0
- package/dist/admin/components/layout/vm-sidebar-nav-item.vue +490 -0
- package/dist/admin/components/layout/vm-sidebar-nav.vue +104 -0
- package/dist/admin/components/layout/vm-tags-view.vue +233 -0
- package/dist/admin/components/ui/avatar/Avatar.vue +18 -0
- package/dist/admin/components/ui/avatar/AvatarFallback.vue +21 -0
- package/dist/admin/components/ui/avatar/AvatarImage.vue +16 -0
- package/dist/admin/components/ui/avatar/index.d.ts +3 -0
- package/dist/admin/components/ui/avatar/index.js +1 -0
- package/dist/admin/components/ui/badge/Badge.vue +26 -0
- package/dist/admin/components/ui/badge/index.d.ts +6 -0
- package/dist/admin/components/ui/badge/index.js +1 -0
- package/dist/admin/components/ui/button/Button.vue +31 -0
- package/dist/admin/components/ui/button/index.d.ts +7 -0
- package/dist/admin/components/ui/button/index.js +1 -0
- package/dist/admin/components/ui/checkbox/Checkbox.vue +35 -0
- package/dist/admin/components/ui/checkbox/index.d.ts +1 -0
- package/dist/admin/components/ui/checkbox/index.js +1 -0
- package/dist/admin/components/ui/dialog/Dialog.vue +19 -0
- package/dist/admin/components/ui/dialog/DialogClose.vue +15 -0
- package/dist/admin/components/ui/dialog/DialogContent.vue +135 -0
- package/dist/admin/components/ui/dialog/DialogDescription.vue +23 -0
- package/dist/admin/components/ui/dialog/DialogFooter.vue +27 -0
- package/dist/admin/components/ui/dialog/DialogHeader.vue +17 -0
- package/dist/admin/components/ui/dialog/DialogOverlay.vue +21 -0
- package/dist/admin/components/ui/dialog/DialogScrollContent.vue +60 -0
- package/dist/admin/components/ui/dialog/DialogTitle.vue +23 -0
- package/dist/admin/components/ui/dialog/DialogTrigger.vue +15 -0
- package/dist/admin/components/ui/dialog/index.d.ts +10 -0
- package/dist/admin/components/ui/dialog/index.js +1 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenu.vue +19 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +39 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuContent.vue +39 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuGroup.vue +15 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuItem.vue +31 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuLabel.vue +23 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +21 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +40 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuSeparator.vue +23 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuShortcut.vue +17 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuSub.vue +18 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuSubContent.vue +27 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +31 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuTrigger.vue +17 -0
- package/dist/admin/components/ui/dropdown-menu/index.d.ts +15 -0
- package/dist/admin/components/ui/dropdown-menu/index.js +1 -0
- package/dist/admin/components/ui/input/Input.vue +34 -0
- package/dist/admin/components/ui/input/index.d.ts +1 -0
- package/dist/admin/components/ui/input/index.js +1 -0
- package/dist/admin/components/ui/label/Label.vue +26 -0
- package/dist/admin/components/ui/label/index.d.ts +1 -0
- package/dist/admin/components/ui/label/index.js +1 -0
- package/dist/admin/components/ui/scroll-area/ScrollArea.vue +33 -0
- package/dist/admin/components/ui/scroll-area/ScrollBar.vue +32 -0
- package/dist/admin/components/ui/scroll-area/index.d.ts +2 -0
- package/dist/admin/components/ui/scroll-area/index.js +1 -0
- package/dist/admin/components/ui/select/Select.vue +19 -0
- package/dist/admin/components/ui/select/SelectContent.vue +51 -0
- package/dist/admin/components/ui/select/SelectGroup.vue +15 -0
- package/dist/admin/components/ui/select/SelectItem.vue +44 -0
- package/dist/admin/components/ui/select/SelectItemText.vue +15 -0
- package/dist/admin/components/ui/select/SelectLabel.vue +17 -0
- package/dist/admin/components/ui/select/SelectScrollDownButton.vue +26 -0
- package/dist/admin/components/ui/select/SelectScrollUpButton.vue +26 -0
- package/dist/admin/components/ui/select/SelectSeparator.vue +19 -0
- package/dist/admin/components/ui/select/SelectTrigger.vue +33 -0
- package/dist/admin/components/ui/select/SelectValue.vue +15 -0
- package/dist/admin/components/ui/select/index.d.ts +11 -0
- package/dist/admin/components/ui/select/index.js +1 -0
- package/dist/admin/components/ui/separator/Separator.vue +29 -0
- package/dist/admin/components/ui/separator/index.d.ts +1 -0
- package/dist/admin/components/ui/separator/index.js +1 -0
- package/dist/admin/components/ui/sheet/Sheet.vue +19 -0
- package/dist/admin/components/ui/sheet/SheetClose.vue +15 -0
- package/dist/admin/components/ui/sheet/SheetContent.vue +63 -0
- package/dist/admin/components/ui/sheet/SheetDescription.vue +21 -0
- package/dist/admin/components/ui/sheet/SheetFooter.vue +16 -0
- package/dist/admin/components/ui/sheet/SheetHeader.vue +15 -0
- package/dist/admin/components/ui/sheet/SheetOverlay.vue +21 -0
- package/dist/admin/components/ui/sheet/SheetTitle.vue +21 -0
- package/dist/admin/components/ui/sheet/SheetTrigger.vue +15 -0
- package/dist/admin/components/ui/sheet/index.d.ts +8 -0
- package/dist/admin/components/ui/sheet/index.js +1 -0
- package/dist/admin/components/ui/sonner/Toaster.vue +117 -0
- package/dist/admin/components/ui/sonner/index.d.ts +1 -0
- package/dist/admin/components/ui/sonner/index.js +1 -0
- package/dist/admin/components/ui/table/Table.vue +16 -0
- package/dist/admin/components/ui/table/TableBody.vue +17 -0
- package/dist/admin/components/ui/table/TableCaption.vue +17 -0
- package/dist/admin/components/ui/table/TableCell.vue +22 -0
- package/dist/admin/components/ui/table/TableEmpty.vue +34 -0
- package/dist/admin/components/ui/table/TableFooter.vue +17 -0
- package/dist/admin/components/ui/table/TableHead.vue +17 -0
- package/dist/admin/components/ui/table/TableHeader.vue +17 -0
- package/dist/admin/components/ui/table/TableRow.vue +17 -0
- package/dist/admin/components/ui/table/index.d.ts +9 -0
- package/dist/admin/components/ui/table/index.js +1 -0
- package/dist/admin/components/ui/table/utils.d.ts +3 -0
- package/dist/admin/components/ui/table/utils.js +1 -0
- package/dist/admin/components/ui/tabs/Tabs.vue +24 -0
- package/dist/admin/components/ui/tabs/TabsContent.vue +21 -0
- package/dist/admin/components/ui/tabs/TabsList.vue +24 -0
- package/dist/admin/components/ui/tabs/TabsTrigger.vue +26 -0
- package/dist/admin/components/ui/tabs/index.d.ts +4 -0
- package/dist/admin/components/ui/tabs/index.js +1 -0
- package/dist/admin/components/ui/tooltip/Tooltip.vue +19 -0
- package/dist/admin/components/ui/tooltip/TooltipContent.vue +34 -0
- package/dist/admin/components/ui/tooltip/TooltipProvider.vue +14 -0
- package/dist/admin/components/ui/tooltip/TooltipTrigger.vue +15 -0
- package/dist/admin/components/ui/tooltip/index.d.ts +4 -0
- package/dist/admin/components/ui/tooltip/index.js +1 -0
- package/dist/admin/crud/components/vm-color-picker.vue +0 -3
- package/dist/admin/crud/components/vm-richtext-extensions.js +1 -1
- package/dist/admin/crud/config.js +1 -1
- package/dist/admin/crud/confirm.d.ts +8 -0
- package/dist/admin/crud/confirm.js +1 -1
- package/dist/admin/crud/crud-page-request.js +1 -1
- package/dist/admin/crud/dict.js +1 -1
- package/dist/admin/crud/export-fetch.js +1 -1
- package/dist/admin/crud/key.js +1 -1
- package/dist/admin/crud/plugins.js +1 -1
- package/dist/admin/crud/span.js +1 -1
- package/dist/admin/crud/style.d.ts +4 -0
- package/dist/admin/crud/style.js +1 -1
- package/dist/admin/crud/validate.js +1 -1
- package/dist/admin/crud/vm-data-i18n-btn.vue +0 -7
- package/dist/admin/directives/perm.js +1 -1
- package/dist/admin/env.d.ts +0 -4
- package/dist/admin/hooks/useUpload.js +1 -1
- package/dist/admin/index.d.ts +11 -4
- package/dist/admin/index.js +16 -7
- package/dist/admin/lib/browser.js +1 -1
- package/dist/admin/lib/cn.js +1 -1
- package/dist/admin/lib/dialog-float.js +1 -1
- package/dist/admin/lib/document-title.d.ts +6 -0
- package/dist/admin/lib/document-title.js +1 -0
- package/dist/admin/lib/export-excel.js +1 -1
- package/dist/admin/lib/import-excel.js +1 -1
- package/dist/admin/lib/json.js +1 -1
- package/dist/admin/lib/menu.js +1 -1
- package/dist/admin/lib/micro-locale.d.ts +5 -0
- package/dist/admin/lib/micro-locale.js +1 -0
- package/dist/admin/lib/micro-theme.d.ts +14 -0
- package/dist/admin/lib/micro-theme.js +1 -0
- package/dist/admin/lib/setup-crud-defaults.d.ts +2 -0
- package/dist/admin/lib/setup-crud-defaults.js +1 -0
- package/dist/admin/lib/shell.d.ts +13 -0
- package/dist/admin/lib/shell.js +1 -0
- package/dist/admin/lib/theme-color-options.js +1 -1
- package/dist/admin/lib/tree.js +1 -1
- package/dist/admin/lib/upload.js +1 -1
- package/dist/admin/lib/video-frame.js +1 -1
- package/dist/admin/router/create.d.ts +16 -0
- package/dist/admin/router/create.js +1 -0
- package/dist/admin/router/guards.d.ts +6 -0
- package/dist/admin/router/guards.js +1 -0
- package/dist/admin/router/index.d.ts +6 -3
- package/dist/admin/router/index.js +5 -80
- package/dist/admin/router/menu-routes.d.ts +7 -2
- package/dist/admin/router/menu-routes.js +10 -12
- package/dist/admin/service/index.js +0 -3
- package/dist/admin/stores/dict.d.ts +13 -0
- package/dist/admin/stores/dict.js +1 -0
- package/dist/admin/stores/locale.d.ts +3 -0
- package/dist/admin/stores/locale.js +1 -0
- package/dist/admin/stores/theme.d.ts +1 -0
- package/dist/admin/stores/theme.js +1 -0
- package/dist/admin/themes/dark.d.ts +2 -0
- package/dist/admin/themes/dark.js +1 -0
- package/dist/admin/themes/index.d.ts +9 -0
- package/dist/admin/themes/index.js +1 -0
- package/dist/admin/themes/light.d.ts +2 -0
- package/dist/admin/themes/light.js +1 -0
- package/dist/client/configure.d.ts +3 -0
- package/dist/client/configure.js +7 -0
- package/dist/client/vite-admin.js +2 -4
- package/dist/client/vite-auto-import.js +4 -4
- package/dist/client/vite-resolve.d.ts +3 -3
- package/dist/client/vite-resolve.js +10 -15
- package/dist/ext/plugin-market-urls.d.ts +8 -0
- package/dist/index.js +1 -1
- package/dist/server/index.js +1 -1
- package/dist/shared/datetime-picker.js +1 -1
- package/dist/shared/excel.js +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/locale-json.js +1 -1
- package/dist/shared/tree.js +1 -1
- package/package.json +13 -4
- package/typings/admin/theme.ts +10 -0
- package/dist/admin/config/plugin-dev.d.ts +0 -52
- package/dist/admin/config/plugin-dev.js +0 -1
- package/typings/admin/host.d.ts +0 -66
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x59f59a,_0x55fd48){const _0x453552=_0x3a12,_0x118f61=_0x59f59a();while(!![]){try{const _0x38f25d=-parseInt(_0x453552(0x15b))/0x1*(parseInt(_0x453552(0x15e))/0x2)+parseInt(_0x453552(0x17c))/0x3*(parseInt(_0x453552(0x179))/0x4)+-parseInt(_0x453552(0x176))/0x5+-parseInt(_0x453552(0x170))/0x6+-parseInt(_0x453552(0x16b))/0x7+-parseInt(_0x453552(0x166))/0x8*(-parseInt(_0x453552(0x15f))/0x9)+parseInt(_0x453552(0x16f))/0xa*(parseInt(_0x453552(0x167))/0xb);if(_0x38f25d===_0x55fd48)break;else _0x118f61['push'](_0x118f61['shift']());}catch(_0x256116){_0x118f61['push'](_0x118f61['shift']());}}}(_0x2be4,0x27c6c));function _0x3a12(_0x5717c2,_0x2e64eb){_0x5717c2=_0x5717c2-0x159;const _0x2be4cc=_0x2be4();let _0x3a1267=_0x2be4cc[_0x5717c2];if(_0x3a12['ssGGLL']===undefined){var _0x233957=function(_0x56ff34){const _0x53c970='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x56408d='',_0x3c623b='';for(let _0x507988=0x0,_0x34e010,_0x39cf6b,_0x10f246=0x0;_0x39cf6b=_0x56ff34['charAt'](_0x10f246++);~_0x39cf6b&&(_0x34e010=_0x507988%0x4?_0x34e010*0x40+_0x39cf6b:_0x39cf6b,_0x507988++%0x4)?_0x56408d+=String['fromCharCode'](0xff&_0x34e010>>(-0x2*_0x507988&0x6)):0x0){_0x39cf6b=_0x53c970['indexOf'](_0x39cf6b);}for(let _0xe71304=0x0,_0x4d399a=_0x56408d['length'];_0xe71304<_0x4d399a;_0xe71304++){_0x3c623b+='%'+('00'+_0x56408d['charCodeAt'](_0xe71304)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3c623b);};_0x3a12['BTYqRr']=_0x233957,_0x3a12['hvwHhY']={},_0x3a12['ssGGLL']=!![];}const _0x546074=_0x2be4cc[0x0],_0x443973=_0x5717c2+_0x546074,_0x4c71bc=_0x3a12['hvwHhY'][_0x443973];return!_0x4c71bc?(_0x3a1267=_0x3a12['BTYqRr'](_0x3a1267),_0x3a12['hvwHhY'][_0x443973]=_0x3a1267):_0x3a1267=_0x4c71bc,_0x3a1267;}import{onUnmounted,ref,watch}from'vue';function _0x2be4(){const _0x58b352=['Dw5KzwzPBMvK','AgvPz2H0','mteWmu5iBwTSsW','Dg9eyxrHvvjm','DMLKzw9izwLNAhq','mZu2wMvnr0HA','oxLOv1rlEa','Aw1Hz2uVANbLzW','y3jLyxrLrwXLBwvUDa','DgHLBG','y2XLyxjuAw1LB3v0','yxv0BW','D2LKDgG','mtm3mtKYoe5LsgLhCW','ndK4odq1nNrIBNzXDq','CgXHExnjBMXPBMu','yw5VBNLTB3vZ','C2vLA2vK','mteYmdi0nxHTtMvPBW','Bg9HzgvKzgf0yq','C2v0vgLTzw91Da','y3jVC3npCMLNAw4','mtb4sLfRC1e','mte3nZK4AKvgCuHY','DMfSDwu','zxjYB3i','ywrKrxzLBNrmAxn0zw5LCG','CMvTB3zLqxr0CMLIDxrL','DMLKzw9xAwr0Aa','otq5nJK1AunIsufc','z2v0q29UDgv4Da','C3jJ','mJe2ogTkvKvfBW','ChjLBg9Hza','zhjHD0LTywDL','ntCZuvDcAhvI'];_0x2be4=function(){return _0x58b352;};return _0x2be4();}const FRAME_CAPTURE_TIMEOUT_MS=0x1f40;function captureVideoFrame(_0x56408d){const _0x41a6a2=_0x3a12;if(typeof document===_0x41a6a2(0x159))return Promise['resolve'](null);return new Promise(_0x3c623b=>{const _0xafb7ab=_0x41a6a2,_0x507988=document[_0xafb7ab(0x161)]('video');_0x507988[_0xafb7ab(0x16e)]=_0xafb7ab(0x169),_0x507988['muted']=!![],_0x507988[_0xafb7ab(0x168)]=!![],_0x507988[_0xafb7ab(0x17a)]=_0xafb7ab(0x164);let _0x34e010=![];const _0x39cf6b=_0xe71304=>{const _0xcf7a8c=_0xafb7ab;if(_0x34e010)return;_0x34e010=!![],window[_0xcf7a8c(0x163)](_0x10f246),_0x507988[_0xcf7a8c(0x174)]('src'),_0x507988['load'](),_0x3c623b(_0xe71304);},_0x10f246=window[_0xafb7ab(0x16d)](()=>_0x39cf6b(null),FRAME_CAPTURE_TIMEOUT_MS);_0x507988['addEventListener'](_0xafb7ab(0x172),()=>_0x39cf6b(null),{'once':!![]}),_0x507988['addEventListener'](_0xafb7ab(0x16c),()=>{try{_0x507988['currentTime']=0.01;}catch{_0x39cf6b(null);}},{'once':!![]}),_0x507988[_0xafb7ab(0x173)](_0xafb7ab(0x16a),()=>{const _0x3d2480=_0xafb7ab;try{const _0x4d399a=_0x507988[_0x3d2480(0x175)],_0x3466e5=_0x507988[_0x3d2480(0x15d)];if(!_0x4d399a||!_0x3466e5){_0x39cf6b(null);return;}const _0x4c2d1d=document['createElement']('canvas');_0x4c2d1d[_0x3d2480(0x165)]=_0x4d399a,_0x4c2d1d[_0x3d2480(0x15a)]=_0x3466e5;const _0x5a1278=_0x4c2d1d[_0x3d2480(0x177)]('2d');if(!_0x5a1278){_0x39cf6b(null);return;}_0x5a1278[_0x3d2480(0x17b)](_0x507988,0x0,0x0,_0x4d399a,_0x3466e5),_0x39cf6b(_0x4c2d1d[_0x3d2480(0x15c)](_0x3d2480(0x160),0.82));}catch{_0x39cf6b(null);}},{'once':!![]}),_0x507988[_0xafb7ab(0x178)]=_0x56408d;});}export function useVideoFrame(_0x32ca65){const _0x51e40b=ref(''),_0x9cc006=ref(![]);let _0x1da8eb=0x0;return watch(_0x32ca65,_0x5c97f9=>{const _0x39e4bc=_0x3a12;_0x1da8eb+=0x1;const _0x3e203f=_0x1da8eb;_0x51e40b['value']='',_0x9cc006[_0x39e4bc(0x171)]=![];if(!_0x5c97f9)return;captureVideoFrame(_0x5c97f9)[_0x39e4bc(0x162)](_0x506194=>{const _0x378bd9=_0x39e4bc;if(_0x3e203f!==_0x1da8eb)return;if(_0x506194)_0x51e40b['value']=_0x506194;else _0x9cc006[_0x378bd9(0x171)]=!![];});},{'immediate':!![]}),onUnmounted(()=>{_0x1da8eb+=0x1;}),{'videoFrameSrc':_0x51e40b,'frameFailed':_0x9cc006};}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
import { type Router } from 'vue-router';
|
|
3
|
+
import type { MenuRouteShell } from './menu-routes';
|
|
4
|
+
export type AdminRouterPages = {
|
|
5
|
+
home: Component;
|
|
6
|
+
layout: Component;
|
|
7
|
+
login: Component;
|
|
8
|
+
missing: Component;
|
|
9
|
+
micro: Component;
|
|
10
|
+
};
|
|
11
|
+
export type AdminRouterResult = {
|
|
12
|
+
router: Router;
|
|
13
|
+
menuRouteShell: MenuRouteShell;
|
|
14
|
+
};
|
|
15
|
+
/** 宿主传入 pages(留在 admin/src/pages),core 装配守卫与动态菜单 shell */
|
|
16
|
+
export declare function createAdminRouter(pages: AdminRouterPages): AdminRouterResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x27b9(){const _0x4ced47=['mZiWnJqYyvfkCM5b','mJu2odKZoxDPzuLTCa','Bg9NAw4','nJyXmtaYDfrwAwDO','Ag9Tzq','otyZnZG1C0LjuejJ','l2XVz2LU','6Ag16z2I5lIn5A2y5zYO','BwLJCM8','mZaWntuZmMDQCuLpwa','mZyXntiYohHjB1fzvG','nJuYmJq1m2nZzhbwsa','BwLZC2LUzW','BM90lwzVDw5K'];_0x27b9=function(){return _0x4ced47;};return _0x27b9();}function _0xf170(_0x453ef9,_0x3aa3d0){_0x453ef9=_0x453ef9-0x15c;const _0x27b90b=_0x27b9();let _0xf17056=_0x27b90b[_0x453ef9];if(_0xf170['wpWeAE']===undefined){var _0x21470a=function(_0x4e008f){const _0x217efc='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x25e412='',_0x1caf76='';for(let _0x46aa50=0x0,_0x28d5af,_0x1ff01d,_0x1f7381=0x0;_0x1ff01d=_0x4e008f['charAt'](_0x1f7381++);~_0x1ff01d&&(_0x28d5af=_0x46aa50%0x4?_0x28d5af*0x40+_0x1ff01d:_0x1ff01d,_0x46aa50++%0x4)?_0x25e412+=String['fromCharCode'](0xff&_0x28d5af>>(-0x2*_0x46aa50&0x6)):0x0){_0x1ff01d=_0x217efc['indexOf'](_0x1ff01d);}for(let _0x59c08c=0x0,_0x5c15cc=_0x25e412['length'];_0x59c08c<_0x5c15cc;_0x59c08c++){_0x1caf76+='%'+('00'+_0x25e412['charCodeAt'](_0x59c08c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1caf76);};_0xf170['VHdaWS']=_0x21470a,_0xf170['MWAJlp']={},_0xf170['wpWeAE']=!![];}const _0x404375=_0x27b90b[0x0],_0x46ae53=_0x453ef9+_0x404375,_0x14eb74=_0xf170['MWAJlp'][_0x46ae53];return!_0x14eb74?(_0xf17056=_0xf170['VHdaWS'](_0xf17056),_0xf170['MWAJlp'][_0x46ae53]=_0xf17056):_0xf17056=_0x14eb74,_0xf17056;}(function(_0x3ce299,_0x5e5b18){const _0x1d9276=_0xf170,_0x9896f5=_0x3ce299();while(!![]){try{const _0x5672ce=-parseInt(_0x1d9276(0x164))/0x1+-parseInt(_0x1d9276(0x167))/0x2+parseInt(_0x1d9276(0x165))/0x3+parseInt(_0x1d9276(0x160))/0x4+-parseInt(_0x1d9276(0x169))/0x5+parseInt(_0x1d9276(0x15f))/0x6+-parseInt(_0x1d9276(0x161))/0x7;if(_0x5672ce===_0x5e5b18)break;else _0x9896f5['push'](_0x9896f5['shift']());}catch(_0x160578){_0x9896f5['push'](_0x9896f5['shift']());}}}(_0x27b9,0x767c1));import{createRouter,createWebHistory}from'vue-router';import{setupAdminRouterGuards}from'./guards';export function createAdminRouter(_0x25e412){const _0x33486e=_0xf170,_0x1caf76={'missing':_0x25e412[_0x33486e(0x162)],'micro':_0x25e412[_0x33486e(0x15e)]},_0x46aa50=createRouter({'history':createWebHistory(),'routes':[{'path':_0x33486e(0x15c),'name':_0x33486e(0x166),'component':_0x25e412['login'],'meta':{'public':!![]}},{'path':'/','name':'layout','component':_0x25e412['layout'],'children':[{'path':'','name':_0x33486e(0x168),'component':_0x25e412[_0x33486e(0x168)],'meta':{'title':'首页'}}]},{'path':'/:pathMatch(.*)*','name':_0x33486e(0x163),'component':_0x25e412[_0x33486e(0x162)],'meta':{'title':_0x33486e(0x15d)}}]});return setupAdminRouterGuards(_0x46aa50,_0x1caf76),{'router':_0x46aa50,'menuRouteShell':_0x1caf76};}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Router } from 'vue-router';
|
|
2
|
+
import { type MenuRouteShell } from './menu-routes';
|
|
3
|
+
/** 鉴权、EPS、动态菜单挂载(由宿主 createRouter 后调用) */
|
|
4
|
+
export declare function setupAdminRouterGuards(router: Router, shell: MenuRouteShell): void;
|
|
5
|
+
/** 退出/重登:卸动态路由并允许再次 ensureMenuRoutes */
|
|
6
|
+
export declare function resetMenuRoutesFlag(router: Router): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x1bc60a,_0x225da5){const _0x972bf8=_0x3049,_0x35276f=_0x1bc60a();while(!![]){try{const _0x4fa8ce=parseInt(_0x972bf8(0x1a4))/0x1+-parseInt(_0x972bf8(0x196))/0x2*(parseInt(_0x972bf8(0x19e))/0x3)+-parseInt(_0x972bf8(0x1a0))/0x4*(parseInt(_0x972bf8(0x1a6))/0x5)+-parseInt(_0x972bf8(0x197))/0x6+-parseInt(_0x972bf8(0x195))/0x7+-parseInt(_0x972bf8(0x1a5))/0x8+parseInt(_0x972bf8(0x194))/0x9;if(_0x4fa8ce===_0x225da5)break;else _0x35276f['push'](_0x35276f['shift']());}catch(_0x37cadc){_0x35276f['push'](_0x35276f['shift']());}}}(_0x3a36,0xbc2e9));function _0x3049(_0x49fe1c,_0x2398fc){_0x49fe1c=_0x49fe1c-0x194;const _0x3a36fc=_0x3a36();let _0x304919=_0x3a36fc[_0x49fe1c];if(_0x3049['TJIcxV']===undefined){var _0x2c58dd=function(_0xa921b9){const _0x2498d5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2ee03d='',_0x516eb5='';for(let _0x68d611=0x0,_0x59d7c5,_0x9bc50b,_0x471507=0x0;_0x9bc50b=_0xa921b9['charAt'](_0x471507++);~_0x9bc50b&&(_0x59d7c5=_0x68d611%0x4?_0x59d7c5*0x40+_0x9bc50b:_0x9bc50b,_0x68d611++%0x4)?_0x2ee03d+=String['fromCharCode'](0xff&_0x59d7c5>>(-0x2*_0x68d611&0x6)):0x0){_0x9bc50b=_0x2498d5['indexOf'](_0x9bc50b);}for(let _0x3f93e6=0x0,_0x625d97=_0x2ee03d['length'];_0x3f93e6<_0x625d97;_0x3f93e6++){_0x516eb5+='%'+('00'+_0x2ee03d['charCodeAt'](_0x3f93e6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x516eb5);};_0x3049['jvodIr']=_0x2c58dd,_0x3049['FYIhep']={},_0x3049['TJIcxV']=!![];}const _0x1d906a=_0x3a36fc[0x0],_0x255762=_0x49fe1c+_0x1d906a,_0x44c83e=_0x3049['FYIhep'][_0x255762];return!_0x44c83e?(_0x304919=_0x3049['jvodIr'](_0x304919),_0x3049['FYIhep'][_0x255762]=_0x304919):_0x304919=_0x44c83e,_0x304919;}import{getAccessToken,getRefreshToken}from'../api/client';import{createEps,setServicePerms}from'../service';function _0x3a36(){const _0x5e37bf=['Bg9Hza','Bwv0yq','ndi0mZKXndbdtvv4we4','ndaWnJy0nNrotKvuEa','mZr1rNvku1m','ndK4nJqYuvrjuxPb','z2v0','Bg9NAw4','ChvIBgLJ','zNvSBfbHDgG','AxntDxbLCG','AgfZAa','mJm3mdiXrw1gtMHe','C2v0','ndqXoda0nhfQvuHLDW','yMvMB3jLrwfJAa','CxvLCNK','CgvYBxm','nteZnZqYD01zzwHi','mta4ndiZntjcB1nTu2m','nwjJEwDmAG'];_0x3a36=function(){return _0x5e37bf;};return _0x3a36();}import{useUserStore}from'../stores/user';import{clearMenuRoutesFlag,ensureMenuRoutes,removeAllMenuRoutes}from'./menu-routes';const menuReadyMap=new WeakMap();export function setupAdminRouterGuards(_0x2ee03d,_0x516eb5){const _0xb8d7ae=_0x3049;_0x2ee03d[_0xb8d7ae(0x1a1)](async _0x68d611=>{const _0x4670d3=_0xb8d7ae;if(_0x68d611[_0x4670d3(0x1a8)][_0x4670d3(0x19a)])return!![];if(!getAccessToken()&&!getRefreshToken())return{'name':'login','query':{'redirect':_0x68d611[_0x4670d3(0x19b)]}};try{const _0x59d7c5=useUserStore();if(!_0x59d7c5['loaded'])await _0x59d7c5[_0x4670d3(0x1a7)]();await createEps(),setServicePerms(_0x59d7c5[_0x4670d3(0x1a3)],_0x59d7c5[_0x4670d3(0x19c)]);if(!menuReadyMap[_0x4670d3(0x198)](_0x2ee03d))return await ensureMenuRoutes(_0x2ee03d,_0x59d7c5['menus'],_0x516eb5),menuReadyMap[_0x4670d3(0x19f)](_0x2ee03d,!![]),{'path':_0x68d611['path'],'query':_0x68d611[_0x4670d3(0x1a2)],'hash':_0x68d611[_0x4670d3(0x19d)],'replace':!![]};}catch{menuReadyMap['set'](_0x2ee03d,![]);if(!getAccessToken()&&!getRefreshToken())return{'name':_0x4670d3(0x199),'query':{'redirect':_0x68d611[_0x4670d3(0x19b)]}};if(!getAccessToken()&&getRefreshToken())return!![];return!![];}return!![];});}export function resetMenuRoutesFlag(_0x9bc50b){menuReadyMap['set'](_0x9bc50b,![]),removeAllMenuRoutes(_0x9bc50b),clearMenuRoutesFlag();}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
export { setupAdminRouterGuards, resetMenuRoutesFlag } from './guards';
|
|
2
|
+
export { createAdminRouter } from './create';
|
|
3
|
+
export type { AdminRouterPages, AdminRouterResult } from './create';
|
|
4
|
+
export { ensureMenuRoutes, syncMenuRoutes, clearMenuRoutesFlag, removeAllMenuRoutes, } from './menu-routes';
|
|
5
|
+
export type { MenuRouteShell } from './menu-routes';
|
|
6
|
+
export type { AdminRouterPages, AdminRouterResult } from './create';
|
|
@@ -1,83 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { useUserStore } from "../stores/user";
|
|
5
|
-
import {
|
|
6
|
-
clearMenuRoutesFlag,
|
|
1
|
+
export { setupAdminRouterGuards, resetMenuRoutesFlag } from "./guards";
|
|
2
|
+
export { createAdminRouter } from "./create";
|
|
3
|
+
export {
|
|
7
4
|
ensureMenuRoutes,
|
|
5
|
+
syncMenuRoutes,
|
|
6
|
+
clearMenuRoutesFlag,
|
|
8
7
|
removeAllMenuRoutes
|
|
9
8
|
} from "./menu-routes";
|
|
10
|
-
import Home from "#vome-host/pages/home/index.vue";
|
|
11
|
-
import Layout from "#vome-host/pages/layout/index.vue";
|
|
12
|
-
import Login from "#vome-host/pages/login/index.vue";
|
|
13
|
-
import MissingView from "#vome-host/pages/missing/index.vue";
|
|
14
|
-
export const router = createRouter({
|
|
15
|
-
history: createWebHistory(),
|
|
16
|
-
routes: [
|
|
17
|
-
{
|
|
18
|
-
path: "/login",
|
|
19
|
-
name: "login",
|
|
20
|
-
component: Login,
|
|
21
|
-
meta: { public: true }
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
path: "/",
|
|
25
|
-
name: "layout",
|
|
26
|
-
component: Layout,
|
|
27
|
-
children: [
|
|
28
|
-
{
|
|
29
|
-
path: "",
|
|
30
|
-
name: "home",
|
|
31
|
-
component: Home,
|
|
32
|
-
meta: { title: "首页" }
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
path: "/:pathMatch(.*)*",
|
|
38
|
-
name: "not-found",
|
|
39
|
-
component: MissingView,
|
|
40
|
-
meta: { title: "页面不存在" }
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
});
|
|
44
|
-
let menusReady = false;
|
|
45
|
-
router.beforeEach(async (to) => {
|
|
46
|
-
if (to.meta.public)
|
|
47
|
-
return true;
|
|
48
|
-
if (!getAccessToken() && !getRefreshToken()) {
|
|
49
|
-
return { name: "login", query: { redirect: to.fullPath } };
|
|
50
|
-
}
|
|
51
|
-
try {
|
|
52
|
-
const user = useUserStore();
|
|
53
|
-
if (!user.loaded)
|
|
54
|
-
await user.load();
|
|
55
|
-
await createEps();
|
|
56
|
-
setServicePerms(user.perms, user.isSuper);
|
|
57
|
-
if (!menusReady) {
|
|
58
|
-
await ensureMenuRoutes(router, user.menus);
|
|
59
|
-
menusReady = true;
|
|
60
|
-
return {
|
|
61
|
-
path: to.path,
|
|
62
|
-
query: to.query,
|
|
63
|
-
hash: to.hash,
|
|
64
|
-
replace: true
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
} catch {
|
|
68
|
-
menusReady = false;
|
|
69
|
-
if (!getAccessToken() && !getRefreshToken()) {
|
|
70
|
-
return { name: "login", query: { redirect: to.fullPath } };
|
|
71
|
-
}
|
|
72
|
-
if (!getAccessToken() && getRefreshToken()) {
|
|
73
|
-
return true;
|
|
74
|
-
}
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
return true;
|
|
78
|
-
});
|
|
79
|
-
export function resetMenuRoutesFlag() {
|
|
80
|
-
menusReady = false;
|
|
81
|
-
removeAllMenuRoutes(router);
|
|
82
|
-
clearMenuRoutesFlag();
|
|
83
|
-
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
1
2
|
import type { Router } from 'vue-router';
|
|
2
3
|
import type { MenuTreeNode } from '../../../typings/admin/base/permission';
|
|
4
|
+
export type MenuRouteShell = {
|
|
5
|
+
missing: Component;
|
|
6
|
+
micro: Component;
|
|
7
|
+
};
|
|
3
8
|
/** 根据权限菜单动态挂载:viewPath 本地模块 / appKey 微应用(仅补新增) */
|
|
4
|
-
export declare function ensureMenuRoutes(router: Router, menus: MenuTreeNode[]): Promise<void>;
|
|
9
|
+
export declare function ensureMenuRoutes(router: Router, menus: MenuTreeNode[], shell: MenuRouteShell): Promise<void>;
|
|
5
10
|
/** 全量同步:删旧补新,菜单改名/改路由/显隐后侧栏与路由一致 */
|
|
6
|
-
export declare function syncMenuRoutes(router: Router, menus: MenuTreeNode[]): Promise<void>;
|
|
11
|
+
export declare function syncMenuRoutes(router: Router, menus: MenuTreeNode[], shell: MenuRouteShell): Promise<void>;
|
|
7
12
|
export declare function clearMenuRoutesFlag(): void;
|
|
8
13
|
export declare function removeAllMenuRoutes(router: Router): void;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { defineComponent, h } from "vue";
|
|
2
2
|
import { resolveView, viewPathToName } from "../lib/module";
|
|
3
|
-
import MissingView from "#vome-host/pages/missing/index.vue";
|
|
4
|
-
import MicroAppView from "#vome-host/pages/micro/index.vue";
|
|
5
3
|
const addedNames = new Set;
|
|
6
4
|
function isMicroMenu(m) {
|
|
7
5
|
return Boolean(m.appKey && m.router);
|
|
@@ -14,18 +12,18 @@ function walk(nodes, out) {
|
|
|
14
12
|
walk(n.children, out);
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
|
-
function missingView(viewPath) {
|
|
15
|
+
function missingView(shell, viewPath) {
|
|
18
16
|
return defineComponent({
|
|
19
17
|
name: "MissingViewPage",
|
|
20
18
|
setup() {
|
|
21
|
-
return () => h(
|
|
19
|
+
return () => h(shell.missing, { path: viewPath });
|
|
22
20
|
}
|
|
23
21
|
});
|
|
24
22
|
}
|
|
25
23
|
function routeNameOf(id) {
|
|
26
24
|
return `menu-${id}`;
|
|
27
25
|
}
|
|
28
|
-
function buildRoute(item) {
|
|
26
|
+
function buildRoute(item, shell) {
|
|
29
27
|
const full = item.router;
|
|
30
28
|
const childPath = full.replace(/^\//, "");
|
|
31
29
|
let component;
|
|
@@ -38,15 +36,15 @@ function buildRoute(item) {
|
|
|
38
36
|
componentName
|
|
39
37
|
};
|
|
40
38
|
if (isMicroMenu(item)) {
|
|
41
|
-
component =
|
|
39
|
+
component = shell.micro;
|
|
42
40
|
meta.appKey = item.appKey;
|
|
43
41
|
meta.componentName = `micro-${item.appKey}`;
|
|
44
42
|
meta.keepAlive = false;
|
|
45
43
|
} else if (item.viewPath) {
|
|
46
44
|
const loader = resolveView(item.viewPath);
|
|
47
|
-
component = loader || missingView(item.viewPath);
|
|
45
|
+
component = loader || missingView(shell, item.viewPath);
|
|
48
46
|
} else {
|
|
49
|
-
component = missingView(full);
|
|
47
|
+
component = missingView(shell, full);
|
|
50
48
|
}
|
|
51
49
|
return {
|
|
52
50
|
path: childPath,
|
|
@@ -55,7 +53,7 @@ function buildRoute(item) {
|
|
|
55
53
|
meta
|
|
56
54
|
};
|
|
57
55
|
}
|
|
58
|
-
export async function ensureMenuRoutes(router, menus) {
|
|
56
|
+
export async function ensureMenuRoutes(router, menus, shell) {
|
|
59
57
|
const items = [];
|
|
60
58
|
walk(menus, items);
|
|
61
59
|
for (const item of items) {
|
|
@@ -63,10 +61,10 @@ export async function ensureMenuRoutes(router, menus) {
|
|
|
63
61
|
if (addedNames.has(name))
|
|
64
62
|
continue;
|
|
65
63
|
addedNames.add(name);
|
|
66
|
-
router.addRoute("layout", buildRoute(item));
|
|
64
|
+
router.addRoute("layout", buildRoute(item, shell));
|
|
67
65
|
}
|
|
68
66
|
}
|
|
69
|
-
export async function syncMenuRoutes(router, menus) {
|
|
67
|
+
export async function syncMenuRoutes(router, menus, shell) {
|
|
70
68
|
const items = [];
|
|
71
69
|
walk(menus, items);
|
|
72
70
|
const nextNames = new Set(items.map((i) => routeNameOf(i.id)));
|
|
@@ -97,7 +95,7 @@ export async function syncMenuRoutes(router, menus) {
|
|
|
97
95
|
}
|
|
98
96
|
if (!addedNames.has(name)) {
|
|
99
97
|
addedNames.add(name);
|
|
100
|
-
router.addRoute("layout", buildRoute(item));
|
|
98
|
+
router.addRoute("layout", buildRoute(item, shell));
|
|
101
99
|
}
|
|
102
100
|
}
|
|
103
101
|
}
|
|
@@ -2,15 +2,12 @@ import { request } from "../api/client";
|
|
|
2
2
|
import {
|
|
3
3
|
BaseService,
|
|
4
4
|
bindEpsHotReload,
|
|
5
|
-
configureClient,
|
|
6
5
|
createEps as createEpsClient,
|
|
7
|
-
fetchPackagedEpsJson,
|
|
8
6
|
getService,
|
|
9
7
|
resolveService,
|
|
10
8
|
serviceOf,
|
|
11
9
|
setServicePerms as setServicePermsClient
|
|
12
10
|
} from "../../client";
|
|
13
|
-
configureClient({ request, loadStaticEps: fetchPackagedEpsJson });
|
|
14
11
|
bindEpsHotReload("admin");
|
|
15
12
|
export const service = getService("admin");
|
|
16
13
|
export async function createEps(opts = {}) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type EpsDictNode } from 'vome-core/client';
|
|
2
|
+
export type DictNode = EpsDictNode;
|
|
3
|
+
/**
|
|
4
|
+
* 字典 store:读 EPS 灌入的本地缓存(createEps / loadEps)
|
|
5
|
+
* - get:字典树(下拉 / switch)
|
|
6
|
+
* - options:平铺 + color → 彩色 tag / 菜单类型等
|
|
7
|
+
* - 业务页勿 refresh;字典管理页改完后 refresh(key, true)
|
|
8
|
+
*/
|
|
9
|
+
export declare const useDictStore: any;
|
|
10
|
+
/** const { dict } = useDict() */
|
|
11
|
+
export declare function useDict(): {
|
|
12
|
+
dict: any;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x32e530=_0x4035;(function(_0x508a7d,_0x16b1ad){const _0x1559ec=_0x4035,_0xa3b11a=_0x508a7d();while(!![]){try{const _0x287113=-parseInt(_0x1559ec(0xa8))/0x1+-parseInt(_0x1559ec(0xa6))/0x2*(-parseInt(_0x1559ec(0xb8))/0x3)+parseInt(_0x1559ec(0xb3))/0x4*(parseInt(_0x1559ec(0xb9))/0x5)+-parseInt(_0x1559ec(0xb5))/0x6*(-parseInt(_0x1559ec(0xad))/0x7)+parseInt(_0x1559ec(0xb2))/0x8*(parseInt(_0x1559ec(0xac))/0x9)+parseInt(_0x1559ec(0xb6))/0xa+-parseInt(_0x1559ec(0xa2))/0xb;if(_0x287113===_0x16b1ad)break;else _0xa3b11a['push'](_0xa3b11a['shift']());}catch(_0x3e3aa6){_0xa3b11a['push'](_0xa3b11a['shift']());}}}(_0x2c4a,0x53a6a));import{getDict,getDictMap,getDictOptions,hydrateDictFromEps}from'vome-core/client';function isEmpty(_0x1a9f1a){return _0x1a9f1a===''||_0x1a9f1a===null||_0x1a9f1a===undefined;}function _0x4035(_0x155060,_0x459ff6){_0x155060=_0x155060-0xa1;const _0x2c4a9c=_0x2c4a();let _0x403540=_0x2c4a9c[_0x155060];if(_0x4035['AfDdYR']===undefined){var _0x4952ea=function(_0x211760){const _0x4cd854='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1a9f1a='',_0x377d23='';for(let _0x52dbbb=0x0,_0x3122bb,_0x51a98a,_0x431378=0x0;_0x51a98a=_0x211760['charAt'](_0x431378++);~_0x51a98a&&(_0x3122bb=_0x52dbbb%0x4?_0x3122bb*0x40+_0x51a98a:_0x51a98a,_0x52dbbb++%0x4)?_0x1a9f1a+=String['fromCharCode'](0xff&_0x3122bb>>(-0x2*_0x52dbbb&0x6)):0x0){_0x51a98a=_0x4cd854['indexOf'](_0x51a98a);}for(let _0x5b49ff=0x0,_0x5a44a4=_0x1a9f1a['length'];_0x5b49ff<_0x5a44a4;_0x5b49ff++){_0x377d23+='%'+('00'+_0x1a9f1a['charCodeAt'](_0x5b49ff)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x377d23);};_0x4035['OVCyAT']=_0x4952ea,_0x4035['pkcmKL']={},_0x4035['AfDdYR']=!![];}const _0x391271=_0x2c4a9c[0x0],_0x1a699f=_0x155060+_0x391271,_0x2593c2=_0x4035['pkcmKL'][_0x1a699f];return!_0x2593c2?(_0x403540=_0x4035['OVCyAT'](_0x403540),_0x4035['pkcmKL'][_0x1a699f]=_0x403540):_0x403540=_0x2593c2,_0x403540;}function sameValue(_0x377d23,_0x52dbbb){if(_0x377d23===_0x52dbbb)return!![];if(_0x377d23==null||_0x52dbbb==null)return![];return String(_0x377d23)===String(_0x52dbbb);}function deepFind(_0x3122bb,_0x51a98a,_0x431378=[]){const _0x33f9d3=_0x4035;for(const _0x5b49ff of _0x51a98a){if(sameValue(_0x5b49ff['value'],_0x3122bb))return{..._0x5b49ff,'label':_0x431378['length']?[..._0x431378,_0x5b49ff['label']||_0x5b49ff['name']][_0x33f9d3(0xb1)](_0x33f9d3(0xa4)):_0x5b49ff['label']||_0x5b49ff[_0x33f9d3(0xaa)]};if(_0x5b49ff[_0x33f9d3(0xa9)]?.[_0x33f9d3(0xb7)]){const _0x5a44a4=deepFind(_0x3122bb,_0x5b49ff['children'],[..._0x431378,_0x5b49ff[_0x33f9d3(0xa1)]||_0x5b49ff[_0x33f9d3(0xaa)]]);if(_0x5a44a4)return _0x5a44a4;}}return;}function snapshot(_0x35b2b9){const _0x89625b=getDictMap(),_0x59a541={};for(const _0x4dd02f of _0x35b2b9||[])_0x59a541[_0x4dd02f]=_0x89625b[_0x4dd02f]||[];return _0x59a541;}export const useDictStore=defineStore(_0x32e530(0xab),()=>{function _0x33338a(_0x9033b9){return computed(()=>getDict(_0x9033b9));}function _0x479840(_0x3c57f4,_0x49dfe2){const _0x54de53=_0x4035,_0x4407d3=getDictMap()[_0x3c57f4]||[],_0x5d8df4=Array[_0x54de53(0xbc)](_0x49dfe2)?_0x49dfe2:[_0x49dfe2];return _0x5d8df4[_0x54de53(0xb0)](_0x2c0179=>_0x2c0179!==undefined)[_0x54de53(0xbb)](_0x49afd6=>deepFind(_0x49afd6,_0x4407d3));}function _0x1fe81e(_0x3351d3){return computed(()=>getDictOptions(_0x3351d3));}async function _0x398a86(_0x2e12d3,_0x19ba61=![]){const _0x568055=_0x4035,_0x1868ef=typeof _0x19ba61===_0x568055(0xa3)?_0x19ba61:Boolean(_0x19ba61?.[_0x568055(0xb4)]),_0x256f66=typeof _0x2e12d3===_0x568055(0xba)?[_0x2e12d3]:_0x2e12d3,_0x8bdb5d=_0x256f66?.[_0x568055(0xb0)](_0x3f8a6b=>!isEmpty(_0x3f8a6b));if(!_0x1868ef)return snapshot(_0x8bdb5d);const _0x21aee9=await service[_0x568055(0xa7)][_0x568055(0xab)][_0x568055(0xae)][_0x568055(0xa5)]({'types':_0x8bdb5d});hydrateDictFromEps(_0x21aee9);const _0x3ac0eb=_0x8bdb5d?.[_0x568055(0xb7)]?_0x8bdb5d:Object[_0x568055(0xaf)](_0x21aee9||{});return snapshot(_0x3ac0eb);}return{'get':_0x33338a,'find':_0x479840,'options':_0x1fe81e,'refresh':_0x398a86};});export function useDict(){const _0x5e9e27=useDictStore();return{'dict':_0x5e9e27};}function _0x2c4a(){const _0x2b49a4=['zM9Yy2u','mtjxAwziEgS','mZiYotCZmhbMA0zNta','BgvUz3rO','mJryqKfTyNu','mJGWmtmWEwTSyNH5','C3rYAw5N','BwfW','AxnbCNjHEq','BgfIzwW','mte3mdi2mtr2yu9UA3i','yM9VBgvHBG','ic8G','zgf0yq','mta4mJy4q01UC2Pj','yMfZzq','ndaZmZK2zMTHAwXX','y2HPBgrYzw4','BMfTzq','zgLJDa','nJuXmZaZug5xrgf0','mtuYmZmZm3vvzendCa','Aw5MBW','A2v5CW','zMLSDgvY','AM9PBG','ntzTA25hD3G','oe1ZzNDcAa'];_0x2c4a=function(){return _0x2b49a4;};return _0x2c4a();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x438836=_0x5133;(function(_0x55d136,_0x2fb02e){const _0x1b68ba=_0x5133,_0x55bd9a=_0x55d136();while(!![]){try{const _0x3471a8=parseInt(_0x1b68ba(0xd0))/0x1+-parseInt(_0x1b68ba(0xcd))/0x2*(parseInt(_0x1b68ba(0xcf))/0x3)+-parseInt(_0x1b68ba(0xd1))/0x4*(-parseInt(_0x1b68ba(0xc8))/0x5)+-parseInt(_0x1b68ba(0xd7))/0x6*(parseInt(_0x1b68ba(0xd3))/0x7)+parseInt(_0x1b68ba(0xce))/0x8+-parseInt(_0x1b68ba(0xd5))/0x9*(-parseInt(_0x1b68ba(0xc7))/0xa)+parseInt(_0x1b68ba(0xc9))/0xb*(-parseInt(_0x1b68ba(0xd2))/0xc);if(_0x3471a8===_0x2fb02e)break;else _0x55bd9a['push'](_0x55bd9a['shift']());}catch(_0x332dfe){_0x55bd9a['push'](_0x55bd9a['shift']());}}}(_0x5a77,0xc25a3));import{setCrudTranslator}from'@core/admin/crud';function _0x5a77(){const _0x2d3a10=['mZiXz1HZueTr','mtiXota1nwvrv0LjyG','ntu2nZC5mKvgsvbRsa','mtCYmZaWmdHWyNLNs1C','n3HTq3zmrW','z2v0sxrLBq','mJa3oti0m0TgwMTzAW','DM9Tzv9Hzg1PBL9SB2nHBgu','mJmXmJeWmhH4ENfkDq','CgfJAW','ntbpyw9mrNy','nxr3s25WBq','mJjdzwnxsLa','C2v0sxrLBq','ywrTAw4','Ate4BG','mty0ntr6CunkBhy','otmZnZG4ogrwEMLnsG'];_0x5a77=function(){return _0x2d3a10;};return _0x5a77();}import{service}from'@core/admin/service';function _0x5133(_0x556b2c,_0x25866e){_0x556b2c=_0x556b2c-0xc7;const _0x5a7723=_0x5a77();let _0x5133ea=_0x5a7723[_0x556b2c];if(_0x5133['lzpNqE']===undefined){var _0x1c0e85=function(_0x144d93){const _0x5bcebd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4e58a8='',_0x9a053a='';for(let _0x1982e3=0x0,_0xf40166,_0x4620a5,_0x5e4b1a=0x0;_0x4620a5=_0x144d93['charAt'](_0x5e4b1a++);~_0x4620a5&&(_0xf40166=_0x1982e3%0x4?_0xf40166*0x40+_0x4620a5:_0x4620a5,_0x1982e3++%0x4)?_0x4e58a8+=String['fromCharCode'](0xff&_0xf40166>>(-0x2*_0x1982e3&0x6)):0x0){_0x4620a5=_0x5bcebd['indexOf'](_0x4620a5);}for(let _0x49c290=0x0,_0x5431ea=_0x4e58a8['length'];_0x49c290<_0x5431ea;_0x49c290++){_0x9a053a+='%'+('00'+_0x4e58a8['charCodeAt'](_0x49c290)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x9a053a);};_0x5133['SJpOIV']=_0x1c0e85,_0x5133['ZtSVLG']={},_0x5133['lzpNqE']=!![];}const _0xd4e181=_0x5a7723[0x0],_0x1c66c6=_0x556b2c+_0xd4e181,_0x15953c=_0x5133['ZtSVLG'][_0x1c66c6];return!_0x15953c?(_0x5133ea=_0x5133['SJpOIV'](_0x5133ea),_0x5133['ZtSVLG'][_0x1c66c6]=_0x5133ea):_0x5133ea=_0x15953c,_0x5133ea;}import{createLocaleStore}from'vome-core/client';export const useLocaleStore=createLocaleStore({'storageKey':_0x438836(0xd6),'scopeKey':'admin','langMode':_0x438836(0xcb),'enableMenu':!![],'persist':{'get':_0x4e58a8=>localStorage[_0x438836(0xd4)](_0x4e58a8),'set':(_0x9a053a,_0x1982e3)=>localStorage[_0x438836(0xca)](_0x9a053a,_0x1982e3)},'getPackApi':()=>service[_0x438836(0xcc)]?.[_0x438836(0xd8)],'onPackLoaded':({t:_0xf40166})=>{setCrudTranslator((_0x4620a5,_0x5e4b1a)=>_0xf40166(_0x4620a5,_0x5e4b1a));}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useThemeStore: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x1a813c=_0x1fd2;function _0x1fd2(_0x3e0c47,_0x83eb6){_0x3e0c47=_0x3e0c47-0x133;const _0x594507=_0x5945();let _0x1fd29e=_0x594507[_0x3e0c47];if(_0x1fd2['RxkxHO']===undefined){var _0x594207=function(_0x29a514){const _0x2f6cdf='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4907ea='',_0x56ac44='';for(let _0x504b37=0x0,_0xc418ea,_0x679a9b,_0x30f5e2=0x0;_0x679a9b=_0x29a514['charAt'](_0x30f5e2++);~_0x679a9b&&(_0xc418ea=_0x504b37%0x4?_0xc418ea*0x40+_0x679a9b:_0x679a9b,_0x504b37++%0x4)?_0x4907ea+=String['fromCharCode'](0xff&_0xc418ea>>(-0x2*_0x504b37&0x6)):0x0){_0x679a9b=_0x2f6cdf['indexOf'](_0x679a9b);}for(let _0x751fb1=0x0,_0xa7df01=_0x4907ea['length'];_0x751fb1<_0xa7df01;_0x751fb1++){_0x56ac44+='%'+('00'+_0x4907ea['charCodeAt'](_0x751fb1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x56ac44);};_0x1fd2['UodxAh']=_0x594207,_0x1fd2['EToMIk']={},_0x1fd2['RxkxHO']=!![];}const _0x440f95=_0x594507[0x0],_0xf135e2=_0x3e0c47+_0x440f95,_0x189834=_0x1fd2['EToMIk'][_0xf135e2];return!_0x189834?(_0x1fd29e=_0x1fd2['UodxAh'](_0x1fd29e),_0x1fd2['EToMIk'][_0xf135e2]=_0x1fd29e):_0x1fd29e=_0x189834,_0x1fd29e;}(function(_0x4878e4,_0x2dd43e){const _0x4d647d=_0x1fd2,_0x142e92=_0x4878e4();while(!![]){try{const _0x566bd0=parseInt(_0x4d647d(0x13a))/0x1+-parseInt(_0x4d647d(0x138))/0x2+-parseInt(_0x4d647d(0x141))/0x3*(-parseInt(_0x4d647d(0x13b))/0x4)+-parseInt(_0x4d647d(0x145))/0x5*(-parseInt(_0x4d647d(0x148))/0x6)+-parseInt(_0x4d647d(0x135))/0x7+parseInt(_0x4d647d(0x134))/0x8+-parseInt(_0x4d647d(0x144))/0x9;if(_0x566bd0===_0x2dd43e)break;else _0x142e92['push'](_0x142e92['shift']());}catch(_0x491af5){_0x142e92['push'](_0x142e92['shift']());}}}(_0x5945,0x235a3));import{bus}from'wujie';import{applyTheme,listThemes}from'../themes';import{hasMicroThemeListeners,MICRO_SET_THEME_EVENT,MICRO_THEME_EVENT,snapshotHostTheme}from'../lib/micro-theme';const THEME_KEY=_0x1a813c(0x136);let themeTransitioning=![];function prefersReducedMotion(){const _0x4af27c=_0x1a813c;if(typeof window===_0x4af27c(0x13c))return!![];return window[_0x4af27c(0x13f)](_0x4af27c(0x142))[_0x4af27c(0x147)];}function _0x5945(){const _0x41fbde=['ntGWnZqXy1nvyxDe','DM9Tzv9Hzg1PBL90AgvTzq','BgLNAhq','ntmWnJqYEg5Kz2zi','zgfYAW','mJqYoti3wxHruxzh','nJbxs1zpCgu','Dw5KzwzPBMvK','yw5PBwf0zq','C3rHCNrwAwv3vhjHBNnPDgLVBG','Bwf0y2HnzwrPyq','DgHLBwvjza','ntiWmtDpqKLMqNu','khbYzwzLCNmTCMvKDwnLzc1TB3rPB246ihjLzhvJzsK','z2v0sxrLBq','mJi5ntKXohbythrQEq','ndm2meDuEgjpta','C2v0sxrLBq','Bwf0y2HLCW','mta2ofzYvw9ouG','DgHLBwu','nZe5nJG4Cu9QAgTv'];_0x5945=function(){return _0x41fbde;};return _0x5945();}function broadcastHostTheme(){try{if(!hasMicroThemeListeners())return;bus['$emit'](MICRO_THEME_EVENT,snapshotHostTheme());}catch{}}function runThemeUpdate(_0x4907ea,_0x56ac44){const _0x5eae83=_0x1a813c,_0x504b37=typeof document!==_0x5eae83(0x13c)?document:null;if(!_0x56ac44||!_0x504b37?.[_0x5eae83(0x13e)]||prefersReducedMotion()||themeTransitioning){_0x4907ea(),queueMicrotask(()=>broadcastHostTheme());return;}themeTransitioning=!![];const _0xc418ea=_0x504b37[_0x5eae83(0x13e)](_0x4907ea);_0xc418ea['finished']['finally'](()=>{themeTransitioning=![],broadcastHostTheme(),requestAnimationFrame(()=>broadcastHostTheme());});}let guestThemeBound=![];function bindGuestThemeRequests(_0x679a9b){if(guestThemeBound)return;guestThemeBound=!![];try{bus['$on'](MICRO_SET_THEME_EVENT,_0x30f5e2=>{const _0xf2d8e2=_0x1fd2,_0x751fb1=_0x30f5e2?.['themeId']==='dark'?_0xf2d8e2(0x139):'light';if(_0x751fb1===_0x679a9b[_0xf2d8e2(0x140)])return;_0x679a9b['setTheme'](_0x751fb1);});}catch{}}export const useThemeStore=defineStore(_0x1a813c(0x133),{'state':()=>({'themeId':localStorage[_0x1a813c(0x143)](THEME_KEY)||_0x1a813c(0x137)}),'getters':{'themes':()=>listThemes()},'actions':{'initTheme'(){applyTheme(this['themeId']),broadcastHostTheme(),bindGuestThemeRequests(this);},'setTheme'(_0xa7df01,_0x55555b){const _0x3b314f=_0x1a813c,_0x2fa731=_0xa7df01!==this['themeId'],_0x38b057=_0x55555b?.[_0x3b314f(0x13d)]!==![]&&_0x2fa731;runThemeUpdate(()=>{const _0x471b22=_0x3b314f;this[_0x471b22(0x140)]=_0xa7df01,localStorage[_0x471b22(0x146)](THEME_KEY,_0xa7df01),applyTheme(_0xa7df01),broadcastHostTheme();},_0x38b057);}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x4822dd=_0x4ec6;(function(_0x5e6693,_0x3ff69c){const _0x530e03=_0x4ec6,_0x42dd18=_0x5e6693();while(!![]){try{const _0x37bd52=-parseInt(_0x530e03(0xef))/0x1+-parseInt(_0x530e03(0xf4))/0x2+-parseInt(_0x530e03(0xf1))/0x3*(-parseInt(_0x530e03(0xf2))/0x4)+parseInt(_0x530e03(0xf3))/0x5*(parseInt(_0x530e03(0xee))/0x6)+parseInt(_0x530e03(0xed))/0x7+-parseInt(_0x530e03(0xf5))/0x8*(parseInt(_0x530e03(0xf7))/0x9)+-parseInt(_0x530e03(0xf6))/0xa*(-parseInt(_0x530e03(0xf0))/0xb);if(_0x37bd52===_0x3ff69c)break;else _0x42dd18['push'](_0x42dd18['shift']());}catch(_0x281773){_0x42dd18['push'](_0x42dd18['shift']());}}}(_0x1a61,0xcf44d));function _0x4ec6(_0x1c2d61,_0x17517a){_0x1c2d61=_0x1c2d61-0xed;const _0x1a61c4=_0x1a61();let _0x4ec6d9=_0x1a61c4[_0x1c2d61];if(_0x4ec6['hXnCST']===undefined){var _0x1c9038=function(_0x44114a){const _0x454db6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4f5d99='',_0xd5a1c2='';for(let _0x563c89=0x0,_0x3240eb,_0x4a756d,_0x4d36f6=0x0;_0x4a756d=_0x44114a['charAt'](_0x4d36f6++);~_0x4a756d&&(_0x3240eb=_0x563c89%0x4?_0x3240eb*0x40+_0x4a756d:_0x4a756d,_0x563c89++%0x4)?_0x4f5d99+=String['fromCharCode'](0xff&_0x3240eb>>(-0x2*_0x563c89&0x6)):0x0){_0x4a756d=_0x454db6['indexOf'](_0x4a756d);}for(let _0x1f7777=0x0,_0x2ba586=_0x4f5d99['length'];_0x1f7777<_0x2ba586;_0x1f7777++){_0xd5a1c2+='%'+('00'+_0x4f5d99['charCodeAt'](_0x1f7777)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xd5a1c2);};_0x4ec6['VEXZuD']=_0x1c9038,_0x4ec6['ttjTdZ']={},_0x4ec6['hXnCST']=!![];}const _0x25dc70=_0x1a61c4[0x0],_0x1866f0=_0x1c2d61+_0x25dc70,_0x2674cc=_0x4ec6['ttjTdZ'][_0x1866f0];return!_0x2674cc?(_0x4ec6d9=_0x4ec6['VEXZuD'](_0x4ec6d9),_0x4ec6['ttjTdZ'][_0x1866f0]=_0x4ec6d9):_0x4ec6d9=_0x2674cc,_0x4ec6d9;}export const darkTheme={'id':_0x4822dd(0xf8),'label':'深色','dark':!![]};function _0x1a61(){const _0xf27429=['nZu1mtK1mufoq01iBa','m1vPAMXbrW','mZy1mZK2qxzmwfzm','mtm5nvPorvjSwq','mZaXmJy5me5zquXQzq','ndyYmtu0ngrstvjcBG','mZbsveHPqKC','oxjvCw5TCq','zgfYAW','nZm2mdqZmfngsK1lwa','mJa1mdjrBfrlsfK','mtiYmJC5nhrnEMjsAq'];_0x1a61=function(){return _0xf27429;};return _0x1a61();}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { darkTheme } from './dark';
|
|
2
|
+
import { lightTheme } from './light';
|
|
3
|
+
/** 注册/覆盖主题(业务方可扩展) */
|
|
4
|
+
export declare function registerTheme(theme: ThemeDefinition): void;
|
|
5
|
+
export declare function getTheme(id: string): ThemeDefinition;
|
|
6
|
+
export declare function listThemes(): ThemeDefinition[];
|
|
7
|
+
export declare function applyTheme(id: string): void;
|
|
8
|
+
export type { ThemeDefinition, ThemeTokens } from '../../../typings/admin/theme';
|
|
9
|
+
export { lightTheme, darkTheme };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x2b74(){const _0x1b7494=['nJCWmZjIDKLXCgi','nJiWmdG2BhresNve','C2v0','mtHiwgvsufO','zgfYAW','y2XHC3nmAxn0','DgHLBwu','nhnQBhPAta','mtu3ntC3mezXu1zYuG','Dg9Rzw5Z','mteYote4mfPZAwDHrq','zg9JDw1LBNrfBgvTzw50','DMfSDwvZ','Dg9Nz2XL','mufMr0TeqG','mtK5odrHsLzVqMu','C3r5Bgu','zgf0yxnLDa','mte3ntC0ndLQDu16q0y','C2v0uhjVCgvYDhK','zw50CMLLCW','odeYq0Xctunz','nZyZndeWzMDPqvvI','z2v0'];_0x2b74=function(){return _0x1b7494;};return _0x2b74();}(function(_0x16ec22,_0x278713){const _0x25cd9a=_0x42dd,_0x33e3e4=_0x16ec22();while(!![]){try{const _0x306324=-parseInt(_0x25cd9a(0x1bd))/0x1*(parseInt(_0x25cd9a(0x1c8))/0x2)+-parseInt(_0x25cd9a(0x1c7))/0x3+parseInt(_0x25cd9a(0x1ce))/0x4*(-parseInt(_0x25cd9a(0x1cf))/0x5)+-parseInt(_0x25cd9a(0x1c5))/0x6+-parseInt(_0x25cd9a(0x1c4))/0x7*(parseInt(_0x25cd9a(0x1be))/0x8)+-parseInt(_0x25cd9a(0x1ca))/0x9*(-parseInt(_0x25cd9a(0x1b9))/0xa)+parseInt(_0x25cd9a(0x1c1))/0xb;if(_0x306324===_0x278713)break;else _0x33e3e4['push'](_0x33e3e4['shift']());}catch(_0x912b20){_0x33e3e4['push'](_0x33e3e4['shift']());}}}(_0x2b74,0x38307));function _0x42dd(_0x255992,_0x46e166){_0x255992=_0x255992-0x1b8;const _0x2b747c=_0x2b74();let _0x42dd5f=_0x2b747c[_0x255992];if(_0x42dd['NrcdBc']===undefined){var _0x39e4ac=function(_0x555126){const _0x5f113c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xc06aa0='',_0x1ef994='';for(let _0xae4001=0x0,_0x346163,_0x641777,_0x24ce95=0x0;_0x641777=_0x555126['charAt'](_0x24ce95++);~_0x641777&&(_0x346163=_0xae4001%0x4?_0x346163*0x40+_0x641777:_0x641777,_0xae4001++%0x4)?_0xc06aa0+=String['fromCharCode'](0xff&_0x346163>>(-0x2*_0xae4001&0x6)):0x0){_0x641777=_0x5f113c['indexOf'](_0x641777);}for(let _0x10993c=0x0,_0xdccab0=_0xc06aa0['length'];_0x10993c<_0xdccab0;_0x10993c++){_0x1ef994+='%'+('00'+_0xc06aa0['charCodeAt'](_0x10993c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1ef994);};_0x42dd['GAnLCi']=_0x39e4ac,_0x42dd['NDMkxH']={},_0x42dd['NrcdBc']=!![];}const _0x3336ae=_0x2b747c[0x0],_0x4284b3=_0x255992+_0x3336ae,_0x248233=_0x42dd['NDMkxH'][_0x4284b3];return!_0x248233?(_0x42dd5f=_0x42dd['GAnLCi'](_0x42dd5f),_0x42dd['NDMkxH'][_0x4284b3]=_0x42dd5f):_0x42dd5f=_0x248233,_0x42dd5f;}import{darkTheme}from'./dark';import{lightTheme}from'./light';const registry=new Map([[lightTheme['id'],lightTheme],[darkTheme['id'],darkTheme]]);export function registerTheme(_0xc06aa0){const _0x26b937=_0x42dd;registry[_0x26b937(0x1c9)](_0xc06aa0['id'],_0xc06aa0);}export function getTheme(_0x1ef994){const _0x2bdb7a=_0x42dd;return registry[_0x2bdb7a(0x1c6)](_0x1ef994);}export function listThemes(){const _0x40f93c=_0x42dd;return[...registry[_0x40f93c(0x1bb)]()];}export function applyTheme(_0xae4001){const _0x229237=_0x42dd,_0x346163=registry['get'](_0xae4001)??lightTheme,_0x641777=document[_0x229237(0x1ba)];_0x641777[_0x229237(0x1cc)][_0x229237(0x1bc)](_0x229237(0x1cb),Boolean(_0x346163[_0x229237(0x1cb)])),_0x641777[_0x229237(0x1c0)][_0x229237(0x1cd)]=_0x346163['id'];if(_0x346163[_0x229237(0x1b8)])for(const [_0x24ce95,_0x10993c]of Object[_0x229237(0x1c3)](_0x346163[_0x229237(0x1b8)])){_0x641777[_0x229237(0x1bf)][_0x229237(0x1c2)](_0x24ce95,_0x10993c);}}export{lightTheme,darkTheme};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x48670a=_0x59b3;(function(_0x102176,_0x500aac){const _0x12176a=_0x59b3,_0x5adaa0=_0x102176();while(!![]){try{const _0x11cd42=parseInt(_0x12176a(0x1c8))/0x1*(parseInt(_0x12176a(0x1c6))/0x2)+-parseInt(_0x12176a(0x1c2))/0x3*(parseInt(_0x12176a(0x1bd))/0x4)+-parseInt(_0x12176a(0x1be))/0x5*(-parseInt(_0x12176a(0x1c7))/0x6)+parseInt(_0x12176a(0x1c0))/0x7+-parseInt(_0x12176a(0x1c4))/0x8+-parseInt(_0x12176a(0x1c1))/0x9*(parseInt(_0x12176a(0x1c5))/0xa)+parseInt(_0x12176a(0x1bf))/0xb;if(_0x11cd42===_0x500aac)break;else _0x5adaa0['push'](_0x5adaa0['shift']());}catch(_0x3f55a0){_0x5adaa0['push'](_0x5adaa0['shift']());}}}(_0x14eb,0x1bc96));function _0x59b3(_0x3ac4f5,_0x56d1cf){_0x3ac4f5=_0x3ac4f5-0x1bd;const _0x14eb2e=_0x14eb();let _0x59b3b6=_0x14eb2e[_0x3ac4f5];if(_0x59b3['BOsBIV']===undefined){var _0x509711=function(_0x459d82){const _0x56624c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x17925b='',_0x4d7176='';for(let _0x5c3a19=0x0,_0x575aaa,_0x335b11,_0x8c01f=0x0;_0x335b11=_0x459d82['charAt'](_0x8c01f++);~_0x335b11&&(_0x575aaa=_0x5c3a19%0x4?_0x575aaa*0x40+_0x335b11:_0x335b11,_0x5c3a19++%0x4)?_0x17925b+=String['fromCharCode'](0xff&_0x575aaa>>(-0x2*_0x5c3a19&0x6)):0x0){_0x335b11=_0x56624c['indexOf'](_0x335b11);}for(let _0xc6649=0x0,_0x432331=_0x17925b['length'];_0xc6649<_0x432331;_0xc6649++){_0x4d7176+='%'+('00'+_0x17925b['charCodeAt'](_0xc6649)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4d7176);};_0x59b3['ZYWsuj']=_0x509711,_0x59b3['kPCIzW']={},_0x59b3['BOsBIV']=!![];}const _0x29a0c8=_0x14eb2e[0x0],_0xcd957=_0x3ac4f5+_0x29a0c8,_0x50061a=_0x59b3['kPCIzW'][_0xcd957];return!_0x50061a?(_0x59b3b6=_0x59b3['ZYWsuj'](_0x59b3b6),_0x59b3['kPCIzW'][_0xcd957]=_0x59b3b6):_0x59b3b6=_0x50061a,_0x59b3b6;}function _0x14eb(){const _0x43d901=['nuD0zMHdsa','nfvuveDKAW','mtb0C1DosMy','ndu1ndC4mujoENv0tW','mtiYntu2AuHpuuj3','mtyYAgTOqvro','nJaWndy1tvrRsvHi','BgLNAhq','mtGWmduWne5wsuPWEa','mti0ndmWzev0zNvf','nty4mJjYELD2D0S','nty4mte2B1PuzffJ'];_0x14eb=function(){return _0x43d901;};return _0x14eb();}export const lightTheme={'id':_0x48670a(0x1c3),'label':'浅色','dark':![]};
|
|
@@ -11,6 +11,8 @@ export type EpsStaticBundle = {
|
|
|
11
11
|
};
|
|
12
12
|
export type ClientHooks = {
|
|
13
13
|
request: ClientRequestFn;
|
|
14
|
+
/** admin / web / uni 的 API 根路径(如 /dev) */
|
|
15
|
+
baseUrl?: string;
|
|
14
16
|
/**
|
|
15
17
|
* 生产环境 loadEps 数据源(打包内 build/eps.json)。
|
|
16
18
|
* DEV 不走此路径;PROD 未注入则 loadEps 抛错(禁止回退 HTTP)。
|
|
@@ -23,6 +25,7 @@ export declare function configureClient(next: Partial<ClientHooks> & {
|
|
|
23
25
|
}): void;
|
|
24
26
|
export declare function getClientRequest(): ClientRequestFn;
|
|
25
27
|
export declare function getLoadStaticEps(): ClientHooks['loadStaticEps'];
|
|
28
|
+
export declare function getClientBaseUrl(): string;
|
|
26
29
|
/**
|
|
27
30
|
* 默认 loadStaticEps:读打包产物根目录 /eps.json
|
|
28
31
|
* (Vite 插件开发态中间件 + closeBundle 拷贝到 dist)
|
package/dist/client/configure.js
CHANGED
|
@@ -11,6 +11,13 @@ export function getClientRequest() {
|
|
|
11
11
|
export function getLoadStaticEps() {
|
|
12
12
|
return hooks?.loadStaticEps;
|
|
13
13
|
}
|
|
14
|
+
export function getClientBaseUrl() {
|
|
15
|
+
const baseUrl = hooks?.baseUrl;
|
|
16
|
+
if (!baseUrl) {
|
|
17
|
+
throw new Error("[vome-client] configureClient({ baseUrl }) before apiUrl / request");
|
|
18
|
+
}
|
|
19
|
+
return baseUrl;
|
|
20
|
+
}
|
|
14
21
|
export async function fetchPackagedEpsJson() {
|
|
15
22
|
const meta = import.meta;
|
|
16
23
|
const base = meta.env?.BASE_URL || "/";
|
|
@@ -17,16 +17,14 @@ export {
|
|
|
17
17
|
} from "./vite-resolve.js";
|
|
18
18
|
export function createAdminResolvePlugins(opts) {
|
|
19
19
|
const root = opts.root;
|
|
20
|
-
const hostSrc = opts.hostSrc ?? path.resolve(root, "src");
|
|
21
20
|
return [
|
|
22
21
|
vomePeerDepsPlugin(root),
|
|
23
|
-
vomeResolvePlugin(root
|
|
22
|
+
vomeResolvePlugin(root),
|
|
24
23
|
vomeAdminNoOptimizePlugin()
|
|
25
24
|
];
|
|
26
25
|
}
|
|
27
26
|
export function createAdminOptimizeDepsPlugins(opts) {
|
|
28
|
-
|
|
29
|
-
return [vomeHostEsbuildPlugin(hostSrc, opts.root)];
|
|
27
|
+
return [vomeHostEsbuildPlugin(opts.root)];
|
|
30
28
|
}
|
|
31
29
|
export const adminDedupe = [
|
|
32
30
|
"vue",
|
|
@@ -111,12 +111,12 @@ export function createAdminAutoImportPlugins(root) {
|
|
|
111
111
|
Components({
|
|
112
112
|
exclude,
|
|
113
113
|
globs: [
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
"src/modules/*/components/vm-*.vue",
|
|
114
|
+
`${coreAdmin}/components/ui/**/*.vue`,
|
|
115
|
+
`${coreAdmin}/components/layout/vm-*.vue`,
|
|
117
116
|
`${coreAdmin}/components/vm-*.vue`,
|
|
118
117
|
`${coreAdmin}/crud/vm-*.vue`,
|
|
119
|
-
`${coreAdmin}/crud/components/vm-*.vue
|
|
118
|
+
`${coreAdmin}/crud/components/vm-*.vue`,
|
|
119
|
+
"src/modules/*/components/vm-*.vue"
|
|
120
120
|
],
|
|
121
121
|
resolvers: [createVomeCoreVmResolver(root)],
|
|
122
122
|
dts: r("typings/components.d.ts"),
|
|
@@ -6,11 +6,11 @@ export declare function vomePeerDepsPlugin(appRoot: string): Plugin;
|
|
|
6
6
|
* 解析 @core/admin/*(及旧 /@/*)→ dist/admin 绝对文件。
|
|
7
7
|
* service 入口强制钉死,避免双实例。
|
|
8
8
|
*/
|
|
9
|
-
export declare function vomeResolvePlugin(root: string
|
|
9
|
+
export declare function vomeResolvePlugin(root: string): Plugin;
|
|
10
10
|
/**
|
|
11
11
|
* 禁止 Vite 把 `@core/admin/*` 当独立包预构建(与 exclude vome-core 配合)。
|
|
12
12
|
* 预构建会复制 style/useCrud 单例,导致 setAuto 写 A、vm-search 读 B。
|
|
13
13
|
*/
|
|
14
14
|
export declare function vomeAdminNoOptimizePlugin(): Plugin;
|
|
15
|
-
/** optimizeDeps 的 esbuild 不读 Vite alias
|
|
16
|
-
export declare function vomeHostEsbuildPlugin(
|
|
15
|
+
/** optimizeDeps 的 esbuild 不读 Vite alias;@core/admin 禁止进预构建图 */
|
|
16
|
+
export declare function vomeHostEsbuildPlugin(appRoot?: string): EsbuildPlugin;
|
|
@@ -74,14 +74,20 @@ export function vomePeerDepsPlugin(appRoot) {
|
|
|
74
74
|
const pkg = normalized.slice("__vite-optional-peer-dep:".length).replace(/:vome-core$/, "");
|
|
75
75
|
return resolvePeerPkg(pkg);
|
|
76
76
|
}
|
|
77
|
-
if (isCoreImporter(importer)
|
|
78
|
-
|
|
77
|
+
if (isCoreImporter(importer)) {
|
|
78
|
+
if (pinned[source])
|
|
79
|
+
return resolvePeerPkg(source);
|
|
80
|
+
try {
|
|
81
|
+
return require.resolve(source);
|
|
82
|
+
} catch {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
79
85
|
}
|
|
80
86
|
return;
|
|
81
87
|
}
|
|
82
88
|
};
|
|
83
89
|
}
|
|
84
|
-
export function vomeResolvePlugin(root
|
|
90
|
+
export function vomeResolvePlugin(root) {
|
|
85
91
|
const coreAdmin = path.resolve(root, "node_modules/vome-core/dist/admin");
|
|
86
92
|
const serviceEntry = path.resolve(coreAdmin, "service/index.js");
|
|
87
93
|
function resolveServiceId(id, importer) {
|
|
@@ -110,10 +116,6 @@ export function vomeResolvePlugin(root, hostSrc) {
|
|
|
110
116
|
const serviceId = resolveServiceId(id, importer);
|
|
111
117
|
if (serviceId)
|
|
112
118
|
return serviceId;
|
|
113
|
-
if (id === "#vome-host" || id.startsWith("#vome-host/")) {
|
|
114
|
-
const sub = id === "#vome-host" ? "" : id.slice("#vome-host/".length);
|
|
115
|
-
return resolveFile(path.resolve(hostSrc, sub)) ?? undefined;
|
|
116
|
-
}
|
|
117
119
|
if (!isAdminSpec(id))
|
|
118
120
|
return;
|
|
119
121
|
const adminId = normalizeAdminId(id);
|
|
@@ -140,19 +142,12 @@ export function vomeAdminNoOptimizePlugin() {
|
|
|
140
142
|
}
|
|
141
143
|
};
|
|
142
144
|
}
|
|
143
|
-
export function vomeHostEsbuildPlugin(
|
|
145
|
+
export function vomeHostEsbuildPlugin(appRoot) {
|
|
144
146
|
const root = appRoot || process.cwd();
|
|
145
147
|
const coreAdmin = path.resolve(root, "node_modules/vome-core/dist/admin");
|
|
146
148
|
return {
|
|
147
149
|
name: "vome-host-esbuild",
|
|
148
150
|
setup(build) {
|
|
149
|
-
build.onResolve({ filter: /^#vome-host(\/|$)/ }, (args) => {
|
|
150
|
-
const sub = args.path === "#vome-host" ? "" : args.path.slice("#vome-host/".length);
|
|
151
|
-
const resolved = resolveFile(path.resolve(hostSrc, sub));
|
|
152
|
-
if (!resolved)
|
|
153
|
-
return;
|
|
154
|
-
return { path: resolved, external: true };
|
|
155
|
-
});
|
|
156
151
|
build.onResolve({ filter: /^@core\/admin(\/|$)|^\/@(\/|$)/ }, (args) => {
|
|
157
152
|
const adminId = normalizeAdminId(args.path);
|
|
158
153
|
const sub = adminId === "vome-core/admin" ? "" : adminId.slice("vome-core/admin/".length);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** 官网文档根(席位 / license API 由此派生) */
|
|
2
|
+
export declare const OFFICIAL_DOCS_URL = "https://vomekj.com";
|
|
3
|
+
/** docsUrl → 官网后端 origin(主机前加 service.) */
|
|
4
|
+
export declare function serviceUrlFromDocs(docsUrl: string): string;
|
|
5
|
+
/** 席位 API 根(occupy / heartbeat / release) */
|
|
6
|
+
export declare function seatApiBaseFromDocs(docsUrl: string): string;
|
|
7
|
+
/** 联网安装签发 license */
|
|
8
|
+
export declare function licenseIssueUrlFromDocs(docsUrl: string): string;
|