@burh/nuxt-core 1.0.42 → 1.0.44
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.
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
preview.innerHTML = ''
|
|
100
100
|
let evtList = ['drop', 'dragstart', 'dragend', 'dragenter', 'dragover', 'addedfile', 'removedfile', 'thumbnail', 'error', 'processing', 'uploadprogress', 'sending', 'success', 'complete', 'canceled', 'maxfilesreached', 'maxfilesexceeded', 'processingmultiple', 'sendingmultiple', 'successmultiple', 'completemultiple', 'canceledmultiple', 'totaluploadprogress', 'reset', 'queuecomplete']
|
|
101
101
|
evtList.forEach(evt => {
|
|
102
|
-
this.dropzone.on(evt, (data) => {
|
|
103
|
-
this.$emit(evt, data);
|
|
102
|
+
this.dropzone.on(evt, (data, message) => {
|
|
103
|
+
this.$emit(evt, data, message);
|
|
104
104
|
|
|
105
105
|
if (evt === 'addedfile') {
|
|
106
106
|
this.files.push(data)
|
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="quill">
|
|
3
3
|
<div :id="toolbarId">
|
|
4
|
-
<!-- <select class="ql-size">
|
|
5
|
-
<option value="small"></option>
|
|
6
|
-
<option selected></option>
|
|
7
|
-
<option value="large"></option>
|
|
8
|
-
<option value="huge"></option>
|
|
9
|
-
</select>
|
|
10
|
-
<div class="ql-formats">
|
|
11
|
-
<button class="ql-header" value="1"></button>
|
|
12
|
-
<button class="ql-header" value="2"></button>
|
|
13
|
-
<button class="ql-bold"></button>
|
|
14
|
-
<button class="ql-italic"></button>
|
|
15
|
-
<button class="ql-underline"></button>
|
|
16
|
-
<button class="ql-link"></button>
|
|
17
|
-
<button class="ql-blockquote"></button>
|
|
18
|
-
<button class="ql-code"></button>
|
|
19
|
-
<button class="ql-image"></button>
|
|
20
|
-
<button type="button" class="ql-list" value="ordered"></button>
|
|
21
|
-
<button type="button" class="ql-list" value="bullet"></button>
|
|
22
|
-
</div> -->
|
|
23
4
|
</div>
|
|
24
5
|
<div :id="editorId" :name="name" class ref="editor"></div>
|
|
25
6
|
</div>
|
|
26
7
|
</template>
|
|
27
8
|
<script>
|
|
9
|
+
import 'quill/dist/quill.core.css'
|
|
10
|
+
import 'quill/dist/quill.snow.css'
|
|
11
|
+
import 'quill/dist/quill.bubble.css'
|
|
28
12
|
export default {
|
|
29
13
|
name: "html-editor",
|
|
30
14
|
props: {
|
|
@@ -124,7 +108,6 @@ export default {
|
|
|
124
108
|
};
|
|
125
109
|
</script>
|
|
126
110
|
<style lang="scss">
|
|
127
|
-
@import '@burh/nuxt-core/node_modules/quill/dist/quill.snow.css';
|
|
128
111
|
|
|
129
112
|
.ql-clipboard {
|
|
130
113
|
display: none;
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
<div class=""><h2 class="display-4">Editar capa do treinamento</h2></div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
|
-
<dropzone-file-upload v-if="
|
|
7
|
+
<dropzone-file-upload v-if="image == null"
|
|
8
|
+
v-on:error="showError"
|
|
9
|
+
ref="Mydropzone" :options="dropzoneOptions" v-model="fileToUpload" class=""/>
|
|
8
10
|
|
|
9
|
-
<div class="row mb-4" v-if="image">
|
|
11
|
+
<div class="row mb-4" v-if="image != null">
|
|
10
12
|
<img class="col-12" :src="image" alt="Cover">
|
|
11
13
|
</div>
|
|
12
14
|
|
|
@@ -22,6 +24,8 @@
|
|
|
22
24
|
</template>
|
|
23
25
|
<script>
|
|
24
26
|
import DropzoneFileUpload from '@burh/nuxt-core/components/argon-core/Inputs/DropzoneFileUpload.vue';
|
|
27
|
+
import swal from "sweetalert2";
|
|
28
|
+
|
|
25
29
|
export default {
|
|
26
30
|
components: {
|
|
27
31
|
DropzoneFileUpload,
|
|
@@ -36,6 +40,12 @@ export default {
|
|
|
36
40
|
data(){
|
|
37
41
|
return{
|
|
38
42
|
fileToUpload: null,
|
|
43
|
+
dropzoneOptions: {
|
|
44
|
+
maxFiles: 1,
|
|
45
|
+
maxFilesize: .2,
|
|
46
|
+
dictFileTooBig: "A imagem que você tentou inserir é maior que 200KB",
|
|
47
|
+
dictDefaultMessage: "Clique ou arraste seu arquivo aqui"
|
|
48
|
+
},
|
|
39
49
|
}
|
|
40
50
|
},
|
|
41
51
|
model:{
|
|
@@ -52,6 +62,16 @@ export default {
|
|
|
52
62
|
}
|
|
53
63
|
},
|
|
54
64
|
methods:{
|
|
65
|
+
showError(file, message) {
|
|
66
|
+
return swal.fire({
|
|
67
|
+
title: "Erro",
|
|
68
|
+
text: message,
|
|
69
|
+
type: "error",
|
|
70
|
+
buttonsStyling: false,
|
|
71
|
+
confirmButtonText: "Ok, fechar!",
|
|
72
|
+
confirmButtonClass: "btn btn-primary btn-fill",
|
|
73
|
+
});
|
|
74
|
+
},
|
|
55
75
|
removeImage() {
|
|
56
76
|
if(!this.image) {
|
|
57
77
|
this.$refs.Mydropzone.removeAllFiles();
|
|
@@ -67,11 +87,6 @@ export default {
|
|
|
67
87
|
this.$emit('close-modal-video')
|
|
68
88
|
}
|
|
69
89
|
},
|
|
70
|
-
watch: {
|
|
71
|
-
image(e) {
|
|
72
|
-
console.log(e);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
90
|
}
|
|
76
91
|
</script>
|
|
77
92
|
<style lang="scss" scoped>
|