@@ -6,6 +6,8 @@ definePage({
6
6
const { onUpdate, offUpdate, reset, copy, getLog } = useLogStore ();
7
7
const { log } = storeToRefs (useLogStore ());
8
8
const { version } = useAppInfo ();
9
+ const { getConfig, getSettingGroup } = useConfigStore ();
10
+ const logSetting = getSettingGroup (' log' );
9
11
10
12
const formatLog = computed (() => {
11
13
const list = log .value
@@ -18,14 +20,15 @@ const formatLog = computed(() => {
18
20
const parts = i .split (' |' );
19
21
const [date, type, module_content] = [
20
22
... parts .slice (0 , 2 ),
21
- parts .slice (2 ).join (' - ' ),
23
+ parts .slice (2 ).join (' | ' ),
22
24
];
23
- const content = module_content .split ( ' - ' ). slice ( 1 ). join (' -' );
24
- console . log ( content );
25
+ const [module, ... contents] = module_content .split (' -' );
26
+ const content = contents . join ( ' - ' );
25
27
return {
26
28
index ,
27
29
date: date .trim (),
28
30
type: type .trim (),
31
+ module: module .trim (),
29
32
content: content .trim (),
30
33
};
31
34
});
@@ -50,6 +53,7 @@ function backToBottom() {
50
53
}
51
54
52
55
onActivated (() => {
56
+ getConfig ();
53
57
onUpdate ();
54
58
55
59
if (log .value ) {
@@ -81,7 +85,28 @@ onDeactivated(() => {
81
85
max-h-60vh
82
86
min-h-20vh
83
87
>
84
- <div min-w-450 >
88
+ <div v-if =" logSetting.debug_enable" min-w-450 >
89
+ <template v-for =" i in formatLog " :key =" i .index " >
90
+ <div
91
+ p =" y-10"
92
+ leading =" 1.5em"
93
+ border =" 0 b-1 solid"
94
+ last:border-b-0
95
+ flex =" ~ items-center gap-20"
96
+ :style =" { color: typeColor(i.type) }"
97
+ >
98
+ <div flex =" ~ col items-center gap-10" whitespace-nowrap >
99
+ <div text =" center" >{{ i.type }}</div >
100
+ <div >[{{ i.date }}]</div >
101
+ </div >
102
+ <div flex-1 break-all style =" color : #73bccd " >
103
+ {{ i.module }}
104
+ </div >
105
+ <div flex-1 break-all >{{ i.content }}</div >
106
+ </div >
107
+ </template >
108
+ </div >
109
+ <div v-else min-w-450 >
85
110
<template v-for =" i in formatLog " :key =" i .index " >
86
111
<div
87
112
p =" y-10"
0 commit comments