forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQItemSection.js
More file actions
43 lines (35 loc) · 964 Bytes
/
QItemSection.js
File metadata and controls
43 lines (35 loc) · 964 Bytes
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
import Vue from 'vue'
import ListenersMixin from '../../mixins/listeners.js'
import { slot } from '../../utils/slot.js'
export default Vue.extend({
name: 'QItemSection',
mixins: [ ListenersMixin ],
props: {
avatar: Boolean,
thumbnail: Boolean,
side: Boolean,
top: Boolean,
noWrap: Boolean
},
computed: {
classes () {
const side = this.avatar || this.side || this.thumbnail
return {
'q-item__section--top': this.top,
'q-item__section--avatar': this.avatar,
'q-item__section--thumbnail': this.thumbnail,
'q-item__section--side': side,
'q-item__section--nowrap': this.noWrap,
'q-item__section--main': !side,
[`justify-${this.top ? 'start' : 'center'}`]: true
}
}
},
render (h) {
return h('div', {
staticClass: 'q-item__section column',
class: this.classes,
on: { ...this.qListeners }
}, slot(this, 'default'))
}
})