mirror of https://github.com/openspug/spug
U update
parent
ddd1cb8cc1
commit
465065ea1f
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { observer } from 'mobx-react';
|
import { observer } from 'mobx-react';
|
||||||
import { Input, Card, Tree, Dropdown, Menu, Switch, Tooltip, Modal } from 'antd';
|
import { Input, Card, Tree, Dropdown, Menu, Switch, Tooltip, Spin, Modal } from 'antd';
|
||||||
import {
|
import {
|
||||||
FolderOutlined,
|
FolderOutlined,
|
||||||
FolderAddOutlined,
|
FolderAddOutlined,
|
||||||
|
@ -158,7 +158,6 @@ export default observer(function () {
|
||||||
<Card
|
<Card
|
||||||
title="分组列表"
|
title="分组列表"
|
||||||
style={{height: '100%'}}
|
style={{height: '100%'}}
|
||||||
loading={store.grpFetching}
|
|
||||||
extra={(
|
extra={(
|
||||||
<AuthFragment auth="admin">
|
<AuthFragment auth="admin">
|
||||||
<Switch
|
<Switch
|
||||||
|
@ -170,25 +169,27 @@ export default observer(function () {
|
||||||
<QuestionCircleOutlined style={{marginLeft: 8, color: '#999'}}/>
|
<QuestionCircleOutlined style={{marginLeft: 8, color: '#999'}}/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</AuthFragment>)}>
|
</AuthFragment>)}>
|
||||||
<Dropdown
|
<Spin spinning={store.grpFetching}>
|
||||||
overlay={menus}
|
<Dropdown
|
||||||
visible={visible}
|
overlay={menus}
|
||||||
trigger={['contextMenu']}
|
visible={visible}
|
||||||
onVisibleChange={v => v || setVisible(v)}>
|
trigger={['contextMenu']}
|
||||||
<Tree.DirectoryTree
|
onVisibleChange={v => v || setVisible(v)}>
|
||||||
autoExpandParent
|
<Tree.DirectoryTree
|
||||||
expandAction="doubleClick"
|
autoExpandParent
|
||||||
draggable={draggable}
|
expandAction="doubleClick"
|
||||||
treeData={treeData}
|
draggable={draggable}
|
||||||
titleRender={treeRender}
|
treeData={treeData}
|
||||||
expandedKeys={expands}
|
titleRender={treeRender}
|
||||||
selectedKeys={[store.group.key]}
|
expandedKeys={expands}
|
||||||
onSelect={(_, {node}) => store.group = node}
|
selectedKeys={[store.group.key]}
|
||||||
onExpand={handleExpand}
|
onSelect={(_, {node}) => store.group = node}
|
||||||
onDrop={handleDrag}
|
onExpand={handleExpand}
|
||||||
onRightClick={handleRightClick}
|
onDrop={handleDrag}
|
||||||
/>
|
onRightClick={handleRightClick}
|
||||||
</Dropdown>
|
/>
|
||||||
|
</Dropdown>
|
||||||
|
</Spin>
|
||||||
{treeData.length === 1 && treeData[0].children.length === 0 && (
|
{treeData.length === 1 && treeData[0].children.length === 0 && (
|
||||||
<div style={{color: '#999', marginTop: 20, textAlign: 'center'}}>右键点击分组进行分组管理哦~</div>
|
<div style={{color: '#999', marginTop: 20, textAlign: 'center'}}>右键点击分组进行分组管理哦~</div>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in New Issue