@nixweb/nixloc-ui 0.0.50 → 0.0.53
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 +3 -2
- package/src/component/forms/Botao.vue +2 -1
- package/src/component/layout/BarraFixa.vue +18 -4
- package/src/component/layout/Menu.vue +96 -122
- package/src/component/layout/Painel.vue +5 -5
- package/src/component/layout/Topo.vue +51 -8
- package/src/component/template/ModeloLista.vue +2 -2
- package/src/store/modulos/generic.js +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nixweb/nixloc-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.53",
|
|
4
4
|
"description": "Componentes UI",
|
|
5
5
|
"author": "Fábio Ávila <fabio@nixweb.com.br>",
|
|
6
6
|
"private": false,
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"vue-multiselect": "^2.1.0",
|
|
22
22
|
"vue-numeric": "^2.4.1",
|
|
23
23
|
"vue-the-mask": "^0.11.1",
|
|
24
|
+
"vue-sidebar-menu": "^3.6.3",
|
|
24
25
|
"vue-toasted": "^1.1.28",
|
|
25
26
|
"vue-toggles": "^1.1.4",
|
|
26
27
|
"vue-upload-file": "^1.1.0",
|
|
@@ -63,4 +64,4 @@
|
|
|
63
64
|
"type": "git",
|
|
64
65
|
"url": "git+https://github.com/nixweb-sistemas/nixloc-ui.git"
|
|
65
66
|
}
|
|
66
|
-
}
|
|
67
|
+
}
|
|
@@ -83,7 +83,8 @@ export default {
|
|
|
83
83
|
border-radius: 40px !important;
|
|
84
84
|
font-size: 13px !important;
|
|
85
85
|
font-weight: 400;
|
|
86
|
-
|
|
86
|
+
font-style: normal !important;
|
|
87
|
+
letter-spacing: 1px !important;
|
|
87
88
|
-webkit-box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 12%);
|
|
88
89
|
-moz-box-shadow: 0px 10px 20px -6px rgba(0, 0, 0, 0.12);
|
|
89
90
|
box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 12%);
|
|
@@ -4,7 +4,12 @@
|
|
|
4
4
|
v-show="!carregando('painel')"
|
|
5
5
|
class="barra"
|
|
6
6
|
:style="'min-height:' + altura + 'px;'"
|
|
7
|
-
:class="{
|
|
7
|
+
:class="{
|
|
8
|
+
topo: posicao == 'topo',
|
|
9
|
+
rodape: posicao == 'rodape',
|
|
10
|
+
esconde: menu.escondeMostra,
|
|
11
|
+
mostra: !menu.escondeMostra,
|
|
12
|
+
}"
|
|
8
13
|
>
|
|
9
14
|
<div class="tamanho">
|
|
10
15
|
<slot></slot>
|
|
@@ -30,20 +35,19 @@ export default {
|
|
|
30
35
|
},
|
|
31
36
|
computed: {
|
|
32
37
|
...mapGetters("generic", ["carregando"]),
|
|
38
|
+
...mapState("generic", ["menu"]),
|
|
33
39
|
},
|
|
34
40
|
};
|
|
35
41
|
</script>
|
|
36
42
|
|
|
37
43
|
<style scoped>
|
|
38
44
|
.barra {
|
|
39
|
-
background-color:
|
|
45
|
+
background-color: white;
|
|
40
46
|
position: fixed;
|
|
41
47
|
width: 100%;
|
|
42
48
|
overflow: hidden;
|
|
43
49
|
z-index: 20;
|
|
44
50
|
padding: 18px;
|
|
45
|
-
border-top: 1px solid #e1e1e2;
|
|
46
|
-
border-bottom: 1px solid #e1e1e2;
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
.tamanho {
|
|
@@ -55,10 +59,20 @@ export default {
|
|
|
55
59
|
top: 0;
|
|
56
60
|
left: 0;
|
|
57
61
|
right: 0;
|
|
62
|
+
border-bottom: 1px solid #e1e1e2;
|
|
58
63
|
}
|
|
59
64
|
|
|
60
65
|
.rodape {
|
|
61
66
|
left: 0;
|
|
62
67
|
bottom: 0px;
|
|
68
|
+
border-top: 1px solid #e1e1e2;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.esconde {
|
|
72
|
+
padding-left: 60px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.mostra {
|
|
76
|
+
padding-left: 230px;
|
|
63
77
|
}
|
|
64
78
|
</style>
|
|
@@ -1,139 +1,113 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<li>
|
|
10
|
-
<span>{{ item.titulo }}</span>
|
|
11
|
-
<ul>
|
|
12
|
-
<li v-for="primeiroNivel in item.primeiroNivel" :key="primeiroNivel.titulo">
|
|
13
|
-
<span
|
|
14
|
-
:class="{ titulo: primeiroNivel.rotaDestino != '' }"
|
|
15
|
-
@click="navegarPara(primeiroNivel.rotaDestino)"
|
|
16
|
-
>{{ primeiroNivel.titulo }}</span
|
|
17
|
-
>
|
|
18
|
-
<ul
|
|
19
|
-
v-for="segundoNivel in primeiroNivel.segundoNivel"
|
|
20
|
-
:key="segundoNivel.titulo"
|
|
21
|
-
>
|
|
22
|
-
<li>
|
|
23
|
-
<span
|
|
24
|
-
:class="{ titulo: segundoNivel.rotaDestino != '' }"
|
|
25
|
-
@click="navegarPara(segundoNivel.rotaDestino)"
|
|
26
|
-
>{{ segundoNivel.titulo }}</span
|
|
27
|
-
>
|
|
28
|
-
</li>
|
|
29
|
-
</ul>
|
|
30
|
-
</li>
|
|
31
|
-
</ul>
|
|
32
|
-
</li>
|
|
33
|
-
</ul>
|
|
34
|
-
</div>
|
|
35
|
-
<ul id="panel-account" data-mm-title="Conta">
|
|
36
|
-
<li v-for="item in conta" :key="item.titulo">
|
|
37
|
-
<span class="titulo" @click="navegarPara(item.rotaDestino)">{{
|
|
38
|
-
item.titulo
|
|
39
|
-
}}</span>
|
|
40
|
-
</li>
|
|
41
|
-
<li>
|
|
42
|
-
<span class="titulo" @click="executarSair()">Sair</span>
|
|
43
|
-
</li>
|
|
44
|
-
</ul>
|
|
45
|
-
</nav>
|
|
2
|
+
<div>
|
|
3
|
+
<sidebar-menu
|
|
4
|
+
:menu="menu.itens"
|
|
5
|
+
:collapsed="menu.escondeMostra"
|
|
6
|
+
theme="white-theme"
|
|
7
|
+
width="220px"
|
|
8
|
+
/>
|
|
46
9
|
</div>
|
|
47
10
|
</template>
|
|
11
|
+
|
|
48
12
|
<script>
|
|
13
|
+
import { SidebarMenu } from "vue-sidebar-menu";
|
|
14
|
+
import { mapState, mapMutations } from "vuex";
|
|
15
|
+
|
|
49
16
|
export default {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
17
|
+
components: {
|
|
18
|
+
SidebarMenu,
|
|
19
|
+
},
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
tamanhoPagina: "0",
|
|
23
|
+
windowWidth: 0,
|
|
24
|
+
windowHeight: 0,
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
created() {
|
|
28
|
+
this.tamanhoPagina = window.innerWidth;
|
|
29
|
+
var corpo = document.getElementsByTagName("body")[0];
|
|
30
|
+
corpo.style = "margin-left: 220px;transition: all 0.2s ease-in-out;";
|
|
59
31
|
},
|
|
60
32
|
mounted() {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
searchfield: {
|
|
79
|
-
add: true,
|
|
80
|
-
placeholder: "Pesquisar",
|
|
81
|
-
splash: "<p>Digite sua pesquisa</p>",
|
|
82
|
-
title: "Pesquisar",
|
|
83
|
-
noResults: "Nenhum resultado",
|
|
84
|
-
},
|
|
85
|
-
iconPanels: {
|
|
86
|
-
add: true,
|
|
87
|
-
visible: 1,
|
|
88
|
-
},
|
|
89
|
-
sidebar: {
|
|
90
|
-
collapsed: {
|
|
91
|
-
use: "(min-width: 450px)",
|
|
92
|
-
},
|
|
93
|
-
expanded: {
|
|
94
|
-
use: "(min-width: 1000px)",
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
navbars: [
|
|
98
|
-
{
|
|
99
|
-
content: ["searchfield"],
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
type: "tabs",
|
|
103
|
-
content: [
|
|
104
|
-
'<a href="#panel-menu"><i class="fas fa-ellipsis-h"></i> <span style="margin-left:5px"> Menu</span></a>',
|
|
105
|
-
'<a href="#panel-account"><i class="fa fa-user"></i> <span style="margin-left:5px"> Conta</span></a>',
|
|
106
|
-
],
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
content: ["prev", "breadcrumbs", "close"],
|
|
110
|
-
},
|
|
111
|
-
],
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
searchfield: {
|
|
115
|
-
cancel: true,
|
|
116
|
-
clear: true,
|
|
117
|
-
},
|
|
118
|
-
}
|
|
119
|
-
);
|
|
33
|
+
this.esconderBotaoRodape();
|
|
34
|
+
this.escondeMostra(false);
|
|
35
|
+
|
|
36
|
+
this.$nextTick(function () {
|
|
37
|
+
window.addEventListener("resize", this.getWindowWidth);
|
|
38
|
+
window.addEventListener("resize", this.getWindowHeight);
|
|
39
|
+
this.getWindowWidth();
|
|
40
|
+
this.getWindowHeight();
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
beforeDestroy() {
|
|
44
|
+
window.removeEventListener("resize", this.getWindowWidth);
|
|
45
|
+
window.removeEventListener("resize", this.getWindowHeight);
|
|
46
|
+
},
|
|
47
|
+
updated() {
|
|
48
|
+
this.esconderBotaoRodape();
|
|
120
49
|
},
|
|
121
50
|
methods: {
|
|
122
|
-
|
|
123
|
-
|
|
51
|
+
...mapMutations("generic", ["escondeMostraMenu"]),
|
|
52
|
+
escondeMostra(esconde) {
|
|
53
|
+
var corpo = document.getElementsByTagName("body")[0];
|
|
54
|
+
this.escondeMostraMenu(esconde);
|
|
55
|
+
if (esconde) {
|
|
56
|
+
corpo.style = "margin-left: 50px;transition: all 0.2s ease-in-out;";
|
|
57
|
+
} else {
|
|
58
|
+
corpo.style = "margin-left: 220px;transition: all 0.2s ease-in-out;";
|
|
59
|
+
}
|
|
124
60
|
},
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
61
|
+
getWindowWidth(event) {
|
|
62
|
+
this.windowWidth = document.documentElement.clientWidth;
|
|
63
|
+
},
|
|
64
|
+
getWindowHeight(event) {
|
|
65
|
+
this.windowHeight = document.documentElement.clientHeight;
|
|
66
|
+
},
|
|
67
|
+
esconderBotaoRodape() {
|
|
68
|
+
var botao = document.getElementsByClassName("collapse-btn")[0];
|
|
69
|
+
botao.style = "visibility: hidden !important;";
|
|
130
70
|
},
|
|
131
71
|
},
|
|
72
|
+
watch: {
|
|
73
|
+
windowWidth: function () {
|
|
74
|
+
if (this.windowWidth < 1280) {
|
|
75
|
+
this.escondeMostra(true);
|
|
76
|
+
} else {
|
|
77
|
+
this.escondeMostra(false);
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"menu.escondeMostra": function (value) {
|
|
81
|
+
this.escondeMostra(value);
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
computed: {
|
|
85
|
+
...mapState("generic", ["menu"]),
|
|
86
|
+
},
|
|
132
87
|
};
|
|
133
88
|
</script>
|
|
134
89
|
|
|
135
|
-
<style
|
|
136
|
-
.
|
|
137
|
-
|
|
90
|
+
<style>
|
|
91
|
+
.v-sidebar-menu .vsm-title {
|
|
92
|
+
font-size: 14px !important;
|
|
93
|
+
font-weight: normal !important;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.v-sidebar-menu.white-theme .vsm-dropdown > .vsm-list {
|
|
97
|
+
background-color: #fafafc !important;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.v-sidebar-menu {
|
|
101
|
+
background-color: white !important;
|
|
102
|
+
border-right: 1px solid #e1e1e2;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.v-sidebar-menu.white-theme .vsm-item.first-item > .vsm-link > .vsm-icon {
|
|
106
|
+
color: #4680a5 !important;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.v-sidebar-menu .vsm-arrow:after {
|
|
110
|
+
font-family: "Font Awesome 5 Pro" !important;
|
|
111
|
+
content: "\f105" !important;
|
|
138
112
|
}
|
|
139
113
|
</style>
|
|
@@ -25,24 +25,25 @@
|
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
|
-
<br v-show="mostrarBotoes"/>
|
|
28
|
+
<br v-show="mostrarBotoes" />
|
|
29
29
|
<div class="row" v-show="mostrarBotoes">
|
|
30
30
|
<div class="col-12" v-show="mostrarBotoes">
|
|
31
31
|
<slot name="conteudo-botoes"></slot>
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
34
|
-
<br v-show="mostrarBotoes || mostrarPesquisa"/>
|
|
34
|
+
<br v-show="mostrarBotoes || mostrarPesquisa" />
|
|
35
35
|
<div class="row" v-show="mostrarBotoes || mostrarPesquisa">
|
|
36
36
|
<div class="col-8">
|
|
37
37
|
<div v-show="mostrarPesquisa"><Pesquisa /></div>
|
|
38
38
|
</div>
|
|
39
39
|
</div>
|
|
40
|
-
<br v-show="mostrarPesquisa"/>
|
|
40
|
+
<br v-show="mostrarPesquisa" />
|
|
41
41
|
<div>
|
|
42
42
|
<slot name="conteudo-principal"></slot>
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
|
+
<br /><br /><br />
|
|
46
47
|
</div>
|
|
47
48
|
</template>
|
|
48
49
|
|
|
@@ -107,10 +108,9 @@ export default {
|
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
.c-titulo-pagina {
|
|
110
|
-
font-size:
|
|
111
|
+
font-size: 20px;
|
|
111
112
|
margin-top: 16px;
|
|
112
113
|
color: #577696;
|
|
113
|
-
font-weight: bold;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
.c-voltar {
|
|
@@ -1,22 +1,65 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div>
|
|
3
|
+
<div
|
|
4
|
+
class="topo"
|
|
5
|
+
:class="{ esconde: menu.escondeMostra, mostra: !menu.escondeMostra }"
|
|
6
|
+
:style="'background-color:' + corTopo"
|
|
7
|
+
>
|
|
8
|
+
<span class="icone" @click="mostrar = !mostrar"><i class="fal fa-bars"></i></span>
|
|
9
|
+
</div>
|
|
10
|
+
<br />
|
|
11
|
+
</div>
|
|
3
12
|
</template>
|
|
4
13
|
|
|
5
14
|
<script>
|
|
15
|
+
import { mapState, mapMutations } from "vuex";
|
|
16
|
+
|
|
6
17
|
export default {
|
|
7
18
|
name: "Topo",
|
|
19
|
+
props: {
|
|
20
|
+
corTopo: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "#4680A5",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
data() {
|
|
26
|
+
return { mostrar: false };
|
|
27
|
+
},
|
|
28
|
+
methods: {
|
|
29
|
+
...mapMutations("generic", ["escondeMostraMenu"]),
|
|
30
|
+
},
|
|
31
|
+
computed: {
|
|
32
|
+
...mapState("generic", ["menu"]),
|
|
33
|
+
},
|
|
34
|
+
watch: {
|
|
35
|
+
mostrar(valor) {
|
|
36
|
+
this.escondeMostraMenu(valor);
|
|
37
|
+
},
|
|
38
|
+
},
|
|
8
39
|
};
|
|
9
40
|
</script>
|
|
10
41
|
|
|
11
42
|
<style scoped>
|
|
12
43
|
.topo {
|
|
13
|
-
|
|
14
|
-
display: block;
|
|
15
|
-
margin: 0 auto;
|
|
16
|
-
height: 60px;
|
|
44
|
+
height: 50px;
|
|
17
45
|
width: 100%;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
46
|
+
position: fixed;
|
|
47
|
+
top: 0;
|
|
48
|
+
left: 0;
|
|
49
|
+
z-index: 20;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.esconde {
|
|
53
|
+
padding-left: 60px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.mostra {
|
|
57
|
+
padding-left: 230px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.icone {
|
|
61
|
+
font-size: 25px;
|
|
62
|
+
color: white;
|
|
63
|
+
cursor: pointer;
|
|
21
64
|
}
|
|
22
65
|
</style>
|
|
@@ -119,7 +119,7 @@ export default {
|
|
|
119
119
|
},
|
|
120
120
|
},
|
|
121
121
|
methods: {
|
|
122
|
-
...mapActions("generic", ["getApi", "
|
|
122
|
+
...mapActions("generic", ["getApi", "deleteAllApi"]),
|
|
123
123
|
...mapMutations("generic", [
|
|
124
124
|
"removeCarregando",
|
|
125
125
|
"adicionaSelecao",
|
|
@@ -139,7 +139,7 @@ export default {
|
|
|
139
139
|
url: this.modeloLista.urlRemoverTodosApi,
|
|
140
140
|
selecionados: this.selecionados,
|
|
141
141
|
};
|
|
142
|
-
this.
|
|
142
|
+
this.deleteAllApi(params).then(() => {
|
|
143
143
|
this.removeCarregando(["remover"]);
|
|
144
144
|
this.adicionaSelecao([]);
|
|
145
145
|
});
|
|
@@ -6,6 +6,13 @@ import Token from "@nixweb/nixloc-ui/src/config/token";
|
|
|
6
6
|
export default {
|
|
7
7
|
namespaced: true,
|
|
8
8
|
state: {
|
|
9
|
+
menu: {
|
|
10
|
+
escondeMostra: false, itens: [{
|
|
11
|
+
href: "/dashboard",
|
|
12
|
+
title: "Dashboard",
|
|
13
|
+
icon: "fa fa-chart-area",
|
|
14
|
+
},]
|
|
15
|
+
},
|
|
9
16
|
modal: {
|
|
10
17
|
nome: undefined,
|
|
11
18
|
abrir: false
|
|
@@ -66,6 +73,12 @@ export default {
|
|
|
66
73
|
},
|
|
67
74
|
},
|
|
68
75
|
mutations: {
|
|
76
|
+
insereItemMenu: (state, obj) => {
|
|
77
|
+
state.menu.itens.push(obj);
|
|
78
|
+
},
|
|
79
|
+
escondeMostraMenu: (state, escondeMostra) => {
|
|
80
|
+
state.menu.escondeMostra = escondeMostra;
|
|
81
|
+
},
|
|
69
82
|
abrirModal: (state, nome) => {
|
|
70
83
|
state.modal.nome = nome;
|
|
71
84
|
state.modal.abrir = true;
|