|
15 | 15 | </q-tr> |
16 | 16 | </template> |
17 | 17 | <template v-slot:body="props"> |
18 | | - <q-tr :props="props" :class="{ 'bg-primary': props.expand }"> |
| 18 | + <q-tr :props="props" :class="{ 'bg-primary': props.expand, 'text-white': props.expand }"> |
19 | 19 | <q-td v-for="col in props.cols" :key="col.name" :props="props"> |
20 | 20 | {{ col.name === 'state' ? getStatusText(col.value) : col.value }} |
21 | 21 | </q-td> |
|
25 | 25 | </q-tr> |
26 | 26 | <q-tr v-show="props.expand" :props="props"> |
27 | 27 | <q-td colspan="100%" style="padding: 0"> |
28 | | - <MonacoEditor :model-value="JSON.stringify(props.row?.result, null, 2)" :options="monacoOptions" lang="json" style="height: 50vh" /> |
| 28 | + <MonacoEditor style="height: 35vh; width: 100%" :model-value="JSON.stringify(props.row?.result, null, 2)" :options="monacoOptions" lang="json" /> |
| 29 | + <q-separator class="q-my-none" size="8px" color="primary" /> |
29 | 30 | </q-td> |
30 | 31 | </q-tr> |
31 | 32 | </template> |
32 | 33 | </q-table> |
33 | 34 | </q-page> |
34 | 35 | </template> |
35 | | -<script setup> |
| 36 | +<script lang="ts" setup> |
| 37 | +import * as Monaco from 'monaco-editor' |
| 38 | +
|
36 | 39 | const $dayjs = useDayjs() |
37 | 40 | const $route = useRoute() |
38 | 41 | const router = useRouter() |
@@ -134,12 +137,14 @@ const isDark = computed(() => { |
134 | 137 | }) |
135 | 138 |
|
136 | 139 | const monacoOptions = computed(() => { |
137 | | - return { |
| 140 | + return <Monaco.editor.IStandaloneEditorConstructionOptions>{ |
138 | 141 | theme: isDark.value ? 'vs-dark' : 'vs-light', |
139 | 142 | readOnly: true, |
140 | 143 | minimap: { |
141 | 144 | enabled: true, |
142 | 145 | }, |
| 146 | + scrollBeyondLastColumn: 0, |
| 147 | + scrollBeyondLastLine: false, |
143 | 148 | } |
144 | 149 | }) |
145 | 150 | </script> |
|
0 commit comments