mirror of
https://github.com/nkanaev/yarr.git
synced 2026-07-15 11:06:31 +00:00
frontend: v-icon component
This commit is contained in:
@@ -2,6 +2,7 @@ import Vue from 'vue/dist/vue.esm.js'
|
||||
import i18n from './i18n'
|
||||
import api from './api'
|
||||
import template from './templates/index.html' with {type: 'text'}
|
||||
import icons from './icons'
|
||||
|
||||
var app = window.app
|
||||
|
||||
@@ -207,6 +208,14 @@ Vue.component('relative-time', {
|
||||
},
|
||||
})
|
||||
|
||||
Vue.component('v-icon', {
|
||||
props: ['name'],
|
||||
template: '<span class="icon" v-html="content"></span>',
|
||||
computed: {
|
||||
content: function () { return icons[this.name] || '' }
|
||||
}
|
||||
})
|
||||
|
||||
Vue.use(i18n)
|
||||
|
||||
var vm = new Vue({
|
||||
|
||||
Reference in New Issue
Block a user