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