vite-uni-dev-tool 0.0.26 → 0.0.28

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 CHANGED
@@ -198,6 +198,14 @@ optimizeDeps: {
198
198
 
199
199
  ## 更新日志
200
200
 
201
+ ### 0.0.28
202
+
203
+ - 兼容 app JsonPretty 警告
204
+
205
+ ### 0.0.27
206
+
207
+ - 兼容h5 内容高度
208
+
201
209
  ### 0.0.26
202
210
 
203
211
  - 兼容h5 systemInfo
package/dist/core.js CHANGED
@@ -3,7 +3,7 @@ import { DevEvent as u } from "./devEvent/index.js";
3
3
  import { DevIntercept as a } from "./devIntercept/index.js";
4
4
  import { DevConsole as v } from "./devConsole/index.js";
5
5
  import { EventBus as D } from "./devEventBus/index.js";
6
- const i = "0.0.26", l = "2025/12/24 11:47:24", g = {
6
+ const i = "0.0.28", l = "2025/12/24 13:09:34", g = {
7
7
  // log: console.log,
8
8
  // info: console.info,
9
9
  // warn: console.warn,
@@ -1,6 +1,12 @@
1
1
  <template>
2
2
  <view class="app-info-content">
3
- <JsonPretty v-if="showJson" :data="appInfo" :theme="theme" />
3
+ <JsonPretty
4
+ v-if="showJson"
5
+ :data="appInfo"
6
+ :theme="theme"
7
+ :nodeSelectable="() => false"
8
+ :pathCollapsible="() => false"
9
+ />
4
10
  <Empty v-else />
5
11
  </view>
6
12
  </template>
@@ -30,7 +36,8 @@ const showJson = computed(() => {
30
36
  padding: 16px;
31
37
  font-size: var(--dev-tool-base-font-size);
32
38
 
33
- height: calc(100% - 32px);
39
+ height: 100%;
40
+ box-sizing: border-box;
34
41
  overflow: auto;
35
42
  }
36
43
  </style>
@@ -15,6 +15,8 @@
15
15
  showLength
16
16
  :data="item.value"
17
17
  :autoVirtualRow="100"
18
+ :nodeSelectable="() => false"
19
+ :pathCollapsible="() => false"
18
20
  />
19
21
  </template>
20
22
  </view>
@@ -36,9 +38,9 @@
36
38
  <view class="console-time">{{ consoleItem.time }}</view>
37
39
  <view class="console-other" v-html="consoleItem.position"></view>
38
40
  <view
39
- :class="`console-other ${isUseDevSource ? 'console-stack' : ''}`"
40
41
  v-if="consoleItem.stack"
41
42
  v-html="consoleItem.stack"
43
+ :class="`console-other ${isUseDevSource ? 'console-stack' : ''}`"
42
44
  @click="emit('openCode', consoleItem.stack)"
43
45
  ></view>
44
46
  </view>
@@ -117,7 +117,11 @@ watch(() => props.consoleList, debounceWatch);
117
117
  const height = ref(0);
118
118
  onMounted(() => {
119
119
  const { windowHeight } = uni.getWindowInfo();
120
- height.value = windowHeight - 32 - 32 - 32;
120
+ height.value = windowHeight - 32 - 32 - 2;
121
+
122
+ // #ifdef H5 || APP-PLUS
123
+ height.value = windowHeight - 100 - 32 - 32 - 2;
124
+ // #endif
121
125
  });
122
126
  </script>
123
127
  <style scoped>
@@ -1344,15 +1344,11 @@ function onClearWebSocketMessage(ws: DevTool.WS) {
1344
1344
  position: fixed;
1345
1345
  top: 0;
1346
1346
  left: 0;
1347
- z-index: 1001;
1348
- /* #ifdef H5 */
1347
+ z-index: 998;
1348
+ /* #ifdef H5 || APP-PLUS */
1349
1349
  padding: 50px 0;
1350
1350
  /* #endif */
1351
1351
 
1352
- /* #ifdef MP-WEIXIN */
1353
- /* padding-bottom:30px; */
1354
- /* #endif */
1355
-
1356
1352
  width: 100vw;
1357
1353
  height: 100vh;
1358
1354
  font-size: 14px;
@@ -1,6 +1,12 @@
1
1
  <template>
2
2
  <view class="device-info-content">
3
- <JsonPretty :data="deviceInfo" v-if="showJson" :theme="theme" />
3
+ <JsonPretty
4
+ :data="deviceInfo"
5
+ v-if="showJson"
6
+ :theme="theme"
7
+ :nodeSelectable="() => false"
8
+ :pathCollapsible="() => false"
9
+ />
4
10
  <Empty v-else />
5
11
  </view>
6
12
  </template>
@@ -28,6 +34,9 @@ const showJson = computed(() => {
28
34
  <style>
29
35
  .device-info-content {
30
36
  padding: 16px;
37
+ height: 100%;
38
+ box-sizing: border-box;
39
+ overflow: auto;
31
40
  font-size: var(--dev-tool-base-font-size);
32
41
  }
33
42
  </style>
@@ -721,7 +721,7 @@ onMounted(() => {
721
721
  top: 0;
722
722
  left: 0;
723
723
  padding: 0 16px;
724
- /* #ifdef H5 */
724
+ /* #ifdef H5 || APP-PLUS */
725
725
  padding: 50px 16px;
726
726
  /* #endif */
727
727
  overflow: auto;
@@ -94,7 +94,13 @@
94
94
  </view>
95
95
  <template v-if="currentSelect === 'payload'">
96
96
  <template v-if="payload?.type === 'object'">
97
- <JsonPretty :data="payload.value" virtual :height="height" />
97
+ <JsonPretty
98
+ :data="payload.value"
99
+ virtual
100
+ :height="height"
101
+ :nodeSelectable="() => false"
102
+ :pathCollapsible="() => false"
103
+ />
98
104
  </template>
99
105
  <view
100
106
  v-else-if="payload?.type === 'string'"
@@ -107,7 +113,12 @@
107
113
 
108
114
  <template v-if="currentSelect === 'response'">
109
115
  <template v-if="response?.type === 'object'">
110
- <JsonPretty :data="response.value" virtual :height="height" />
116
+ <JsonPretty
117
+ :data="response.value"
118
+ virtual
119
+ :height="height"
120
+ :nodeSelectable="() => false"
121
+ />
111
122
  </template>
112
123
  <view
113
124
  v-else-if="response?.type === 'string'"
@@ -200,6 +211,10 @@ onMounted(() => {
200
211
  const { windowHeight } = uni.getWindowInfo();
201
212
 
202
213
  height.value = windowHeight - 32 - 32 - 2;
214
+
215
+ // #ifdef H5 || APP-PLUS
216
+ height.value = windowHeight - 100 - 32 - 32 - 2;
217
+ // #endif
203
218
  });
204
219
  </script>
205
220
  <style scoped>
@@ -211,7 +226,7 @@ onMounted(() => {
211
226
  top: 0;
212
227
  left: 0;
213
228
  padding: 0 16px;
214
- /* #ifdef H5 */
229
+ /* #ifdef H5 || APP-PLUS */
215
230
  padding: 50px 16px;
216
231
  /* #endif */
217
232
 
@@ -63,7 +63,7 @@ const emit = defineEmits<{
63
63
  top: 0;
64
64
  left: 0;
65
65
 
66
- /* #ifdef H5 */
66
+ /* #ifdef H5 || APP-PLUS */
67
67
  padding: 50px 0px;
68
68
  /* #endif */
69
69
 
@@ -614,7 +614,7 @@ onMounted(() => {
614
614
  top: 0;
615
615
  left: 0;
616
616
  padding: 0 16px;
617
- /* #ifdef H5 */
617
+ /* #ifdef H5 || APP-PLUS */
618
618
  padding: 50px 16px;
619
619
  /* #endif */
620
620
  overflow: auto;
@@ -126,7 +126,11 @@ function onChoose(type: string) {
126
126
  const height = ref(0);
127
127
  onMounted(() => {
128
128
  const { windowHeight } = uni.getWindowInfo();
129
- height.value = windowHeight - 32 - 32;
129
+ height.value = windowHeight - 32 - 32 - 2;
130
+
131
+ // #ifdef H5 || APP-PLUS
132
+ height.value = windowHeight - 100 - 32 - 32 - 2;
133
+ // #endif
130
134
  });
131
135
 
132
136
  function onSort() {
@@ -6,6 +6,8 @@
6
6
  v-if="showJson"
7
7
  :data="piniaList"
8
8
  :theme="theme"
9
+ :nodeSelectable="() => false"
10
+ :pathCollapsible="() => false"
9
11
  @update:data="onUpdateData"
10
12
  @nodeClick="onNodeClick"
11
13
  />
@@ -61,5 +63,8 @@ function onNodeClick(node: any) {
61
63
  .pinia-content {
62
64
  padding: 16px;
63
65
  font-size: var(--dev-tool-base-font-size);
66
+ height: 100%;
67
+ box-sizing: border-box;
68
+ overflow: auto;
64
69
  }
65
70
  </style>
@@ -71,7 +71,11 @@ function onRefresh() {
71
71
  const height = ref(0);
72
72
  onMounted(() => {
73
73
  const { windowHeight } = uni.getWindowInfo();
74
- height.value = windowHeight - 32 - 32;
74
+ height.value = windowHeight - 32 - 32 - 2;
75
+
76
+ // #ifdef H5 || APP-PLUS
77
+ height.value = windowHeight - 100 - 32 - 32 - 2;
78
+ // #endif
75
79
  });
76
80
  </script>
77
81
  <style scoped>
@@ -180,7 +180,11 @@ function getSourceCodeDev(url: string) {
180
180
  onMounted(() => {
181
181
  const { windowHeight } = uni.getWindowInfo();
182
182
 
183
- height.value = windowHeight - 32 - 32;
183
+ height.value = windowHeight - 32 - 32 - 2;
184
+
185
+ // #ifdef H5 || APP-PLUS
186
+ height.value = windowHeight - 100 - 32 - 32 - 2;
187
+ // #endif
184
188
 
185
189
  let url = props?.url;
186
190
 
@@ -32,13 +32,15 @@
32
32
  </view>
33
33
 
34
34
  <JsonPretty
35
+ showLength
36
+ editable
35
37
  :data="{
36
38
  key: item.key,
37
39
  value: item.value,
38
40
  }"
39
- showLength
40
- editable
41
41
  :theme="theme"
42
+ :nodeSelectable="() => false"
43
+ :pathCollapsible="() => false"
42
44
  @update:data="onUpdateData($event, item)"
43
45
  />
44
46
  </view>
@@ -1,6 +1,13 @@
1
1
  <template>
2
2
  <view class="system-content">
3
- <JsonPretty showLength :theme="theme" :data="systemInfo" v-if="showJson" />
3
+ <JsonPretty
4
+ v-if="showJson"
5
+ showLength
6
+ :theme="theme"
7
+ :data="systemInfo"
8
+ :nodeSelectable="() => false"
9
+ :pathCollapsible="() => false"
10
+ />
4
11
  <Empty v-else />
5
12
  </view>
6
13
  </template>
@@ -28,8 +35,8 @@ const showJson = computed(() => {
28
35
  .system-content {
29
36
  padding: 16px;
30
37
  font-size: var(--dev-tool-base-font-size);
31
-
32
- height: calc(100% - 32px);
38
+ height: 100%;
39
+ box-sizing: border-box;
33
40
  overflow: auto;
34
41
  }
35
42
  </style>
@@ -16,7 +16,11 @@
16
16
  <CircularButton style="margin-left: auto" text="×" @click="onClose" />
17
17
  </view>
18
18
 
19
- <view class="upload-detail-header" v-if="currentSelect === 'header'">
19
+ <view
20
+ class="upload-detail-header"
21
+ :style="{ height: height + 'px' }"
22
+ v-if="currentSelect === 'header'"
23
+ >
20
24
  <DevToolTitle>常规</DevToolTitle>
21
25
  <view class="upload-detail-item">
22
26
  <view>请求url:</view>
@@ -63,7 +67,11 @@
63
67
 
64
68
  <template v-if="currentSelect === 'formdata'">
65
69
  <template v-if="formData?.type === 'object'">
66
- <JsonPretty :data="formData.value" />
70
+ <JsonPretty
71
+ :data="formData.value"
72
+ :nodeSelectable="() => false"
73
+ :pathCollapsible="() => false"
74
+ />
67
75
  </template>
68
76
  <view
69
77
  v-else-if="formData?.type === 'string'"
@@ -76,7 +84,12 @@
76
84
 
77
85
  <template v-if="currentSelect === 'response'">
78
86
  <template v-if="response?.type === 'object'">
79
- <JsonPretty :data="response.value" virtual />
87
+ <JsonPretty
88
+ virtual
89
+ :data="response.value"
90
+ :nodeSelectable="() => false"
91
+ :pathCollapsible="() => false"
92
+ />
80
93
  </template>
81
94
  <view
82
95
  v-else-if="response?.type === 'string'"
@@ -89,7 +102,7 @@
89
102
  </view>
90
103
  </template>
91
104
  <script lang="ts" setup>
92
- import { ref, computed } from 'vue';
105
+ import { ref, computed, onMounted } from 'vue';
93
106
  import JsonPretty from '../JsonPretty/index.vue';
94
107
  import Tag from '../Tag/index.vue';
95
108
  import Empty from '../Empty/index.vue';
@@ -115,6 +128,9 @@ const selectItems = [
115
128
  mode: 'info',
116
129
  },
117
130
  ];
131
+
132
+ const height = ref(0);
133
+
118
134
  const currentSelect = ref('header');
119
135
 
120
136
  const formData = computed(() => {
@@ -164,6 +180,15 @@ function onSelect(item: { label: string; value: string }) {
164
180
  function onClose() {
165
181
  emit('close');
166
182
  }
183
+ onMounted(() => {
184
+ const { windowHeight } = uni.getWindowInfo();
185
+
186
+ height.value = windowHeight - 32 - 32 - 2;
187
+
188
+ // #ifdef H5 || APP-PLUS
189
+ height.value = windowHeight - 100 - 32 - 32 - 2;
190
+ // #endif
191
+ });
167
192
  </script>
168
193
  <style>
169
194
  .upload-detail {
@@ -174,7 +199,7 @@ function onClose() {
174
199
  top: 0;
175
200
  left: 0;
176
201
  padding: 0 16px;
177
- /* #ifdef H5 */
202
+ /* #ifdef H5 || APP-PLUS */
178
203
  padding: 50px 16px;
179
204
  /* #endif */
180
205
  background-color: var(--dev-tool-bg3-color);
@@ -104,7 +104,11 @@ function onChoose(type: string) {
104
104
  const height = ref(0);
105
105
  onMounted(() => {
106
106
  const { windowHeight } = uni.getWindowInfo();
107
- height.value = windowHeight - 32 - 32;
107
+ height.value = windowHeight - 32 - 32 - 2;
108
+
109
+ // #ifdef H5 || APP-PLUS
110
+ height.value = windowHeight - 100 - 32 - 32 - 2;
111
+ // #endif
108
112
  });
109
113
  </script>
110
114
  <style scoped>
@@ -6,6 +6,8 @@
6
6
  v-if="showJson"
7
7
  :data="vuexList"
8
8
  :theme="theme"
9
+ :nodeSelectable="() => false"
10
+ :pathCollapsible="() => false"
9
11
  @update:data="onUpdateData"
10
12
  @nodeClick="onNodeClick"
11
13
  />
@@ -52,5 +54,8 @@ function onNodeClick(node: any) {
52
54
  .vuex-content {
53
55
  padding: 16px;
54
56
  font-size: var(--dev-tool-base-font-size);
57
+ height: 100%;
58
+ box-sizing: border-box;
59
+ overflow: auto;
55
60
  }
56
61
  </style>
@@ -147,11 +147,11 @@ function onChangeText(e: any) {
147
147
  position: fixed;
148
148
  width: 100vw;
149
149
  height: 100vh;
150
- z-index: 1001;
150
+ z-index: 998;
151
151
  top: 0;
152
152
  left: 0;
153
153
  padding: 0 16px;
154
- /* #ifdef H5 */
154
+ /* #ifdef H5 || APP-PLUS */
155
155
  padding: 50px 16px;
156
156
  /* #endif */
157
157
 
@@ -104,6 +104,10 @@ const height = ref(0);
104
104
  onMounted(() => {
105
105
  const { windowHeight } = uni.getWindowInfo();
106
106
  height.value = windowHeight - 32 - 32;
107
+
108
+ // #ifdef H5
109
+ height.value = windowHeight - 100 - 32 - 32 - 2;
110
+ // #endif
107
111
  });
108
112
  </script>
109
113
  <style scoped>
@@ -1,11 +1,18 @@
1
1
  <template>
2
2
  <view class="window-info-content">
3
- <JsonPretty v-if="showJson" :data="windowInfo" :theme="theme" />
3
+ <JsonPretty
4
+ v-if="showJson"
5
+ :data="windowInfo"
6
+ :theme="theme"
7
+ :height="height"
8
+ :nodeSelectable="() => false"
9
+ :pathCollapsible="() => false"
10
+ />
4
11
  <Empty v-else />
5
12
  </view>
6
13
  </template>
7
14
  <script lang="ts" setup>
8
- import { computed } from 'vue';
15
+ import { computed, onMounted, ref } from 'vue';
9
16
  import JsonPretty from '../JsonPretty/index.vue';
10
17
 
11
18
  import Empty from '../Empty/index.vue';
@@ -13,6 +20,7 @@ const props = defineProps<{
13
20
  windowInfo: Record<string, any>;
14
21
  theme?: string;
15
22
  }>();
23
+ const height = ref(0);
16
24
 
17
25
  const showJson = computed(() => {
18
26
  try {
@@ -25,10 +33,21 @@ const showJson = computed(() => {
25
33
  return false;
26
34
  }
27
35
  });
36
+ onMounted(() => {
37
+ const { windowHeight } = uni.getWindowInfo();
38
+ height.value = windowHeight - 32 - 32 - 2;
39
+
40
+ // #ifdef H5 || APP-PLUS
41
+ height.value = windowHeight - 100 - 32 - 32 - 2;
42
+ // #endif
43
+ });
28
44
  </script>
29
45
  <style scoped>
30
46
  .window-info-content {
31
47
  padding: 16px;
48
+ height: 100%;
49
+ box-sizing: border-box;
50
+ overflow: auto;
32
51
  font-size: var(--dev-tool-base-font-size);
33
52
  }
34
53
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-uni-dev-tool",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "description": "vite-uni-dev-tool, debug, uni-app, 一处编写,到处调试",
5
5
  "keywords": [
6
6
  "vite",