未验证 提交 5145e96b 编写于 作者: _ __Oasis__ 提交者: GitHub

fix: checkbox 组件的全选 demo 无法高亮全选按钮 (#239)

上级 9bef2157
......@@ -309,6 +309,7 @@ const CheckboxDemo = () => {
if (state) {
setIndeterminate(false)
}
setCheckbox1(state)
;(checkboxgroup3Ref.current as any).toggleAll(state)
}}
>
......
......@@ -35,7 +35,6 @@ export const CheckboxGroup = React.forwardRef(
const childrenLabel: string[] = []
React.Children.map(children, (child) => {
const childProps = (child as any).props
console.log(child)
childrenLabel.push(childProps.label || (child as any).children)
})
setInnerValue(childrenLabel)
......
......@@ -182,7 +182,7 @@ 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 | 'nutui-iconfont' |
| classPrefix | 自Custom icon class name prefix for using custom icons | String | 'nut-icon' |
| dot | Whether to display the little red dot in the upper right corner of the icon | Boolean | false |
......
......@@ -179,7 +179,7 @@ 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 | 'nutui-iconfont' |
| classPrefix`v1.2.2` | 自定义icon 类名前缀,用于使用自定义图标 | String | 'nut-icon' |
| dot`v1.2.2` | 是否显示图标右上角小红点 | Boolean | false |
......
......@@ -182,7 +182,7 @@ 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 | 'nutui-iconfont' |
| classPrefix | 自定義icon 類名前綴,用於使用自定義圖標 | String | 'nut-icon' |
| dot | 是否顯示圖標右上角小紅點 | Boolean | false |
......
......@@ -22,7 +22,7 @@ export interface TabbarItemProps {
const defaultProps = {
dot: false,
size: '',
classPrefix: 'nutui-iconfont',
classPrefix: 'nut-icon',
tabTitle: '',
icon: '',
href: '',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册