Skip to content

Commit

Permalink
antd 属性升级
Browse files Browse the repository at this point in the history
  • Loading branch information
xg15472 committed Oct 21, 2024
1 parent bda975e commit 6a92850
Show file tree
Hide file tree
Showing 28 changed files with 66 additions and 78 deletions.
4 changes: 2 additions & 2 deletions hyperse-antd.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"path": "packages/pro-layout",
},
{
"name": "demo",
"path": "packages/antd-demo",
"name": "demo-antd",
"path": "packages/demo-antd",
},
],
"extensions": {
Expand Down
12 changes: 3 additions & 9 deletions packages/antd/flatjs-forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,9 @@ export default defineConfig({
return `@ant-design/icons/es/icons/${transformedMethodName}.js`;
},
},
{
libraryName: '@dimjs/utils',
},
{
libraryName: '@dimjs/lang',
},
{
libraryName: '@wove/react',
},
{ libraryName: '@dimjs/utils' },
{ libraryName: '@dimjs/lang' },
{ libraryName: '@wove/react' },
],
plugin: {
extraPlugins: [stylingPlugin],
Expand Down
2 changes: 1 addition & 1 deletion packages/antd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@
"@hyperse/utils": ">=1.0.0",
"@wove/react": ">=2.0.2",
"ahooks": ">=3.7.11",
"antd": ">=5.11.0",
"antd": ">=5.21.4",
"dayjs": ">=1.11.9",
"react": ">=18.2.0",
"react-dom": ">=18.2.0"
Expand Down
10 changes: 4 additions & 6 deletions packages/antd/src/dialog-drawer/dialog-drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,18 +187,16 @@ const ModalRender = (props: BodyAppendDivElementProps & DialogDrawerProps) => {
maskClosable={true}
destroyOnClose
onClose={onClose}
// 5.13.0 新增 styles.wrapper,并废弃 contentWrapperStyle drawerStyle maskStyle 属性
contentWrapperStyle={{ maxWidth: customSize?.maxWidth }}
footer={operatePosition === 'footer' ? newOperateRender : null}
{...otherProps}
width={customSize?.width}
styles={{
...otherProps.styles,
body: { ...innerBodyStyle, ...otherProps.styles?.body },
// wrapper: {
// maxWidth: customSize?.maxWidth,
// ...otherProps.styles?.wrapper,
// },
wrapper: {
maxWidth: customSize?.maxWidth,
...otherProps.styles?.wrapper,
},
}}
extra={operatePosition === 'header' ? newOperateRender : extraRender}
open={open}
Expand Down
10 changes: 4 additions & 6 deletions packages/antd/src/fba-app/dialog-drawer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,15 @@ export const FbaAppDrawer = (props: FbaAppDrawerProps) => {
<Drawer
maskClosable={true}
destroyOnClose
// 5.13.0 新增 styles.wrapper,并废弃 contentWrapperStyle drawerStyle maskStyle 属性
contentWrapperStyle={{ maxWidth: customSize?.maxWidth }}
footer={operatePosition === 'footer' ? newOperateRender : null}
{...otherProps}
width={customSize?.width}
styles={{
...otherProps.styles,
// wrapper: {
// maxWidth: customSize?.maxWidth,
// ...otherProps.styles?.wrapper,
// },
wrapper: {
maxWidth: customSize?.maxWidth,
...otherProps.styles?.wrapper,
},
}}
className={classNames('app-dialog-drawer', otherProps.className)}
extra={operatePosition === 'header' ? newOperateRender : extraRender}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ const getHeadBeforeScripts = (serveMode: boolean) => {
? [
'https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.development.js',
'https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.development.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/antd/5.20.5/antd.js',
'https://cdnjs.cloudflare.com/ajax/libs/antd/5.21.4/antd.js',
]
: [
'https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.development.js',
'https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/antd/5.20.5/antd.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/antd/5.21.4/antd.min.js',
]),
];
};
Expand Down Expand Up @@ -89,9 +89,9 @@ export default defineConfig((env) => ({
{
libraryName: '@dimjs/utils',
},
{
libraryName: '@hyperse/antd',
},
// {
// libraryName: '@hyperse/antd',
// },
],
},
multiHtmlCdn: {
Expand All @@ -112,7 +112,7 @@ export default defineConfig((env) => ({
},
entryMap: getEntryMap(env.command === 'serve', [
{
name: 'utils',
name: 'home',
options: {
title: '',
},
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@hyperse/antd-demo",
"name": "@hyperse/demo-antd",
"version": "1.0.0",
"private": true,
"type": "module",
Expand All @@ -24,7 +24,8 @@
"test-task": "vitest run",
"test-unit": "vitest run --passWithNoTests",
"test-watch": "vitest watch --ui",
"typecheck": "tsc --project ./tsconfig.json --noEmit"
"typecheck": "tsc --project ./tsconfig.json --noEmit",
"serve": "npx flat serve evolve"
},
"dependencies": {
"@dimjs/lang": "^2.0.0",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"incremental": true,
"module": "ESNext",
"target": "ESNext",
"moduleResolution": "node"
"moduleResolution": "node",
"paths": {
"@hyperse/antd": ["../antd/src/index.ts"]
}
},
"exclude": ["node_modules", "**/.*/", "dist", "build", "public"]
}
File renamed without changes.
21 changes: 11 additions & 10 deletions packages/pro-layout/flatjs-forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,18 @@ export default defineConfig({
},
modularImports: [
{
libraryName: '@dimjs/utils',
},
{
libraryName: '@dimjs/lang',
},
{
libraryName: '@wove/react',
},
{
libraryName: '@hyperse/antd',
libraryName: '@ant-design/icons',
libraryDirectory: 'es/icons',
transformToDefaultImport: true,
camel2DashComponentName: false, // default: true
customName(transformedMethodName) {
return `@ant-design/icons/es/icons/${transformedMethodName}.js`;
},
},
{ libraryName: '@dimjs/utils' },
{ libraryName: '@dimjs/lang' },
{ libraryName: '@wove/react' },
{ libraryName: '@hyperse/antd' },
],
plugin: {
extraPlugins: [stylingPlugin],
Expand Down
2 changes: 1 addition & 1 deletion packages/pro-layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@hyperse/utils": ">=1.0.0",
"@wove/react": ">=2.0.2",
"ahooks": ">=3.7.11",
"antd": ">=5.11.0",
"antd": ">=5.21.4",
"dayjs": ">=1.11.9",
"react": ">=18.2.0",
"react-dom": ">=18.2.0",
Expand Down
11 changes: 2 additions & 9 deletions packages/utils/flatjs-forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,8 @@ export default defineConfig({
dtsFile.split('/').length <= 1 && /index.d.ts/.test(dtsFile),
},
modularImports: [
{
libraryName: '@dimjs/utils',
},
{
libraryName: '@dimjs/lang',
},
{
libraryName: '@wove/react',
},
{ libraryName: '@dimjs/utils' },
{ libraryName: '@dimjs/lang' },
],
output: {
format: 'esm',
Expand Down
50 changes: 25 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3320,31 +3320,6 @@ __metadata:
languageName: node
linkType: hard

"@hyperse/antd-demo@workspace:packages/antd-demo":
version: 0.0.0-use.local
resolution: "@hyperse/antd-demo@workspace:packages/antd-demo"
dependencies:
"@dimjs/lang": "npm:^2.0.0"
"@dimjs/model": "npm:^2.0.1"
"@dimjs/model-react": "npm:^2.0.1"
"@dimjs/utils": "npm:^2.0.2"
"@flatjs/cli": "npm:2.1.9"
"@hyperse/antd": "workspace:*"
"@hyperse/eslint-config-hyperse": "npm:^1.1.3"
"@hyperse/utils": "workspace:*"
"@types/react": "npm:^18.3.11"
"@types/react-dom": "npm:^18.3.1"
"@wove/react": "npm:^2.0.2"
antd: "npm:^5.21.4"
eslint: "npm:^9.13.0"
react: "npm:^18.3.1"
react-dom: "npm:^18.3.1"
typescript: "npm:5.6.3"
vite-tsconfig-paths: "npm:5.0.1"
vitest: "npm:2.1.3"
languageName: unknown
linkType: soft

"@hyperse/antd-monorepo@workspace:.":
version: 0.0.0-use.local
resolution: "@hyperse/antd-monorepo@workspace:."
Expand Down Expand Up @@ -3435,6 +3410,31 @@ __metadata:
languageName: node
linkType: hard

"@hyperse/demo-antd@workspace:packages/demo-antd":
version: 0.0.0-use.local
resolution: "@hyperse/demo-antd@workspace:packages/demo-antd"
dependencies:
"@dimjs/lang": "npm:^2.0.0"
"@dimjs/model": "npm:^2.0.1"
"@dimjs/model-react": "npm:^2.0.1"
"@dimjs/utils": "npm:^2.0.2"
"@flatjs/cli": "npm:2.1.9"
"@hyperse/antd": "workspace:*"
"@hyperse/eslint-config-hyperse": "npm:^1.1.3"
"@hyperse/utils": "workspace:*"
"@types/react": "npm:^18.3.11"
"@types/react-dom": "npm:^18.3.1"
"@wove/react": "npm:^2.0.2"
antd: "npm:^5.21.4"
eslint: "npm:^9.13.0"
react: "npm:^18.3.1"
react-dom: "npm:^18.3.1"
typescript: "npm:5.6.3"
vite-tsconfig-paths: "npm:5.0.1"
vitest: "npm:2.1.3"
languageName: unknown
linkType: soft

"@hyperse/eslint-config-hyperse@npm:^1.1.3":
version: 1.1.3
resolution: "@hyperse/eslint-config-hyperse@npm:1.1.3"
Expand Down

0 comments on commit 6a92850

Please sign in to comment.