File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 129129 computed: {
130130 style () {
131131 let style = {};
132- if (this .width ) {
133- style .width = this .width ;
134- }
135132 if (! this .fullscreen ) {
136133 style .marginTop = this .top ;
134+ if (this .width ) {
135+ style .width = this .width ;
136+ }
137137 }
138138 return style;
139139 }
Original file line number Diff line number Diff line change @@ -134,8 +134,10 @@ describe('Dialog', () => {
134134 } ;
135135
136136 it ( 'fullscreen' , ( ) => {
137- vm = getDialogVm ( 'fullscreen' ) ;
138- expect ( vm . $el . querySelector ( '.el-dialog' ) . classList . contains ( 'is-fullscreen' ) ) . to . true ;
137+ vm = getDialogVm ( 'fullscreen width="40%"' ) ;
138+ const dialogEl = vm . $el . querySelector ( '.el-dialog' ) ;
139+ expect ( dialogEl . classList . contains ( 'is-fullscreen' ) ) . to . true ;
140+ expect ( dialogEl . style . width ) . to . be . empty ;
139141 } ) ;
140142
141143 it ( 'top' , ( ) => {
You can’t perform that action at this time.
0 commit comments