mirror of
https://github.com/tenrok/vue-json-viewer.git
synced 2026-06-08 17:22:32 +03:00
28 lines
516 B
Vue
28 lines
516 B
Vue
<template>
|
|
<i class="j-icon" :class="{
|
|
[`${iconPrefix}`]: true,
|
|
[`${iconPrefix}-${type}`]: true
|
|
}" @click="iconClick"></i>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'JsonIcon',
|
|
inject: ['iconPrefix'],
|
|
props: {
|
|
iconPrefix: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
type: {
|
|
type: String,
|
|
default: ''
|
|
}
|
|
},
|
|
methods: {
|
|
iconClick(e) {
|
|
this.$emit('click', e);
|
|
}
|
|
}
|
|
}
|
|
</script> |