@jiangood/open-admin 2.5.9 → 3.0.1
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 +20 -8
- package/src/framework/GlobalData.ts +85 -0
- package/src/framework/biz/OrgTree.tsx +2 -7
- package/src/framework/biz/Perm.tsx +11 -0
- package/src/framework/biz/PermActions.tsx +18 -15
- package/src/framework/biz/index.tsx +34 -19
- package/src/framework/components/ContextMenu/index.tsx +105 -78
- package/src/framework/components/DownloadModal/index.tsx +15 -17
- package/src/framework/components/ErrorBoundary/index.tsx +2 -2
- package/src/framework/components/FormModal/index.tsx +76 -0
- package/src/framework/components/Gap/index.tsx +1 -1
- package/src/framework/components/NamedIcon/index.tsx +55 -9
- package/src/framework/components/Page/index.less +0 -1
- package/src/framework/components/Page/index.tsx +34 -27
- package/src/framework/components/PageLoading/index.less +15 -0
- package/src/framework/components/PageLoading/index.tsx +32 -16
- package/src/framework/components/ProTable/index.tsx +86 -15
- package/src/framework/components/index.ts +1 -0
- package/src/framework/config/index.ts +1 -0
- package/src/framework/config/themeConfig.ts +39 -0
- package/src/framework/fields/FieldBoolean/index.tsx +11 -2
- package/src/framework/fields/FieldDate/index.tsx +22 -7
- package/src/framework/fields/FieldDateRange/index.tsx +24 -6
- package/src/framework/fields/FieldDictSelect/index.tsx +1 -0
- package/src/framework/fields/FieldEditor/index.tsx +7 -1
- package/src/framework/fields/FieldNumberRange/index.tsx +14 -5
- package/src/framework/fields/FieldPercent/index.tsx +16 -5
- package/src/framework/fields/FieldRemoteSelect/index.tsx +4 -2
- package/src/framework/fields/FieldRemoteTreeSelect/index.tsx +2 -1
- package/src/framework/fields/FieldSysOrgTree/index.tsx +6 -1
- package/src/framework/fields/FieldSysOrgTreeSelect/index.tsx +6 -1
- package/src/framework/fields/FieldTable/index.tsx +35 -6
- package/src/framework/fields/FieldTableSelect/index.tsx +18 -2
- package/src/framework/fields/FieldUploadFile/index.tsx +69 -28
- package/src/framework/fields/index.ts +0 -1
- package/src/framework/index.ts +2 -0
- package/src/framework/router/Link.tsx +26 -0
- package/src/framework/router/PageFrame.tsx +31 -0
- package/src/framework/router/history.ts +50 -0
- package/src/framework/router/index.ts +4 -0
- package/src/framework/router/matcher.ts +58 -0
- package/src/framework/utils/{ArrayUtils.js → ArrayUtils.ts} +5 -5
- package/src/framework/utils/{DateUtils.js → DateUtils.ts} +19 -19
- package/src/framework/utils/{DeviceUtils.js → DeviceUtils.ts} +8 -1
- package/src/framework/utils/{EventBus.js → EventBus.ts} +13 -6
- package/src/framework/utils/MessageApi.ts +5 -0
- package/src/framework/utils/ModalApi.ts +5 -0
- package/src/framework/utils/ObjectUtils.ts +15 -0
- package/src/framework/utils/{StorageUtils.js → StorageUtils.ts} +7 -7
- package/src/framework/utils/{StringUtils.js → StringUtils.ts} +15 -15
- package/src/framework/utils/{TreeUtils.js → TreeUtils.ts} +19 -12
- package/src/framework/utils/{UrlUtils.js → UrlUtils.ts} +10 -10
- package/src/framework/utils/index.ts +2 -1
- package/src/framework/utils/system/{DictUtils.js → DictUtils.ts} +16 -4
- package/src/framework/utils/system/{HttpUtils.js → HttpUtils.ts} +25 -21
- package/src/framework/utils/system/PageUtils.ts +49 -0
- package/src/framework/utils/system/{PermUtils.js → PermUtils.ts} +5 -6
- package/src/framework/utils/system/index.ts +0 -2
- package/src/framework/views/ViewBoolean/index.tsx +6 -3
- package/src/framework/views/ViewFileButton/index.tsx +13 -8
- package/src/framework/views/ViewImage/index.tsx +19 -14
- package/src/framework/views/ViewRange/index.tsx +10 -7
- package/src/framework/views/ViewText/index.tsx +9 -11
- package/src/layouts/admin/AdminTabs.jsx +79 -0
- package/src/layouts/admin/AdminTabs.less +63 -0
- package/src/layouts/admin/HeaderRight.jsx +27 -13
- package/src/layouts/admin/TabLayout.jsx +124 -0
- package/src/layouts/admin/index.jsx +5 -6
- package/src/layouts/admin/index.less +1 -82
- package/src/layouts/index.tsx +148 -0
- package/src/main.jsx +8 -0
- package/src/pages/account/changePassword.jsx +14 -10
- package/src/pages/article/$code.jsx +2 -2
- package/src/pages/index.jsx +6 -4
- package/src/pages/{login.jsx → public/login.jsx} +7 -10
- package/src/pages/public/test.jsx +30 -0
- package/src/pages/{forceUpdatePwd.jsx → standalone/forceUpdatePwd.jsx} +3 -24
- package/src/pages/system/article/index.jsx +51 -56
- package/src/pages/system/dict/index.jsx +60 -91
- package/src/pages/system/file/index.jsx +23 -17
- package/src/pages/system/job/index.jsx +63 -72
- package/src/pages/system/log/index.jsx +11 -8
- package/src/pages/system/org/index.jsx +60 -80
- package/src/pages/system/role/index.jsx +50 -86
- package/src/pages/system/role/rolePerm.jsx +2 -2
- package/src/pages/system/user/index.jsx +120 -73
- package/src/pages/system/user/userPerm.jsx +2 -2
- package/vite-plugin/index.js +107 -0
- package/config/common-plugin.js +0 -145
- package/config/config.js +0 -5
- package/config/utils.js +0 -73
- package/src/.umi-production/appData.json +0 -2257
- package/src/.umi-production/core/EmptyRoute.tsx +0 -9
- package/src/.umi-production/core/defineApp.ts +0 -16
- package/src/.umi-production/core/helmet.ts +0 -10
- package/src/.umi-production/core/helmetContext.ts +0 -4
- package/src/.umi-production/core/history.ts +0 -72
- package/src/.umi-production/core/historyIntelli.ts +0 -132
- package/src/.umi-production/core/plugin.ts +0 -40
- package/src/.umi-production/core/pluginConfig.ts +0 -330
- package/src/.umi-production/core/pluginConfigJoi.d.ts +0 -7
- package/src/.umi-production/core/polyfill.ts +0 -220
- package/src/.umi-production/core/route.tsx +0 -47
- package/src/.umi-production/core/routeProps.js +0 -5
- package/src/.umi-production/core/routeProps.ts +0 -6
- package/src/.umi-production/core/terminal.ts +0 -37
- package/src/.umi-production/exports.ts +0 -17
- package/src/.umi-production/testBrowser.tsx +0 -90
- package/src/.umi-production/tsconfig.json +0 -43
- package/src/.umi-production/typings.d.ts +0 -136
- package/src/.umi-production/umi.ts +0 -83
- package/src/framework/GlobalData.d.ts +0 -10
- package/src/framework/GlobalData.js +0 -42
- package/src/framework/biz/HasPerm.tsx +0 -14
- package/src/framework/fields/FieldRemoteSelectMultiple/index.tsx +0 -29
- package/src/framework/utils/ArrayUtils.d.ts +0 -6
- package/src/framework/utils/DateUtils.d.ts +0 -20
- package/src/framework/utils/DeviceUtils.d.ts +0 -3
- package/src/framework/utils/EventBus.d.ts +0 -6
- package/src/framework/utils/MessageUtils.d.ts +0 -10
- package/src/framework/utils/MessageUtils.js +0 -43
- package/src/framework/utils/ObjectUtils.d.ts +0 -14
- package/src/framework/utils/ObjectUtils.js +0 -12
- package/src/framework/utils/StorageUtils.d.ts +0 -4
- package/src/framework/utils/StringUtils.d.ts +0 -17
- package/src/framework/utils/TreeUtils.d.ts +0 -13
- package/src/framework/utils/UrlUtils.d.ts +0 -6
- package/src/framework/utils/system/DictUtils.d.ts +0 -20
- package/src/framework/utils/system/FormRegistry.d.ts +0 -8
- package/src/framework/utils/system/FormRegistry.js +0 -31
- package/src/framework/utils/system/HttpUtils.d.ts +0 -14
- package/src/framework/utils/system/PageUtils.d.ts +0 -14
- package/src/framework/utils/system/PageUtils.js +0 -59
- package/src/framework/utils/system/PermUtils.d.ts +0 -5
- package/src/framework/utils/system/ThemeUtils.d.ts +0 -6
- package/src/framework/utils/system/ThemeUtils.js +0 -52
- package/src/layouts/PageRender.tsx +0 -29
- package/src/layouts/admin/TabPageRender.jsx +0 -210
- package/src/layouts/index.jsx +0 -120
- package/src/loading.jsx +0 -19
- package/src/pages/about.jsx +0 -16
- /package/src/pages/{login.less → public/login.less} +0 -0
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
// This file is generated by Umi automatically
|
|
3
|
-
// DO NOT CHANGE IT MANUALLY!
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { Outlet, useOutletContext } from 'umi';
|
|
6
|
-
export default function EmptyRoute() {
|
|
7
|
-
const context = useOutletContext();
|
|
8
|
-
return <Outlet context={context} />;
|
|
9
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
// This file is generated by Umi automatically
|
|
3
|
-
// DO NOT CHANGE IT MANUALLY!
|
|
4
|
-
interface IDefaultRuntimeConfig {
|
|
5
|
-
onRouteChange?: (props: { routes: any, clientRoutes: any, location: any, action: any, isFirst: boolean }) => void;
|
|
6
|
-
patchRoutes?: (props: { routes: any }) => void;
|
|
7
|
-
patchClientRoutes?: (props: { routes: any }) => void;
|
|
8
|
-
render?: (oldRender: () => void) => void;
|
|
9
|
-
rootContainer?: (lastRootContainer: JSX.Element, args?: any) => void;
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
}
|
|
12
|
-
export type RuntimeConfig = IDefaultRuntimeConfig
|
|
13
|
-
|
|
14
|
-
export function defineApp(config: RuntimeConfig): RuntimeConfig {
|
|
15
|
-
return config;
|
|
16
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
// This file is generated by Umi automatically
|
|
3
|
-
// DO NOT CHANGE IT MANUALLY!
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { HelmetProvider } from '/home/runner/work/open-admin/open-admin/web/node_modules/@umijs/renderer-react';
|
|
6
|
-
import { context } from './helmetContext';
|
|
7
|
-
|
|
8
|
-
export const innerProvider = (container) => {
|
|
9
|
-
return React.createElement(HelmetProvider, { context }, container);
|
|
10
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
// This file is generated by Umi automatically
|
|
3
|
-
// DO NOT CHANGE IT MANUALLY!
|
|
4
|
-
import { createHashHistory, createMemoryHistory, createBrowserHistory } from '/home/runner/work/open-admin/open-admin/web/node_modules/@umijs/renderer-react';
|
|
5
|
-
import type { UmiHistory } from './historyIntelli';
|
|
6
|
-
|
|
7
|
-
let history: UmiHistory;
|
|
8
|
-
let basename: string = '/';
|
|
9
|
-
export function createHistory(opts: any) {
|
|
10
|
-
let h;
|
|
11
|
-
if (opts.type === 'hash') {
|
|
12
|
-
h = createHashHistory();
|
|
13
|
-
} else if (opts.type === 'memory') {
|
|
14
|
-
h = createMemoryHistory(opts);
|
|
15
|
-
} else {
|
|
16
|
-
h = createBrowserHistory();
|
|
17
|
-
}
|
|
18
|
-
if (opts.basename) {
|
|
19
|
-
basename = opts.basename;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
history = {
|
|
24
|
-
...h,
|
|
25
|
-
push(to, state) {
|
|
26
|
-
h.push(patchTo(to, h), state);
|
|
27
|
-
},
|
|
28
|
-
replace(to, state) {
|
|
29
|
-
h.replace(patchTo(to, h), state);
|
|
30
|
-
},
|
|
31
|
-
get location() {
|
|
32
|
-
return h.location;
|
|
33
|
-
},
|
|
34
|
-
get action() {
|
|
35
|
-
return h.action;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return h;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function setHistory(h: UmiHistory) {
|
|
43
|
-
if (h) {
|
|
44
|
-
history = h;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Patch `to` to support basename
|
|
49
|
-
// Refs:
|
|
50
|
-
// https://github.com/remix-run/history/blob/3e9dab4/packages/history/index.ts#L484
|
|
51
|
-
// https://github.com/remix-run/history/blob/dev/docs/api-reference.md#to
|
|
52
|
-
function patchTo(to: any, h: History) {
|
|
53
|
-
if (typeof to === 'string') {
|
|
54
|
-
return `${stripLastSlash(basename)}${to}`;
|
|
55
|
-
} else if (typeof to === 'object') {
|
|
56
|
-
|
|
57
|
-
const currentPathname = h.location.pathname;
|
|
58
|
-
|
|
59
|
-
return {
|
|
60
|
-
...to,
|
|
61
|
-
pathname: to.pathname? `${stripLastSlash(basename)}${to.pathname}` : currentPathname,
|
|
62
|
-
};
|
|
63
|
-
} else {
|
|
64
|
-
throw new Error(`Unexpected to: ${to}`);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function stripLastSlash(path) {
|
|
69
|
-
return path.slice(-1) === '/' ? path.slice(0, -1) : path;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export { history };
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
// This file is generated by Umi automatically
|
|
3
|
-
// DO NOT CHANGE IT MANUALLY!
|
|
4
|
-
import { getRoutes } from './route'
|
|
5
|
-
import type { History } from '/home/runner/work/open-admin/open-admin/web/node_modules/@umijs/renderer-react'
|
|
6
|
-
|
|
7
|
-
type Routes = Awaited<ReturnType<typeof getRoutes>>['routes']
|
|
8
|
-
type AllRoute = Routes[keyof Routes]
|
|
9
|
-
type IsRoot<T extends any> = 'parentId' extends keyof T ? false : true
|
|
10
|
-
|
|
11
|
-
// show `/` in not `layout / wrapper` only
|
|
12
|
-
type GetAllRouteWithoutLayout<Item extends AllRoute> = Item extends any
|
|
13
|
-
? 'isWrapper' extends keyof Item
|
|
14
|
-
? never
|
|
15
|
-
: 'isLayout' extends keyof Item
|
|
16
|
-
? never
|
|
17
|
-
: Item
|
|
18
|
-
: never
|
|
19
|
-
type AllRouteWithoutLayout = GetAllRouteWithoutLayout<AllRoute>
|
|
20
|
-
type IndexRoutePathname = '/' extends AllRouteWithoutLayout['path']
|
|
21
|
-
? '/'
|
|
22
|
-
: never
|
|
23
|
-
|
|
24
|
-
type GetChildrens<T extends any> = T extends any
|
|
25
|
-
? IsRoot<T> extends true
|
|
26
|
-
? never
|
|
27
|
-
: T
|
|
28
|
-
: never
|
|
29
|
-
type Childrens = GetChildrens<AllRoute>
|
|
30
|
-
type Root = Exclude<AllRoute, Childrens>
|
|
31
|
-
type AllIds = AllRoute['id']
|
|
32
|
-
|
|
33
|
-
type GetChildrensByParentId<
|
|
34
|
-
Id extends AllIds,
|
|
35
|
-
Item = AllRoute
|
|
36
|
-
> = Item extends any
|
|
37
|
-
? 'parentId' extends keyof Item
|
|
38
|
-
? Item['parentId'] extends Id
|
|
39
|
-
? Item
|
|
40
|
-
: never
|
|
41
|
-
: never
|
|
42
|
-
: never
|
|
43
|
-
|
|
44
|
-
type RouteObject<
|
|
45
|
-
Id extends AllIds,
|
|
46
|
-
Item = GetChildrensByParentId<Id>
|
|
47
|
-
> = IsNever<Item> extends true
|
|
48
|
-
? ''
|
|
49
|
-
: Item extends AllRoute
|
|
50
|
-
? {
|
|
51
|
-
[Key in Item['path'] as TrimSlash<Key>]: UnionMerge<
|
|
52
|
-
RouteObject<Item['id']>
|
|
53
|
-
>
|
|
54
|
-
}
|
|
55
|
-
: never
|
|
56
|
-
|
|
57
|
-
type GetRootRouteObject<Item extends Root> = Item extends Root
|
|
58
|
-
? {
|
|
59
|
-
[K in Item['path'] as TrimSlash<K>]: UnionMerge<RouteObject<Item['id']>>
|
|
60
|
-
}
|
|
61
|
-
: never
|
|
62
|
-
type MergedResult = UnionMerge<GetRootRouteObject<Root>>
|
|
63
|
-
|
|
64
|
-
// --- patch history types ---
|
|
65
|
-
|
|
66
|
-
type HistoryTo = Parameters<History['push']>['0']
|
|
67
|
-
type HistoryPath = Exclude<HistoryTo, string>
|
|
68
|
-
|
|
69
|
-
type UmiPathname = Path<MergedResult> | (string & {})
|
|
70
|
-
interface UmiPath extends HistoryPath {
|
|
71
|
-
pathname: UmiPathname
|
|
72
|
-
}
|
|
73
|
-
type UmiTo = UmiPathname | UmiPath
|
|
74
|
-
|
|
75
|
-
type UmiPush = (to: UmiTo, state?: any) => void
|
|
76
|
-
type UmiReplace = (to: UmiTo, state?: any) => void
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
export interface UmiHistory extends History {
|
|
80
|
-
push: UmiPush
|
|
81
|
-
replace: UmiReplace
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// --- type utils ---
|
|
85
|
-
type TrimLeftSlash<T extends string> = T extends `/${infer R}`
|
|
86
|
-
? TrimLeftSlash<R>
|
|
87
|
-
: T
|
|
88
|
-
type TrimRightSlash<T extends string> = T extends `${infer R}/`
|
|
89
|
-
? TrimRightSlash<R>
|
|
90
|
-
: T
|
|
91
|
-
type TrimSlash<T extends string> = TrimLeftSlash<TrimRightSlash<T>>
|
|
92
|
-
|
|
93
|
-
type IsNever<T> = [T] extends [never] ? true : false
|
|
94
|
-
type IsEqual<A, B> = (<G>() => G extends A ? 1 : 2) extends <G>() => G extends B
|
|
95
|
-
? 1
|
|
96
|
-
: 2
|
|
97
|
-
? true
|
|
98
|
-
: false
|
|
99
|
-
|
|
100
|
-
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
|
|
101
|
-
k: infer I
|
|
102
|
-
) => void
|
|
103
|
-
? I
|
|
104
|
-
: never
|
|
105
|
-
type UnionMerge<U> = UnionToIntersection<U> extends infer O
|
|
106
|
-
? { [K in keyof O]: O[K] }
|
|
107
|
-
: never
|
|
108
|
-
|
|
109
|
-
type ExcludeEmptyKey<T> = IsEqual<T, ''> extends true ? never : T
|
|
110
|
-
|
|
111
|
-
type PathConcat<
|
|
112
|
-
TKey extends string,
|
|
113
|
-
TValue,
|
|
114
|
-
N = TrimSlash<TKey>
|
|
115
|
-
> = TValue extends string
|
|
116
|
-
? ExcludeEmptyKey<N>
|
|
117
|
-
:
|
|
118
|
-
| ExcludeEmptyKey<N>
|
|
119
|
-
| `${N & string}${IsNever<ExcludeEmptyKey<N>> extends true
|
|
120
|
-
? ''
|
|
121
|
-
: '/'}${UnionPath<TValue>}`
|
|
122
|
-
|
|
123
|
-
type UnionPath<T> = {
|
|
124
|
-
[K in keyof T]-?: PathConcat<K & string, T[K]>
|
|
125
|
-
}[keyof T]
|
|
126
|
-
|
|
127
|
-
type MakeSureLeftSlash<T> = T extends any
|
|
128
|
-
? `/${TrimRightSlash<T & string>}`
|
|
129
|
-
: never
|
|
130
|
-
|
|
131
|
-
// exclude `/*`, because it always at the top of the IDE tip list
|
|
132
|
-
type Path<T, K = UnionPath<T>> = Exclude<MakeSureLeftSlash<K>, '/*'> | IndexRoutePathname
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
// This file is generated by Umi automatically
|
|
3
|
-
// DO NOT CHANGE IT MANUALLY!
|
|
4
|
-
import * as Plugin_0 from '@@/core/helmet.ts';
|
|
5
|
-
import { PluginManager } from 'umi';
|
|
6
|
-
|
|
7
|
-
function __defaultExport (obj) {
|
|
8
|
-
if (obj.default) {
|
|
9
|
-
return typeof obj.default === 'function' ? obj.default() : obj.default
|
|
10
|
-
}
|
|
11
|
-
return obj;
|
|
12
|
-
}
|
|
13
|
-
export function getPlugins() {
|
|
14
|
-
return [
|
|
15
|
-
{
|
|
16
|
-
apply: Plugin_0,
|
|
17
|
-
path: process.env.NODE_ENV === 'production' ? void 0 : '@@/core/helmet.ts',
|
|
18
|
-
},
|
|
19
|
-
];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function getValidKeys() {
|
|
23
|
-
return ['patchRoutes','patchClientRoutes','modifyContextOpts','modifyClientRenderOpts','rootContainer','innerProvider','i18nProvider','accessProvider','dataflowProvider','outerProvider','render','onRouteChange',];
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
let pluginManager = null;
|
|
27
|
-
|
|
28
|
-
export function createPluginManager() {
|
|
29
|
-
pluginManager = PluginManager.create({
|
|
30
|
-
plugins: getPlugins(),
|
|
31
|
-
validKeys: getValidKeys(),
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return pluginManager;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function getPluginManager() {
|
|
39
|
-
return pluginManager;
|
|
40
|
-
}
|
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
// This file is generated by Umi automatically
|
|
3
|
-
// DO NOT CHANGE IT MANUALLY!
|
|
4
|
-
import { IConfigFromPluginsJoi } from "./pluginConfigJoi.d";
|
|
5
|
-
|
|
6
|
-
interface IConfigTypes {
|
|
7
|
-
codeSplitting: {
|
|
8
|
-
jsStrategy: "bigVendors" | "depPerChunk" | "granularChunks";
|
|
9
|
-
jsStrategyOptions?: ({
|
|
10
|
-
|
|
11
|
-
} | undefined);
|
|
12
|
-
cssStrategy?: ("mergeAll" | undefined);
|
|
13
|
-
cssStrategyOptions?: ({
|
|
14
|
-
|
|
15
|
-
} | undefined);
|
|
16
|
-
};
|
|
17
|
-
title: string;
|
|
18
|
-
styles: Array<string | {
|
|
19
|
-
src?: (string | undefined);
|
|
20
|
-
} | {
|
|
21
|
-
content?: (string | undefined);
|
|
22
|
-
} | { [x: string]: any }>;
|
|
23
|
-
scripts: Array<string | {
|
|
24
|
-
src?: (string | undefined);
|
|
25
|
-
} | {
|
|
26
|
-
content?: (string | undefined);
|
|
27
|
-
} | { [x: string]: any }>;
|
|
28
|
-
routes: Array<{
|
|
29
|
-
component?: (string | undefined);
|
|
30
|
-
layout?: (false | undefined);
|
|
31
|
-
path?: (string | undefined);
|
|
32
|
-
redirect?: (string | undefined);
|
|
33
|
-
routes?: IConfigTypes['routes'];
|
|
34
|
-
wrappers?: (Array<string> | undefined);
|
|
35
|
-
} | { [x: string]: any }>;
|
|
36
|
-
routeLoader: {
|
|
37
|
-
moduleType: "esm" | "cjs";
|
|
38
|
-
};
|
|
39
|
-
reactRouter5Compat: boolean | {
|
|
40
|
-
|
|
41
|
-
};
|
|
42
|
-
presets: Array<string>;
|
|
43
|
-
plugins: Array<string>;
|
|
44
|
-
npmClient: "pnpm" | "tnpm" | "cnpm" | "yarn" | "npm";
|
|
45
|
-
mountElementId: string;
|
|
46
|
-
metas: Array<{
|
|
47
|
-
charset?: (string | undefined);
|
|
48
|
-
content?: (string | undefined);
|
|
49
|
-
"http-equiv"?: (string | undefined);
|
|
50
|
-
name?: (string | undefined);
|
|
51
|
-
} | { [x: string]: any }>;
|
|
52
|
-
links: Array<{
|
|
53
|
-
crossorigin?: (string | undefined);
|
|
54
|
-
href?: (string | undefined);
|
|
55
|
-
hreflang?: (string | undefined);
|
|
56
|
-
media?: (string | undefined);
|
|
57
|
-
referrerpolicy?: (string | undefined);
|
|
58
|
-
rel?: (string | undefined);
|
|
59
|
-
sizes?: (any | undefined);
|
|
60
|
-
title?: (any | undefined);
|
|
61
|
-
type?: (any | undefined);
|
|
62
|
-
} | { [x: string]: any }>;
|
|
63
|
-
historyWithQuery: {
|
|
64
|
-
|
|
65
|
-
};
|
|
66
|
-
history: {
|
|
67
|
-
type: "browser" | "hash" | "memory";
|
|
68
|
-
};
|
|
69
|
-
headScripts: Array<string | {
|
|
70
|
-
src?: (string | undefined);
|
|
71
|
-
} | {
|
|
72
|
-
content?: (string | undefined);
|
|
73
|
-
} | { [x: string]: any }>;
|
|
74
|
-
esbuildMinifyIIFE: boolean;
|
|
75
|
-
conventionRoutes: {
|
|
76
|
-
base?: (string | undefined);
|
|
77
|
-
exclude?: (Array<any> | undefined);
|
|
78
|
-
};
|
|
79
|
-
conventionLayout: boolean;
|
|
80
|
-
base: string;
|
|
81
|
-
analyze: {
|
|
82
|
-
|
|
83
|
-
};
|
|
84
|
-
writeToDisk: boolean;
|
|
85
|
-
transformRuntime: { [x: string]: any };
|
|
86
|
-
theme: { [x: string]: any };
|
|
87
|
-
targets: { [x: string]: any };
|
|
88
|
-
svgr: { [x: string]: any };
|
|
89
|
-
svgo: { [x: string]: any } | boolean;
|
|
90
|
-
stylusLoader: { [x: string]: any };
|
|
91
|
-
styleLoader: { [x: string]: any };
|
|
92
|
-
srcTranspilerOptions: {
|
|
93
|
-
esbuild?: ({ [x: string]: any } | undefined);
|
|
94
|
-
swc?: ({ [x: string]: any } | undefined);
|
|
95
|
-
};
|
|
96
|
-
srcTranspiler: "babel" | "esbuild" | "swc";
|
|
97
|
-
sassLoader: { [x: string]: any };
|
|
98
|
-
runtimePublicPath: {
|
|
99
|
-
|
|
100
|
-
};
|
|
101
|
-
purgeCSS: { [x: string]: any };
|
|
102
|
-
publicPath: string;
|
|
103
|
-
proxy: { [x: string]: any } | Array<any>;
|
|
104
|
-
postcssLoader: { [x: string]: any };
|
|
105
|
-
outputPath: string;
|
|
106
|
-
normalCSSLoaderModules: { [x: string]: any };
|
|
107
|
-
mfsu: {
|
|
108
|
-
cacheDirectory?: (string | undefined);
|
|
109
|
-
chainWebpack?: (((...args: any[]) => unknown) | undefined);
|
|
110
|
-
esbuild?: (boolean | undefined);
|
|
111
|
-
exclude?: (Array<string | any> | undefined);
|
|
112
|
-
include?: (Array<string> | undefined);
|
|
113
|
-
mfName?: (string | undefined);
|
|
114
|
-
remoteAliases?: (Array<string> | undefined);
|
|
115
|
-
remoteName?: (string | undefined);
|
|
116
|
-
runtimePublicPath?: (boolean | undefined);
|
|
117
|
-
shared?: ({ [x: string]: any } | undefined);
|
|
118
|
-
strategy?: ("eager" | "normal" | undefined);
|
|
119
|
-
} | boolean;
|
|
120
|
-
mdx: {
|
|
121
|
-
loader?: (string | undefined);
|
|
122
|
-
loaderOptions?: ({ [x: string]: any } | undefined);
|
|
123
|
-
};
|
|
124
|
-
manifest: {
|
|
125
|
-
basePath?: (string | undefined);
|
|
126
|
-
fileName?: (string | undefined);
|
|
127
|
-
};
|
|
128
|
-
lessLoader: { [x: string]: any };
|
|
129
|
-
jsMinifierOptions: { [x: string]: any };
|
|
130
|
-
jsMinifier: "esbuild" | "swc" | "terser" | "uglifyJs" | "none";
|
|
131
|
-
inlineLimit: number;
|
|
132
|
-
ignoreMomentLocale: boolean;
|
|
133
|
-
https: {
|
|
134
|
-
cert?: (string | undefined);
|
|
135
|
-
hosts?: (Array<string> | undefined);
|
|
136
|
-
http2?: (boolean | undefined);
|
|
137
|
-
key?: (string | undefined);
|
|
138
|
-
};
|
|
139
|
-
hash: boolean;
|
|
140
|
-
forkTSChecker: { [x: string]: any };
|
|
141
|
-
fastRefresh: boolean;
|
|
142
|
-
extraPostCSSPlugins: Array<any>;
|
|
143
|
-
extraBabelPresets: Array<string | Array<any>>;
|
|
144
|
-
extraBabelPlugins: Array<string | Array<any>>;
|
|
145
|
-
extraBabelIncludes: Array<string | any>;
|
|
146
|
-
externals: { [x: string]: any } | string | ((...args: any[]) => unknown);
|
|
147
|
-
esm: {
|
|
148
|
-
|
|
149
|
-
};
|
|
150
|
-
devtool: "cheap-source-map" | "cheap-module-source-map" | "eval" | "eval-source-map" | "eval-cheap-source-map" | "eval-cheap-module-source-map" | "eval-nosources-cheap-source-map" | "eval-nosources-cheap-module-source-map" | "eval-nosources-source-map" | "source-map" | "hidden-source-map" | "hidden-nosources-cheap-source-map" | "hidden-nosources-cheap-module-source-map" | "hidden-nosources-source-map" | "hidden-cheap-source-map" | "hidden-cheap-module-source-map" | "inline-source-map" | "inline-cheap-source-map" | "inline-cheap-module-source-map" | "inline-nosources-cheap-source-map" | "inline-nosources-cheap-module-source-map" | "inline-nosources-source-map" | "nosources-source-map" | "nosources-cheap-source-map" | "nosources-cheap-module-source-map" | boolean;
|
|
151
|
-
depTranspiler: "babel" | "esbuild" | "swc" | "none";
|
|
152
|
-
define: { [x: string]: any };
|
|
153
|
-
deadCode: {
|
|
154
|
-
context?: (string | undefined);
|
|
155
|
-
detectUnusedExport?: (boolean | undefined);
|
|
156
|
-
detectUnusedFiles?: (boolean | undefined);
|
|
157
|
-
exclude?: (Array<string> | undefined);
|
|
158
|
-
failOnHint?: (boolean | undefined);
|
|
159
|
-
patterns?: (Array<string> | undefined);
|
|
160
|
-
};
|
|
161
|
-
cssPublicPath: string;
|
|
162
|
-
cssMinifierOptions: { [x: string]: any };
|
|
163
|
-
cssMinifier: "cssnano" | "esbuild" | "parcelCSS" | "none";
|
|
164
|
-
cssLoaderModules: { [x: string]: any };
|
|
165
|
-
cssLoader: { [x: string]: any };
|
|
166
|
-
copy: Array<{
|
|
167
|
-
from: string;
|
|
168
|
-
to: string;
|
|
169
|
-
} | string>;
|
|
170
|
-
checkDepCssModules?: boolean;
|
|
171
|
-
cacheDirectoryPath: string;
|
|
172
|
-
babelLoaderCustomize: string;
|
|
173
|
-
autoprefixer: { [x: string]: any };
|
|
174
|
-
autoCSSModules: boolean;
|
|
175
|
-
alias: { [x: string]: any };
|
|
176
|
-
crossorigin: boolean | {
|
|
177
|
-
includes?: (Array<any> | undefined);
|
|
178
|
-
};
|
|
179
|
-
esmi: {
|
|
180
|
-
cdnOrigin: string;
|
|
181
|
-
shimUrl?: (string | undefined);
|
|
182
|
-
};
|
|
183
|
-
exportStatic: {
|
|
184
|
-
extraRoutePaths?: (((...args: any[]) => unknown) | Array<string> | undefined);
|
|
185
|
-
ignorePreRenderError?: (boolean | undefined);
|
|
186
|
-
};
|
|
187
|
-
favicons: Array<string>;
|
|
188
|
-
helmet: boolean;
|
|
189
|
-
icons: {
|
|
190
|
-
autoInstall?: ({
|
|
191
|
-
|
|
192
|
-
} | undefined);
|
|
193
|
-
defaultComponentConfig?: ({
|
|
194
|
-
|
|
195
|
-
} | undefined);
|
|
196
|
-
alias?: ({
|
|
197
|
-
|
|
198
|
-
} | undefined);
|
|
199
|
-
include?: (Array<string> | undefined);
|
|
200
|
-
};
|
|
201
|
-
mock: {
|
|
202
|
-
exclude?: (Array<string> | undefined);
|
|
203
|
-
include?: (Array<string> | undefined);
|
|
204
|
-
};
|
|
205
|
-
mpa: {
|
|
206
|
-
template?: (string | undefined);
|
|
207
|
-
layout?: (string | undefined);
|
|
208
|
-
getConfigFromEntryFile?: (boolean | undefined);
|
|
209
|
-
entry?: ({
|
|
210
|
-
|
|
211
|
-
} | undefined);
|
|
212
|
-
};
|
|
213
|
-
phantomDependency: {
|
|
214
|
-
exclude?: (Array<string> | undefined);
|
|
215
|
-
};
|
|
216
|
-
polyfill: {
|
|
217
|
-
imports?: (Array<string> | undefined);
|
|
218
|
-
};
|
|
219
|
-
routePrefetch: {
|
|
220
|
-
defaultPrefetch?: ("none" | "intent" | "render" | "viewport" | undefined);
|
|
221
|
-
defaultPrefetchTimeout?: (number | undefined);
|
|
222
|
-
};
|
|
223
|
-
terminal: {
|
|
224
|
-
|
|
225
|
-
};
|
|
226
|
-
tmpFiles: boolean;
|
|
227
|
-
clientLoader: {
|
|
228
|
-
|
|
229
|
-
};
|
|
230
|
-
routeProps: {
|
|
231
|
-
|
|
232
|
-
};
|
|
233
|
-
ssr: {
|
|
234
|
-
serverBuildPath?: (string | undefined);
|
|
235
|
-
serverBuildTarget?: ("express" | "worker" | undefined);
|
|
236
|
-
platform?: (string | undefined);
|
|
237
|
-
builder?: ("esbuild" | "webpack" | "mako" | "utoopack" | undefined);
|
|
238
|
-
__INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?: ({
|
|
239
|
-
pureApp?: (boolean | undefined);
|
|
240
|
-
pureHtml?: (boolean | undefined);
|
|
241
|
-
} | undefined);
|
|
242
|
-
useStream?: (boolean | undefined);
|
|
243
|
-
};
|
|
244
|
-
lowImport: {
|
|
245
|
-
libs?: (Array<any> | undefined);
|
|
246
|
-
css?: (string | undefined);
|
|
247
|
-
};
|
|
248
|
-
vite: {
|
|
249
|
-
|
|
250
|
-
};
|
|
251
|
-
apiRoute: {
|
|
252
|
-
platform?: (string | undefined);
|
|
253
|
-
};
|
|
254
|
-
monorepoRedirect: boolean | {
|
|
255
|
-
srcDir?: (Array<string> | undefined);
|
|
256
|
-
exclude?: (Array<any> | undefined);
|
|
257
|
-
peerDeps?: (boolean | undefined);
|
|
258
|
-
};
|
|
259
|
-
test: {
|
|
260
|
-
|
|
261
|
-
};
|
|
262
|
-
clickToComponent: {
|
|
263
|
-
/** 默认情况下,点击将默认编辑器为vscode, 你可以设置编辑器 vscode 或者 vscode-insiders */
|
|
264
|
-
editor?: (string | undefined);
|
|
265
|
-
};
|
|
266
|
-
legacy: {
|
|
267
|
-
buildOnly?: (boolean | undefined);
|
|
268
|
-
nodeModulesTransform?: (boolean | undefined);
|
|
269
|
-
checkOutput?: (boolean | undefined);
|
|
270
|
-
};
|
|
271
|
-
/** 设置 babel class-properties 启用 loose
|
|
272
|
-
@doc https://umijs.org/docs/api/config#classpropertiesloose */
|
|
273
|
-
classPropertiesLoose: boolean | {
|
|
274
|
-
|
|
275
|
-
};
|
|
276
|
-
ui: {
|
|
277
|
-
|
|
278
|
-
};
|
|
279
|
-
mako: {
|
|
280
|
-
plugins?: (Array<{
|
|
281
|
-
load?: (((...args: any[]) => unknown) | undefined);
|
|
282
|
-
generateEnd?: (((...args: any[]) => unknown) | undefined);
|
|
283
|
-
}> | undefined);
|
|
284
|
-
px2rem?: ({
|
|
285
|
-
root?: (number | undefined);
|
|
286
|
-
propBlackList?: (Array<string> | undefined);
|
|
287
|
-
propWhiteList?: (Array<string> | undefined);
|
|
288
|
-
selectorBlackList?: (Array<string> | undefined);
|
|
289
|
-
selectorWhiteList?: (Array<string> | undefined);
|
|
290
|
-
selectorDoubleList?: (Array<string> | undefined);
|
|
291
|
-
} | undefined);
|
|
292
|
-
experimental?: ({
|
|
293
|
-
webpackSyntaxValidate?: (Array<string> | undefined);
|
|
294
|
-
} | undefined);
|
|
295
|
-
flexBugs?: (boolean | undefined);
|
|
296
|
-
optimization?: ({
|
|
297
|
-
skipModules?: (boolean | undefined);
|
|
298
|
-
} | undefined);
|
|
299
|
-
};
|
|
300
|
-
utoopack: boolean | {
|
|
301
|
-
root?: (string | undefined);
|
|
302
|
-
};
|
|
303
|
-
hmrGuardian: boolean;
|
|
304
|
-
forget: {
|
|
305
|
-
ReactCompilerConfig?: ({
|
|
306
|
-
|
|
307
|
-
} | undefined);
|
|
308
|
-
};
|
|
309
|
-
verifyCommit: {
|
|
310
|
-
scope?: (Array<string> | undefined);
|
|
311
|
-
allowEmoji?: (boolean | undefined);
|
|
312
|
-
};
|
|
313
|
-
run: {
|
|
314
|
-
globals?: (Array<string> | undefined);
|
|
315
|
-
};
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
type UtoopackConfigOverride = {
|
|
319
|
-
utoopack?: boolean | Partial<import('umi').IUtoopackUserConfig>;
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
type PrettifyWithCloseable<T> = {
|
|
323
|
-
[K in keyof T]: T[K] | false;
|
|
324
|
-
} & {};
|
|
325
|
-
|
|
326
|
-
export type IConfigFromPlugins = PrettifyWithCloseable<
|
|
327
|
-
IConfigFromPluginsJoi &
|
|
328
|
-
Omit<Partial<IConfigTypes>, keyof UtoopackConfigOverride> &
|
|
329
|
-
UtoopackConfigOverride
|
|
330
|
-
>;
|