Commit 9ff070a9 authored by 涂茜's avatar 涂茜

fix: update empty

parent 0f81f1f4
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# 1.4.0 (2021-04-09) # 1.4.0 (2021-04-09)
### Bug Fixes ### Bug Fixes
* update table ([dcf8ae6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/dcf8ae65818c903c9bf08080b26250c79b26c4b7)) - update table ([dcf8ae6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/dcf8ae65818c903c9bf08080b26250c79b26c4b7))
### Features ### Features
* 新增标准表格组件 ([f0b0666](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/f0b0666a246761fd3debe0f3d8a3b3ca4df5a568)) - 新增标准表格组件 ([f0b0666](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/f0b0666a246761fd3debe0f3d8a3b3ca4df5a568))
# 1.3.0 (2021-04-09) # 1.3.0 (2021-04-09)
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.2.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basictools@1.2.2...@wisdom-components/basictools@1.2.6) (2021-04-09) ## [1.2.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basictools@1.2.2...@wisdom-components/basictools@1.2.6) (2021-04-09)
**Note:** Version bump only for package @wisdom-components/basictools **Note:** Version bump only for package @wisdom-components/basictools
## [1.2.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basictools@1.2.2...@wisdom-components/basictools@1.2.5) (2021-04-09) ## [1.2.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basictools@1.2.2...@wisdom-components/basictools@1.2.5) (2021-04-09)
**Note:** Version bump only for package @wisdom-components/basictools **Note:** Version bump only for package @wisdom-components/basictools
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.3.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/devicetree@1.3.2...@wisdom-components/devicetree@1.3.6) (2021-04-09) ## [1.3.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/devicetree@1.3.2...@wisdom-components/devicetree@1.3.6) (2021-04-09)
### Bug Fixes ### Bug Fixes
* 解决冲突 ([c19528b](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/c19528b108b9bf2268d7a765ffe04585e6ccedf7)) - 解决冲突 ([c19528b](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/c19528b108b9bf2268d7a765ffe04585e6ccedf7))
* update empty ([0fb8d9f](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/0fb8d9f60f47e216f45dd0d0d034b8931f05bbd3)) - update empty ([0fb8d9f](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/0fb8d9f60f47e216f45dd0d0d034b8931f05bbd3))
## [1.3.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/devicetree@1.3.2...@wisdom-components/devicetree@1.3.5) (2021-04-09) ## [1.3.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/devicetree@1.3.2...@wisdom-components/devicetree@1.3.5) (2021-04-09)
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.3.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/empty@1.3.2...@wisdom-components/empty@1.3.6) (2021-04-09) ## [1.3.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/empty@1.3.2...@wisdom-components/empty@1.3.6) (2021-04-09)
### Bug Fixes ### Bug Fixes
* 解决冲突 ([c19528b](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/c19528b108b9bf2268d7a765ffe04585e6ccedf7)) - 解决冲突 ([c19528b](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/c19528b108b9bf2268d7a765ffe04585e6ccedf7))
* update empty ([0fb8d9f](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/0fb8d9f60f47e216f45dd0d0d034b8931f05bbd3)) - update empty ([0fb8d9f](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/0fb8d9f60f47e216f45dd0d0d034b8931f05bbd3))
* update empty ([195dc64](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/195dc64e73585e3205f28784e1cd53e61feca9b0)) - update empty ([195dc64](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/195dc64e73585e3205f28784e1cd53e61feca9b0))
## [1.3.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/empty@1.3.2...@wisdom-components/empty@1.3.5) (2021-04-09) ## [1.3.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/empty@1.3.2...@wisdom-components/empty@1.3.5) (2021-04-09)
......
...@@ -2,9 +2,8 @@ import React, { useContext } from 'react'; ...@@ -2,9 +2,8 @@ import React, { useContext } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import classNames from 'classnames'; import classNames from 'classnames';
import { ConfigProvider } from 'antd'; import { ConfigProvider } from 'antd';
import Icon from '@ant-design/icons'; import noDataLight from './assets/noDataLight.png';
import { ReactComponent as noDataLight } from './assets/noDataLight.svg'; import noDataDark from './assets/noDataDark.png';
import { ReactComponent as noDataDark } from './assets/noDataDark.svg';
import errorLight from './assets/errorLight.png'; import errorLight from './assets/errorLight.png';
import errorDark from './assets/errorDark.png'; import errorDark from './assets/errorDark.png';
...@@ -13,6 +12,7 @@ import './index.less'; ...@@ -13,6 +12,7 @@ import './index.less';
const Empty = ({ description, image, theme, size, statusCode, imageStyle, children }) => { const Empty = ({ description, image, theme, size, statusCode, imageStyle, children }) => {
const alt = description ? description : 'empty'; const alt = description ? description : 'empty';
const des = description ? description : DESC_DATA[`${statusCode}`]; const des = description ? description : DESC_DATA[`${statusCode}`];
const imageSrc = image ? image : IMAGE_DATA[theme][statusCode == '0' ? 0 : 1];
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext); const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = getPrefixCls('panda-empty'); const prefixCls = getPrefixCls('panda-empty');
...@@ -20,12 +20,7 @@ const Empty = ({ description, image, theme, size, statusCode, imageStyle, childr ...@@ -20,12 +20,7 @@ const Empty = ({ description, image, theme, size, statusCode, imageStyle, childr
let imageNode = null; let imageNode = null;
if (typeof image === 'string') { if (typeof image === 'string') {
if (statusCode == '0') { imageNode = <img alt={alt} src={imageSrc} />;
imageNode = <Icon component={IMAGE_DATA[theme][0]} />;
} else {
let imageSrc = image ? image : IMAGE_DATA[theme][1];
imageNode = <img alt={alt} src={imageSrc} />;
}
} else { } else {
imageNode = image; imageNode = image;
} }
......
...@@ -11,16 +11,6 @@ ...@@ -11,16 +11,6 @@
img { img {
height: 100%; height: 100%;
} }
.anticon {
display: block;
height: 100%;
svg {
width: 100%;
height: 100%;
}
}
} }
&-des { &-des {
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.0.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/exportexcel@1.0.2...@wisdom-components/exportexcel@1.0.6) (2021-04-09) ## [1.0.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/exportexcel@1.0.2...@wisdom-components/exportexcel@1.0.6) (2021-04-09)
**Note:** Version bump only for package @wisdom-components/exportexcel **Note:** Version bump only for package @wisdom-components/exportexcel
## [1.0.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/exportexcel@1.0.2...@wisdom-components/exportexcel@1.0.5) (2021-04-09) ## [1.0.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/exportexcel@1.0.2...@wisdom-components/exportexcel@1.0.5) (2021-04-09)
**Note:** Version bump only for package @wisdom-components/exportexcel **Note:** Version bump only for package @wisdom-components/exportexcel
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/historyinfo@1.4.2...@wisdom-components/historyinfo@1.4.6) (2021-04-09) ## [1.4.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/historyinfo@1.4.2...@wisdom-components/historyinfo@1.4.6) (2021-04-09)
### Bug Fixes ### Bug Fixes
* 解决冲突 ([c19528b](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/c19528b108b9bf2268d7a765ffe04585e6ccedf7)) - 解决冲突 ([c19528b](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/c19528b108b9bf2268d7a765ffe04585e6ccedf7))
* update empty ([0fb8d9f](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/0fb8d9f60f47e216f45dd0d0d034b8931f05bbd3)) - update empty ([0fb8d9f](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/0fb8d9f60f47e216f45dd0d0d034b8931f05bbd3))
* update historyinfo and realtimeinfo ([d937324](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/d937324eb5daf4a55bea700f0c186b4ae95d98e2)) - update historyinfo and realtimeinfo ([d937324](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/d937324eb5daf4a55bea700f0c186b4ae95d98e2))
## [1.4.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/historyinfo@1.4.2...@wisdom-components/historyinfo@1.4.5) (2021-04-09) ## [1.4.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/historyinfo@1.4.2...@wisdom-components/historyinfo@1.4.5) (2021-04-09)
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.3.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/imageselect@1.3.2...@wisdom-components/imageselect@1.3.6) (2021-04-09) ## [1.3.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/imageselect@1.3.2...@wisdom-components/imageselect@1.3.6) (2021-04-09)
### Bug Fixes ### Bug Fixes
* 解决冲突 ([c19528b](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/c19528b108b9bf2268d7a765ffe04585e6ccedf7)) - 解决冲突 ([c19528b](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/c19528b108b9bf2268d7a765ffe04585e6ccedf7))
* update empty ([0fb8d9f](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/0fb8d9f60f47e216f45dd0d0d034b8931f05bbd3)) - update empty ([0fb8d9f](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/0fb8d9f60f47e216f45dd0d0d034b8931f05bbd3))
## [1.3.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/imageselect@1.3.2...@wisdom-components/imageselect@1.3.5) (2021-04-09) ## [1.3.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/imageselect@1.3.2...@wisdom-components/imageselect@1.3.5) (2021-04-09)
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.2.8](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/mqttview@1.2.4...@wisdom-components/mqttview@1.2.8) (2021-04-09) ## [1.2.8](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/mqttview@1.2.4...@wisdom-components/mqttview@1.2.8) (2021-04-09)
**Note:** Version bump only for package @wisdom-components/mqttview **Note:** Version bump only for package @wisdom-components/mqttview
## [1.2.7](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/mqttview@1.2.4...@wisdom-components/mqttview@1.2.7) (2021-04-09) ## [1.2.7](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/mqttview@1.2.4...@wisdom-components/mqttview@1.2.7) (2021-04-09)
**Note:** Version bump only for package @wisdom-components/mqttview **Note:** Version bump only for package @wisdom-components/mqttview
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.2.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/parseform@1.2.2...parseform@1.2.6) (2021-04-09) ## [1.2.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/parseform@1.2.2...parseform@1.2.6) (2021-04-09)
**Note:** Version bump only for package parseform **Note:** Version bump only for package parseform
## [1.2.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/parseform@1.2.2...parseform@1.2.5) (2021-04-09) ## [1.2.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/parseform@1.2.2...parseform@1.2.5) (2021-04-09)
**Note:** Version bump only for package parseform **Note:** Version bump only for package parseform
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.7.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/quotaselect@1.3.2...@wisdom-components/quotaselect@1.7.0) (2021-04-09) # [1.7.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/quotaselect@1.3.2...@wisdom-components/quotaselect@1.7.0) (2021-04-09)
### Bug Fixes ### Bug Fixes
* 解决冲突 ([c19528b](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/c19528b108b9bf2268d7a765ffe04585e6ccedf7)) - 解决冲突 ([c19528b](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/c19528b108b9bf2268d7a765ffe04585e6ccedf7))
* update empty ([0fb8d9f](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/0fb8d9f60f47e216f45dd0d0d034b8931f05bbd3)) - update empty ([0fb8d9f](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/0fb8d9f60f47e216f45dd0d0d034b8931f05bbd3))
* update QuotaSelect ([4952245](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/49522451da39fdd98cc87bb59929c9e176d21012)) - update QuotaSelect ([4952245](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/49522451da39fdd98cc87bb59929c9e176d21012))
### Features ### Features
* 新增标准表格组件 ([f0b0666](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/f0b0666a246761fd3debe0f3d8a3b3ca4df5a568)) - 新增标准表格组件 ([f0b0666](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/f0b0666a246761fd3debe0f3d8a3b3ca4df5a568))
# [1.6.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/quotaselect@1.3.2...@wisdom-components/quotaselect@1.6.0) (2021-04-09) # [1.6.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/quotaselect@1.3.2...@wisdom-components/quotaselect@1.6.0) (2021-04-09)
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.2.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/realtimeinfo@1.2.2...@wisdom-components/realtimeinfo@1.2.6) (2021-04-09) ## [1.2.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/realtimeinfo@1.2.2...@wisdom-components/realtimeinfo@1.2.6) (2021-04-09)
### Bug Fixes ### Bug Fixes
* update historyinfo and realtimeinfo ([d937324](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/d937324eb5daf4a55bea700f0c186b4ae95d98e2)) - update historyinfo and realtimeinfo ([d937324](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/d937324eb5daf4a55bea700f0c186b4ae95d98e2))
## [1.2.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/realtimeinfo@1.2.2...@wisdom-components/realtimeinfo@1.2.5) (2021-04-09) ## [1.2.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/realtimeinfo@1.2.2...@wisdom-components/realtimeinfo@1.2.5) (2021-04-09)
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.3.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/timerangepicker@1.3.2...@wisdom-components/timerangepicker@1.3.6) (2021-04-09) ## [1.3.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/timerangepicker@1.3.2...@wisdom-components/timerangepicker@1.3.6) (2021-04-09)
### Bug Fixes ### Bug Fixes
* 解决冲突 ([c19528b](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/c19528b108b9bf2268d7a765ffe04585e6ccedf7)) - 解决冲突 ([c19528b](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/c19528b108b9bf2268d7a765ffe04585e6ccedf7))
* update empty ([0fb8d9f](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/0fb8d9f60f47e216f45dd0d0d034b8931f05bbd3)) - update empty ([0fb8d9f](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/0fb8d9f60f47e216f45dd0d0d034b8931f05bbd3))
## [1.3.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/timerangepicker@1.3.2...@wisdom-components/timerangepicker@1.3.5) (2021-04-09) ## [1.3.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/timerangepicker@1.3.2...@wisdom-components/timerangepicker@1.3.5) (2021-04-09)
......
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