docs: App专题
This commit is contained in:
parent
5464d0b817
commit
5c83bcabae
@ -1,6 +1,25 @@
|
|||||||
# App 专题
|
# App 专题
|
||||||
|
|
||||||
## manifest.json的内容搬运到 manifest.config.ts
|
## 1. 其他端正常,`App` 白屏
|
||||||
|
|
||||||
|
请检查 `useXxxStore` 的调用,需要在函数内部调用,而不是在函数外部调用。(估计是顶层调用的时候 `pinia` 没有初始化,导致的问题,`app` 端独有的问题。)
|
||||||
|
|
||||||
|
```ts
|
||||||
|
// 错误写法
|
||||||
|
const userStore = useUserStore()
|
||||||
|
function foo() {
|
||||||
|
userStore.xxx
|
||||||
|
}
|
||||||
|
// 正确写法
|
||||||
|
function foo() {
|
||||||
|
const userStore = useUserStore()
|
||||||
|
userStore.xxx
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 2.unibest 的 `App` 模块配置
|
||||||
|
|
||||||
|
> 核心解决办法就是把 `manifest.json` 的内容搬运到 `manifest.config.ts` 中。
|
||||||
|
|
||||||
我们默认的的 `manifest.config.ts` 只包含了比较基础的 `uniapp` 配置,有的时候我们需要在打包 `app` 时在 `hbuilderx` 里面额外设置一些配置,那么就需要配置好后把 `manifest.json` 中的内容拷贝到 `manifest.config.ts` 中,后面运行就不会丢失了。
|
我们默认的的 `manifest.config.ts` 只包含了比较基础的 `uniapp` 配置,有的时候我们需要在打包 `app` 时在 `hbuilderx` 里面额外设置一些配置,那么就需要配置好后把 `manifest.json` 中的内容拷贝到 `manifest.config.ts` 中,后面运行就不会丢失了。
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user