@nixweb/nixloc-ui 0.0.184 → 0.0.185
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 +1 -1
- package/src/component/forms/Button.vue +15 -29
- package/src/component/forms/FileUpload.vue +8 -31
- package/src/component/layout/Menu.vue +0 -4
- package/src/component/shared/SelectOption.vue +2 -2
- package/src/component/shared/TableItem.vue +3 -2
- package/src/store/modules/generic.js +25 -0
package/package.json
CHANGED
|
@@ -1,35 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="c-div-button">
|
|
3
|
-
<button
|
|
4
|
-
:
|
|
5
|
-
|
|
6
|
-
:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
disabled: disabled,
|
|
17
|
-
}"
|
|
18
|
-
:disabled="disabled"
|
|
19
|
-
@click="execute()"
|
|
20
|
-
>
|
|
21
|
-
<i
|
|
22
|
-
class="title"
|
|
23
|
-
:class="classIcon"
|
|
24
|
-
v-if="!isLoading(this._key) && classIcon"
|
|
25
|
-
></i>
|
|
3
|
+
<button :style="'background-color:' + backGroundColor + ';color:' + color" class="button" :class="{
|
|
4
|
+
small: size === 'small',
|
|
5
|
+
medium: size === 'medium',
|
|
6
|
+
large: size === 'large',
|
|
7
|
+
primary: type === 'primary',
|
|
8
|
+
success: type === 'success',
|
|
9
|
+
warning: type === 'warning',
|
|
10
|
+
info: type === 'info',
|
|
11
|
+
edit: type === 'edit',
|
|
12
|
+
danger: type === 'danger',
|
|
13
|
+
disabled: disabled,
|
|
14
|
+
}" :disabled="disabled" @click="execute()">
|
|
15
|
+
<i class="title" :class="classIcon" v-if="!isLoading(this._key) && classIcon"></i>
|
|
26
16
|
<span v-if="!isLoading(this._key)">{{ title }}</span>
|
|
27
|
-
<vue-loading
|
|
28
|
-
|
|
29
|
-
type="bubbles"
|
|
30
|
-
color="#fff"
|
|
31
|
-
:size="{ width: '26px', height: '26px' }"
|
|
32
|
-
></vue-loading>
|
|
17
|
+
<vue-loading v-if="isLoading(this._key)" type="bubbles" color="#fff"
|
|
18
|
+
:size="{ width: '26px', height: '26px' }"></vue-loading>
|
|
33
19
|
</button>
|
|
34
20
|
</div>
|
|
35
21
|
</template>
|
|
@@ -4,43 +4,20 @@
|
|
|
4
4
|
<div class="file" v-if="!value">
|
|
5
5
|
<button class="button small primary">
|
|
6
6
|
<span v-if="!loadingAdd">
|
|
7
|
-
<i :class="classIcon"></i> {{ title }}</span
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
v-if="loadingAdd"
|
|
11
|
-
type="bubbles"
|
|
12
|
-
color="#fff"
|
|
13
|
-
:size="{ width: '20px', height: '20px' }"
|
|
14
|
-
></vue-loading>
|
|
7
|
+
<i :class="classIcon"></i> {{ title }}</span>
|
|
8
|
+
<vue-loading v-if="loadingAdd" type="bubbles" color="#fff"
|
|
9
|
+
:size="{ width: '20px', height: '20px' }"></vue-loading>
|
|
15
10
|
</button>
|
|
16
|
-
<input
|
|
17
|
-
type="file"
|
|
18
|
-
name="myfile"
|
|
19
|
-
ref="file"
|
|
20
|
-
:accept="allowed"
|
|
21
|
-
v-on:change="upload()"
|
|
22
|
-
/>
|
|
11
|
+
<input type="file" name="myfile" ref="file" :accept="allowed" v-on:change="upload()" />
|
|
23
12
|
</div>
|
|
24
13
|
<div v-if="value">
|
|
25
|
-
<button
|
|
26
|
-
class="button small success"
|
|
27
|
-
@click="download()"
|
|
28
|
-
v-if="!loadingAdd"
|
|
29
|
-
>
|
|
14
|
+
<button class="button small success" @click="download()" v-if="!loadingAdd">
|
|
30
15
|
<i class="fas fa-cloud-download-alt"></i> Baixar
|
|
31
16
|
</button>
|
|
32
|
-
<button
|
|
33
|
-
class="button small danger"
|
|
34
|
-
v-if="!loadingAdd"
|
|
35
|
-
@click="remove()"
|
|
36
|
-
>
|
|
17
|
+
<button class="button small danger" v-if="!loadingAdd" @click="remove()">
|
|
37
18
|
<span v-if="!loadingRemove">Remover</span>
|
|
38
|
-
<vue-loading
|
|
39
|
-
|
|
40
|
-
type="bubbles"
|
|
41
|
-
color="#fff"
|
|
42
|
-
:size="{ width: '20px', height: '20px' }"
|
|
43
|
-
></vue-loading>
|
|
19
|
+
<vue-loading v-if="loadingRemove" type="bubbles" color="#fff"
|
|
20
|
+
:size="{ width: '20px', height: '20px' }"></vue-loading>
|
|
44
21
|
</button>
|
|
45
22
|
</div>
|
|
46
23
|
</div>
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
:class="{ selected: option.value == selected }" @click="optionSelected(option.value)">
|
|
9
9
|
<div class="text-center">
|
|
10
10
|
<span :class="{ disabled: disabled }" :style="'font-size:' + option.titleSize + 'px;'">
|
|
11
|
-
<i v-if="size === 'small'" :class="option.icon"></i>
|
|
11
|
+
<i v-if="size === 'small'" :class="option.icon" :style="option.iconStyle"></i>
|
|
12
12
|
{{ option.title }}
|
|
13
13
|
</span>
|
|
14
14
|
<div v-if="size === 'medium'" class="icon" :style="'font-size:' + option.iconSize + 'px;'">
|
|
15
|
-
<i :class="option.icon"></i>
|
|
15
|
+
<i :class="option.icon" :style="option.iconStyle"></i>
|
|
16
16
|
</div>
|
|
17
17
|
</div>
|
|
18
18
|
<div v-if="option.tipId">
|
|
@@ -579,6 +579,30 @@ export default {
|
|
|
579
579
|
return false;
|
|
580
580
|
})
|
|
581
581
|
},
|
|
582
|
+
getFileApiWithParameterBody: async function (context, params) {
|
|
583
|
+
context.commit('cleanMethodExecutedApi');
|
|
584
|
+
return axios.post(params.url, params.obj, {
|
|
585
|
+
headers: new Token().tokenHeaders(),
|
|
586
|
+
responseType: "arraybuffer",
|
|
587
|
+
})
|
|
588
|
+
.then((response) => {
|
|
589
|
+
|
|
590
|
+
let blob = new Blob([response.data], { type: "application/pdf" });
|
|
591
|
+
let url = window.URL.createObjectURL(blob);
|
|
592
|
+
|
|
593
|
+
let downloadLink = document.createElement("a");
|
|
594
|
+
downloadLink.href = url;
|
|
595
|
+
downloadLink.download = `${params.obj.fileName}.${params.obj.fileType}`;
|
|
596
|
+
|
|
597
|
+
document.body.appendChild(downloadLink);
|
|
598
|
+
downloadLink.click();
|
|
599
|
+
|
|
600
|
+
document.body.removeChild(downloadLink);
|
|
601
|
+
|
|
602
|
+
}, (err) => {
|
|
603
|
+
return false;
|
|
604
|
+
})
|
|
605
|
+
},
|
|
582
606
|
postFileApi: async function (context, params) {
|
|
583
607
|
context.commit('cleanMethodExecutedApi');
|
|
584
608
|
|
|
@@ -681,5 +705,6 @@ export default {
|
|
|
681
705
|
return false;
|
|
682
706
|
})
|
|
683
707
|
},
|
|
708
|
+
|
|
684
709
|
}
|
|
685
710
|
}
|