@monoui/vuejs 1.1.8 → 1.1.12
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
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<mui-button-core v-on="$listeners" v-bind="$props" :class="innerClass">
|
|
3
3
|
<template v-if="!hasSlot">
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
:class="['mr-1', spinnerClass]"
|
|
8
|
-
/>
|
|
4
|
+
<span class="mr-1" v-if="loading">
|
|
5
|
+
<b-spinner :small="true" :class="spinnerClass" />
|
|
6
|
+
</span>
|
|
9
7
|
<mui-icon
|
|
10
8
|
v-if="!loading && icon"
|
|
11
9
|
:icon="icon"
|
|
@@ -13,7 +11,12 @@
|
|
|
13
11
|
/>
|
|
14
12
|
{{ text }}
|
|
15
13
|
</template>
|
|
16
|
-
<
|
|
14
|
+
<template v-else>
|
|
15
|
+
<span class="mr-1" v-if="loading">
|
|
16
|
+
<b-spinner :small="true" :class="spinnerClass" />
|
|
17
|
+
</span>
|
|
18
|
+
<slot></slot>
|
|
19
|
+
</template>
|
|
17
20
|
</mui-button-core>
|
|
18
21
|
</template>
|
|
19
22
|
<script>
|
|
@@ -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"
|
|
@@ -294,6 +295,11 @@ export default {
|
|
|
294
295
|
required: false,
|
|
295
296
|
default: ""
|
|
296
297
|
},
|
|
298
|
+
tableStyle: {
|
|
299
|
+
type: String,
|
|
300
|
+
required: false,
|
|
301
|
+
default: ""
|
|
302
|
+
},
|
|
297
303
|
isResponsive: {
|
|
298
304
|
type: Boolean,
|
|
299
305
|
required: false,
|
|
@@ -414,9 +420,9 @@ export default {
|
|
|
414
420
|
},
|
|
415
421
|
sortableIconClass(column) {
|
|
416
422
|
if (this.isSorted(column)) {
|
|
417
|
-
return
|
|
423
|
+
return this.sortingIconActiveClass;
|
|
418
424
|
}
|
|
419
|
-
return
|
|
425
|
+
return this.sortingIconClass;
|
|
420
426
|
},
|
|
421
427
|
isSorted(column) {
|
|
422
428
|
return this.sorting.some(x => x.Column === column);
|