@teamix/data-summary
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

数据概览_spacex

@teamix/data-summary

数据概览,数据展示

API

参数名 说明 必填 类型 默认值 备注
dataSource 数据项 IDataItem 或者 IDataItem[],参考 IDataItem 定义
title 标题 React.ReactNode
subTitle 副标题 React.ReactNode
loading 加载中状态 Boolean false
noBorder 没有边框 Boolean false 默认带边框
noPadding 没有内边距 Boolean false 默认带内边距,无边距的情况下也没有边框
backgroundState 背景色状态 'normal', 'success', 'error', 'warning', 'help', 'grey' 想定制背景色可通过style属性指定
increase 增减百分比,正数表示增加,负数表示减少 number
increaseUnit 增减单位 string %
progress 进度 number
progressState 进度条状态,可快捷设置进度条颜色,当 progress 不为空时有效 'normal', 'success', 'error' 对应 Progress 的 state 属性
progressColor 进度条颜色,当 progress 不为空时有效 string 对应 Progress 的 color 属性
style 自定义样式 React.CSSProperties
action 自定义操作区 React.ReactNode
extra 自定义扩展区 React.ReactNode
footer 自定义底部内容 React.ReactNode
prefixType 卡片前缀状态,当设置 prefix 或 prefixIcon 后生效 'inner', 'outer' 'inner'
prefix 卡片前缀文案 React.ReactNode
prefixIcon 卡片前缀图标 string 对应 Icon 的 type 属性
prefixState 卡片前缀状态 'normal', 'success', 'warning', 'error'
onDataItemClick 点击回调函数 Function

IDataItem

数据项

参数名 说明 必填 类型 默认值 备注
data 数据 number
description 描述文案 React.ReactNode
icon 图标 string 对应 Icon 的 type 属性
unit 数据单位 string 如 '%', '个', '℃'
align 数据项水平对齐 'center', 'left', 'right' 'left'
status 数据状态 'success', 'error'
dataAlign 数值水平对齐 'center', 'left', 'right' 'left'
url 跳转地址 string
onClick 点击回调函数 Function

Readme

Keywords

Package Sidebar

Install

npm i @teamix/data-summary

Weekly Downloads

8

Version

2.0.1

License

MIT

Unpacked Size

3.39 MB

Total Files

41

Last publish

Collaborators

  • yofine
  • zaranengap
  • chesstar