@fishawack/lab-velocity 0.8.8 → 0.9.1
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.
- package/components/_datepicker.scss +17 -1
- package/form/DatePicker.vue +1 -0
- package/form/Upload.vue +11 -1
- package/form/Wysiwyg2.vue +4 -25
- package/form/input.js +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,23 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.vel-popper {
|
|
12
|
-
|
|
12
|
+
@include breakpoint (max-width $mobileMax) {
|
|
13
|
+
min-width: 280px;
|
|
14
|
+
max-width: 325px;
|
|
15
|
+
width: auto;
|
|
16
|
+
.el-date-range-picker{
|
|
17
|
+
width: 100%;
|
|
18
|
+
.el-picker-panel__body {
|
|
19
|
+
width: 100%;
|
|
20
|
+
min-width: 100%;
|
|
21
|
+
&>div {
|
|
22
|
+
width: auto;
|
|
23
|
+
min-width: auto;
|
|
24
|
+
border: none;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
13
29
|
}
|
|
14
30
|
|
|
15
31
|
.vel-date-picker, .el-date-picker {
|
package/form/DatePicker.vue
CHANGED
package/form/Upload.vue
CHANGED
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
v-model:file-list="content"
|
|
18
18
|
:auto-upload="autoUpload"
|
|
19
19
|
:required="required"
|
|
20
|
+
:list-type="listType"
|
|
21
|
+
:accept="accept"
|
|
20
22
|
>
|
|
21
23
|
<template #trigger>
|
|
22
24
|
<slot name="trigger">
|
|
@@ -61,7 +63,15 @@ export default {
|
|
|
61
63
|
onExceed: {
|
|
62
64
|
type: Function,
|
|
63
65
|
default: null,
|
|
64
|
-
}
|
|
66
|
+
},
|
|
67
|
+
listType: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: "text",
|
|
70
|
+
},
|
|
71
|
+
accept: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: "",
|
|
74
|
+
},
|
|
65
75
|
},
|
|
66
76
|
|
|
67
77
|
components: {
|
package/form/Wysiwyg2.vue
CHANGED
|
@@ -203,29 +203,7 @@ export default {
|
|
|
203
203
|
|
|
204
204
|
methods: {
|
|
205
205
|
setValue() {
|
|
206
|
-
|
|
207
|
-
this.simple && this.modelValue // Surround text in p tags to keep it grouped correctly on simple strings. Ignore if modelValue empty otherwise you'll end up with <p>null</p>
|
|
208
|
-
? `<p>${this.modelValue}</p>`
|
|
209
|
-
: this.modelValue;
|
|
210
|
-
this.editor.commands.setContent(temp);
|
|
211
|
-
this.hold = temp;
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
},
|
|
215
|
-
// Function to remove p tags from inside li tags, breaks the wysiwyg
|
|
216
|
-
formatCleaner(unformmatted) {
|
|
217
|
-
if(!unformmatted) {
|
|
218
|
-
return "";
|
|
219
|
-
}
|
|
220
|
-
let parser = document.createElement('div');
|
|
221
|
-
parser.innerHTML = unformmatted.replace(/(\r\n|\n|\r|\t)/gm,"");
|
|
222
|
-
const lists = parser.getElementsByTagName('ul');
|
|
223
|
-
for(var x = 0; x < lists.length; x++) {
|
|
224
|
-
lists[x].innerHTML = sanitizeHtml(lists[x].innerHTML, {
|
|
225
|
-
allowedTags: [ 'b', 'i', 'em', 'strong', 'a','li']
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
return parser.innerHTML;
|
|
206
|
+
this.editor.commands.setContent(this.modelValue);
|
|
229
207
|
},
|
|
230
208
|
setLink() {
|
|
231
209
|
this.previousUrl = this.editor.getAttributes('link').href;
|
|
@@ -289,8 +267,9 @@ export default {
|
|
|
289
267
|
this.setValue();
|
|
290
268
|
|
|
291
269
|
this.editor.on('blur', ({ editor, event }) => {
|
|
292
|
-
|
|
293
|
-
|
|
270
|
+
const value = editor.isEmpty ? '' : event.srcElement.innerHTML;
|
|
271
|
+
if(this.hold !== value) {
|
|
272
|
+
this.hold = value;
|
|
294
273
|
this.$emit("update:modelValue", this.hold);
|
|
295
274
|
}
|
|
296
275
|
})
|
package/form/input.js
CHANGED