0.0.3 • Published 4 years ago

taro-ui-hd v0.0.3

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

TARO-UI-HD

前言

在 taro 生态中,已经有了 taro-ui 这样优秀且有官方支持的组件库,但是在有些场景下还是无法满足需求,如弹窗组件的功能不够丰富,定制性不够强;另外,有些组件是与设计风格强相关的,如果去修改 taro-ui 的样式,会变得麻烦且没有必要,有时甚至不如在项目中手写组件。基于这些情况,对于 taro-ui 中部分难以达到业务需求的组件做了补充,产生了 taro-ui-hd。

Installation

yarn add taro-ui-hd

为了使 taro-ui-hd 的组件在 h5 环境中的 px 自动转换为 rem,需要编辑 Taro 项目的 config/index.js 文件的 h5 对象, 加入 taro-ui-hd, 如下:

{
  h5: {
    esnextModules: ['taro-ui', 'taro-ui-hd'],
  }
}

然后重新启动项目,就可以在项目中使用 taro-ui-hd 中的组件了。

Components

组件描述状态
BackToTop返回顶部组件stable
Card卡片组件stable
Countdown倒计时组件stable
Modal弹窗组件stable
NoData缺省状态组件,含文字和描述,均可通过传入属性自定义stable
Paging分页提示组件stable
Tabs标签页组件stable

使用

import { Paging } from 'taro-ui-hd'

render() {
  return (
    <Paging hasMore />
  )
}

更新日志

点此前往