@nixweb/nixloc-ui 1.7.0 → 1.8.0
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
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
</div>
|
|
9
9
|
<div v-show="show" class="side-by-side">
|
|
10
10
|
<div class="input-container">
|
|
11
|
-
<input type="text" v-model="baseParams.search" placeholder="Pesquisar..." />
|
|
11
|
+
<input type="text" v-model="baseParams.search" placeholder="Pesquisar..." @keyup.enter.prevent="getAll" />
|
|
12
|
+
<Button _key="btnSearch" :disabled="baseParams.search == ''" type="info"
|
|
13
|
+
classIcon="fa-solid fa-magnifying-glass" size="small" :clicked="getAll" />
|
|
14
|
+
<Button _key="btnClean" :disabled="baseParams.search == ''" type="info" classIcon="fa-solid fa-broom"
|
|
15
|
+
size="small" :clicked="clean" />
|
|
12
16
|
</div>
|
|
13
17
|
</div>
|
|
14
18
|
|
|
@@ -32,10 +36,12 @@
|
|
|
32
36
|
</div>
|
|
33
37
|
<div v-if="totalRecords > 20 && data.length < totalRecords">
|
|
34
38
|
<div class="after-list text-center">
|
|
35
|
-
<Button key="loadingMore" type="info" title="Carregar mais..."
|
|
36
|
-
:clicked="loadingMore" />
|
|
39
|
+
<Button key="loadingMore" type="info" title="Carregar mais..." size="small" :clicked="loadingMore" />
|
|
37
40
|
</div>
|
|
38
41
|
</div>
|
|
42
|
+
<div class="title" v-if="data.length == 0">
|
|
43
|
+
Nenhum registro encontrado!
|
|
44
|
+
</div>
|
|
39
45
|
</ScrollBar>
|
|
40
46
|
</div>
|
|
41
47
|
</div>
|
|
@@ -79,7 +85,7 @@ export default {
|
|
|
79
85
|
baseParams: {
|
|
80
86
|
search: "",
|
|
81
87
|
currentPage: 1,
|
|
82
|
-
totalPerPage:
|
|
88
|
+
totalPerPage: 50,
|
|
83
89
|
},
|
|
84
90
|
};
|
|
85
91
|
},
|
|
@@ -125,7 +131,7 @@ export default {
|
|
|
125
131
|
this.markSelected();
|
|
126
132
|
|
|
127
133
|
this.loading = false;
|
|
128
|
-
this.removeLoading(["loadingMore"]);
|
|
134
|
+
this.removeLoading(["loadingMore", "btnSearch", "btnClean"]);
|
|
129
135
|
});
|
|
130
136
|
},
|
|
131
137
|
loadingMore() {
|
|
@@ -144,6 +150,14 @@ export default {
|
|
|
144
150
|
this.show = this.show == true ? false : true;
|
|
145
151
|
this.removeLoading(["btnShow"]);
|
|
146
152
|
},
|
|
153
|
+
clean() {
|
|
154
|
+
this.baseParams = {
|
|
155
|
+
search: "",
|
|
156
|
+
currentPage: 1,
|
|
157
|
+
totalPerPage: 50,
|
|
158
|
+
}
|
|
159
|
+
this.getAll();
|
|
160
|
+
},
|
|
147
161
|
markSelected() {
|
|
148
162
|
this.data.forEach(item => {
|
|
149
163
|
if (this.selected.includes(item.content)) {
|
|
@@ -155,14 +169,23 @@ export default {
|
|
|
155
169
|
watch: {
|
|
156
170
|
selected: {
|
|
157
171
|
handler(value) {
|
|
158
|
-
|
|
159
|
-
|
|
172
|
+
if (value) {
|
|
173
|
+
this.$emit("input", value);
|
|
174
|
+
if (this.changed) this.changed(value);
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
deep: true,
|
|
178
|
+
},
|
|
179
|
+
event: {
|
|
180
|
+
handler(event) {
|
|
181
|
+
if (event.name == "cleanCheckboxServer")
|
|
182
|
+
this.selected = "";
|
|
160
183
|
},
|
|
161
184
|
deep: true,
|
|
162
185
|
},
|
|
163
186
|
'baseParams.search': {
|
|
164
187
|
handler(value) {
|
|
165
|
-
this.getAll();
|
|
188
|
+
// this.getAll();
|
|
166
189
|
},
|
|
167
190
|
deep: true,
|
|
168
191
|
},
|