@moneko/core 2.0.0-beta.3 → 2.0.0-beta.31
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/{lib/utils → build}/color-palette.d.ts +0 -0
- package/build/color-palette.js +1 -0
- package/build/common.js +1 -1
- package/build/envFlags.d.ts +1 -1
- package/build/envFlags.js +1 -1
- package/build/html-add-entry-attr.js +1 -1
- package/build/html-plugin-option.js +1 -1
- package/build/minify.d.ts +1 -1
- package/build/modifyVars.js +1 -1
- package/build/module-federation.js +1 -1
- package/build/module.config.js +1 -1
- package/build/process-env.d.ts +2 -0
- package/build/process-env.js +1 -1
- package/build/swcrc.js +1 -1
- package/build/tsloader.config.js +1 -1
- package/{lib/utils/theme.d.ts → build/variables.d.ts} +9 -1
- package/build/variables.js +1 -0
- package/build/webpack.common.js +1 -1
- package/build/webpack.dev.js +1 -1
- package/build/yarn-argv.js +1 -1
- package/lib/components/app-router/index.d.ts +2 -2
- package/lib/components/app-router/index.js +1 -1
- package/lib/components/app-router/index.js.map +1 -1
- package/lib/components/fallback/index.js +1 -1
- package/lib/components/fallback/index.js.map +1 -1
- package/lib/components/fallback-comp/index.js +1 -1
- package/lib/components/fallback-comp/index.js.map +1 -1
- package/lib/components/layout-menu/index.js +1 -1
- package/lib/components/layout-menu/index.js.map +1 -1
- package/lib/components/readme/index.js +1 -1
- package/lib/components/readme/index.js.map +1 -1
- package/lib/hooks/navgate.js +1 -1
- package/lib/hooks/navgate.js.map +1 -1
- package/lib/index.d.ts +2 -7
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/packages/back-stage/app.d.ts +0 -2
- package/lib/packages/back-stage/app.js +1 -1
- package/lib/packages/back-stage/app.js.map +1 -1
- package/lib/packages/back-stage/index.d.ts +1 -1
- package/lib/packages/back-stage/index.js +1 -1
- package/lib/packages/back-stage/index.js.map +1 -1
- package/lib/packages/back-stage/layout/index.js +1 -1
- package/lib/packages/back-stage/layout/index.js.map +1 -1
- package/lib/packages/back-stage/models/app-program.d.ts +1 -1
- package/lib/packages/back-stage/models/app-program.js +1 -1
- package/lib/packages/back-stage/models/app-program.js.map +1 -1
- package/lib/packages/library/index.d.ts +1 -1
- package/lib/packages/library/index.js +1 -1
- package/lib/packages/library/index.js.map +1 -1
- package/lib/packages/mobile/index.d.ts +1 -1
- package/lib/packages/mobile/index.js +1 -1
- package/lib/packages/mobile/index.js.map +1 -1
- package/lib/packages/single-spa/index.d.ts +1 -1
- package/lib/packages/single-spa/index.js +1 -1
- package/lib/packages/single-spa/index.js.map +1 -1
- package/lib/packages/site/index.d.ts +1 -1
- package/lib/packages/site/index.js +1 -1
- package/lib/packages/site/index.js.map +1 -1
- package/lib/router/index.d.ts +6 -5
- package/lib/router/index.js +1 -1
- package/lib/router/index.js.map +1 -1
- package/lib/styles/animation.css +58 -0
- package/lib/styles/normalize.css +96 -21
- package/lib/styles/variables.css +40 -0
- package/lib/utils/index.d.ts +1 -2
- package/lib/utils/index.js +1 -1
- package/lib/utils/index.js.map +1 -1
- package/package.json +18 -22
- package/typings/global.d.ts +29 -11
- package/build/has-antd.d.ts +0 -3
- package/build/has-antd.js +0 -1
- package/lib/packages/back-stage/antd.global.less +0 -67
- package/lib/styles/animation.less +0 -58
- package/lib/styles/ant.variables.global.less +0 -231
- package/lib/styles/eval/bezierEasing.less +0 -106
- package/lib/styles/eval/colorPalette.less +0 -73
- package/lib/styles/eval/tinyColor.less +0 -1181
- package/lib/styles/index.global.less +0 -136
- package/lib/styles/vars.less +0 -98
- package/lib/utils/color-palette.js +0 -2
- package/lib/utils/color-palette.js.map +0 -1
- package/lib/utils/lazy-import.d.ts +0 -34
- package/lib/utils/lazy-import.js +0 -2
- package/lib/utils/lazy-import.js.map +0 -1
- package/lib/utils/theme.js +0 -2
- package/lib/utils/theme.js.map +0 -1
package/lib/router/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/router/index.ts"],"sourcesContent":["import * as React from 'react';\nimport { lazyImport } from '../utils/lazy-import';\nimport { pathToRegexp } from 'path-to-regexp';\nimport type { ReactNode } from 'react';\nimport type { RouteObject } from 'react-router-dom';\nimport type { KeepAliveProps } from 'react-activation';\n\nexport interface RouterProps extends Omit<RouteObject, 'index' | 'children'> {\n key: string;\n alive?: KeepAliveProps | boolean;\n icon?: ReactNode;\n dynamicTitle?: string;\n i18n?: string | null;\n hideMenu?: boolean;\n hideTabs?: boolean;\n onlyLogin?: boolean;\n root?: boolean;\n path?: string;\n element?: ReactNode;\n /** 可否关闭标签 */\n closable?: boolean;\n children?: RouterProps[];\n}\n\nexport const myPkgs: RouterProps[] = [];\nif (APPTYPE === 'library') {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const Readme = require('../components/readme').default;\n const models = require.context('@pkg/', true, /README\\.mdx?$/);\n\n models.keys().map((item: string) => {\n const key = item.substring(2).split('/').slice(0, -1).join('/');\n\n myPkgs.push({\n key: key,\n path: key,\n element: React.createElement(Readme),\n });\n });\n}\n\nlet list: RouterProps[] = [];\n\ntry {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n list = require('@/router').default;\n} catch (error) {\n // eslint-disable-next-line no-console\n console.info('自定义路由请在 router 目录下新建 index.ts, 类型: RouterProps[]');\n}\n\nconst predixKey = (path?: string, prev?: string) =>\n // eslint-disable-next-line no-undefined\n [prev === '*' && path !== '*' ? undefined : prev, path].filter(Boolean).join('/');\n\nconst models = require.context('@/pages/', true, /\\.(t|j)sx$/, 'lazy');\n\nconst pathToTree = (input: string[]) => {\n const root: RouterProps[] = [];\n\n for (let i = 0; i < input.length; i++) {\n const chain = input[i].split('/').slice(0, -1);\n let curr = root;\n\n for (let j = 0; j < chain.length; j++) {\n let pathRule = chain[j];\n\n if (pathRule === '') continue;\n if (pathRule === '.') pathRule = '*';\n const lastHierarchy = curr;\n\n // 遍历root是否已有该层级\n if (Array.isArray(curr)) {\n for (let k = 0; k < curr.length; k++) {\n if (curr[k].path === pathRule) {\n curr = curr[k].children as RouterProps[];\n break;\n }\n }\n }\n\n if (lastHierarchy === curr) {\n let key: string = j === chain.length - 1 ? input[i] : chain.slice(0, j + 1).join('/') + '/';\n\n // 截取最后一个 / 前面的数据\n key = key.substring(2, key.lastIndexOf('/'));\n\n const node: RouterProps = {\n key: key,\n path: pathRule,\n i18n: 'route-' + key,\n children: [],\n alive: false,\n element: React.createElement(lazyImport(key.replace(/:/g, '$'))),\n hideMenu: key.includes(':'),\n };\n\n // 文件,最后一个字符不是\"/“符号\n // if (j === chain.length - 1) delete node.children;\n if (Array.isArray(curr)) curr.push(node);\n curr = node.children as RouterProps[];\n }\n }\n }\n\n return root;\n};\nconst routers: RouterProps[] = pathToTree(\n models.keys().map((item: string) => item.replace(/\\$/g, ':'))\n);\n\nfunction merge(source: RouterProps[], child: RouterProps, prev?: string) {\n const _ = source.find((item) => item.path === child.path);\n\n if (!_) {\n source.push(child);\n } else {\n // 处理key\n _.key = predixKey(_.path, prev);\n if (typeof _.i18n === 'undefined') {\n _.i18n = 'route-' + _.key;\n }\n if (typeof _.alive === 'undefined') {\n _.alive = false;\n }\n if (typeof _.element === 'undefined' && child.element) {\n _.element = child.element;\n }\n if (typeof _.hideMenu === 'undefined') {\n _.hideMenu = _.path === '*' ? true : _.key.includes(':');\n }\n\n Object.assign(_, {\n ...child,\n ..._,\n });\n if (child.children) {\n if (!_.children && Array.isArray(child.children)) {\n _.children = child.children;\n }\n child.children?.forEach((childData) => {\n merge(_?.children as RouterProps[], childData, _?.key);\n });\n }\n }\n}\nconst findLogin = (rs: RouterProps[] = [], onlyLogin: boolean, prevKey?: string): RouterProps[] => {\n return rs\n .map((e) => {\n const _ = { ...e };\n\n if (typeof _.key === 'undefined') {\n _.key = predixKey(e.path, prevKey);\n }\n if (typeof _.i18n === 'undefined') {\n _.i18n = 'route-' + _.key;\n }\n if (typeof _.alive === 'undefined') {\n _.alive = false;\n }\n if (_.path === '*' && typeof _.hideMenu === 'undefined') {\n _.hideMenu = true;\n }\n if (Array.isArray(_.children)) {\n // eslint-disable-next-line no-undefined\n _.children = _.children.length ? findLogin(_.children, onlyLogin, _.key) : undefined;\n }\n if (!_.element) {\n _.element = React.createElement(lazyImport(_.key.replace(/:/g, '$')));\n }\n return !!_.onlyLogin === onlyLogin && !_.root ? null : _;\n })\n .filter(Boolean) as RouterProps[];\n};\nconst _router: RouterProps[] = [...list];\n\nrouters.forEach((item: RouterProps) => merge(_router, item));\n\n/* 登录前注册的路由 */\nexport const onlyLoginRouter = findLogin(_router, false);\n/* 登录后注册的路由 */\nexport const router = findLogin(_router, true);\n\nexport const matchUtil = (pathname: string) => {\n let p: RouterProps = { key: '' };\n const findPath = (rs: RouterProps[]): void => {\n rs.forEach((item) => {\n if (item.path && item.path !== '*' && item.key) {\n try {\n if (pathToRegexp(item.key).exec(pathname.substring(1) as string)) {\n p = item;\n return;\n }\n // eslint-disable-next-line no-empty\n } catch (error) {}\n }\n if (Array.isArray(item.children)) findPath(item.children);\n });\n };\n\n findPath(router);\n return p;\n};\n"],"names":["React","lazyImport","pathToRegexp","myPkgs","APPTYPE","Readme","require","default","models","context","keys","map","item","key","substring","split","slice","join","push","path","element","createElement","list","error","console","info","predixKey","prev","undefined","filter","Boolean","pathToTree","input","root","i","length","chain","curr","j","pathRule","lastHierarchy","Array","isArray","k","children","lastIndexOf","node","i18n","alive","replace","hideMenu","includes","routers","merge","source","child","_","find","Object","assign","forEach","childData","findLogin","rs","onlyLogin","prevKey","e","_router","onlyLoginRouter","router","matchUtil","pathname","p","findPath","exec"],"mappings":"AAAA,wpDAAA,UAAYA,UAAW,OAAQ,AAC/B,QAASC,UAAU,KAAQ,sBAAuB,AAClD,QAASC,YAAY,KAAQ,gBAAiB,AAsB9C,QAAO,IAAMC,OAAwB,EAAE,AAAC,CACxC,GAAIC,UAAY,UAAW,CAEzB,IAAMC,OAASC,QAAQ,wBAAwBC,OAAO,CACtD,IAAMC,OAASF,QAAQG,OAAO,CAAC,QAAS,IAAI,CAAE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AO,CAAC9B,KAAKgC,QAAQ,EAAG6B,SAAS7D,KAAKgC,QAAQ,CAAE,AAC5D,EACF,EAEA6B,SAASJ,QACT,OAAOG,CACT,CAAE"}
|
|
1
|
+
{"version":3,"sources":["../../src/router/index.ts"],"sourcesContent":["import { pathToRegexp } from 'path-to-regexp';\nimport { createElement, lazy, type ReactElement } from 'react';\nimport type { KeepAliveProps } from 'react-activation';\n\nexport interface RouterProps {\n key: string;\n alive?: KeepAliveProps | boolean;\n icon?: ReactElement;\n dynamicTitle?: string;\n i18n?: string | null;\n hideMenu?: boolean;\n hideTabs?: boolean;\n onlyLogin?: boolean;\n root?: boolean;\n path?: string;\n element?: ReactElement;\n fallback?: ReactElement;\n /** 可否关闭标签 */\n closable?: boolean;\n children?: RouterProps[];\n}\nexport const lazyImport = (filePath: string) => {\n return lazy(\n () =>\n import(\n /* webpackChunkName: \"[request]\" */\n '@/pages/' + filePath.replace(/^\\//, '')\n )\n );\n};\n\nexport const myPkgs: RouterProps[] = [];\nif (APPTYPE === 'library') {\n const models = require.context('@pkg/', true, /README\\.mdx?$/);\n\n models.keys().map((item: string) => {\n const key = item.substring(2).split('/').slice(0, -1).join('/');\n\n myPkgs.push({\n key: key,\n path: key,\n element: createElement(\n lazy(\n () =>\n import(\n /* webpackChunkName: \"[request]\" */\n '@pkg/' + key + '/' + 'README.mdx'\n )\n )\n ),\n });\n });\n}\n\nlet list: RouterProps[] = [];\n\ntry {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n list = require('@/router').default;\n} catch (error) {\n // eslint-disable-next-line no-console\n console.info('自定义路由请在 router 目录下新建 index.ts, 类型: RouterProps[]');\n}\n\nconst predixKey = (path?: string, prev?: string) =>\n // eslint-disable-next-line no-undefined\n [prev === '*' && path !== '*' ? undefined : prev, path].filter(Boolean).join('/');\n\nconst models = require.context('@/pages/', true, /\\.(t|j)sx$/, 'lazy');\n\nconst pathToTree = (input: string[]) => {\n const root: RouterProps[] = [];\n\n for (let i = 0; i < input.length; i++) {\n const chain = input[i].split('/').slice(0, -1);\n let curr = root;\n\n for (let j = 0; j < chain.length; j++) {\n let pathRule = chain[j];\n\n if (pathRule === '') continue;\n if (pathRule === '.') pathRule = '*';\n const lastHierarchy = curr;\n\n // 遍历root是否已有该层级\n if (Array.isArray(curr)) {\n for (let k = 0; k < curr.length; k++) {\n if (curr[k].path === pathRule) {\n curr = curr[k].children as RouterProps[];\n break;\n }\n }\n }\n\n if (lastHierarchy === curr) {\n let key: string = j === chain.length - 1 ? input[i] : chain.slice(0, j + 1).join('/') + '/';\n\n // 截取最后一个 / 前面的数据\n key = key.substring(2, key.lastIndexOf('/'));\n\n const node: RouterProps = {\n key: key,\n path: pathRule,\n i18n: 'route-' + key,\n children: [],\n alive: false,\n element: createElement(lazyImport(key.replace(/:/g, '$'))),\n hideMenu: key.includes(':'),\n };\n\n // 文件,最后一个字符不是\"/“符号\n // if (j === chain.length - 1) delete node.children;\n if (Array.isArray(curr)) curr.push(node);\n curr = node.children as RouterProps[];\n }\n }\n }\n\n return root;\n};\nconst routers: RouterProps[] = pathToTree(\n models.keys().map((item: string) => item.replace(/\\$/g, ':'))\n);\n\nfunction merge(source: RouterProps[], child: RouterProps, prev?: string) {\n const _ = source.find((item) => item.path === child.path);\n\n if (!_) {\n source.push(child);\n } else {\n // 处理key\n _.key = predixKey(_.path, prev);\n if (typeof _.i18n === 'undefined') {\n _.i18n = 'route-' + _.key;\n }\n if (typeof _.alive === 'undefined') {\n _.alive = false;\n }\n if (typeof _.element === 'undefined' && child.element) {\n _.element = child.element;\n }\n if (typeof _.hideMenu === 'undefined') {\n _.hideMenu = _.path === '*' ? true : _.key.includes(':');\n }\n\n Object.assign(_, {\n ...child,\n ..._,\n });\n if (child.children) {\n if (!_.children && Array.isArray(child.children)) {\n _.children = child.children;\n }\n child.children?.forEach((childData) => {\n merge(_?.children as RouterProps[], childData, _?.key);\n });\n }\n }\n}\nconst findLogin = (rs: RouterProps[] = [], onlyLogin: boolean, prevKey?: string): RouterProps[] => {\n return rs\n .map((e) => {\n const _ = { ...e };\n\n if (typeof _.key === 'undefined') {\n _.key = predixKey(e.path, prevKey);\n }\n if (typeof _.i18n === 'undefined') {\n _.i18n = 'route-' + _.key;\n }\n if (typeof _.alive === 'undefined') {\n _.alive = false;\n }\n if (_.path === '*' && typeof _.hideMenu === 'undefined') {\n _.hideMenu = true;\n }\n if (Array.isArray(_.children)) {\n // eslint-disable-next-line no-undefined\n _.children = _.children.length ? findLogin(_.children, onlyLogin, _.key) : undefined;\n }\n if (!_.element) {\n _.element = createElement(lazyImport(_.key.replace(/:/g, '$')));\n }\n return !!_.onlyLogin === onlyLogin && !_.root ? null : _;\n })\n .filter(Boolean) as RouterProps[];\n};\nconst _router: RouterProps[] = [...list];\n\nrouters.forEach((item: RouterProps) => merge(_router, item));\n\n/* 登录前注册的路由 */\nexport const onlyLoginRouter = findLogin(_router, false);\n/* 登录后注册的路由 */\nexport const router = findLogin(_router, true);\n\nexport const matchUtil = (pathname: string) => {\n let p: RouterProps = { key: '' };\n const findPath = (rs: RouterProps[]): void => {\n rs.forEach((item) => {\n if (item.path && item.path !== '*' && item.key) {\n try {\n if (pathToRegexp(item.key).exec(pathname.substring(1) as string)) {\n p = item;\n return;\n }\n // eslint-disable-next-line no-empty\n } catch (error) {}\n }\n if (Array.isArray(item.children)) findPath(item.children);\n });\n };\n\n findPath(router);\n return p;\n};\n"],"names":["pathToRegexp","createElement","lazy","lazyImport","filePath","replace","myPkgs","APPTYPE","models","require","context","keys","map","item","key","substring","split","slice","join","push","path","element","list","default","error","console","info","predixKey","prev","undefined","filter","Boolean","pathToTree","input","root","i","length","chain","curr","j","pathRule","lastHierarchy","Array","isArray","k","children","lastIndexOf","node","i18n","alive","hideMenu","includes","routers","merge","source","child","_","find","Object","assign","forEach","childData","findLogin","rs","onlyLogin","prevKey","e","_router","onlyLoginRouter","router","matchUtil","pathname","p","findPath","exec"],"mappings":"AAAA,wpDAAA,OAASA,YAAY,KAAQ,gBAAiB,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,SAAC/C,KAAS,CACnB,GAAIA,KAAKO,IAAI,EAAIP,KAAKO,IAAI,GAAK,KAAOP,KAAKC,GAAG,CAAE,CAC9C,GAAI,CACF,GAAId,aAAaa,KAAKC,GAAG,EAAE4D,IAAI,CAACH,SAASxD,SAAS,CAAC,IAAe,CAChEyD,EAAI3D,KACJ,MACF,CAAC,AAEH,CAAE,MAAOW,MAAO,CAAC,CACnB,CAAC,AACD,GAAIkB,MAAMC,OAAO,CAAC9B,KAAKgC,QAAQ,EAAG4B,SAAS5D,KAAKgC,QAAQ,CAAE,AAC5D,EACF,EAEA4B,SAASJ,QACT,OAAOG,CACT,CAAE"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@keyframes avatar-in {
|
|
2
|
+
0% {
|
|
3
|
+
transform: scale(30);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
20% {
|
|
7
|
+
transform: scale(30);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
100% {
|
|
11
|
+
transform: scale(1);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@keyframes route-in {
|
|
16
|
+
from {
|
|
17
|
+
transform: translate3d(0, 16px, 0);
|
|
18
|
+
opacity: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
to {
|
|
22
|
+
transform: translate3d(0, 0, 0);
|
|
23
|
+
opacity: 1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@keyframes route-out {
|
|
28
|
+
from {
|
|
29
|
+
transform: translate3d(0, 0, 0);
|
|
30
|
+
opacity: 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
to {
|
|
34
|
+
z-index: -1;
|
|
35
|
+
transform: translate3d(0, 1rem, 0);
|
|
36
|
+
opacity: 0;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@keyframes fade-in {
|
|
41
|
+
from {
|
|
42
|
+
opacity: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
to {
|
|
46
|
+
opacity: 1;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@keyframes fade-out {
|
|
51
|
+
from {
|
|
52
|
+
opacity: 1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
to {
|
|
56
|
+
opacity: 0;
|
|
57
|
+
}
|
|
58
|
+
}
|
package/lib/styles/normalize.css
CHANGED
|
@@ -1,17 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
@import url("tailwindcss/base");
|
|
2
|
+
@import url("tailwindcss/components");
|
|
3
|
+
@import url("tailwindcss/utilities");
|
|
4
|
+
@import url("./animation.css");
|
|
5
|
+
@import url("./variables.css");
|
|
6
|
+
|
|
7
|
+
html,
|
|
8
|
+
body {
|
|
9
|
+
width: 100vw;
|
|
10
|
+
height: 100vh;
|
|
11
|
+
padding: 0;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
margin: 0;
|
|
14
|
+
color: var(--text-color);
|
|
15
|
+
font-size: var(--font-size-base);
|
|
16
|
+
font-family: var(--font-family);
|
|
17
|
+
line-height: 1.8;
|
|
18
|
+
background-color: var(--body-background);
|
|
19
|
+
transition-duration: var(--transition-duration);
|
|
20
|
+
transition-property: background-color, color;
|
|
21
|
+
transition-timing-function: var(--transition-timing-function);
|
|
3
22
|
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
4
23
|
-webkit-text-size-adjust: 100%;
|
|
5
24
|
}
|
|
6
25
|
|
|
7
|
-
|
|
8
|
-
|
|
26
|
+
#root {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
width: 100%;
|
|
30
|
+
height: 100%;
|
|
31
|
+
-webkit-overflow-scrolling: touch;
|
|
9
32
|
}
|
|
10
33
|
|
|
11
34
|
main {
|
|
12
35
|
display: block;
|
|
13
36
|
}
|
|
14
37
|
|
|
38
|
+
#root>main {
|
|
39
|
+
flex: 1;
|
|
40
|
+
width: 100%;
|
|
41
|
+
overflow-y: auto;
|
|
42
|
+
animation: route-in var(--transition-duration);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
input,
|
|
46
|
+
textarea {
|
|
47
|
+
caret-color: plum;
|
|
48
|
+
}
|
|
49
|
+
|
|
15
50
|
h1 {
|
|
16
51
|
font-size: 2em;
|
|
17
52
|
margin: 0.67em 0;
|
|
@@ -107,8 +142,7 @@ button,
|
|
|
107
142
|
[type='button'],
|
|
108
143
|
[type='reset'],
|
|
109
144
|
[type='submit'] {
|
|
110
|
-
|
|
111
|
-
-webkit-appearance: button;
|
|
145
|
+
appearance: button;
|
|
112
146
|
}
|
|
113
147
|
|
|
114
148
|
button::-moz-focus-inner,
|
|
@@ -123,7 +157,7 @@ button:-moz-focusring,
|
|
|
123
157
|
[type='button']:-moz-focusring,
|
|
124
158
|
[type='reset']:-moz-focusring,
|
|
125
159
|
[type='submit']:-moz-focusring {
|
|
126
|
-
outline: 1px dotted
|
|
160
|
+
outline: 1px dotted var(--primary-color-outline);
|
|
127
161
|
}
|
|
128
162
|
|
|
129
163
|
fieldset {
|
|
@@ -147,6 +181,22 @@ textarea {
|
|
|
147
181
|
overflow: auto;
|
|
148
182
|
}
|
|
149
183
|
|
|
184
|
+
details {
|
|
185
|
+
display: block;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
summary {
|
|
189
|
+
display: list-item;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
template {
|
|
193
|
+
display: none;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
[hidden] {
|
|
197
|
+
display: none;
|
|
198
|
+
}
|
|
199
|
+
|
|
150
200
|
[type='checkbox'],
|
|
151
201
|
[type='radio'] {
|
|
152
202
|
box-sizing: border-box;
|
|
@@ -159,34 +209,59 @@ textarea {
|
|
|
159
209
|
}
|
|
160
210
|
|
|
161
211
|
[type='search'] {
|
|
162
|
-
|
|
163
|
-
-webkit-appearance: textfield;
|
|
212
|
+
appearance: textfield;
|
|
164
213
|
outline-offset: -2px;
|
|
165
214
|
}
|
|
166
215
|
|
|
167
216
|
[type='search']::-webkit-search-decoration {
|
|
168
|
-
|
|
169
|
-
-webkit-appearance: none;
|
|
217
|
+
appearance: none;
|
|
170
218
|
}
|
|
171
219
|
|
|
172
220
|
::-webkit-file-upload-button {
|
|
173
|
-
|
|
174
|
-
-webkit-appearance: button;
|
|
221
|
+
appearance: button;
|
|
175
222
|
font: inherit;
|
|
176
223
|
}
|
|
177
224
|
|
|
178
|
-
|
|
179
|
-
|
|
225
|
+
|
|
226
|
+
:-webkit-autofill,
|
|
227
|
+
:-webkit-autofill:hover,
|
|
228
|
+
:-webkit-autofill:focus {
|
|
229
|
+
font-weight: 400;
|
|
230
|
+
border: none;
|
|
231
|
+
border-radius: 5px;
|
|
232
|
+
box-shadow: 0 0 0 1000px transparent inset;
|
|
233
|
+
transition: background-color var(--transition-duration) var(--transition-timing-function);
|
|
234
|
+
-webkit-text-fill-color: var(--text-color);
|
|
235
|
+
caret-color: transparent;
|
|
180
236
|
}
|
|
181
237
|
|
|
182
|
-
|
|
183
|
-
|
|
238
|
+
::-webkit-scrollbar {
|
|
239
|
+
width: 4px;
|
|
240
|
+
height: 4px;
|
|
241
|
+
opacity: 0;
|
|
184
242
|
}
|
|
185
243
|
|
|
186
|
-
|
|
187
|
-
|
|
244
|
+
::-webkit-scrollbar-track {
|
|
245
|
+
background-color: transparent;
|
|
188
246
|
}
|
|
189
247
|
|
|
190
|
-
|
|
191
|
-
|
|
248
|
+
::-webkit-scrollbar-thumb {
|
|
249
|
+
background-color: transparent;
|
|
250
|
+
border-radius: 5px;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
:hover::-webkit-scrollbar-thumb {
|
|
254
|
+
background-color: rgba(78, 78, 78, 0.15);
|
|
192
255
|
}
|
|
256
|
+
|
|
257
|
+
::-webkit-scrollbar-thumb:hover {
|
|
258
|
+
background-color: rgba(176, 139, 227, 0.5);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
::-webkit-scrollbar-thumb:active {
|
|
262
|
+
background-color: rgba(247, 138, 224, 0.5);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
::-webkit-scrollbar-button {
|
|
266
|
+
display: none;
|
|
267
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--text-shadow-color: rgba(0, 0, 0, 0.1);
|
|
3
|
+
--font-size-base: 14px;
|
|
4
|
+
--border-color-base: #d9d9d9;
|
|
5
|
+
--border-radius-base: 4px;
|
|
6
|
+
--body-background: #f8f8f8;
|
|
7
|
+
--component-background: #fff;
|
|
8
|
+
--table-header-bg: rgba(0, 0, 0, 0.02);
|
|
9
|
+
--text-color: rgba(0, 0, 0, 0.65);
|
|
10
|
+
--text-color-secondary: rgba(0, 0, 0, 0.45);
|
|
11
|
+
--heading-color: rgba(0, 0, 0, 0.85);
|
|
12
|
+
--text-selection-bg: var(--primary-color-deprecated-bg);
|
|
13
|
+
--box-shadow-small: 0 0 12px rgba(0, 0, 0, 0.1);
|
|
14
|
+
--box-shadow-base: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
15
|
+
0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
|
16
|
+
--font-family: -apple-system, 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial',
|
|
17
|
+
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
18
|
+
'Noto Color Emoji', 'Helvetica', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans';
|
|
19
|
+
--transition-duration: 0.3s;
|
|
20
|
+
--transition-timing-function: cubic-bezier(0.94, -0.1, 0.1, 1.2);
|
|
21
|
+
--antd-wave-shadow-color: var(--primary-color-outline);
|
|
22
|
+
--disable-color: rgba(0, 0, 0, 0.25);
|
|
23
|
+
--btn-disable-bg: var(--disable-color);
|
|
24
|
+
--btn-disable-border: var(--disable-color);
|
|
25
|
+
--menu-dark-item-active-bg: #0e3ab3;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
[data-theme='dark'] {
|
|
29
|
+
--text-selection-bg: var(--primary-color-deprecated-bg);
|
|
30
|
+
--text-color-secondary: rgba(255, 255, 255, 0.25);
|
|
31
|
+
--text-shadow-color: rgba(255, 255, 255, 0.1);
|
|
32
|
+
--header-shadow: rgba(255, 255, 255, 0.05);
|
|
33
|
+
--body-background: #000;
|
|
34
|
+
--component-background: #141414;
|
|
35
|
+
--header-bg: rgba(20, 20, 20, 0.9);
|
|
36
|
+
--text-color: #ffffffd9;
|
|
37
|
+
--border-color-base: #303030;
|
|
38
|
+
--heading-color: rgba(255, 255, 255, 0.85);
|
|
39
|
+
--disabled-color: rgba(255, 255, 255, 0.3);
|
|
40
|
+
}
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export var
|
|
1
|
+
export var watermark=function(param){var text=param.text,_x=param.x,x=_x===void 0?19.5:_x,_y=param.y,y=_y===void 0?55:_y,_width=param.width,width=_width===void 0?100:_width,_height=param.height,height=_height===void 0?100:_height,_fontSize=param.fontSize,fontSize=_fontSize===void 0?14:_fontSize,_angle=param.angle,angle=_angle===void 0?-45:_angle,_opacity=param.opacity,opacity=_opacity===void 0?.1:_opacity,_color=param.color,color=_color===void 0?"#000":_color;var svgStr='<svg xmlns="http://www.w3.org/2000/svg" width="'+width+'" height="'+height+'"><g><title>Layer 1</title><text x="'+x+'" y="'+y+'" textAnchor="middle" dominantBaseline="middle" stroke-opacity="'+opacity+'" stroke="'+color+'" fill="none" transform="rotate('+angle+" "+width/2+","+height/2+')" font-size="'+fontSize+'" font-family="-apple-system, BlinkMacSystemFont, '+"'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', 'Helvetica', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans'"+'">'+text+"</text></g></svg>";return"data:image/svg+xml;base64,"+window.btoa(decodeURIComponent(encodeURIComponent(svgStr)))};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/lib/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/index.ts"],"sourcesContent":["export const translatFunction = (func: string, val?: number | string | any): string => {\n
|
|
1
|
+
{"version":3,"sources":["../../src/utils/index.ts"],"sourcesContent":["// export const translatFunction = (func: string, val?: number | string | any): string => {\n// try {\n// if (typeof val !== 'undefined') {\n// return eval(func);\n// }\n// } catch (error) {\n// // eslint-disable-next-line no-console\n// console.warn(error);\n// }\n// return func;\n// };\n\nexport type WatermarkParamsType = {\n text: string;\n x?: number;\n y?: number;\n width?: number;\n height?: number;\n fontSize?: number;\n angle?: number;\n opacity?: number;\n color?: string;\n};\n\nexport const watermark = ({\n text,\n x = 19.5,\n y = 55,\n width = 100,\n height = 100,\n fontSize = 14,\n angle = -45,\n opacity = 0.1,\n color = '#000',\n}: WatermarkParamsType): string => {\n const svgStr =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"' +\n width +\n '\" height=\"' +\n height +\n '\"><g><title>Layer 1</title><text x=\"' +\n x +\n '\" y=\"' +\n y +\n '\" textAnchor=\"middle\" dominantBaseline=\"middle\" stroke-opacity=\"' +\n opacity +\n '\" stroke=\"' +\n color +\n '\" fill=\"none\" transform=\"rotate(' +\n angle +\n ' ' +\n width / 2 +\n ',' +\n height / 2 +\n ')\" font-size=\"' +\n fontSize +\n '\" font-family=\"-apple-system, BlinkMacSystemFont, ' +\n \"'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', 'Helvetica', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans'\" +\n '\">' +\n text +\n '</text></g></svg>';\n\n return 'data:image/svg+xml;base64,' + window.btoa(decodeURIComponent(encodeURIComponent(svgStr)));\n};\n"],"names":["watermark","text","x","y","width","height","fontSize","angle","opacity","color","svgStr","window","btoa","decodeURIComponent","encodeURIComponent"],"mappings":"AAwBA,OAAO,IAAMA,UAAY,eAUU,KATjCC,WAAAA,cACAC,EAAAA,cAAI,iBACJC,EAAAA,cAAI,mBACJC,MAAAA,sBAAQ,yBACRC,OAAAA,wBAAS,4BACTC,SAAAA,4BAAW,0BACXC,MAAAA,sBAAQ,CAAC,yBACTC,QAAAA,0BAAU,yBACVC,MAAAA,sBAAQ,cAER,IAAMC,OACJ,kDACAN,MACA,aACAC,OACA,uCACAH,EACA,QACAC,EACA,mEACAK,QACA,aACAC,MACA,mCACAF,MACA,IACAH,MAAQ,EACR,IACAC,OAAS,EACT,iBACAC,SACA,qDACA,8NACA,KACAL,KACA,oBAEF,MAAO,6BAA+BU,OAAOC,IAAI,CAACC,mBAAmBC,mBAAmBJ,SAC1F,CAAE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/core",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.31",
|
|
4
4
|
"description": "core",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,23 +15,21 @@
|
|
|
15
15
|
"author": "moneko",
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@emotion/
|
|
18
|
+
"@emotion/css": "11.10.5",
|
|
19
19
|
"@mapbox/rehype-prism": "0.8.0",
|
|
20
|
-
"@mdx-js/loader": "2.1
|
|
20
|
+
"@mdx-js/loader": "2.2.1",
|
|
21
21
|
"@moneko/common": "1.0.5",
|
|
22
22
|
"@parcel/css": "1.14.0",
|
|
23
|
-
"@pmmmwh/react-refresh-webpack-plugin": "0.5.
|
|
23
|
+
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
|
|
24
24
|
"@soda/friendly-errors-webpack-plugin": "1.8.1",
|
|
25
25
|
"@swc/cli": "0.1.57",
|
|
26
|
-
"@swc/core": "1.3.
|
|
27
|
-
"@swc/helpers": "0.4.
|
|
28
|
-
"@swc/plugin-emotion": "2.5.21",
|
|
26
|
+
"@swc/core": "1.3.6",
|
|
27
|
+
"@swc/helpers": "0.4.12",
|
|
29
28
|
"add-asset-html-webpack-plugin": "5.0.2",
|
|
30
|
-
"
|
|
31
|
-
"core-js": "3.26.0",
|
|
29
|
+
"core-js": "3.27.2",
|
|
32
30
|
"cross-env": "7.0.3",
|
|
33
|
-
"css-loader": "6.7.
|
|
34
|
-
"css-minimizer-webpack-plugin": "4.2.
|
|
31
|
+
"css-loader": "6.7.1",
|
|
32
|
+
"css-minimizer-webpack-plugin": "4.2.1",
|
|
35
33
|
"css-unicode-loader": "1.0.3",
|
|
36
34
|
"external-remotes-plugin": "1.0.0",
|
|
37
35
|
"fastclick": "1.0.6",
|
|
@@ -44,7 +42,7 @@
|
|
|
44
42
|
"mini-svg-data-uri": "1.4.4",
|
|
45
43
|
"path-to-regexp": "6.2.1",
|
|
46
44
|
"portfinder": "1.0.32",
|
|
47
|
-
"react-activation": "0.12.
|
|
45
|
+
"react-activation": "0.12.2",
|
|
48
46
|
"react-refresh": "0.14.0",
|
|
49
47
|
"react-refresh-typescript": "2.0.7",
|
|
50
48
|
"react-router": "6.4.2",
|
|
@@ -54,14 +52,13 @@
|
|
|
54
52
|
"style-loader": "3.3.1",
|
|
55
53
|
"style-resources-loader": "1.5.0",
|
|
56
54
|
"swc-loader": "0.2.3",
|
|
57
|
-
"
|
|
58
|
-
"tinycolor2": "1.4.2",
|
|
55
|
+
"tinycolor2": "1.6.0",
|
|
59
56
|
"ts-import-plugin": "2.0.0",
|
|
60
|
-
"ts-loader": "9.4.
|
|
61
|
-
"typescript": "4.
|
|
57
|
+
"ts-loader": "9.4.2",
|
|
58
|
+
"typescript": "4.9.5",
|
|
62
59
|
"webfontloader": "1.6.28",
|
|
63
|
-
"webpack": "5.
|
|
64
|
-
"webpack-cli": "
|
|
60
|
+
"webpack": "5.75.0",
|
|
61
|
+
"webpack-cli": "5.0.1",
|
|
65
62
|
"webpack-dev-server": "4.11.1",
|
|
66
63
|
"webpack-merge": "5.8.0",
|
|
67
64
|
"webpackbar": "5.0.2",
|
|
@@ -76,12 +73,11 @@
|
|
|
76
73
|
"@types/tinycolor2": "^1.4.3",
|
|
77
74
|
"@types/webfontloader": "^1.6.34",
|
|
78
75
|
"@types/webpack-env": "^1.18.0",
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"eslint-config-neko": "^1.0.8",
|
|
76
|
+
"antd": "4.20.2",
|
|
77
|
+
"eslint-config-neko": "^1.0.15",
|
|
82
78
|
"react": "^18.2.0",
|
|
83
79
|
"shelljs": "^0.8.5",
|
|
84
|
-
"stylelint-config-moneko": "^1.0.
|
|
80
|
+
"stylelint-config-moneko": "^1.0.4"
|
|
85
81
|
},
|
|
86
82
|
"files": [
|
|
87
83
|
"lib",
|
package/typings/global.d.ts
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
/* eslint-disable no-unused-vars */
|
|
2
2
|
import type { Options } from 'ts-import-plugin';
|
|
3
|
-
import type { RuleSetRule, WebpackPluginInstance, Configuration
|
|
3
|
+
import type { RuleSetRule, WebpackPluginInstance, Configuration } from 'webpack';
|
|
4
4
|
import type { ProxyArray, ProxyConfigArray, ProxyConfigMap } from 'webpack-dev-server';
|
|
5
5
|
import type { JsMinifyOptions } from '@swc/core';
|
|
6
6
|
import type { MinifyOptions } from 'terser';
|
|
7
7
|
import { Options as AssetHtmlOptions } from 'add-asset-html-webpack-plugin';
|
|
8
8
|
import { Options as HtmlWebpackPluginOptions } from 'html-webpack-plugin';
|
|
9
|
+
import type { WebpackConfiguration } from 'webpack-dev-server';
|
|
10
|
+
import type { Config as SwcConfig } from '@swc/core';
|
|
9
11
|
|
|
10
12
|
export type MinifierType = 'swc' | 'terser';
|
|
11
|
-
export declare type AppType =
|
|
13
|
+
export declare type AppType =
|
|
14
|
+
| 'single-component'
|
|
15
|
+
| 'mobile'
|
|
16
|
+
| 'site'
|
|
17
|
+
| 'back-stage'
|
|
18
|
+
| 'single-spa'
|
|
19
|
+
| 'library';
|
|
12
20
|
export type TerserOptions = MinifyOptions;
|
|
13
21
|
export type SwcOptions = JsMinifyOptions;
|
|
14
22
|
export declare type ConfigType<T = 'tsc'> = {
|
|
15
|
-
clean: boolean | CleanPlugin['options'];
|
|
16
23
|
/** 渲染模式 */
|
|
17
24
|
mode: 'ssr' | 'csr';
|
|
18
25
|
/** 编译器 */
|
|
19
26
|
compiler: 'tsc' | 'swc';
|
|
20
27
|
/** swc 配置项,仅当编译器为 swc 时有效 */
|
|
21
|
-
|
|
22
|
-
swcrc?: Record<string, any> | ((isDev: boolean) => Record<string, any>);
|
|
28
|
+
swcrc?: SwcConfig | ((isDev: boolean) => SwcConfig);
|
|
23
29
|
/**
|
|
24
30
|
* 自定义entry
|
|
25
31
|
* 当你需要添加一些polyfill函数时可在这里添加
|
|
@@ -70,11 +76,6 @@ export declare type ConfigType<T = 'tsc'> = {
|
|
|
70
76
|
fallbackCompPath?: string | null;
|
|
71
77
|
/** less 全局变量 */
|
|
72
78
|
modifyVars: Record<string, string>;
|
|
73
|
-
/** antd 主题配置 */
|
|
74
|
-
antdThemeVariables: {
|
|
75
|
-
compact?: boolean;
|
|
76
|
-
dark?: boolean;
|
|
77
|
-
};
|
|
78
79
|
/** 类名前缀 */
|
|
79
80
|
prefixCls?: string;
|
|
80
81
|
/** 左侧菜单栏, 不需要时设置为 false, 仅 type: back-stage 时有效 */
|
|
@@ -86,6 +87,23 @@ export declare type ConfigType<T = 'tsc'> = {
|
|
|
86
87
|
};
|
|
87
88
|
/** 自定义 webpack module rules */
|
|
88
89
|
moduleRules: RuleSetRule[];
|
|
90
|
+
/** 解析js/ts前置的loader
|
|
91
|
+
* @example
|
|
92
|
+
* ```js
|
|
93
|
+
* const conf: PartialConfigType = {
|
|
94
|
+
* compiler: 'tsc',
|
|
95
|
+
* prefixJsLoader: [
|
|
96
|
+
* {
|
|
97
|
+
* loader: 'babel-loader',
|
|
98
|
+
* options: {
|
|
99
|
+
* presets: ['solid'],
|
|
100
|
+
* },
|
|
101
|
+
* },
|
|
102
|
+
* ],
|
|
103
|
+
* };
|
|
104
|
+
* ```
|
|
105
|
+
* */
|
|
106
|
+
prefixJsLoader: RuleSetRule['use'][];
|
|
89
107
|
/** node_modules中, 需要开启 cssModules 的模块 */
|
|
90
108
|
cssModules: string[];
|
|
91
109
|
/** 按需引入 */
|
|
@@ -131,7 +149,7 @@ export declare type ConfigType<T = 'tsc'> = {
|
|
|
131
149
|
/** 通过Web字体加载加载的字体 */
|
|
132
150
|
webFontLoader: string[];
|
|
133
151
|
/** 编译输出路径 */
|
|
134
|
-
output
|
|
152
|
+
output?: Omit<WebpackConfiguration['output'], 'publishPath'> | string;
|
|
135
153
|
/** 模块联邦 */
|
|
136
154
|
moduleFederation: ModuleFederationOption[];
|
|
137
155
|
/** 跳过编译的模块 */
|
package/build/has-antd.d.ts
DELETED
package/build/has-antd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _export(target,all){for(var name in all)Object.defineProperty(target,name,{enumerable:true,get:all[name]})}_export(exports,{HASANTD:function(){return HASANTD},AntdDayjsWebpackPlugin:function(){return AntdDayjsWebpackPlugin},antdThemeVariables:function(){return antdThemeVariables}});var _fs=_interopRequireDefault(require("fs"));var _path=_interopRequireDefault(require("path"));var _common=require("./common");var _processEnv=require("./process-env");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var HASANTD=false;var AntdDayjsWebpackPlugin=null;var antdThemeVariables={};try{var antdPath=_path.default.join(_processEnv.PROGRAMPATH,"./node_modules/antd/package.json");_fs.default.accessSync(antdPath,_fs.default.constants.R_OK);HASANTD=true;Object.assign(antdThemeVariables,require("antd/dist/theme").getThemeVariables(_common.CONFIG.antdThemeVariables||{}));AntdDayjsWebpackPlugin=require("antd-dayjs-webpack-plugin")}catch(error){HASANTD=false}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
.@{ant-prefix}-layout,
|
|
2
|
-
.@{ant-prefix}-layout-footer {
|
|
3
|
-
background: none;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.@{ant-prefix}-layout-content {
|
|
7
|
-
position: relative;
|
|
8
|
-
height: 100%;
|
|
9
|
-
|
|
10
|
-
>div>div {
|
|
11
|
-
animation: route-in @transition-duration forwards;
|
|
12
|
-
|
|
13
|
-
>div:first-child:not(.@{ant-prefix}-table-wrapper) {
|
|
14
|
-
max-height: 100%;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.@{ant-prefix}-menu-inline-collapsed {
|
|
20
|
-
width: 50px !important;
|
|
21
|
-
.@{ant-prefix}-menu-item {
|
|
22
|
-
text-align: center;
|
|
23
|
-
.@{ant-prefix}-menu-title-content {
|
|
24
|
-
width: 0;
|
|
25
|
-
margin: 0;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.@{ant-prefix}-layout-sider-collapsed {
|
|
31
|
-
flex: 0 0 50px !important;
|
|
32
|
-
width: 50px !important;
|
|
33
|
-
min-width: 50px !important;
|
|
34
|
-
max-width: 50px !important;
|
|
35
|
-
|
|
36
|
-
.@{ant-prefix}-menu-item,
|
|
37
|
-
.@{ant-prefix}-menu-submenu-title {
|
|
38
|
-
padding: 0 12.5px !important;
|
|
39
|
-
|
|
40
|
-
.@{iconfont-css-prefix} {
|
|
41
|
-
line-height: normal !important;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.@{ant-prefix}-layout-sider {
|
|
47
|
-
overflow: auto;
|
|
48
|
-
border-radius: @border-radius-base !important;
|
|
49
|
-
|
|
50
|
-
&:not(.@{ant-prefix}-layout-sider-collapsed) {
|
|
51
|
-
flex: 0 0 200px !important;
|
|
52
|
-
width: 200px !important;
|
|
53
|
-
min-width: 200px !important;
|
|
54
|
-
max-width: 200px !important;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&::-webkit-scrollbar {
|
|
58
|
-
display: none;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.@{ant-prefix}-layout-sider-dark {
|
|
63
|
-
--sider-logo-bg: @menu-dark-bg;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/* stylelint-disable-next-line no-invalid-position-at-import-rule */
|
|
67
|
-
@import (optional, once) url('@/styles/antd.global.less');
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
@keyframes route-in {
|
|
2
|
-
from {
|
|
3
|
-
transform: translate3d(0, 1rem, 0);
|
|
4
|
-
opacity: 0;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
to {
|
|
8
|
-
transform: translate3d(0, 0, 0);
|
|
9
|
-
opacity: 1;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@keyframes route-out {
|
|
14
|
-
from {
|
|
15
|
-
transform: translate3d(0, 0, 0);
|
|
16
|
-
opacity: 1;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
to {
|
|
20
|
-
z-index: -1;
|
|
21
|
-
transform: translate3d(0, 1rem, 0);
|
|
22
|
-
opacity: 0;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@keyframes fade-in {
|
|
27
|
-
from {
|
|
28
|
-
opacity: 0;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
to {
|
|
32
|
-
opacity: 1;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@keyframes fade-out {
|
|
37
|
-
from {
|
|
38
|
-
opacity: 1;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
to {
|
|
42
|
-
opacity: 0;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@keyframes avatar-in {
|
|
47
|
-
0% {
|
|
48
|
-
transform: scale(30);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
20% {
|
|
52
|
-
transform: scale(30);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
100% {
|
|
56
|
-
transform: scale(1);
|
|
57
|
-
}
|
|
58
|
-
}
|