@nixweb/nixloc-ui 0.0.277 → 0.0.279
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/ButtonToggle.vue +31 -21
- package/src/component/shared/DocumentPublic.vue +1 -1
- package/src/component/shared/Pagination.vue +3 -1
- package/src/component/shared/TableTotalPerPage.vue +1 -0
- package/src/component/shared/filter-builder/FilterBuilder.vue +4 -2
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<button-toggle :style="{ backgroundColor: value ? colorActive : colorInactive }" :class="buttonClass"
|
|
4
|
+
@click="handleClick">
|
|
5
|
+
<span v-if="value" class="icon-button-toggle"><i :class="classIconActive"></i></span>
|
|
6
|
+
<span v-else class="icon-button-toggle"><i :class="classIconInactive"></i></span>
|
|
7
|
+
<span v-if="value">{{ titleActive }}</span>
|
|
8
|
+
<span v-else="value">{{ titleInactive }}</span>
|
|
9
|
+
</button-toggle>
|
|
10
|
+
</div>
|
|
8
11
|
</template>
|
|
9
12
|
|
|
10
13
|
<script>
|
|
@@ -12,27 +15,30 @@ export default {
|
|
|
12
15
|
name: 'ToggleButton',
|
|
13
16
|
props: {
|
|
14
17
|
titleActive: String,
|
|
18
|
+
classIconActive: String,
|
|
19
|
+
colorActive: String,
|
|
15
20
|
titleInactive: String,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
active: false,
|
|
21
|
-
}
|
|
21
|
+
classIconInactive: String,
|
|
22
|
+
colorInactive: String,
|
|
23
|
+
value: Number,
|
|
24
|
+
disabled: Boolean
|
|
22
25
|
},
|
|
23
26
|
computed: {
|
|
24
27
|
buttonClass() {
|
|
25
28
|
return {
|
|
26
29
|
'button-toggle': true,
|
|
27
|
-
'button-toggle--
|
|
28
|
-
'button-toggle--inactive': !this.
|
|
30
|
+
'button-toggle--value': this.value,
|
|
31
|
+
'button-toggle--inactive': !this.value,
|
|
32
|
+
'button-toggle-disabled': this.disabled
|
|
29
33
|
};
|
|
30
34
|
},
|
|
31
35
|
},
|
|
32
36
|
methods: {
|
|
33
37
|
handleClick() {
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
if (!this.disabled) {
|
|
39
|
+
this.value = this.value == true ? false : true;
|
|
40
|
+
this.$emit("input", this.value);
|
|
41
|
+
}
|
|
36
42
|
}
|
|
37
43
|
}
|
|
38
44
|
}
|
|
@@ -43,7 +49,7 @@ export default {
|
|
|
43
49
|
display: flex;
|
|
44
50
|
align-items: center;
|
|
45
51
|
justify-content: center;
|
|
46
|
-
padding:
|
|
52
|
+
padding: 3px 15px;
|
|
47
53
|
border: none;
|
|
48
54
|
border-radius: 20px;
|
|
49
55
|
font-size: 13px;
|
|
@@ -51,17 +57,21 @@ export default {
|
|
|
51
57
|
transition: background-color 0.3s, color 0.3s;
|
|
52
58
|
}
|
|
53
59
|
|
|
54
|
-
.button-toggle--
|
|
55
|
-
background-color: #FF8A1B;
|
|
60
|
+
.button-toggle--value {
|
|
56
61
|
color: white;
|
|
57
62
|
}
|
|
58
63
|
|
|
59
64
|
.button-toggle--inactive {
|
|
60
|
-
background-color: #F0F0F0;
|
|
61
65
|
color: black;
|
|
62
66
|
}
|
|
63
67
|
|
|
64
|
-
.icon {
|
|
68
|
+
.icon-button-toggle {
|
|
65
69
|
margin-right: 8px;
|
|
66
70
|
}
|
|
71
|
+
|
|
72
|
+
.button-toggle-disabled {
|
|
73
|
+
background-color: #b0b0b0;
|
|
74
|
+
opacity: 0.5;
|
|
75
|
+
cursor: not-allowed;
|
|
76
|
+
}
|
|
67
77
|
</style>
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
</span>
|
|
11
11
|
<span v-else>
|
|
12
12
|
<div>
|
|
13
|
-
<span class="title">
|
|
13
|
+
<span class="title">
|
|
14
|
+
<span v-if="totalPages == 0">0</span>
|
|
15
|
+
<span v-else>{{ currentPage }}</span> de {{ totalPages }}</span>
|
|
14
16
|
</div>
|
|
15
17
|
</span>
|
|
16
18
|
</div>
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
</div>
|
|
31
31
|
<div v-if="item.type == 'multiOptions'">
|
|
32
32
|
<div class="div-multi-options">
|
|
33
|
-
<CheckboxServer :title="item.title" :
|
|
33
|
+
<CheckboxServer :title="item.title" :propsParams="item.propsParams" :url="item.url"
|
|
34
|
+
v-model="item.value" />
|
|
34
35
|
</div>
|
|
35
36
|
</div>
|
|
36
37
|
<InputText v-if="item.type == 'text'" :title="item.title" v-model="item.value" />
|
|
@@ -97,7 +98,8 @@ export default {
|
|
|
97
98
|
title: filter.title,
|
|
98
99
|
type: filter.type,
|
|
99
100
|
url: filter.url,
|
|
100
|
-
value: filter.value
|
|
101
|
+
value: filter.value,
|
|
102
|
+
propsParams: filter.propsParams
|
|
101
103
|
});
|
|
102
104
|
});
|
|
103
105
|
return options;
|