@enso-ui/uploader 2.0.14 → 2.0.15
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/package.json
CHANGED
package/src/bulma/Uploader.vue
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<core-uploader v-bind="$attrs"
|
|
5
5
|
ref="uploader">
|
|
6
6
|
<template #default="{
|
|
7
|
-
|
|
7
|
+
controlEvents, files, inputBindings, inputEvents, label, manual,
|
|
8
8
|
}">
|
|
9
9
|
<input class="is-hidden"
|
|
10
10
|
v-bind="inputBindings"
|
|
@@ -13,15 +13,23 @@
|
|
|
13
13
|
:control-events="controlEvents">
|
|
14
14
|
<a :class="['file', {'is-small': isSmall}, {'is-large': isLarge}]"
|
|
15
15
|
v-on="controlEvents">
|
|
16
|
-
<span :class="['file-cta', {'is-rounded': isRounded}]"
|
|
17
|
-
|
|
16
|
+
<span :class="['file-cta', {'is-rounded': isRounded}]"
|
|
17
|
+
v-if="label">
|
|
18
|
+
<span class="file-icon mx-a"
|
|
18
19
|
v-if="!manual || files">
|
|
19
20
|
<fa icon="upload"/>
|
|
20
21
|
</span>
|
|
21
|
-
<span class="file-label"
|
|
22
|
+
<span class="file-label">
|
|
22
23
|
{{ label }}
|
|
23
24
|
</span>
|
|
24
25
|
</span>
|
|
26
|
+
<span class="button"
|
|
27
|
+
v-else>
|
|
28
|
+
<span class="icon"
|
|
29
|
+
v-if="!manual || files">
|
|
30
|
+
<fa icon="upload"/>
|
|
31
|
+
</span>
|
|
32
|
+
</span>
|
|
25
33
|
</a>
|
|
26
34
|
</slot>
|
|
27
35
|
</template>
|
|
@@ -64,6 +64,10 @@ export default {
|
|
|
64
64
|
|
|
65
65
|
computed: {
|
|
66
66
|
displayLabel() {
|
|
67
|
+
if (this.compact) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
|
|
67
71
|
if (this.manual && this.files) {
|
|
68
72
|
return this.i18n('Upload');
|
|
69
73
|
}
|
|
@@ -178,7 +182,6 @@ export default {
|
|
|
178
182
|
|
|
179
183
|
render() {
|
|
180
184
|
return this.$slots.default({
|
|
181
|
-
compact: this.compact,
|
|
182
185
|
controlEvents: {
|
|
183
186
|
click: this.browseFiles,
|
|
184
187
|
},
|