Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复TabBar组件demo演示页路由跳转失败问题 #451

Merged
merged 28 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
294c18f
feat: 单选按钮组支持options设置子元素
cuiyiworld Oct 26, 2022
cd8f656
Merge branch 'main' of github.com:jdf2e/nutui-react
cuiyiworld Oct 31, 2022
8471e87
fix: 代码review问题处理,完善文档介绍
cuiyiworld Nov 1, 2022
cff5c28
Merge branch 'jdf2e:main' into main
Nov 3, 2022
b686cc7
fix: 修改版本号
cuiyiworld Nov 3, 2022
8f9fef7
Merge branch 'main' of https://github.com/cuicuiworld/nutui-react
cuiyiworld Nov 3, 2022
d4168b6
Merge branch 'jdf2e:main' into main
Nov 7, 2022
4ecaecb
feat: 复选按钮支持options设置子元素
cuiyiworld Nov 7, 2022
1dd547e
Merge branch 'main' of https://github.com/cuicuiworld/nutui-react
cuiyiworld Nov 7, 2022
c3efd7e
Merge branch 'jdf2e:main' into main
Nov 7, 2022
384dbd7
Merge branch 'jdf2e:main' into main
Nov 8, 2022
2a3b669
fix: checkbox组件继承父级参数抽离,与checkbox的interface无关
cuiyiworld Nov 8, 2022
f961b38
Merge branch 'main' of https://github.com/cuicuiworld/nutui-react
cuiyiworld Nov 8, 2022
9516284
fix: tabbarItem组件自定义名称统一为className字段
cuiyiworld Nov 8, 2022
0045ec0
Merge branch 'main' of https://github.com/cuicuiworld/nutui-react
cuiyiworld Nov 8, 2022
dafc38e
fix: menuItem组件className指定到nut-menu__item
cuiyiworld Nov 8, 2022
2bfc0d1
fix: 代码没有同步造成启动报错
cuiyiworld Nov 8, 2022
64701c7
Merge branch 'main' of https://github.com/cuicuiworld/nutui-react
cuiyiworld Nov 8, 2022
0f4d5ff
feat: tag组件添加自定义className和style属性
cuiyiworld Nov 8, 2022
211cfb2
fix: tag组件的className从IComponent中获取
cuiyiworld Nov 8, 2022
03d68fa
feat: rate组件添加className和style属性
cuiyiworld Nov 9, 2022
1205efb
Merge branch 'main' of https://github.com/cuicuiworld/nutui-react
cuiyiworld Nov 9, 2022
84e5ad7
feat: row和col组件支持className和style属性
cuiyiworld Nov 9, 2022
9d75139
Merge branch 'main' of https://github.com/cuicuiworld/nutui-react
cuiyiworld Nov 9, 2022
25c319f
feat: badge组件支持className和style属性
cuiyiworld Nov 10, 2022
fc8e1b8
Merge branch 'main' of https://github.com/cuicuiworld/nutui-react
cuiyiworld Nov 10, 2022
6bf9f19
Merge branch 'main' of https://github.com/cuicuiworld/nutui-react
cuiyiworld Nov 11, 2022
50ca295
fix: 修复TabBar组件路由跳转失败问题
cuiyiworld Nov 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: tabbarItem组件自定义名称统一为className字段
  • Loading branch information
cuiyiworld committed Nov 8, 2022
commit 95162846caec84a42f9915875c2364ec0857a52e
3 changes: 2 additions & 1 deletion src/packages/tabbar/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ export default App;
| href | Jump link of tab page; if `to` exists at the same time, it takes precedence over to | String | -- |
| to | The route object of the tab, equal to React Router's [to Prop](https://v5.reactrouter.com/web/api/Link/to-string) Prop | any | -- |
| num | The numerical corner mark in the upper right corner of the tab, if it exceeds 99, it will be 99+ | Number | -- |
| classPrefix | 自Custom icon class name prefix for using custom icons | String | 'nut-icon' |
| iconClassPrefix`v1.2.1` | Custom icon class name prefix, used to use custom icons | String | `nut-icon` |
| iconFontClassName`v1.2.1` | Basic class name of custom icon font | String | `nutui-iconfont` |
| dot | Whether to display the little red dot in the upper right corner of the icon | Boolean | false |


Expand Down
4 changes: 2 additions & 2 deletions src/packages/tabbar/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ export default App;
| href | 标签页的跳转链接;如果同时存在 `to`,优先级高于 to | String | -- |
| to | 标签页的路由对象,等于 React Router 的 [to 属性](https://v5.reactrouter.com/web/api/Link/to-string) 属性 | any | -- |
| num | 页签右上角的数字角标,超出99之后为99+ | Number | -- |
| classPrefix`v1.2.2` | 自定义icon 类名前缀,用于使用自定义图标 | String | 'nut-icon' |
| iconClassPrefix`v1.2.1` | 自定义 icon 类名前缀,用于使用自定义图标 | String | `nut-icon` |
| iconFontClassName`v1.2.1` | 自定义 icon 字体基础类名 | String | `nutui-iconfont` |
| dot`v1.2.2` | 是否显示图标右上角小红点 | Boolean | false |


### Event

| 事件名称 | 说明 | 回调参数 |
Expand Down
3 changes: 2 additions & 1 deletion src/packages/tabbar/doc.zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ export default App;
| href | 標籤頁的跳轉鏈接;如果同時存在 `to`,優先級高於 to | String | -- |
| to | 標籤頁的路由對象,等於 React Router 的 [to 屬性](https://v5.reactrouter.com/web/api/Link/to-string) 屬性 | any | -- |
| num | 頁簽右上角的數字角標,超出99之後為99+ | Number | -- |
| classPrefix | 自定義icon 類名前綴,用於使用自定義圖標 | String | 'nut-icon' |
| iconClassPrefix`v1.2.1` | 自定義 icon 類名前綴,用於使用自定義圖標 | String | `nut-icon` |
| iconFontClassName`v1.2.1` | 自定義 icon 字體基礎類名 | String |
| dot | 是否顯示圖標右上角小紅點 | Boolean | false |


Expand Down
10 changes: 6 additions & 4 deletions src/packages/tabbaritem/tabbaritem.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { IComponent, ComponentDefaults } from '@/utils/typings'
export interface TabbarItemProps extends IComponent {
dot: boolean
size: string | number
classPrefix: string
className: string
tabTitle: string
icon: string
href: string
Expand All @@ -26,7 +26,7 @@ const defaultProps = {
...ComponentDefaults,
dot: false,
size: '',
classPrefix: 'nutui-iconfont',
className: '',
tabTitle: '',
icon: '',
href: '',
Expand All @@ -45,7 +45,8 @@ export const TabbarItem: FunctionComponent<Partial<TabbarItemProps>> = (
const {
dot,
size,
classPrefix,
className,
style,
tabTitle,
icon,
href,
Expand Down Expand Up @@ -78,8 +79,9 @@ export const TabbarItem: FunctionComponent<Partial<TabbarItemProps>> = (

return (
<div
className={`${b({ active })}`}
className={`${b({ active })} ${className}`}
style={{
...style,
color: active ? activeColor : unactiveColor,
}}
onClick={() => {
Expand Down
10 changes: 6 additions & 4 deletions src/packages/tabbaritem/tabbaritem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { IComponent, ComponentDefaults } from '@/utils/typings'
export interface TabbarItemProps extends IComponent {
dot: boolean
size: string | number
classPrefix: string
className: string
tabTitle: string
icon: string
href: string
Expand All @@ -26,7 +26,7 @@ const defaultProps = {
...ComponentDefaults,
dot: false,
size: '',
classPrefix: 'nut-icon',
className: '',
tabTitle: '',
icon: '',
href: '',
Expand All @@ -45,7 +45,8 @@ export const TabbarItem: FunctionComponent<Partial<TabbarItemProps>> = (
const {
dot,
size,
classPrefix,
className,
style,
tabTitle,
icon,
href,
Expand Down Expand Up @@ -78,8 +79,9 @@ export const TabbarItem: FunctionComponent<Partial<TabbarItemProps>> = (

return (
<div
className={`${b({ active })}`}
className={`${b({ active })} ${className}`}
style={{
...style,
color: active ? activeColor : unactiveColor,
}}
onClick={() => {
Expand Down