Skip to content
New issue

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

[Taro3 beta0] 引入 app.config.ts 值为 undefined #5749

Closed
cncolder opened this issue Mar 20, 2020 · 5 comments
Closed

[Taro3 beta0] 引入 app.config.ts 值为 undefined #5749

cncolder opened this issue Mar 20, 2020 · 5 comments
Assignees

Comments

@cncolder
Copy link
Contributor

问题描述

此前的 alpha 版, 可以 import 'app.config.ts'.

之所以要引入这个文件, 有几个目的:

  1. custom-tab-bar 复用 tabBar 配置.
  2. 统一处理 navigateTo 和 switchTab, 甚至是提前判断错误的路由地址.
  3. 如果想自定义 NavigationBar 也会希望复用标题和背景色吧? (虽然我没用到过)

复现步骤

  1. custom-tab-bar/index.tsx 文件
import appConfig from '../app.config'

console.log(appConfig) // <- 返回 undefined

期望行为

报错信息

系统信息

taro 3.0.0.beta.0

补充信息

如果您有功能上的建议,可以提到 FeatHub

使用上的问题,欢迎在「Taro 社区」一起交流

@taro-bot
Copy link

taro-bot bot commented Mar 20, 2020

CC @luckyadam

@taro-bot
Copy link

taro-bot bot commented Mar 20, 2020

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@ruofeng086
Copy link

@luckyadam 同为undefined,请问解决了吗?version: 3.0.2

@ruofeng086
Copy link

@yuche

@daiyuanhao
Copy link

请问如何解决的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants