一种选择是使用过滤器,如果您实际上想要整个对象
Vue.filter('jsonPretty', (value)=>{
return JSON.stringify(value,null,4)
})
然后用法:
<div>{{testRich | jsonPretty}}</div>
如果只需要该值,则需要正确地引用它:
v-html="testRich.content[0].content[0].value"
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句