mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
get it working
This commit is contained in:
parent
3244f3f86d
commit
8df7d5d265
@ -45,9 +45,10 @@
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
existingCategoryIds() {
|
existingCategoryIds() {
|
||||||
console.log('existingCategoryIds', this.selectedCategoryIds)
|
if (!this.selectedCategoryIds.length && this.existingCategoryIds.length) {
|
||||||
if (!this.selectedCategoryIds.length)
|
|
||||||
this.selectedCategoryIds = this.existingCategoryIds
|
this.selectedCategoryIds = this.existingCategoryIds
|
||||||
|
this.$forceUpdate()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
@ -138,7 +138,7 @@
|
|||||||
imageAspectRatio,
|
imageAspectRatio,
|
||||||
imageType,
|
imageType,
|
||||||
imageBlurred,
|
imageBlurred,
|
||||||
categoryIds: categories ? categories.map((category) => category.id) : []
|
categoryIds: categories ? categories.map((category) => category.id) : [], // : this.groupCategories.map((cat) => cat.id) || [],
|
||||||
},
|
},
|
||||||
formSchema: {
|
formSchema: {
|
||||||
title: { required: true, min: 3, max: 100 },
|
title: { required: true, min: 3, max: 100 },
|
||||||
@ -178,13 +178,13 @@
|
|||||||
return this.group && this.group.name
|
return this.group && this.group.name
|
||||||
},
|
},
|
||||||
groupCategories() {
|
groupCategories() {
|
||||||
return this.group && this.group.categories
|
return this.group && this.group.categories // && group.categories.map((cat) => cat.id )
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
groupCategories() {
|
groupCategories() {
|
||||||
console.log('groupCategories', this.groupCategories)
|
if (!this.formData.categoryIds.length && this.groupCategories)
|
||||||
if (!this.formData.categoryIds && this.groupCategories) this.formData.categoryIds = this.groupCategories
|
this.formData.categoryIds = this.groupCategories.map((cat) => cat.id)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user