@finema/core 1.4.124 → 1.4.125
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/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<div class="flex flex-col items-end justify-end">
|
|
7
7
|
<div
|
|
8
8
|
v-show="isShowDevTools"
|
|
9
|
-
class="max-w-screen mb-4 h-[
|
|
9
|
+
class="max-w-screen mb-4 h-[750px] max-h-screen w-[600px] overflow-auto rounded-lg border opacity-80 shadow-2xl"
|
|
10
10
|
>
|
|
11
11
|
<p class="p-3 text-lg font-semibold">Debug Tools</p>
|
|
12
12
|
<hr />
|
|
@@ -1,38 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<TeleportSafe v-if="isDevEnv" to="#dev-logs">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
:code="JSON.stringify(data)"
|
|
6
|
-
max-height="500"
|
|
7
|
-
:browser-window="true"
|
|
8
|
-
:indent="2"
|
|
9
|
-
lang="json"
|
|
10
|
-
highlightjs
|
|
11
|
-
>
|
|
12
|
-
<template #label>
|
|
13
|
-
<span v-if="title" class="font-semibold">{{ title }}</span>
|
|
14
|
-
</template>
|
|
15
|
-
</VCodeBlock>
|
|
16
|
-
|
|
17
|
-
<VCodeBlock
|
|
3
|
+
<LogItem v-if="typeof data !== 'undefined'" :data="data" :title="title" />
|
|
4
|
+
<LogItem
|
|
18
5
|
v-for="(item, index) in dataItems"
|
|
19
6
|
:key="index"
|
|
20
|
-
:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
:indent="2"
|
|
24
|
-
lang="json"
|
|
25
|
-
highlightjs
|
|
26
|
-
>
|
|
27
|
-
<template #label>
|
|
28
|
-
<span v-if="title" class="font-semibold">{{ title }} #{{ index + 1 }} </span>
|
|
29
|
-
</template>
|
|
30
|
-
</VCodeBlock>
|
|
7
|
+
:data="item"
|
|
8
|
+
:title="`${title} #${index + 1}`"
|
|
9
|
+
/>
|
|
31
10
|
</TeleportSafe>
|
|
32
11
|
</template>
|
|
33
12
|
<script lang="ts" setup>
|
|
34
13
|
import { defineProps } from 'vue'
|
|
35
|
-
import
|
|
14
|
+
import LogItem from './LogItem.vue'
|
|
36
15
|
|
|
37
16
|
defineProps<{
|
|
38
17
|
data?: any
|
|
@@ -42,6 +21,3 @@ defineProps<{
|
|
|
42
21
|
|
|
43
22
|
const isDevEnv = process.env.NODE_ENV === 'development'
|
|
44
23
|
</script>
|
|
45
|
-
<style>
|
|
46
|
-
.hljs-string{white-space:break-spaces}
|
|
47
|
-
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="mb-2 flex items-center justify-between">
|
|
4
|
+
<p v-if="title" class="font-semibold">{{ title }}</p>
|
|
5
|
+
<Icon
|
|
6
|
+
class="cursor-pointer"
|
|
7
|
+
:name="isShow ? 'heroicons:minus' : 'heroicons:plus'"
|
|
8
|
+
@click="isShow = !isShow"
|
|
9
|
+
/>
|
|
10
|
+
</div>
|
|
11
|
+
<VCodeBlock
|
|
12
|
+
v-show="isShow"
|
|
13
|
+
:code="getCode"
|
|
14
|
+
max-height="500"
|
|
15
|
+
:browser-window="true"
|
|
16
|
+
:indent="2"
|
|
17
|
+
lang="json"
|
|
18
|
+
highlightjs
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
<script lang="ts" setup>
|
|
23
|
+
import { defineProps, computed, ref } from 'vue'
|
|
24
|
+
import { VCodeBlock } from '@wdns/vue-code-block'
|
|
25
|
+
|
|
26
|
+
const props = defineProps<{
|
|
27
|
+
data?: any
|
|
28
|
+
title?: string
|
|
29
|
+
}>()
|
|
30
|
+
|
|
31
|
+
const isShow = ref(true)
|
|
32
|
+
|
|
33
|
+
const getCode = computed(() => {
|
|
34
|
+
try {
|
|
35
|
+
return JSON.stringify(props.data)
|
|
36
|
+
} catch (e) {
|
|
37
|
+
return JSON.stringify('{}')
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
</script>
|
|
41
|
+
<style>
|
|
42
|
+
.hljs-string{white-space:break-spaces}
|
|
43
|
+
</style>
|