1.0.22 • Published 4 years ago

zhs-components v1.0.22

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

智慧树定制化部门前端公用库

组件安装

npm install zhs-components --save

组件使用

主文件导入

import { Empty } from "zhs-components";

组件导入

import { Empty } from "zhs-components/components";

方法使用

主文件导入

import { getFileType } from "zhs-components";

方法导入

import { getFileType } from "zhs-components/utils";

组件详情

动态数字

  • 导入
import { DynamicNumber } from "zhs-components";
  • Attribute
字段描述默认值
start起始数字0
end结束数字0
time过渡时间,以秒为单位0.5

空状态

  • 导入
import { Empty } from "zhs-components";
  • 使用
  1. 默认
<Empty />;
  1. 暂无人员
<Empty type="people"/>;
  1. 暂无消息
<Empty type="message"/>;
  1. 自定义文案
<Empty type="message" text="我是有底线的~"/>;
  • Attribute
字段描述默认
type空状态的类型,有 coursepeoplemessag 三种状态course
text暂无数据的文案course 时为“暂无课程”, people 时为“暂无人员”, message 时为“暂无消息”

文件类型Icon

  • 导入
import { FileIcon } from "zhs-components";
  • 使用
  1. word(docdocx
<FileIcon suffix="xxx.doc" />;
  1. excel(xlsxlsx
<FileIcon suffix="xxx.xls" />
  1. ppt(pptpptx
<FileIcon suffix="xxx.ppt" />;
  1. 文本(txt
<FileIcon suffix="xxx.txt" />;
  1. pdf(pdf
<FileIcon suffix="xxx.pdf" />;
  1. 压缩包(rarzip
<FileIcon suffix="xxx.zip" />;
  1. 图片(gifjpgjpegpngbmp
<FileIcon suffix="xxx.jpg" />;
  1. 视频(asfaviflvm4vmovmp4rmvbwmvmkvmpegrmmpg
<FileIcon suffix="xxx.mp4" />;
  1. 音乐(mp3
<FileIcon suffix="xxx.mp3" />;
  1. 默认(其他类型)
<FileIcon suffix="xxx.json" />;
  • Attribute
字段描述默认
suffix文件名称或路径-
1.0.22

4 years ago

1.0.19

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago