Skip to content

Commit

Permalink
feat: rm Sortablejs, add @dnd-kit/*
Browse files Browse the repository at this point in the history
  • Loading branch information
magicdawn committed Nov 8, 2023
1 parent 21c900c commit 37d6ef1
Show file tree
Hide file tree
Showing 10 changed files with 281 additions and 186 deletions.
5 changes: 4 additions & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
},
"dependencies": {
"@ant-design/icons": "^5.2.6",
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/modifiers": "^7.0.0",
"@dnd-kit/sortable": "^8.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@icon-park/react": "^1.4.2",
"ahooks": "^3.7.8",
"antd": "^5.11.0",
Expand Down Expand Up @@ -40,7 +44,6 @@
"react-dom": "^18.2.0",
"react-monaco-editor": "^0.54.0",
"react-router-dom": "^6.18.0",
"react-sortablejs": "^6.1.4",
"react-spinkit": "^3.0.0",
"react-spinners": "^0.13.8",
"reuse-promise": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/common/dnd.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '@dnd-kit/modifiers'
4 changes: 2 additions & 2 deletions packages/ui/src/page/common/global/loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Loading({ visible }: { visible: boolean }) {
footer={null}
centered
closable={false}
bodyStyle={{ padding: 0, backgroundColor: 'transparent' }}
styles={{ body: { padding: 0, backgroundColor: 'transparent' } }}
>
<PacmanLoader color={color} size={100} />
</Modal>
Expand All @@ -51,7 +51,7 @@ const hide = wrapAction(() => {
proxyProps.visible = false
})

export { WrappedComponent, show, hide }
export { WrappedComponent, hide, show }
export default { WrappedComponent, show, hide }

// setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/page/library-rule-list/AddRuleModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default function AddRuleModal(props: IProps) {
maskClosable={false}
title='添加规则'
width={'95vw'}
bodyStyle={{ padding: '24px 12px' }}
styles={{ body: { padding: '24px 12px' } }}
okButtonProps={okButtonProps}
destroyOnClose
okText={mode === 'from-global' ? '添加并重新生成' : '确定'}
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/page/library-rule-list/index.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

margin: 15px 15px;
border-radius: 10px;
border: 1px solid #ccc;
border: 1px solid #ede;
padding: 10px 10px;

.list-item-info {
Expand Down
Loading

0 comments on commit 37d6ef1

Please sign in to comment.