mirror of
https://github.com/tenrok/vue-json-viewer.git
synced 2026-06-20 20:00:37 +03:00
feat: allow add specific style for float and integer numbers
This commit is contained in:
@@ -9,10 +9,14 @@ export default {
|
||||
}
|
||||
},
|
||||
render (h, { props }) {
|
||||
const isInteger = Number.isInteger(props.jsonValue)
|
||||
|
||||
return h('span', {
|
||||
class: {
|
||||
'jv-item': true,
|
||||
'jv-number': true,
|
||||
'jv-number-integer': isInteger,
|
||||
'jv-number-float': !isInteger,
|
||||
},
|
||||
domProps: {
|
||||
innerText: props.jsonValue.toString()
|
||||
|
||||
Reference in New Issue
Block a user