This commit is contained in:
chenos 2021-08-20 22:50:12 +08:00
parent 2e8fe58246
commit c3abf10746
4 changed files with 109 additions and 104 deletions

View File

@ -21,9 +21,9 @@
"@antv/g2plot": "^2.3.27",
"@dnd-kit/core": "^3.1.1",
"@dnd-kit/sortable": "^4.0.0",
"@formily/antd": "^2.0.0-rc.2",
"@formily/core": "^2.0.0-rc.2",
"@formily/react": "^2.0.0-rc.2",
"@formily/antd": "^2.0.0-rc.3",
"@formily/core": "^2.0.0-rc.3",
"@formily/react": "^2.0.0-rc.3",
"@monaco-editor/react": "^4.2.1",
"ahooks": "^2.10.2",
"axios": "^0.21.1",

View File

@ -238,49 +238,54 @@ Action.Drawer = observer((props: any) => {
const isFormDecorator = schema['x-decorator'] === 'Form';
console.log('Action.Modal.field', schema['x-read-pretty']);
return (
<Drawer
width={'50%'}
title={schema.title}
maskClosable
destroyOnClose
footer={
isFormDecorator &&
!schema['x-read-pretty'] && (
<Space style={{ float: 'right' }}>
<Button
onClick={async (e) => {
form.clearErrors();
props.onClose && (await props.onClose(e));
runCancel && (await runCancel());
setVisible(false);
}}
>
Cancel
</Button>
<Button
onClick={async (e) => {
await form.submit();
props.onOk && (await props.onOk(e));
runOk && (await runOk());
setVisible(false);
}}
type={'primary'}
>
OK
</Button>
</Space>
)
}
{...others}
visible={visible}
onClose={async (e) => {
props.onClose && (await props.onClose(e));
runCancel && (await runCancel());
setVisible(false);
}}
>
<FormLayout layout={'vertical'}>{props.children}</FormLayout>
</Drawer>
<>
{createPortal(
<Drawer
width={'50%'}
title={schema.title}
maskClosable
destroyOnClose
footer={
isFormDecorator &&
!schema['x-read-pretty'] && (
<Space style={{ float: 'right' }}>
<Button
onClick={async (e) => {
form.clearErrors();
props.onClose && (await props.onClose(e));
runCancel && (await runCancel());
setVisible(false);
}}
>
Cancel
</Button>
<Button
onClick={async (e) => {
await form.submit();
props.onOk && (await props.onOk(e));
runOk && (await runOk());
setVisible(false);
}}
type={'primary'}
>
OK
</Button>
</Space>
)
}
{...others}
visible={visible}
onClose={async (e) => {
props.onClose && (await props.onClose(e));
runCancel && (await runCancel());
setVisible(false);
}}
>
<FormLayout layout={'vertical'}>{props.children}</FormLayout>
</Drawer>,
document.body,
)}
</>
);
});

View File

@ -225,7 +225,7 @@ const InternalKanban = observer((props: any) => {
}}
>
<DragOverlay
// style={{ pointerEvents: 'none' }}
style={{ pointerEvents: 'none' }}
>
<div
className={'nb-kanban-drag-overlay'}

114
yarn.lock
View File

@ -1915,78 +1915,78 @@
resolved "https://registry.npmjs.org/@formatjs/intl-utils/-/intl-utils-2.3.0.tgz#2dc8c57044de0340eb53a7ba602e59abf80dc799"
integrity sha512-KWk80UPIzPmUg+P0rKh6TqspRw0G6eux1PuJr+zz47ftMaZ9QDwbGzHZbtzWkl5hgayM/qrKRutllRC7D/vVXQ==
"@formily/antd@^2.0.0-rc.2":
version "2.0.0-rc.2"
resolved "https://registry.npmjs.org/@formily/antd/-/antd-2.0.0-rc.2.tgz#81dd3ced30f42ce121e89cebb6ecbdc529ad6c3f"
integrity sha512-IJxGOyIPICZgEemQxKCc1p/5VESeCrTaTTC6AGaFkFShxFvlOx8XwXq7/BAgIuFstwV6vkbnXO656G/3SZXByg==
"@formily/antd@^2.0.0-rc.3":
version "2.0.0-rc.3"
resolved "https://registry.npmjs.org/@formily/antd/-/antd-2.0.0-rc.3.tgz#714e3cca4dee78799ff3b51f9d9fca143ed52513"
integrity sha512-uHq+Z1YWzBQgk5zYRhUcRL6UUfLLveSwRptDxUjw/TRS760WIfzs52m/763TZqKpmMmDb83lFoailEoKwalVtg==
dependencies:
"@ant-design/icons" "^4.0.0"
"@formily/core" "2.0.0-rc.2"
"@formily/json-schema" "2.0.0-rc.2"
"@formily/react" "2.0.0-rc.2"
"@formily/reactive" "2.0.0-rc.2"
"@formily/reactive-react" "2.0.0-rc.2"
"@formily/shared" "2.0.0-rc.2"
"@formily/core" "2.0.0-rc.3"
"@formily/json-schema" "2.0.0-rc.3"
"@formily/react" "2.0.0-rc.3"
"@formily/reactive" "2.0.0-rc.3"
"@formily/reactive-react" "2.0.0-rc.3"
"@formily/shared" "2.0.0-rc.3"
"@juggle/resize-observer" "^3.3.1"
classnames "^2.2.6"
react-sortable-hoc "^1.11.0"
react-sticky-box "^0.9.3"
"@formily/core@2.0.0-rc.2", "@formily/core@^2.0.0-rc.2":
version "2.0.0-rc.2"
resolved "https://registry.npmjs.org/@formily/core/-/core-2.0.0-rc.2.tgz#715cae845d638d6a327a3f33953b3be5adaf9144"
integrity sha512-uYC390qbs7K39s3Ekb0+pooYnxkCoSWD3Up+PstanMESnW8fzFnij0sJgGUbPYgiK44MpTARf8TvIsVmEn907w==
"@formily/core@2.0.0-rc.3", "@formily/core@^2.0.0-rc.3":
version "2.0.0-rc.3"
resolved "https://registry.npmjs.org/@formily/core/-/core-2.0.0-rc.3.tgz#aeb085c88f24527fec9b14efe162a77b0a9a4741"
integrity sha512-DZvrCbQqpg8A0V0asVFYWbmdiqmDLq52OZmImr/1Vh3fa6wLExenoMfd1Koz1NXHdtMsLDlqOLnneS8e8+xKgw==
dependencies:
"@formily/reactive" "2.0.0-rc.2"
"@formily/shared" "2.0.0-rc.2"
"@formily/validator" "2.0.0-rc.2"
"@formily/reactive" "2.0.0-rc.3"
"@formily/shared" "2.0.0-rc.3"
"@formily/validator" "2.0.0-rc.3"
"@formily/json-schema@2.0.0-rc.2":
version "2.0.0-rc.2"
resolved "https://registry.npmjs.org/@formily/json-schema/-/json-schema-2.0.0-rc.2.tgz#41285e44cead0670a8d0c36471ecb0d4f8aeaf28"
integrity sha512-JL7Mca+9meeaN0xuJufvDKjPgKETseDyIRv4oGuxYJvA1SadvTjQy8N1W68bo1F8HnptXlNbGKYQ61l7CQU+lA==
"@formily/json-schema@2.0.0-rc.3":
version "2.0.0-rc.3"
resolved "https://registry.npmjs.org/@formily/json-schema/-/json-schema-2.0.0-rc.3.tgz#86cb03910e135e198decd41c8e7ecd38923bf8d1"
integrity sha512-l9XtoX2Y8LOWzKoz26Q1E2mbGdPsQXikhCpKdoQ8/wQxEPDd4xzKXVq1+JTepW+N6Qk0I+mP1K26I5vhx9pqCw==
dependencies:
"@formily/core" "2.0.0-rc.2"
"@formily/reactive" "2.0.0-rc.2"
"@formily/shared" "2.0.0-rc.2"
"@formily/core" "2.0.0-rc.3"
"@formily/reactive" "2.0.0-rc.3"
"@formily/shared" "2.0.0-rc.3"
"@formily/path@2.0.0-rc.2":
version "2.0.0-rc.2"
resolved "https://registry.npmjs.org/@formily/path/-/path-2.0.0-rc.2.tgz#04d19acfdd43878e1f9f037f93e24dc6d67939c9"
integrity sha512-vdLEy1vkiQvLT17ABJNMqPdUm/igTxiUZOYr/jrxJB6FHTZ5yrxxib49qSWDTiiFuuwYNp4xIt/F4CcSMlLAMQ==
"@formily/path@2.0.0-rc.3":
version "2.0.0-rc.3"
resolved "https://registry.npmjs.org/@formily/path/-/path-2.0.0-rc.3.tgz#10023fe2776d9f2b22ddce1019b5d931f4a517a5"
integrity sha512-Q2QgJQH7VOJ/T3dx1GjnA1KCQfutatDcJ7yH7XIJY4XQILnoI5HnNM4b0kJfYH+0LppUsRJrZAhEMO4bH2PUUQ==
"@formily/react@2.0.0-rc.2", "@formily/react@^2.0.0-rc.2":
version "2.0.0-rc.2"
resolved "https://registry.npmjs.org/@formily/react/-/react-2.0.0-rc.2.tgz#d0c53ea2583a573a6a0e72ef2ab806062f726f49"
integrity sha512-gsDWRPxEFkzpgeq4zi4BDS6baKk90cnMKbOJyvwE0QfUp6Lk0wP1aOq9bNLtzkIYbYQYPNP1aAE/3UwLrCZT1w==
"@formily/react@2.0.0-rc.3", "@formily/react@^2.0.0-rc.3":
version "2.0.0-rc.3"
resolved "https://registry.npmjs.org/@formily/react/-/react-2.0.0-rc.3.tgz#7ba70b8045b096b4117e2664948b695747e5545c"
integrity sha512-nPiYAOymAtS6ZRN+/uT6c6M729x3c4keRF4johXpBL3gj9Qy3RtGAy41e9Ey/oGHfJjYXCjeLBxtedEyH/3YhA==
dependencies:
"@formily/core" "2.0.0-rc.2"
"@formily/json-schema" "2.0.0-rc.2"
"@formily/reactive" "2.0.0-rc.2"
"@formily/reactive-react" "2.0.0-rc.2"
"@formily/shared" "2.0.0-rc.2"
"@formily/validator" "2.0.0-rc.2"
"@formily/core" "2.0.0-rc.3"
"@formily/json-schema" "2.0.0-rc.3"
"@formily/reactive" "2.0.0-rc.3"
"@formily/reactive-react" "2.0.0-rc.3"
"@formily/shared" "2.0.0-rc.3"
"@formily/validator" "2.0.0-rc.3"
hoist-non-react-statics "^3.3.2"
"@formily/reactive-react@2.0.0-rc.2":
version "2.0.0-rc.2"
resolved "https://registry.npmjs.org/@formily/reactive-react/-/reactive-react-2.0.0-rc.2.tgz#860a788673452887ef5225c195116367bbccdc79"
integrity sha512-EKC/SbSpjagxMQYoV1Lc10yn6k0JXzWJNEpe8r05ayCzJzvg+t8H3jGKJmDrKUp186jT7iEhLb1O6JcySGkJRw==
"@formily/reactive-react@2.0.0-rc.3":
version "2.0.0-rc.3"
resolved "https://registry.npmjs.org/@formily/reactive-react/-/reactive-react-2.0.0-rc.3.tgz#ed2e16e85998867b57e6957aee758154d819d2f3"
integrity sha512-h1rkVFtlXnz4f9JE7550K37DJe/l1OHsiPpqIx4eEROSZedoAmsyp/vysDEU2L6CSYmvcLXrqAD4feWh6/r23g==
dependencies:
"@formily/reactive" "2.0.0-rc.2"
"@formily/reactive" "2.0.0-rc.3"
hoist-non-react-statics "^3.3.2"
"@formily/reactive@2.0.0-rc.2":
version "2.0.0-rc.2"
resolved "https://registry.npmjs.org/@formily/reactive/-/reactive-2.0.0-rc.2.tgz#e94d433a69e6e84c92a9edd8acb19217796e2687"
integrity sha512-363eZWAfhGqNQWDIWXxiQT8nWpDvkpUBg+djkUVAvFE7TKmbSpSUpj7rTo60dDNLVdWN59/VfVIlBy8jN45cXA==
"@formily/reactive@2.0.0-rc.3":
version "2.0.0-rc.3"
resolved "https://registry.npmjs.org/@formily/reactive/-/reactive-2.0.0-rc.3.tgz#2c3a4f034c3e733c75e0e8a9041379be475e74fa"
integrity sha512-m9KOsYkf03efV2D4uGuWQlfSXn8LmuS1B2D56GCu351/CVkiYgaKCm9/3lTOy+Ff0eEg5awdpT5ATOnnQpGa7g==
"@formily/shared@2.0.0-rc.2":
version "2.0.0-rc.2"
resolved "https://registry.npmjs.org/@formily/shared/-/shared-2.0.0-rc.2.tgz#5e8797d62e3f85bf6c8d84e5533894d30359bfcb"
integrity sha512-2FF5KxsqZWUdsbq1qiq7iWOb2k9s3k563WOsZhYdOpjYJ0KcyP97hlYm4g7q5cjVeocXLtQjWCgHlDadZ1QihQ==
"@formily/shared@2.0.0-rc.3":
version "2.0.0-rc.3"
resolved "https://registry.npmjs.org/@formily/shared/-/shared-2.0.0-rc.3.tgz#8bd430c1d35561397a0686ebb043ae97a0626561"
integrity sha512-r0MbLytj//Db2nGNsOi2dyaX1x25EJpPZm1xNevZqGhBj+j+X9YcIl1FbpB6j1nEN6DA3z599AM0V0wu4hpDcA==
dependencies:
"@formily/path" "2.0.0-rc.2"
"@formily/path" "2.0.0-rc.3"
camel-case "^4.1.1"
lower-case "^2.0.1"
no-case "^3.0.4"
@ -1994,12 +1994,12 @@
pascal-case "^3.1.1"
upper-case "^2.0.1"
"@formily/validator@2.0.0-rc.2":
version "2.0.0-rc.2"
resolved "https://registry.npmjs.org/@formily/validator/-/validator-2.0.0-rc.2.tgz#c99b66a047c71bfcabc55b5bb3cfaddfb490ac3c"
integrity sha512-r4VmLvQuYKdra6nsl2rC9Ac5clw8isE3ipcqR2rRiWbDZRV8b5WpSZn5faP5DAs/Sq4e4gX1l7ffoWOAf/S6Fw==
"@formily/validator@2.0.0-rc.3":
version "2.0.0-rc.3"
resolved "https://registry.npmjs.org/@formily/validator/-/validator-2.0.0-rc.3.tgz#74a6b093ede5275d93b6e38435c5a7874c34a509"
integrity sha512-pk7fN/P2U38C56YYx6JIcWssAlgxeYoU1rSLFKiV4bawJyoeypVkk6SNmRrruYsFkiZuALvQ2BPtaPpLm7YLIQ==
dependencies:
"@formily/shared" "2.0.0-rc.2"
"@formily/shared" "2.0.0-rc.3"
"@gulp-sourcemaps/identity-map@1.X":
version "1.0.2"