@monoui/vuejs 1.1.23 → 1.1.26
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/dist/main.js +2 -2
- package/package.json +1 -1
- package/src/components/Table/Table.vue +23 -1
- package/src/directive/nocomplete.js +35 -0
package/package.json
CHANGED
|
@@ -234,9 +234,26 @@
|
|
|
234
234
|
</slot>
|
|
235
235
|
<slot name="pagination-center" v-bind="settings">
|
|
236
236
|
<div>
|
|
237
|
-
<span
|
|
237
|
+
<span
|
|
238
|
+
v-show="
|
|
239
|
+
settings.totalItemCount && !refreshButton
|
|
240
|
+
"
|
|
241
|
+
>
|
|
238
242
|
{{ settings.totalItemCount }} rows
|
|
239
243
|
</span>
|
|
244
|
+
<mui-button
|
|
245
|
+
v-if="refreshButton"
|
|
246
|
+
variant="light"
|
|
247
|
+
id="tooltip-button-5"
|
|
248
|
+
class="ml-2 mr-2"
|
|
249
|
+
@click="refresh"
|
|
250
|
+
>
|
|
251
|
+
<i class="fas fa-sync"></i>
|
|
252
|
+
Refresh
|
|
253
|
+
<span v-show="settings.totalItemCount">
|
|
254
|
+
{{ settings.totalItemCount }} Rows
|
|
255
|
+
</span></mui-button
|
|
256
|
+
>
|
|
240
257
|
</div>
|
|
241
258
|
</slot>
|
|
242
259
|
<slot name="pagination-buttons">
|
|
@@ -341,6 +358,11 @@ export default {
|
|
|
341
358
|
required: false,
|
|
342
359
|
default: true
|
|
343
360
|
},
|
|
361
|
+
refreshButton: {
|
|
362
|
+
type: Boolean,
|
|
363
|
+
required: false,
|
|
364
|
+
default: true
|
|
365
|
+
},
|
|
344
366
|
pagination: {
|
|
345
367
|
type: Object,
|
|
346
368
|
required: false,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export function install(Vue) {
|
|
2
|
+
if (install.installed) {
|
|
3
|
+
return;
|
|
4
|
+
}
|
|
5
|
+
install.installed = true;
|
|
6
|
+
|
|
7
|
+
Vue.directive("no-autocomplete", {
|
|
8
|
+
bind(el, { value }) {
|
|
9
|
+
const isDisabled = el.disabled;
|
|
10
|
+
el.disabled = true;
|
|
11
|
+
|
|
12
|
+
el.style.backgroundColor = "inherit";
|
|
13
|
+
|
|
14
|
+
setTimeout(() => {
|
|
15
|
+
el.disabled = isDisabled;
|
|
16
|
+
}, 1000);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const plugin = {
|
|
22
|
+
install
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
let globalVue = null;
|
|
26
|
+
if (typeof window !== "undefined") {
|
|
27
|
+
globalVue = window.Vue;
|
|
28
|
+
} else if (typeof global !== "undefined") {
|
|
29
|
+
globalVue = global.Vue;
|
|
30
|
+
}
|
|
31
|
+
if (globalVue) {
|
|
32
|
+
globalVue.use(plugin);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default plugin;
|