Feat(tag): Start creating new tag

This commit is contained in:
2019-01-28 15:14:22 +01:00
parent f5bbf195f3
commit 62ec65ce53
3 changed files with 42 additions and 14 deletions

View File

@@ -4,7 +4,7 @@
<font-awesome-icon :style="{ color: value.color}" :icon="value.icon" class="fa-2x"/>
</div>
<div class="description">
<div v-if="value.name">
<div v-if="existing_tag">
<h4>{{ value.name }}</h4>
</div>
<div v-else>
@@ -42,11 +42,14 @@ export default {
props: {
value: {
type: Object,
default: {
color: '',
icon: '',
name: '',
variant: ''
default: function () {
return {
color: '',
icon: 'question',
name: '',
variant: '',
words: []
}
}
}
},
@@ -55,6 +58,9 @@ export default {
}
},
computed: {
...mapGetters({
'tag': 'config/tag',
}),
keywords: {
get: function () {
return this.value.words.join('\n')
@@ -63,6 +69,9 @@ export default {
var kwds = keywords.split('\n')
this.value.words = kwds
}
},
existing_tag () {
return this.tag(this.value.name) ? true : false
}
},
methods: {