forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQModalLayout.js
More file actions
57 lines (51 loc) · 1.4 KB
/
QModalLayout.js
File metadata and controls
57 lines (51 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
export default {
name: 'QModalLayout',
inject: {
__qmodal: {
default () {
console.error('QModalLayout needs to be child of QModal')
}
}
},
props: {
headerStyle: [String, Object, Array],
headerClass: [String, Object, Array],
contentStyle: [String, Object, Array],
contentClass: [String, Object, Array],
footerStyle: [String, Object, Array],
footerClass: [String, Object, Array]
},
render (h) {
const child = []
if (this.$slots.header || (__THEME__ !== 'ios' && this.$slots.navigation)) {
child.push(h('div', {
staticClass: 'q-layout-header',
style: this.headerStyle,
'class': this.headerClass
}, [
this.$slots.header,
__THEME__ !== 'ios' ? this.$slots.navigation : null
]))
}
child.push(h('div', {
staticClass: 'q-modal-layout-content col scroll',
style: this.contentStyle,
'class': this.contentClass
}, [
this.$slots.default
]))
if (this.$slots.footer || (__THEME__ === 'ios' && this.$slots.navigation)) {
child.push(h('div', {
staticClass: 'q-layout-footer',
style: this.footerStyle,
'class': this.footerClass
}, [
this.$slots.footer,
__THEME__ === 'ios' ? this.$slots.navigation : null
]))
}
return h('div', {
staticClass: 'q-modal-layout column absolute-full'
}, child)
}
}