forked from area17/twill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMediaFieldTranslated.vue
executable file
·63 lines (61 loc) · 1.83 KB
/
MediaFieldTranslated.vue
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<template>
<a17-inputframe :error="error"
:label="label"
:locale="locale"
@localize="updateLocale"
:size="size"
:name="name">
<a17-slideshow v-if="max > 1 || max === 0"
:name="name"
:cropContext="cropContext"
:max="max"
:required="required"
:withAddInfo="withAddInfo"
:withVideoUrl="withVideoUrl"
:withCaption="withCaption"
:altTextMaxLength="altTextMaxLength"
:captionMaxLength="captionMaxLength"
:extraMetadatas="extraMetadatas">
<slot />
</a17-slideshow>
<a17-mediafield v-else
:name="name"
:cropContext="cropContext"
:required="required"
:withAddInfo="withAddInfo"
:withVideoUrl="withVideoUrl"
:withCaption="withCaption"
:altTextMaxLength="altTextMaxLength"
:captionMaxLength="captionMaxLength"
:extraMetadatas="extraMetadatas">
<slot />
</a17-mediafield>
</a17-inputframe>
</template>
<script>
import localeMixin from '@/mixins/locale'
import inputframeMixin from '@/mixins/inputFrame'
import mediaFieldMixin from '@/mixins/mediaField.js'
export default {
name: 'A17MediafieldTranslated',
mixins: [localeMixin, inputframeMixin, mediaFieldMixin],
props: {
name: {
type: String,
required: true
},
disabled: {
type: Boolean,
default: false
},
required: {
type: Boolean,
default: false
},
max: {
type: Number,
default: 1
}
}
}
</script>