# 好呀

**好呀** 是 [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] 主色调变量混乱，按钮的主色无法改变
