qt-public-ui
Version:
新设计规范下业务组件库
119 lines • 3.43 kB
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
var _excluded = ["type", "style", "height", "description", "className"];
import React from 'react';
import { Empty } from 'antd';
import classnames from 'classnames';
import './style';
var defaultHint = {
nothing: {
image: '//img.alicdn.com/tfs/TB1hUILp1L2gK0jSZFmXXc7iXXa-188-252.png',
imageStyle: {
height: 80
},
description: '暂无数据'
},
waiting: {
image: '//img.alicdn.com/tfs/TB1wNVHrO_1gK0jSZFqXXcpaXXa-228-200.png',
imageStyle: {
height: 80
},
description: '功能还未上线,敬请期待'
},
suprise: {
image: '//img.alicdn.com/tfs/TB1y0UNpYj1gK0jSZFOXXc7GpXa-190-202.png',
imageStyle: {
height: 80
},
description: '恭喜你发现一个新功能'
},
welcome: {
image: '//img.alicdn.com/tfs/TB1xBBFrHr1gK0jSZR0XXbP8XXa-226-192.png',
imageStyle: {
height: 80
},
description: '欢迎使用新功能'
},
winking: {
image: '//img.alicdn.com/tfs/TB1hjEJp.T1gK0jSZFhXXaAtVXa-180-166.png',
imageStyle: {
height: 80
},
description: '您还没有关注的应用'
},
'report-ios': {
image: '//img.alicdn.com/tfs/TB153kMB4z1gK0jSZSgXXavwpXa-428-288.png',
imageStyle: {
height: 80
},
description: '添加报表'
},
'report-android': {
image: '//img.alicdn.com/tfs/TB1.HwRB4D1gK0jSZFyXXciOVXa-428-288.png',
imageStyle: {
height: 80
},
description: '添加报表'
},
flying: {
image: '//img.alicdn.com/tfs/TB1ojfNC.H1gK0jSZSyXXXtlpXa-240-240.png',
imageStyle: {
height: 80
},
description: '一点都没有错啦'
},
sorry: {
image: '//img.alicdn.com/tfs/TB1mlDqDND1gK0jSZFsXXbldVXa-240-240.png',
imageStyle: {
height: 80
},
description: '很抱歉,友小盟无法为您进行全量计算'
},
// 非友盟小鸟
empty: {
image: '//img.alicdn.com/tfs/TB155J4ueH2gK0jSZJnXXaT1FXa-168-168.png',
imageStyle: {
height: 80
},
description: '暂无数据'
},
note: {
image: '//img.alicdn.com/tfs/TB1vwRJrQT2gK0jSZFkXXcIQFXa-108-154.png',
imageStyle: {
height: 80
},
description: '您还没添加任何信息'
},
complete: {
image: '//img.alicdn.com/tfs/TB1NP1gukT2gK0jSZPcXXcKkpXa-168-168.png',
imageStyle: {
height: 80
},
description: '恭喜您,所有待办都已完成'
}
};
var Default = function Default(props) {
var type = props.type,
style = props.style,
height = props.height,
description = props.description,
className = props.className,
antProps = _objectWithoutPropertiesLoose(props, _excluded);
var hintProps = defaultHint[type] || {};
var _description = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
className: "ant-empty-description"
}, description || hintProps.description));
return /*#__PURE__*/React.createElement("div", {
className: classnames('um-hint-wrap', className),
style: _extends({}, style, {
height: height
})
}, /*#__PURE__*/React.createElement(Empty, _extends({}, hintProps, antProps, {
description: _description
})));
};
Default.defaultProps = {
type: 'empty'
};
Default.displayName = 'Default';
export default Default;