Feat(tag): Start creating new tag
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user