mirror of
https://github.com/tenrok/vue-json-viewer.git
synced 2026-06-08 17:22:32 +03:00
rename JsonNull to JsonUndefined (due to a wired bug)
This commit is contained in:
+3
-3
@@ -11,7 +11,7 @@
|
||||
<script>
|
||||
import JIcon from './json-icon'
|
||||
import JsonString from './types/json-string';
|
||||
import JsonNull from './types/json-null';
|
||||
import JsonUndefined from './types/json-undefined';
|
||||
import JsonNumber from './types/json-number';
|
||||
import JsonBoolean from './types/json-boolean';
|
||||
import JsonObject from './types/json-object';
|
||||
@@ -36,7 +36,7 @@ export default {
|
||||
computed: {
|
||||
valueType() {
|
||||
if (this.value === null || this.value === undefined) {
|
||||
return 'Null';
|
||||
return 'Undefined';
|
||||
} else if (Array.isArray(this.value)) {
|
||||
return 'Array';
|
||||
} else if (typeof this.value === 'object') {
|
||||
@@ -59,7 +59,7 @@ export default {
|
||||
JsonBoolean,
|
||||
JsonObject,
|
||||
JsonArray,
|
||||
JsonNull,
|
||||
JsonUndefined,
|
||||
JIcon
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<span class="json-null">{{ jsonValue === null ? 'null' : 'undefined' }}</span>
|
||||
<span class="json-undefined">{{ jsonValue === null ? 'null' : 'undefined' }}</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'JsonNull',
|
||||
name: 'JsonUndefined',
|
||||
props: {
|
||||
jsonValue: Object
|
||||
}
|
||||
@@ -12,7 +12,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.json-null {
|
||||
.json-undefined {
|
||||
color: #e08331;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user