vite-uni-dev-tool 0.0.3 → 0.0.4
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/README.md +6 -4
- package/dev/devStore/index.ts +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,14 +52,16 @@ export default defineConfig({
|
|
|
52
52
|
|
|
53
53
|
| vue2 | vue3 |
|
|
54
54
|
| ---- | ---- |
|
|
55
|
-
|
|
|
55
|
+
| N | Y |
|
|
56
56
|
|
|
57
|
-
| 微信小程序 | 安卓 | 其他
|
|
58
|
-
| ---------- | ---- |
|
|
59
|
-
|
|
|
57
|
+
| 微信小程序 | 安卓 | 其他 |
|
|
58
|
+
| ---------- | ---- | ------ |
|
|
59
|
+
| Y | Y | 未测试 |
|
|
60
60
|
|
|
61
61
|
### 预览
|
|
62
62
|
|
|
63
|
+

|
|
64
|
+
|
|
63
65
|
- 支持 console 日志
|
|
64
66
|
|
|
65
67
|

|
package/dev/devStore/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
getLanIp,
|
|
10
10
|
getMicroAppIp,
|
|
11
11
|
getWifiIp,
|
|
12
|
+
isBoolean,
|
|
12
13
|
} from '../utils/index';
|
|
13
14
|
|
|
14
15
|
/** 数据存储中心 */
|
|
@@ -131,6 +132,13 @@ export class DevStore {
|
|
|
131
132
|
this.wsDataMaxSize = options.wsDataMaxSize || 1000;
|
|
132
133
|
this.cacheMaxSize = options.cacheMaxSize || 8 * 1024 * 1024 * 10;
|
|
133
134
|
|
|
135
|
+
const devToolVisible = uni.getStorageSync(EVENT_DEV_BUTTON);
|
|
136
|
+
this.devToolVisible = isBoolean(devToolVisible)
|
|
137
|
+
? devToolVisible
|
|
138
|
+
: (options.initShowDevTool ?? true);
|
|
139
|
+
|
|
140
|
+
this.setDevToolVisible(this.devToolVisible);
|
|
141
|
+
|
|
134
142
|
const pages =
|
|
135
143
|
options.pagesJson?.pages.map((page) => {
|
|
136
144
|
const isNav = options.pagesJson?.tabBar?.list?.some(
|