uni-oaview 1.4.2 → 1.4.3
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/components/oa-vconsole/audio.vue +24 -16
- package/package.json +2 -2
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<uni-collapse-item
|
|
4
4
|
v-for="meta in audioLogMetas"
|
|
5
5
|
:key="meta.id"
|
|
6
|
+
:name="meta.id"
|
|
6
7
|
:title="meta.title"
|
|
7
8
|
:class="{
|
|
8
9
|
'uni-collapse-item-error': meta.isError,
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
</template>
|
|
42
43
|
|
|
43
44
|
<script lang="ts" setup>
|
|
44
|
-
import { nextTick, onBeforeUnmount, ref, shallowRef } from 'vue';
|
|
45
|
+
import { nextTick, onBeforeUnmount, ref, shallowRef, watch } from 'vue';
|
|
45
46
|
import awesomeDisplayInfo from './awesome-display-info.vue';
|
|
46
47
|
import { audioSubject, getAudioLogs } from 'uniapp-log-sdk';
|
|
47
48
|
|
|
@@ -119,7 +120,8 @@
|
|
|
119
120
|
const durationStr = duration > 0 ? duration.toFixed(2) : '-';
|
|
120
121
|
return {
|
|
121
122
|
id: buildAudioLogId(log),
|
|
122
|
-
|
|
123
|
+
// ✅ 加入 [实例N] 标识,让用户清晰地看出不同实例的日志
|
|
124
|
+
title: `[实例${id}] [${shortTime}] ${action} - ${shortSrc} (${durationStr}s)`,
|
|
123
125
|
instanceId: id,
|
|
124
126
|
src,
|
|
125
127
|
duration,
|
|
@@ -174,20 +176,26 @@
|
|
|
174
176
|
upsertLogs(data);
|
|
175
177
|
});
|
|
176
178
|
|
|
177
|
-
// 展开项变化时刷新 collapse 高度缓存(小程序端必须手动调用,否则内容高度可能为 0)
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
179
|
+
// ✅ 展开项变化时刷新 collapse 高度缓存(小程序端必须手动调用,否则内容高度可能为 0)
|
|
180
|
+
watch(
|
|
181
|
+
() => getActiveNameList().join('|'),
|
|
182
|
+
() => {
|
|
183
|
+
// #ifdef MP
|
|
184
|
+
nextTick(() => collapseRef.value?.resize?.());
|
|
185
|
+
// #endif
|
|
186
|
+
},
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
// ✅ 列表更新时,如果有已展开项(内容高度可能变化),同步刷新高度缓存
|
|
190
|
+
watch(
|
|
191
|
+
() => audioLogMetas.value,
|
|
192
|
+
() => {
|
|
193
|
+
// #ifdef MP
|
|
194
|
+
if (getActiveNameList().length) nextTick(() => collapseRef.value?.resize?.());
|
|
195
|
+
// #endif
|
|
196
|
+
},
|
|
197
|
+
{ deep: false },
|
|
198
|
+
);
|
|
191
199
|
|
|
192
200
|
onBeforeUnmount(() => {
|
|
193
201
|
stop?.unsubscribe();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uni-oaview",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.03",
|
|
4
4
|
"description": "uniapp小程序组件库",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"rollup-plugin-typescript2": "^0.27.2",
|
|
52
52
|
"rollup-plugin-vue": "^6.0.0",
|
|
53
53
|
"typescript": "^4.0.2",
|
|
54
|
-
"uniapp-log-sdk": "^1.7.
|
|
54
|
+
"uniapp-log-sdk": "^1.7.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@dcloudio/uni-ui": "^1.5.11",
|