We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
FixedNav 目前只能接收 string 类型的图片链接,无法复用已有的 Icon 组件,也无法自由定制 icon 的显示,增加该特性后可以增加其灵活性和适用面
https://github.com/jdf2e/nutui-react/blob/next/src/packages/fixednav/fixednav.taro.tsx#L111
import React, { useState } from "react"; import { FixedNav } from '@nutui/nutui-react-taro'; import { Home } from "@nutui/icons-react-taro"; const App = () => { const list = [ { id: 1, text: '首页', // 这是当前行为,只能传入有效的图片链接 icon: 'https://img14.360buyimg.com/imagetools/jfs/t1/130725/4/3157/1704/5ef83e95Eb976644f/b36c6cfc1cc1a99d.png' }, { id: 2, text: '分类', // 期望这里支持 React.ReactNode,例如 Icon 组件 icon: <Home/> }, { id: 3, text: '购物车', num: 2, // 期望这里支持 React.ReactNode,例如自定义组件 icon: <div style={{width: 20, height: 20, borderRadius: 10, background: 'red'}} /> }, ]; const [visible, setVisible] = useState(false); const change = (value: boolean) => { setVisible(value); }; const selected = (item: any, event: MouseEvent) => { console.log(item, event); }; return ( <> <FixedNav list={list} activeText="基础用法" overlay position={{ top: '70px' }} onChange={change} visible={visible} onSelect={selected} /> </> ) }; export default App;
The text was updated successfully, but these errors were encountered:
xiaoyatong
No branches or pull requests
这个功能解决了什么问题?
FixedNav 目前只能接收 string 类型的图片链接,无法复用已有的 Icon 组件,也无法自由定制 icon 的显示,增加该特性后可以增加其灵活性和适用面
https://github.com/jdf2e/nutui-react/blob/next/src/packages/fixednav/fixednav.taro.tsx#L111
你期望的组件设计是怎样的?
The text was updated successfully, but these errors were encountered: