Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why expanded-depth is not working ? #99

Open
wjdrbs96 opened this issue Nov 8, 2022 · 0 comments
Open

why expanded-depth is not working ? #99

wjdrbs96 opened this issue Nov 8, 2022 · 0 comments

Comments

@wjdrbs96
Copy link

wjdrbs96 commented Nov 8, 2022

<template>
  <div>
     <json-viewer
          :value="jsonData"
          :expand-depth=5>
      </json-viewer>
  </div>
</template>

<script>

import JsonViewer from 'vue-json-viewer'
import 'vue-json-viewer/style.css'

export default {
  name: "app",
  components: {
    JsonViewer
  },
  data: () => ({
    jsonData: {
      total: 25,
      limit: 10,
      skip: 0,
      links: {
        previous: undefined,
        next: function () {},
      },
      data: [
        {
          id: '5968fcad629fa84ab65a5247',
          firstname: 'Ada',
          lastname: 'Lovelace',
          awards: null,
          known: [
            'mathematics',
            'computing'
          ],
          position: {
            lat: 44.563836,
            lng: 6.495139
          },
          description: `Augusta Ada King, Countess of Lovelace (née Byron; 10 December 1815 – 27 November 1852) was an English mathematician and writer,
            chiefly known for her work on Charles Babbage's proposed mechanical general-purpose computer,
            the Analytical Engine. She was the first to recognise that the machine had applications beyond pure calculation,
            and published the first algorithm intended to be carried out by such a machine.
            As a result, she is sometimes regarded as the first to recognise the full potential of a "computing machine" and the first computer programmer.`,
          bornAt: '1815-12-10T00:00:00.000Z',
          diedAt: '1852-11-27T00:00:00.000Z'
        }, {
          id: '5968fcad629fa84ab65a5246',
          firstname: 'Grace',
          lastname: 'Hopper',
          awards: [
            'Defense Distinguished Service Medal',
            'Legion of Merit',
            'Meritorious Service Medal',
            'American Campaign Medal',
            'World War II Victory Medal',
            'National Defense Service Medal',
            'Armed Forces Reserve Medal',
            'Naval Reserve Medal',
            'Presidential Medal of Freedom'
          ],
          known: null,
          position: {
            lat: 43.614624,
            lng: 3.879995
          },
          description: `Grace Brewster Murray Hopper (née Murray; December 9, 1906 – January 1, 1992)
            was an American computer scientist and United States Navy rear admiral.
            One of the first programmers of the Harvard Mark I computer,
            she was a pioneer of computer programming who invented one of the first compiler related tools.
            She popularized the idea of machine-independent programming languages, which led to the development of COBOL,
            an early high-level programming language still in use today.`,
          bornAt: '1815-12-10T00:00:00.000Z',
          diedAt: '1852-11-27T00:00:00.000Z'
        }
      ]
    }
  }),

  mounted() {
  },

  methods: {
  }
}
</script>
<style scoped>
</style>
  • vue: ^2.5.16
  • vue-json-viewer: "^2.2.22"
npm install vue-json-viewer@2 --save

I installed it with the mullet above.


Result

스크린샷 2022-11-08 오전 11 11 33

Is there any reason to guess why it's like that when Json can't handle it?

I thought I could modify expanded-depth, but it doesn't work.

Thanks

@wjdrbs96 wjdrbs96 changed the title why expanded-depth is not workling ? why expanded-depth is not working ? Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant