11import { QItem , QItemSide , QItemTile , QItemWrapper } from '../list'
22import { QSlideTransition } from '../slide-transition'
3- import Ripple from '../../directives/ripple'
43import ModelToggleMixin from '../../mixins/model-toggle'
54import ItemMixin from '../../mixins/item'
6- import extend from '../../utils/extend'
75
86const eventName = 'q:collapsible:close'
97
@@ -13,39 +11,28 @@ export default {
1311 modelToggle : {
1412 history : false
1513 } ,
16- directives : {
17- Ripple
18- } ,
1914 props : {
2015 disable : Boolean ,
2116 popup : Boolean ,
2217 indent : Boolean ,
2318 group : String ,
2419 iconToggle : Boolean ,
25- noRipple : Boolean ,
2620 collapseIcon : String ,
2721 opened : Boolean ,
2822
2923 headerStyle : [ Array , String , Object ] ,
3024 headerClass : [ Array , String , Object ]
3125 } ,
3226 computed : {
33- hasRipple ( ) {
34- return __THEME__ === 'mat' && ! this . noRipple && ! this . disable
35- } ,
3627 classes ( ) {
3728 return {
3829 'q-collapsible-opened' : this . popup && this . showing ,
3930 'q-collapsible-closed' : this . popup && ! this . showing ,
31+ 'q-collapsible-cursor-pointer' : ! this . iconToggle ,
4032 'q-item-separator' : this . separator ,
4133 'q-item-inset-separator' : this . insetSeparator ,
4234 disabled : this . disable
4335 }
44- } ,
45- wrapperCfg ( ) {
46- return extend ( { } , this . $props , {
47- link : ! this . iconToggle
48- } )
4936 }
5037 } ,
5138 watch : {
@@ -84,26 +71,18 @@ export default {
8471 nativeOn : {
8572 click : this . __toggleIcon
8673 } ,
87- props : { icon : this . collapseIcon || this . $q . icon . collapsible . icon } ,
88- directives : this . iconToggle && this . hasRipple
89- ? [ { name : 'ripple' } ]
90- : null
74+ props : { icon : this . collapseIcon || this . $q . icon . collapsible . icon }
9175 } )
9276 ]
9377 } ,
9478 __getItemProps ( wrapper ) {
9579 return {
96- props : wrapper
97- ? { cfg : this . wrapperCfg }
98- : { link : ! this . iconToggle } ,
80+ props : { cfg : this . $props } ,
9981 style : this . headerStyle ,
10082 'class' : this . headerClass ,
10183 nativeOn : {
10284 click : this . __toggleItem
103- } ,
104- directives : this . hasRipple && ! this . iconToggle
105- ? [ { name : 'ripple' } ]
106- : null
85+ }
10786 }
10887 }
10988 } ,
0 commit comments