Commit ad539337 authored by Maofei94's avatar Maofei94

fix: fix

parent 2a737a80
import React, { useState, useEffect } from 'react';
import { Spin, Button } from 'antd';
import { Spin, Button, Empty } from 'antd';
import _ from 'lodash';
import ListCardItem from './ItemCard';
import styles from './ItemCard.less';
......@@ -64,8 +64,7 @@ const ListCard = props => {
/>
) : (
<>
{dataList &&
dataList.length > 0 &&
{dataList && dataList.length > 0 ? (
dataList
.filter(d => d.type === 'widgetGroup')
.map((item, index) => (
......@@ -78,10 +77,13 @@ const ListCard = props => {
searchWord={searchWord}
{...props}
/>
))}
))
) : (
<Empty />
)}
</>
)}
{true && !loading && dataList && (
{true && !loading && dataList && dataList.length > 0 && (
<div className={styles.btnBox}>
<Button
type="primary"
......
......@@ -48,7 +48,7 @@ const SiteManage = () => {
const [currentSelectId, setCurrentSelectId] = useState([]); // 选中的树节点
const [saveCurId, setSaveCurId] = useState([]); // 树节点ID
const [groupVisible, setGroupVisible] = useState(false); // 分组编辑弹窗
const [hasData, setHasData] = useState(false);
const [valueList, setValueList] = useState([]);
const [dataList, setdataList] = useState([]);
const [loading, setLoading] = useState(true);
......@@ -413,6 +413,7 @@ const SiteManage = () => {
searchWord={searchWord}
onCommit={handleCommit}
btnLoading={btnLoading}
hasData={hasData}
/>
)}
</Card>
......
.cardBox{
min-height: calc(100vh - 80px);
// max-height: calc(100vh - 200px);
// overflow-y: scroll;
max-height: calc(100vh - 80px);
overflow-y: scroll;
}
.ant-tree-node-content-wrapper-open{
display: flex;
......
.cardBox{
height: calc(100vh - 80px);
min-height: calc(100vh - 80px);
max-height: calc(100vh - 80px);
overflow: auto;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment