$emit('sub-click', _id)"
+ @click-property="(e) => $emit('click-property', e)"
+ @sub-click="(e) => $emit('sub-click', e)"
@remove="$emit('remove', prop._id)"
/>
@@ -20,15 +21,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 = [];
@@ -54,7 +55,7 @@ export default {
}, {
sort: { order: 1 },
}).forEach(prop => {
- if (this.$options.components[prop.type]) {
+ if (propComponents[prop.type]) {
props.push(prop);
}
});