1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-06 18:18:53 +08:00

#115 add styles for blob and null

This commit is contained in:
lana-k
2024-01-06 16:51:35 +01:00
parent 878689b3f7
commit 7a18e415c8
6 changed files with 74 additions and 10 deletions

View File

@@ -26,7 +26,10 @@
:value="formattedJson"
:options="cmOptions"
/>
<div v-if="currentFormat === 'text'" class="text-value">
<div
v-if="currentFormat === 'text'"
:class="['text-value', { 'meta-value': isNull || isBlob }]"
>
{{ cellValue }}
</div>
<logs
@@ -56,7 +59,9 @@ export default {
Logs
},
props: {
cellValue: [String, Number]
cellValue: [String, Number],
isNull: Boolean,
isBlob: Boolean
},
data () {
return {
@@ -84,12 +89,12 @@ export default {
this.messages = []
this.formattedJson = ''
if (this.currentFormat === 'json') {
this.formatJson(this.cellValue)
this.formatJson(this.isNull ? null : this.cellValue)
}
},
cellValue () {
if (this.currentFormat === 'json') {
this.formatJson(this.cellValue)
this.formatJson(this.isNull ? null : this.cellValue)
}
}
},
@@ -139,6 +144,11 @@ export default {
color: var(--color-text-base);
}
.text-value.meta-value {
font-style: italic;
color: var(--color-text-light-2);
}
.messages {
margin: 8px;
}