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
1.3.10
No response
本地测试没有问题,线上报错Cannot read properties of undefined (reading '0') ,导致左侧导航栏不展示; 线上重现错误: 1.利用tdesign初始化项目的代码:
<t-submenu name={item.path} value={item.path} title={item.title} icon={renderIcon(item)}> {item.children && useRenderNav(item.children)} </t-submenu> const renderIcon = (item: any) => { if (typeof item.icon === 'string') { return () => item.icon && <t-icon name={item.icon}></t-icon>; } if (item.icon && typeof item.icon.render === 'function') { return () => h(item.icon.render(), { class: 't-icon', }); } return () => ''; };
2.通过打印输出,一级导航栏数据正常输出信息,然后报错Cannot read properties of undefined (reading '0') ,就没进入到二级导航栏,也没输出任何二级导航栏信息 怀疑是中的 icon={renderIcon(item)}错误导致 3.进一步定位看报错信息是item.icon.render执行报错
正常展示左侧导航栏
本地测试没有问题,线上报错Cannot read properties of undefined (reading '0') ,左侧导航栏不展示;
Vue(3.2.37)
Chrome(126.0.6478.127)
MacOS(14.5)
v16.14.1
本地测试没有问题,线上才报错,原版本为 "tdesign-icons-vue-next": "0.1.7", "tdesign-vue-next": "1.3.10",升级了tedesign版本"tdesign-icons-vue-next": "^0.2.2", "tdesign-vue-next": "^1.8.0", 还是报这个错误;另外一个项目目前使用的是"tdesign-icons-vue-next": "^0.2.2", "tdesign-vue-next": "^1.8.0"导航栏是正常展示;
The text was updated successfully, but these errors were encountered:
已企微沟通解答
Sorry, something went wrong.
No branches or pull requests
tdesign 版本
1.3.10
重现链接
No response
重现步骤
本地测试没有问题,线上报错Cannot read properties of undefined (reading '0') ,导致左侧导航栏不展示;
线上重现错误:
1.利用tdesign初始化项目的代码:
2.通过打印输出,一级导航栏数据正常输出信息,然后报错Cannot read properties of undefined (reading '0') ,就没进入到二级导航栏,也没输出任何二级导航栏信息
怀疑是中的 icon={renderIcon(item)}错误导致
3.进一步定位看报错信息是item.icon.render执行报错
期望结果
正常展示左侧导航栏
实际结果
本地测试没有问题,线上报错Cannot read properties of undefined (reading '0') ,左侧导航栏不展示;
框架版本
Vue(3.2.37)
浏览器版本
Chrome(126.0.6478.127)
系统版本
MacOS(14.5)
Node版本
v16.14.1
补充说明
本地测试没有问题,线上才报错,原版本为 "tdesign-icons-vue-next": "0.1.7",
"tdesign-vue-next": "1.3.10",升级了tedesign版本"tdesign-icons-vue-next": "^0.2.2",
"tdesign-vue-next": "^1.8.0", 还是报这个错误;另外一个项目目前使用的是"tdesign-icons-vue-next": "^0.2.2",
"tdesign-vue-next": "^1.8.0"导航栏是正常展示;
The text was updated successfully, but these errors were encountered: