forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQCard.js
More file actions
36 lines (29 loc) · 854 Bytes
/
QCard.js
File metadata and controls
36 lines (29 loc) · 854 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
import Vue from 'vue'
import DarkMixin from '../../mixins/dark.js'
import TagMixin from '../../mixins/tag.js'
import ListenersMixin from '../../mixins/listeners.js'
import { slot } from '../../utils/slot.js'
export default Vue.extend({
name: 'QCard',
mixins: [ ListenersMixin, DarkMixin, TagMixin ],
props: {
square: Boolean,
flat: Boolean,
bordered: Boolean
},
computed: {
classes () {
return 'q-card' +
(this.isDark === true ? ' q-card--dark q-dark' : '') +
(this.bordered === true ? ' q-card--bordered' : '') +
(this.square === true ? ' q-card--square no-border-radius' : '') +
(this.flat === true ? ' q-card--flat no-shadow' : '')
}
},
render (h) {
return h(this.tag, {
class: this.classes,
on: { ...this.qListeners }
}, slot(this, 'default'))
}
})