king
2022-01-21 46f79b491173d284a4900d19e7aecf7509481438
src/tabviews/treepage/index.jsx
@@ -2,7 +2,8 @@
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { notification, Spin, Tabs, Icon, Tree, Row, Col, Card, Input, Empty } from 'antd'
import { notification, Spin, Tabs, Tree, Row, Col, Card, Input, Empty } from 'antd'
import { FolderOpenOutlined, FolderOutlined, FileOutlined } from '@ant-design/icons'
import Api from '@/api'
import zhCN from '@/locales/zh-CN/main.js'
@@ -12,6 +13,7 @@
import MKEmitter from '@/utils/events.js'
import asyncComponent from '@/utils/asyncComponent'
import asyncSpinComponent from '@/utils/asyncSpinComponent'
import MkIcon from '@/components/mk-icon'
import NotFount from '@/components/404'
import './index.scss'
@@ -49,7 +51,8 @@
    revertLoading: false, // 恢复默认设置
    expandedKeys: [],     // 展开的树节点
    selectedKeys: [],     // 选中的树节点
    shortcuts: null       // 快捷键
    shortcuts: null,      // 快捷键
    searchKey: ''
  }
  /**
@@ -362,12 +365,12 @@
    return nodes.map(item => {
      if (item.children) {
        return (
          <TreeNode icon={<span><Icon type="folder-open" /><Icon type="folder" /></span>} title={item.title} key={item.key} dataRef={item}>
          <TreeNode icon={<span><FolderOpenOutlined /><FolderOutlined /></span>} title={item.title} key={item.key} dataRef={item}>
            {this.renderTreeNodes(item.children)}
          </TreeNode>
        )
      }
      return <TreeNode icon={<Icon type="file" />} key={item.key} title={item.title} dataRef={item} isLeaf />
      return <TreeNode icon={<FileOutlined />} key={item.key} title={item.title} dataRef={item} isLeaf />
    })
  }
@@ -468,7 +471,8 @@
      BIDs: {},
      shortcuts: null,
      expandedKeys: [],
      selectedKeys: []
      selectedKeys: [],
      searchKey: ''
    }, () => {
      this.loadconfig()
    })
@@ -609,7 +613,7 @@
                  return (
                    <TabPane tab={
                      <span id={_tab.uuid}>
                        {_tab.icon ? <Icon type={_tab.icon} /> : null}
                        {_tab.icon ? <MkIcon type={_tab.icon} /> : null}
                        {_tab.label}
                      </span>
                    } key={_tab.uuid}>