summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/vue_shared/components/blob_viewers/mixins.js
blob: 0c1d55ae707e54737ccc848ab942d8aea6d7d763 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import eventHub from '~/blob/components/eventhub';
import { SNIPPET_MEASURE_BLOBS_CONTENT } from '~/performance/constants';

export default {
  props: {
    content: {
      type: String,
      required: false,
      default: null,
    },
    richViewer: {
      type: String,
      default: '',
      required: false,
    },
    type: {
      type: String,
      required: true,
    },
    isRawContent: {
      type: Boolean,
      default: false,
      required: false,
    },
    fileName: {
      type: String,
      required: false,
      default: '',
    },
  },
  mounted() {
    eventHub.$emit(SNIPPET_MEASURE_BLOBS_CONTENT);
  },
};