vantui
vantui copied to clipboard
Area 组件报错“Error: setColumnIndex: 对应列不存在”
这个 Issue 涉及以下平台
- [x] 微信小程序
- [ ] 支付宝小程序
- [ ] 百度小程序
- [ ] 头条小程序
- [ ] 快手小程序
- [ ] QQ 轻应用
- [x] Web 平台(H5)
BUG 描述
@zuolung 升级 Taro 4.0 后,地址选择器报错崩溃,让小程序白屏。
复现步骤
- 打开脚手架预览页面:https://taro-vant-mobx-oxbisjliu-techquerys-projects.vercel.app/#/pages/component
- 点击“请选择地区”
- 浏览器控制台即显示上述报错
期望结果
在 Taro 4.x 中使用 <Area /> 组件无报错。
实际结果
Error: setColumnIndex: 对应列不存在
at ._node_modules_.pnpm_@[email protected]_node_modules_@antmjs_vantui_es_picker_index.js:251
at ._node_modules_.pnpm_@[email protected]_node_modules_@antmjs_vantui_es_picker_index.js:263
at Array.map (<anonymous>)
at Object.setIndexes (._node_modules_.pnpm_@[email protected]_node_modules_@antmjs_vantui_es_picker_index.js:263)
at t.<anonymous> (._node_modules_.pnpm_@[email protected]_node_modules_@antmjs_vantui_es_area_index.js:195)
at f (WASubContext.js?t=wechat&s=1730203008373&v=3.6.3:1)
at WASubContext.js?t=wechat&s=1730203008373&v=3.6.3:1
at t.<anonymous> (WASubContext.js?t=wechat&s=1730203008373&v=3.6.3:1)
at Function.<anonymous> (WASubContext.js?t=wechat&s=1730203008373&v=3.6.3:1)
at p (WAServiceMainContext.js?t=wechat&s=1730203008373&v=3.6.3:1)(env: Windows,mp,1.06.2409140; lib: 3.6.3)
截图
环境
👽 Taro v4.0.7
Taro CLI 4.0.7 environment info:
System:
OS: Windows 11 10.0.22631
Binaries:
Node: 20.15.1 - C:\Program Files\nodejs\node.EXE
npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
npmPackages:
@tarojs/cli: 4.0.7 => 4.0.7
@tarojs/components: 4.0.7 => 4.0.7
@tarojs/helper: 4.0.7 => 4.0.7
@tarojs/plugin-framework-react: 4.0.7 => 4.0.7
@tarojs/plugin-html: 4.0.7 => 4.0.7
@tarojs/plugin-http: 4.0.7 => 4.0.7
@tarojs/plugin-platform-alipay: 4.0.7 => 4.0.7
@tarojs/plugin-platform-h5: 4.0.7 => 4.0.7
@tarojs/plugin-platform-jd: 4.0.7 => 4.0.7
@tarojs/plugin-platform-qq: 4.0.7 => 4.0.7
@tarojs/plugin-platform-swan: 4.0.7 => 4.0.7
@tarojs/plugin-platform-tt: 4.0.7 => 4.0.7
@tarojs/plugin-platform-weapp: 4.0.7 => 4.0.7
@tarojs/react: 4.0.7 => 4.0.7
@tarojs/runtime: 4.0.7 => 4.0.7
@tarojs/shared: 4.0.7 => 4.0.7
@tarojs/taro: 4.0.7 => 4.0.7
@tarojs/webpack5-runner: 4.0.7 => 4.0.7
babel-preset-taro: 4.0.7 => 4.0.7
附加信息
- 相关 PR:idea2app/Taro-Vant-MobX-ts#14
- 实例代码:https://github.com/idea2app/Taro-Vant-MobX-ts/pull/14/files#diff-3076b9eb0c8c702a2cafd8a2f0da884f02c27bf1eb0debf9ca8dfc2db9a5d843
暂时不支持v4+
暂时不支持v4+
有大概的开发计划吗?
暂时不支持v4+
在taro 3.6.35也遇到同样的报错
暂时不支持v4+
实测vantui降级到3.4.9报错就消失, 应该是3.5.0对area和picker的修改引入的bug
实测vantui降级到3.4.9报错就消失, 应该是3.5.0对area和picker的修改引入的bug
@Almagestum469 降级后 Button 又报错了:
TypeError: Cannot read property 'call' of undefined
at __webpack_require__ (webpack_bootstrap:19)
at Object../node_modules/.pnpm/@[email protected]/node_modules/@antmjs/vantui/es/button/index.js (home.js:formatted:35)
at __webpack_require__ (webpack_bootstrap:19)
at Object../node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/home!./src/pages/home.tsx (home.js:formatted:640)
at __webpack_require__ (webpack_bootstrap:19)
at Object../src/pages/home.tsx (home.js:formatted:709)
at __webpack_require__ (webpack_bootstrap:19)
at __webpack_exec__ (home.js:formatted:23425)
at home.js:formatted:23429
at Function.__webpack_require__.O (webpack_runtime_chunk loaded:25)
(env: Windows,mp,1.06.2409140; lib: 3.6.3)
实测vantui降级到3.4.9报错就消失, 应该是3.5.0对area和picker的修改引入的bug
@Almagestum469 降级后 Button 又报错了:
TypeError: Cannot read property 'call' of undefined at __webpack_require__ (webpack_bootstrap:19) at Object../node_modules/.pnpm/@[email protected]/node_modules/@antmjs/vantui/es/button/index.js (home.js:formatted:35) at __webpack_require__ (webpack_bootstrap:19) at Object../node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/home!./src/pages/home.tsx (home.js:formatted:640) at __webpack_require__ (webpack_bootstrap:19) at Object../src/pages/home.tsx (home.js:formatted:709) at __webpack_require__ (webpack_bootstrap:19) at __webpack_exec__ (home.js:formatted:23425) at home.js:formatted:23429 at Function.__webpack_require__.O (webpack_runtime_chunk loaded:25) (env: Windows,mp,1.06.2409140; lib: 3.6.3)
这么坑啊, 还好我没用过它的Button组件
实测vantui降级到3.4.9报错就消失, 应该是3.5.0对area和picker的修改引入的bug
@Almagestum469 降级后 Button 又报错了:
TypeError: Cannot read property 'call' of undefined at __webpack_require__ (webpack_bootstrap:19) at Object../node_modules/.pnpm/@[email protected]/node_modules/@antmjs/vantui/es/button/index.js (home.js:formatted:35) at __webpack_require__ (webpack_bootstrap:19) at Object../node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/home!./src/pages/home.tsx (home.js:formatted:640) at __webpack_require__ (webpack_bootstrap:19) at Object../src/pages/home.tsx (home.js:formatted:709) at __webpack_require__ (webpack_bootstrap:19) at __webpack_exec__ (home.js:formatted:23425) at home.js:formatted:23429 at Function.__webpack_require__.O (webpack_runtime_chunk loaded:25) (env: Windows,mp,1.06.2409140; lib: 3.6.3)这么坑啊, 还好我没用过它的Button组件
@Almagestum469 <Button /> 报错是编译缓存问题,执行 rm -rf .swc/ dist/ 后重启开发服务器就好了。