@monoui/vuejs 1.1.10 → 1.1.13
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 +11 -11
- package/package.json +1 -1
- package/src/components/Modal/Modal.vue +78 -3
- package/src/components/Table/Table.vue +27 -10
package/package.json
CHANGED
|
@@ -5,7 +5,12 @@
|
|
|
5
5
|
v-bind="$props"
|
|
6
6
|
:title="displayTitle"
|
|
7
7
|
v-model="visible"
|
|
8
|
+
@hidden="hidden()"
|
|
8
9
|
:hide-footer="hideFooter"
|
|
10
|
+
:dialog-class="isFullScreen ? 'modal-dialog-fullScreen' : ''"
|
|
11
|
+
:content-class="isFullScreen ? 'modal-content-fullScreen' : ''"
|
|
12
|
+
:body-class="isFullScreen ? 'modal-body-fullScreen' : ''"
|
|
13
|
+
:header-class="isFullScreen ? 'modal-header-fullScreen' : ''"
|
|
9
14
|
>
|
|
10
15
|
<mui-loader :loading="loading" />
|
|
11
16
|
|
|
@@ -20,8 +25,32 @@
|
|
|
20
25
|
<slot name="modal-title"></slot>
|
|
21
26
|
</template> -->
|
|
22
27
|
|
|
23
|
-
<template v-if="!loading" #modal-header>
|
|
24
|
-
<slot name="modal-header"
|
|
28
|
+
<template v-if="!loading" #modal-header="{close}">
|
|
29
|
+
<slot name="modal-header">
|
|
30
|
+
<div class="d-flex align-items-center">
|
|
31
|
+
<h5 class="modal-title">{{ displayTitle }}</h5>
|
|
32
|
+
<mui-button
|
|
33
|
+
v-if="enableFullScreen"
|
|
34
|
+
variant="light"
|
|
35
|
+
fixed-width
|
|
36
|
+
class="ml-2"
|
|
37
|
+
@click="fullScreeModalChange()"
|
|
38
|
+
:icon="isFullScreen ? 'compress' : 'expand'"
|
|
39
|
+
:title="
|
|
40
|
+
isFullScreen
|
|
41
|
+
? 'Disable Full Screen Mode'
|
|
42
|
+
: 'Enable Full Screen Mode'
|
|
43
|
+
"
|
|
44
|
+
></mui-button>
|
|
45
|
+
</div>
|
|
46
|
+
<mui-button
|
|
47
|
+
@click="close()"
|
|
48
|
+
class="close"
|
|
49
|
+
style="font-size:.85rem;"
|
|
50
|
+
>
|
|
51
|
+
<mui-icon icon="times" size="xs" />
|
|
52
|
+
</mui-button>
|
|
53
|
+
</slot>
|
|
25
54
|
</template>
|
|
26
55
|
|
|
27
56
|
<template v-slot:modal-footer="{ ok, cancel }">
|
|
@@ -46,6 +75,11 @@
|
|
|
46
75
|
<script>
|
|
47
76
|
export default {
|
|
48
77
|
name: "mui-modal",
|
|
78
|
+
data() {
|
|
79
|
+
return {
|
|
80
|
+
isFullScreen: false
|
|
81
|
+
};
|
|
82
|
+
},
|
|
49
83
|
computed: {
|
|
50
84
|
visible: {
|
|
51
85
|
get() {
|
|
@@ -110,6 +144,10 @@ export default {
|
|
|
110
144
|
cancelTitle: {
|
|
111
145
|
type: String,
|
|
112
146
|
default: "Cancel"
|
|
147
|
+
},
|
|
148
|
+
enableFullScreen: {
|
|
149
|
+
type: Boolean,
|
|
150
|
+
default: false
|
|
113
151
|
}
|
|
114
152
|
},
|
|
115
153
|
methods: {
|
|
@@ -118,8 +156,45 @@ export default {
|
|
|
118
156
|
},
|
|
119
157
|
hide() {
|
|
120
158
|
this.$refs.modal.hide();
|
|
159
|
+
},
|
|
160
|
+
hidden() {
|
|
161
|
+
this.isFullScreen = false;
|
|
162
|
+
this.emitChange();
|
|
163
|
+
},
|
|
164
|
+
fullScreeModalChange() {
|
|
165
|
+
this.isFullScreen = !this.isFullScreen;
|
|
166
|
+
this.emitChange();
|
|
167
|
+
},
|
|
168
|
+
emitChange() {
|
|
169
|
+
this.$emit("full-screen-modal-change", this.isFullScreen);
|
|
121
170
|
}
|
|
122
171
|
}
|
|
123
172
|
};
|
|
124
173
|
</script>
|
|
125
|
-
<style
|
|
174
|
+
<style>
|
|
175
|
+
.modal-dialog-fullScreen {
|
|
176
|
+
max-width: 100% !important;
|
|
177
|
+
height: 100%;
|
|
178
|
+
margin: 0 !important;
|
|
179
|
+
padding: 0 !important;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.modal-content-fullScreen {
|
|
183
|
+
height: 100%;
|
|
184
|
+
width: 100%;
|
|
185
|
+
border: 0;
|
|
186
|
+
border-radius: 0;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.modal-body-fullScreen {
|
|
190
|
+
overflow-y: auto;
|
|
191
|
+
height: 100%;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.modal-header-fullScreen {
|
|
195
|
+
flex: 0;
|
|
196
|
+
}
|
|
197
|
+
.close:hover {
|
|
198
|
+
background-color: white !important;
|
|
199
|
+
}
|
|
200
|
+
</style>
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
'table-responsive': isResponsive,
|
|
6
6
|
'table-relative': isLoading
|
|
7
7
|
}"
|
|
8
|
+
:style="tableStyle"
|
|
8
9
|
>
|
|
9
10
|
<div
|
|
10
11
|
v-if="isLoading && !isEmpty"
|
|
@@ -205,16 +206,23 @@
|
|
|
205
206
|
<b-dropdown-divider
|
|
206
207
|
v-if="
|
|
207
208
|
filteredPerPageValues &&
|
|
208
|
-
filteredPerPageValues.length
|
|
209
|
+
filteredPerPageValues.length &&
|
|
210
|
+
inLimit()
|
|
209
211
|
"
|
|
210
212
|
></b-dropdown-divider>
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
213
|
+
|
|
214
|
+
<template>
|
|
215
|
+
<b-dropdown-item
|
|
216
|
+
v-if="inLimit()"
|
|
217
|
+
@click="
|
|
218
|
+
changeItemPerPage(
|
|
219
|
+
settings.totalItemCount
|
|
220
|
+
)
|
|
221
|
+
"
|
|
222
|
+
>
|
|
223
|
+
All ({{ settings.totalItemCount }})
|
|
224
|
+
</b-dropdown-item>
|
|
225
|
+
</template>
|
|
218
226
|
</b-dropdown>
|
|
219
227
|
</div>
|
|
220
228
|
</slot>
|
|
@@ -294,6 +302,11 @@ export default {
|
|
|
294
302
|
required: false,
|
|
295
303
|
default: ""
|
|
296
304
|
},
|
|
305
|
+
tableStyle: {
|
|
306
|
+
type: String,
|
|
307
|
+
required: false,
|
|
308
|
+
default: ""
|
|
309
|
+
},
|
|
297
310
|
isResponsive: {
|
|
298
311
|
type: Boolean,
|
|
299
312
|
required: false,
|
|
@@ -314,7 +327,7 @@ export default {
|
|
|
314
327
|
emptyMessage: {
|
|
315
328
|
type: String,
|
|
316
329
|
required: false,
|
|
317
|
-
default: "No data
|
|
330
|
+
default: "No data available in table"
|
|
318
331
|
},
|
|
319
332
|
autoLoad: {
|
|
320
333
|
type: Boolean,
|
|
@@ -373,7 +386,8 @@ export default {
|
|
|
373
386
|
tableData: [],
|
|
374
387
|
searchWord: null,
|
|
375
388
|
isDataEmpty: false,
|
|
376
|
-
isLoading: false
|
|
389
|
+
isLoading: false,
|
|
390
|
+
limit: 250
|
|
377
391
|
};
|
|
378
392
|
},
|
|
379
393
|
computed: {
|
|
@@ -525,6 +539,9 @@ export default {
|
|
|
525
539
|
}
|
|
526
540
|
|
|
527
541
|
this.getValues();
|
|
542
|
+
},
|
|
543
|
+
inLimit() {
|
|
544
|
+
return this.settings.totalItemCount <= this.limit;
|
|
528
545
|
}
|
|
529
546
|
}
|
|
530
547
|
};
|