Vue3 uni-app watch 监听不到、不生效

有这么一个场景,A页面跳转到B页面,然后A页面监听了一个Store,然后B页面修改Store,再切回来,A页面竟然监听不到?

他喵 🐱 的,watch了半天,不生效,不知道什么鬼。

watch(
[
pickTicketStore.ship,
userStore.user,
pickTicketStore.isOnlySupportManualPay,
],
([ship, user, isOnlySupportManualPay]) => {
// Do something with ship, user, isOnlySupportManualPay
},
{ immediate: true }
);
阅读更多

uni-app 配置env环境变量

在项目根目录新建几个.env.x,例如

.env.development
.env.alpha
.env.beta
.env.production

注意,这里面的名字不是乱起的,不是你想搞成什么名字就是什么名字,必须得是VITE_开头,不要问我为什么,我只想静静,也不要问我静静是谁 …

VITE_BASE_URL=http://www.baidu.com
(import.meta as any).env.VITE_BASE_URL;

HBuilderX 开发 uni-app 无法唤醒微信小程序开发工具

哎,又开始赶鸭子上架了 😌 …

uni-app搞什么飞机 😡 …

08:54:42.318 [微信小程序开发者工具] [error] IDE service port disabled. To use CLI Call, please enter y to confirm enabling CLI capability, or manually open IDE -> Settings -> Security Settings, and set Service Port On.
08:54:42.322 [微信小程序开发者工具] For more details see: https://developers.weixin.qq.com/miniprogram/en/dev/devtools/cli.html
08:54:42.325 [微信小程序开发者工具] [error] 工具的服务端口已关闭。要使用命令行调用工具,请在下方输入 y 以确认开启,或手动打开工具 -> 设置 -> 安全设置,将服务端口开启。
08:54:42.331 [微信小程序开发者工具] 详细信息: https://developers.weixin.qq.com/miniprogram/dev/devtools/cli.html
08:54:42.337 [微信小程序开发者工具]
08:54:42.337 [微信小程序开发者工具]
08:54:42.340 [微信小程序开发者工具] ? Enable IDE Service (y/N) 

阅读更多