From 690b84584abfcc40fb4c0f10dfa447e3623f11f6 Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 23 Dec 2020 10:35:09 +0800 Subject: [PATCH] upgrade antd 4.9.4 --- spug_api/apps/host/group.py | 7 +++++-- spug_web/package.json | 2 +- spug_web/src/pages/host/Group.js | 2 -- spug_web/src/pages/host/Selector.js | 2 -- spug_web/src/pages/host/index.module.css | 4 ---- 5 files changed, 6 insertions(+), 11 deletions(-) delete mode 100644 spug_web/src/pages/host/index.module.css diff --git a/spug_api/apps/host/group.py b/spug_api/apps/host/group.py index de23da6..a5fee4c 100644 --- a/spug_api/apps/host/group.py +++ b/spug_api/apps/host/group.py @@ -68,8 +68,11 @@ class GroupView(View): dst = Group.objects.get(pk=form.d_id) if form.action == 0: src.parent_id = dst.id - src.save() - return json_response() + dst = Group.objects.filter(parent_id=dst.id).first() + if not dst: + src.save() + return json_response() + form.action = -1 src.parent_id = dst.parent_id if src.sort_id > dst.sort_id: if form.action == -1: diff --git a/spug_web/package.json b/spug_web/package.json index e8ee1c0..e35a019 100644 --- a/spug_web/package.json +++ b/spug_web/package.json @@ -5,7 +5,7 @@ "dependencies": { "@ant-design/icons": "^4.3.0", "ace-builds": "^1.4.7", - "antd": "^4.8.5", + "antd": "^4.9.4", "axios": "^0.21.0", "bizcharts": "^3.5.9", "history": "^4.10.1", diff --git a/spug_web/src/pages/host/Group.js b/spug_web/src/pages/host/Group.js index b29ddbf..3c6b5d2 100644 --- a/spug_web/src/pages/host/Group.js +++ b/spug_web/src/pages/host/Group.js @@ -15,7 +15,6 @@ import { ScissorOutlined } from '@ant-design/icons'; import { LoadingOutlined } from '@ant-design/icons'; -import styles from './index.module.css'; import { http } from 'libs'; import store from './store'; import lds from 'lodash'; @@ -141,7 +140,6 @@ export default observer(function () { trigger={['contextMenu']} onVisibleChange={v => v || setVisible(v)}> setGroup(node)} diff --git a/spug_web/src/pages/host/index.module.css b/spug_web/src/pages/host/index.module.css deleted file mode 100644 index 86f1290..0000000 --- a/spug_web/src/pages/host/index.module.css +++ /dev/null @@ -1,4 +0,0 @@ -.dragBox :global(.ant-tree-node-content-wrapper) { - border-top: 2px transparent solid; - border-bottom: 2px transparent solid; -} \ No newline at end of file