summaryrefslogtreecommitdiff
path: root/app/src/mixins/dynamicModelObjectEmit.js
blob: 93701c8b5bb9c8611a7cbc686bff443d2eb451d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
export default {
  props: {
    modelValue: {
      type: Object,
      required: true,
    },
  },

  emits: ['update:modelValue'],

  methods: {
    emit (key, value) {
      this.$emit('update:modelValue', { ...this.modelValue, [key]: value });
    },
  },
};