vue.js 前端 vue 使用vue-json-viewer 展示 JSON 格式的数据 - this

📅 2026-11-30 👤 拼多多助力营销技巧 📂 首码项目 👁️ 553 次阅读

npm install vue-json-viewer --save

预览

import viewer from './components/viewer.vue'

export default {

components: { viewer },

methods:{ 拼多多帮助力入口

previewClick(){

this.previewVisible = true

let list = [

{

"id": "1",

"amount": 1,

"count": 1,

"label": "a"

},

{

"id": "2",

"amount": 2,

"count": 2,

"label": "b"

},

]

const str = JSON.stringify(list)

this.$nextTick(() => {

this.$refs.viewer.jsonStr = str

})

}

}

}

viewer.vue

文章来源

标签: 拼多多助力网站平台 赚钱项目 拼多多助力网 首码项目 手赚APP
拼多多助力营销技巧