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
支付宝小程序
小程序基础库: 2.8.10 使用框架: React
配置自定义tabbar,直接运行
经过查询源码这个位置 源码位置
const config: any = { [ATTACHED] () { perf.start(PAGE_INIT) const path = getPath(id, { id: this.getPageId?.() || pageId() }) Current.app!.mount!(component, path, () => { componentElement = env.document.getElementById<TaroRootElement>(path) ensure(componentElement !== null, '没有找到组件实例。') this.$taroInstances = instances.get(path) safeExecute(path, ON_LOAD) if (!isWeb) { componentElement.ctx = this componentElement.performUpdate(true) } }) }, [DETACHED] () { const path = getPath(id, { id: this.getPageId() }) // 这里需要也加一个pageId() Current.app!.unmount!(path, () => { instances.delete(path) if (componentElement) { componentElement.ctx = null } }) }, methods: { eh: eventHandler } }
正常运行,渲染自定义tabbar
报错:(index):1 TypeError: this.getPageId is not a function
Taro v3.2.13 Taro CLI 3.2.13 environment info: System: OS: Windows 10 Binaries: Node: 10.16.0 - C:\Program Files\nodejs\node.EXE npm: 6.10.0 - C:\Program Files\nodejs\node_global\npm.CMD
The text was updated successfully, but these errors were encountered:
应该是支付宝小程序 自定义tabbar 没有this.getPageId()方法导致
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
相关平台
支付宝小程序
小程序基础库: 2.8.10
使用框架: React
复现步骤
配置自定义tabbar,直接运行
经过查询源码这个位置
源码位置
期望结果
正常运行,渲染自定义tabbar
实际结果
报错:(index):1 TypeError: this.getPageId is not a function
环境信息
The text was updated successfully, but these errors were encountered: