Add categories to bookmarking
This commit is contained in:
parent
d9595a94d2
commit
e71a125e64
|
@ -193,7 +193,9 @@ export default {
|
|||
this.bookmarkTitle = '';
|
||||
this.bookmarkDescription = '';
|
||||
this.selected = []
|
||||
this.selectedDestinations = []
|
||||
this.bookmarking = false
|
||||
this.categories = []
|
||||
})
|
||||
},
|
||||
hasRef(key) {
|
||||
|
|
38
src/components/EntryCategories.vue
Normal file
38
src/components/EntryCategories.vue
Normal file
|
@ -0,0 +1,38 @@
|
|||
<template>
|
||||
<div>
|
||||
<input type="text" class="input" v-model="categories">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "EntryCategories",
|
||||
props: {
|
||||
'value': {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
categories: ''
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.categories = this.value.join(" ")
|
||||
},
|
||||
|
||||
watch: {
|
||||
categories() {
|
||||
let words = this.categories.split(/\s+/).filter(value => value.length !== 0)
|
||||
this.$emit('input', words)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user