diff --git a/app/imports/client/ui/properties/components/folders/FolderGroupCard.vue b/app/imports/client/ui/properties/components/folders/FolderGroupCard.vue index db4a6b7e..1784a60a 100644 --- a/app/imports/client/ui/properties/components/folders/FolderGroupCard.vue +++ b/app/imports/client/ui/properties/components/folders/FolderGroupCard.vue @@ -15,7 +15,8 @@ :model="prop" :data-id="prop._id" @click="$emit('click-property', {_id: prop._id})" - @sub-click="_id => $emit('sub-click', _id)" + @click-property="e => $emit('click-property', e)" + @sub-click="e => $emit('sub-click', e)" @remove="$emit('remove', prop._id)" /> @@ -27,15 +28,15 @@ import CreatureProperties from '/imports/api/creature/creatureProperties/Creatur import propComponents from '/imports/client/ui/properties/components/folders/propertyComponentIndex.js'; export default { - components: { - ...propComponents, - }, props: { model: { type: Object, required: true, } }, + beforeCreate() { + Object.assign(this.$options.components, propComponents); + }, meteor: { properties() { const props = []; @@ -61,7 +62,7 @@ export default { }, { sort: { order: 1 }, }).forEach(prop => { - if (this.$options.components[prop.type]) { + if (propComponents[prop.type]) { props.push(prop); } }); diff --git a/app/imports/client/ui/properties/components/folders/folderGroupComponents/AttributeGroupComponent.vue b/app/imports/client/ui/properties/components/folders/folderGroupComponents/AttributeGroupComponent.vue index a2ef661d..2b485e3b 100644 --- a/app/imports/client/ui/properties/components/folders/folderGroupComponents/AttributeGroupComponent.vue +++ b/app/imports/client/ui/properties/components/folders/folderGroupComponents/AttributeGroupComponent.vue @@ -1,44 +1,55 @@ @@ -50,6 +61,7 @@ import SpellSlotListTile from '/imports/client/ui/properties/components/attribut import ResourceCardContent from '/imports/client/ui/properties/components/attributes/ResourceCardContent.vue'; import AttributeCardContent from '/imports/client/ui/properties/components/attributes/AttributeCardContent.vue'; import CardHighlight from '/imports/client/ui/components/CardHighlight.vue'; +import FolderGroupChildren from '/imports/client/ui/properties/components/folders/folderGroupComponents/FolderGroupChildren.vue'; import damageProperty from '/imports/api/creature/creatureProperties/methods/damageProperty.js'; @@ -62,12 +74,17 @@ export default { ResourceCardContent, AttributeCardContent, CardHighlight, + FolderGroupChildren, }, props: { model: { type: Object, required: true, }, + dataId: { + type: String, + required: true, + }, }, data() { return { @@ -81,6 +98,10 @@ export default { value: change.value }); }, + log({_id}) { + console.log(...arguments) + this.$emit('click-property', { _id }); + } } } diff --git a/app/imports/client/ui/properties/components/folders/folderGroupComponents/FolderGroupChildren.vue b/app/imports/client/ui/properties/components/folders/folderGroupComponents/FolderGroupChildren.vue index a69afa22..32edef29 100644 --- a/app/imports/client/ui/properties/components/folders/folderGroupComponents/FolderGroupChildren.vue +++ b/app/imports/client/ui/properties/components/folders/folderGroupComponents/FolderGroupChildren.vue @@ -1,6 +1,6 @@