Welcome to mirror list, hosted at ThFree Co, Russian Federation.

compat_functional_mixin.js « vue3compat « utils « lib « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ec8feb7d2e6b4ac49e573580fef40e986b366235 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import Vue from 'vue';

export const compatFunctionalMixin = Vue.version.startsWith('3')
  ? {
      created() {
        this.props = this.$props;
        this.listeners = this.$listeners;
      },
    }
  : {
      created() {
        throw new Error('This mixin should not be executed in Vue.js 2');
      },
    };