-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
116 additions
and
123 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# 配色主题 | ||
|
||
支持的配色主题详见下表,默认为 **hiui-blue** | ||
|
||
## 使用方法 | ||
|
||
通过 `ThemeContext` 使内部的组件可以通过 `props.theme` 获取到设置的主题,所以在页面根组件嵌套即可。 | ||
|
||
```js | ||
import { ThemeContext } from '@hi-ui/hiui/es/context' | ||
|
||
ReactDOM.render( | ||
<ThemeContext.Provider value="hiui-blue"> | ||
<App /> | ||
</ThemeContext.Provider>, | ||
mountNode | ||
) | ||
``` | ||
|
||
## 示例 | ||
|
||
import DemoExample from '../../demo/theme/section-example.jsx' | ||
|
||
<DemoExample /> | ||
|
||
## 支持的主题 | ||
|
||
<table className="no-vertical-border" style={{ width: '480px' }}> | ||
<thead> | ||
<tr> | ||
<th>主题</th> | ||
<th>值</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>品牌蓝</td> | ||
<td>hiui-blue</td> | ||
</tr> | ||
<tr> | ||
<td>活力橙</td> | ||
<td>orange</td> | ||
</tr> | ||
<tr> | ||
<td>橘青</td> | ||
<td>cyan</td> | ||
</tr> | ||
<tr> | ||
<td>洋红</td> | ||
<td>magenta</td> | ||
</tr> | ||
<tr> | ||
<td>薰衣草</td> | ||
<td>lavender</td> | ||
</tr> | ||
<tr> | ||
<td>天蓝</td> | ||
<td>blue</td> | ||
</tr> | ||
</tbody> | ||
</table> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,10 @@ | ||
# 配色主题 | ||
# 主题 | ||
|
||
支持的配色主题详见下表,默认为 **hiui-blue** | ||
目前有两款主题可以使用,分别是 `Classic` 和 `Genuine`,具体使用方法请看仓库 `README.md` | ||
|
||
## 使用方法 | ||
主题链接:[GitHub](https://github.com/hiui-group/classic-theme) [NPM](https://www.npmjs.com/package/@hi-ui/classic-theme) | ||
|
||
通过 `ThemeContext` 使内部的组件可以通过 `props.theme` 获取到设置的主题,所以在页面根组件嵌套即可。 | ||
|
||
```js | ||
import { ThemeContext } from '@hi-ui/hiui/es/context' | ||
|
||
ReactDOM.render( | ||
<ThemeContext.Provider value="hiui-blue"> | ||
<App /> | ||
</ThemeContext.Provider>, | ||
mountNode | ||
) | ||
``` | ||
|
||
## 示例 | ||
|
||
import DemoExample from '../../demo/theme/section-example.jsx' | ||
|
||
<DemoExample /> | ||
|
||
## 支持的主题 | ||
|
||
|
||
<table className="no-vertical-border" style={{ width: '480px' }}> | ||
<thead> | ||
<tr> | ||
<th>主题</th> | ||
<th>值</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>品牌蓝</td> | ||
<td>hiui-blue</td> | ||
</tr> | ||
<tr> | ||
<td>活力橙</td> | ||
<td>orange</td> | ||
</tr> | ||
<tr> | ||
<td>橘青</td> | ||
<td>cyan</td> | ||
</tr> | ||
<tr> | ||
<td>洋红</td> | ||
<td>magenta</td> | ||
</tr> | ||
<tr> | ||
<td>薰衣草</td> | ||
<td>lavender</td> | ||
</tr> | ||
<tr> | ||
<td>天蓝</td> | ||
<td>blue</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<p><img src="<BASE_URL>/static/img/themes/classic/classic-theme-01.png" width="90%" /></p> | ||
<p><img src="<BASE_URL>/static/img/themes/classic/classic-theme-02.png" width="90%" /></p> | ||
<p><img src="<BASE_URL>/static/img/themes/classic/classic-theme-03.png" width="90%" /></p> | ||
<p><img src="<BASE_URL>/static/img/themes/classic/classic-theme-04.png" width="90%" /></p> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 从 v1.x 升级至 v2.x | ||
|
||
HIUI 2.0.0 是一次重大更新,在这次迭代中,我们统一梳理了所有组件的 API。现在的组件 API 都基于统一的规范设计,不同组件间属性名、参数甚至数据类型都趋于一致,使用起来学习成本更小。 | ||
|
||
即便如此,我们依旧为 1.x 的用户提供了最大程度的向前支持。如果你的项目正在从 1.x 升级,请参考下面的升级指南。 | ||
|
||
## 从 1.4.x/1.5.x 升级至 2.0.0 | ||
|
||
基于 1.4.x 和 1.5.x 版本开发的内容,可通过为下列组件批量增加 `legacy={true}` 标识来让其保持使用旧版 API。而新增模块参照新版 API 使用即可。 | ||
|
||
- `<Checkbox />` | ||
- `<Counter />` | ||
- `<DatePicker />` | ||
- `<Input />` | ||
- `<Radio />` | ||
- `<Select />` | ||
- `<Tabs />` | ||
- `<Tree />` | ||
- `<Upload />` | ||
|
||
以 `<Checkbox />` 组件为例: | ||
在 `src` 目录批量搜索 `<Checkbox ` 替换为 `<Checkbox legacy={true} ` 即可,其它组件以此类推。 | ||
|
||
非上述列表中的组件如有 API 调整,他们的使用方式没变,只是部分属性名变了,所以我们已经在组件内部做了兼容处理。 | ||
|
||
(更新中…) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters