jmash-core-mp 0.1.63 → 0.1.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/mpx.config.js
CHANGED
|
@@ -16,9 +16,20 @@ module.exports = defineConfig({
|
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
loader: {},
|
|
19
|
-
unocss: {},
|
|
20
19
|
},
|
|
21
20
|
},
|
|
21
|
+
chainWebpack(config) {
|
|
22
|
+
const rules = config.module.rules;
|
|
23
|
+
rules.store.forEach((rule) => {
|
|
24
|
+
if (!rule || !rule.uses) return;
|
|
25
|
+
const use = rule.uses.get("ts-loader");
|
|
26
|
+
if (!use) return;
|
|
27
|
+
use.tap((options = {}) => ({
|
|
28
|
+
...options,
|
|
29
|
+
allowTsInNodeModules: true,
|
|
30
|
+
}));
|
|
31
|
+
});
|
|
32
|
+
},
|
|
22
33
|
/**
|
|
23
34
|
* 如果希望node_modules下的文件时对应的缓存可以失效,
|
|
24
35
|
* 可以将configureWebpack.snap.managedPaths修改为 []
|
package/package.json
CHANGED
|
@@ -108,10 +108,14 @@ createComponent({
|
|
|
108
108
|
});
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
|
-
if (url
|
|
112
|
-
mpx.
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
if (!url) {
|
|
112
|
+
mpx.showToast({ title: "暂未开放,敬请期待", icon: "none" });
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (url && tabbar === false) {
|
|
116
|
+
mpx.navigateTo({ url: url });
|
|
117
|
+
} else if (url && tabbar === true) {
|
|
118
|
+
mpx.switchTab({ url: url });
|
|
115
119
|
}
|
|
116
120
|
}
|
|
117
121
|
|