@burh/nuxt-core 1.0.40 → 1.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,14 +4,20 @@
|
|
|
4
4
|
<div class=""><h2 class="display-4">Editar capa do treinamento</h2></div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
|
-
<dropzone-file-upload v-model="fileToUpload"></dropzone-file-upload>
|
|
7
|
+
<dropzone-file-upload v-if="!image" ref="Mydropzone" v-model="fileToUpload" class=""></dropzone-file-upload>
|
|
8
8
|
|
|
9
|
-
<div class="
|
|
10
|
-
<
|
|
9
|
+
<div class="row mb-4" v-if="image">
|
|
10
|
+
<img class="col-12" :src="image" alt="Cover">
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<template slot="footer">
|
|
14
|
+
<base-button type="link" @click="removeImage">Remover Imagem
|
|
15
|
+
</base-button>
|
|
16
|
+
<base-button type="primary" class="ml-auto" role="button"
|
|
11
17
|
@click="saveImage"
|
|
12
|
-
|
|
18
|
+
>Salvar Imagem
|
|
13
19
|
</base-button>
|
|
14
|
-
|
|
20
|
+
</template>
|
|
15
21
|
</modal>
|
|
16
22
|
</template>
|
|
17
23
|
<script>
|
|
@@ -21,7 +27,11 @@ export default {
|
|
|
21
27
|
DropzoneFileUpload,
|
|
22
28
|
},
|
|
23
29
|
props:{
|
|
24
|
-
show: false
|
|
30
|
+
show: false,
|
|
31
|
+
image: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: null
|
|
34
|
+
}
|
|
25
35
|
},
|
|
26
36
|
data(){
|
|
27
37
|
return{
|
|
@@ -42,12 +52,25 @@ export default {
|
|
|
42
52
|
}
|
|
43
53
|
},
|
|
44
54
|
methods:{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
55
|
+
removeImage() {
|
|
56
|
+
if(!this.image) {
|
|
57
|
+
this.$refs.Mydropzone.removeAllFiles();
|
|
58
|
+
}
|
|
59
|
+
this.$emit('remove-image')
|
|
60
|
+
},
|
|
61
|
+
async saveImage() {
|
|
62
|
+
if(this.fileToUpload != null) {
|
|
63
|
+
let image = this.fileToUpload
|
|
64
|
+
this.$emit('save-img', image)
|
|
65
|
+
}
|
|
48
66
|
|
|
49
67
|
this.$emit('close-modal-video')
|
|
50
68
|
}
|
|
69
|
+
},
|
|
70
|
+
watch: {
|
|
71
|
+
image(e) {
|
|
72
|
+
console.log(e);
|
|
73
|
+
}
|
|
51
74
|
}
|
|
52
75
|
}
|
|
53
76
|
</script>
|