# haoya

> 基于 WeUI 2 的移动端 React 组件库。

Latest version **1.0.8** (published 2021-01-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install haoya
pnpm add haoya
yarn add haoya
bun add haoya
```

Provides the command `haoya`.

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2021-01-18 |
| First published | 2020-04-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 23 |
| Unpacked size | 5.7 MB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| Author | Jay Fong |
| Maintainers | funch |
| Keywords | weui, haoya, react, components |

## Links

- npm: https://www.npmjs.com/package/haoya
- Repository: https://github.com/fjc0k/haoya
- Homepage: https://github.com/fjc0k/haoya#readme
- Issues: https://github.com/fjc0k/haoya/issues
- npm.io page: https://npm.io/package/haoya

## Dependencies (23)

- [less](https://npm.io/package/less.md) ^3.11.1
- [weui](https://npm.io/package/weui.md) 2.3.0
- [tslib](https://npm.io/package/tslib.md) ^2.0.0
- [vtils](https://npm.io/package/vtils.md) ^3.49.3
- [cssnano](https://npm.io/package/cssnano.md) ^4.1.10
- [pkg-dir](https://npm.io/package/pkg-dir.md) ^4.2.0
- [postcss](https://npm.io/package/postcss.md) ^7.0.27
- [ts-node](https://npm.io/package/ts-node.md) ^8.8.2
- [color-js](https://npm.io/package/color-js.md) ^1.0.5
- [fs-extra](https://npm.io/package/fs-extra.md) ^9.0.0
- [typescript](https://npm.io/package/typescript.md) ^3.9.7
- [autoprefixer](https://npm.io/package/autoprefixer.md) ^9.7.6
- [body-scroll-lock](https://npm.io/package/body-scroll-lock.md) ^3.0.2
- [postcss-preset-env](https://npm.io/package/postcss-preset-env.md) ^6.7.0
- [@better-scroll/core](https://npm.io/package/@better-scroll/core.md) ^2.0.0-beta.9
- [@better-scroll/slide](https://npm.io/package/@better-scroll/slide.md) ^2.0.0-beta.9
- [@better-scroll/wheel](https://npm.io/package/@better-scroll/wheel.md) ^2.0.0-beta.9
- [postcss-css-variables](https://npm.io/package/postcss-css-variables.md) ^0.17.0
- [@better-scroll/pull-up](https://npm.io/package/@better-scroll/pull-up.md) ^2.0.0-beta.9
- [less-plugin-npm-import](https://npm.io/package/less-plugin-npm-import.md) ^2.1.0
- [@better-scroll/pull-down](https://npm.io/package/@better-scroll/pull-down.md) ^2.0.0-beta.9
- [@better-scroll/mouse-wheel](https://npm.io/package/@better-scroll/mouse-wheel.md) ^2.0.0-beta.9
- [@better-scroll/observe-dom](https://npm.io/package/@better-scroll/observe-dom.md) ^2.0.0-beta.9

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.8 (latest) — 2021-01-18
- 1.0.0-beta.2 (next) — 2020-10-17
- 1.0.7 — 2021-01-18
- 1.0.5 — 2020-11-02
- 1.0.1 — 2020-11-02
- 1.0.0 — 2020-10-30
- 1.0.0-beta.1 — 2020-08-08
- 1.0.0-beta.0 — 2020-08-08
- 0.6.6 — 2020-08-07
- 0.6.5 — 2020-08-07
- 0.6.0 — 2020-07-02
- 0.5.0 — 2020-05-14
- 0.4.0 — 2020-05-11
- 0.3.0 — 2020-05-10
- 0.2.1 — 2020-05-08
- … 2 more at https://npm.io/package/haoya/versions

## README

# 好呀

**好呀** 是 [WeUI 2](https://github.com/Tencent/weui/) 的 [React](https://zh-hans.reactjs.org/) 实现，同时支持 Web、[Taro 3](https://taro.js.org/)、[Remax 2](https://remaxjs.org/) 多平台。

## 安装

```bash
# npm
npm i haoya

# or, yarn
yarn add haoya

# or, pnpm
pnpm add haoya
```

如果你的网络环境欠佳，推荐使用 [tbify](https://github.com/fjc0k/tbify) 自动连接淘宝镜像加速：

```bash
# 首先，全局安装 tbify
npm i tbify --global

# 然后，在任意要使用的命令前加上 tbify 前缀即可：

# npm
tbify npm i haoya

# or, yarn
tbify yarn add haoya

# or, pnpm
tbify pnpm add haoya
```

## 使用

好呀支持在 Web、[Taro 3](https://taro.js.org/)、[Remax 2](https://remaxjs.org/) 多平台使用。

### Web

Web 下无需特别设定，就跟你平时开发一样，爱用啥用啥，爱咋用咋用。

#### 引入样式

必须全局全量引入样式文件：

```typescript
// 如果基于 375 宽的设计稿开发，这样引入
import 'haoya/lib/styles.css'

// 如果基于 750 宽的设计稿开发，这样引入
import 'haoya/lib/styles@750.css'
```

如果基于其他宽的设计稿开发或需要自定义主题，新建一个 less 文件，然后全局引入它：

```less
// 基于的设计稿宽度
@designWidth: 750;
// 主色
@primaryColor: red;

@import '~haoya/lib/styles.less';
```

## TODO

[x] 小程序不支持 CSS \* 选择符
[x] 小程序的 hover 类名得对其 H5
[x] 选择器基础组件类名对其 H5
[] Remax 小程序选择器 separator 禁用
[x] 主色调变量混乱，按钮的主色无法改变

---
_Source: https://npm.io/package/haoya · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
