Skip to content

Commit 836768e

Browse files
committed
upd: popup prettier fix
1 parent 79b4fd9 commit 836768e

File tree

3 files changed

+28
-29
lines changed

3 files changed

+28
-29
lines changed

src/packages/popup/demo.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ export default {
5757
showRound: false,
5858
showIconPosition: false,
5959
showCloseIcon: false,
60-
getContainer: false,
60+
getContainer: false
6161
};
6262
},
6363
methods: {
6464
show() {
6565
this.isShow = true;
66-
},
67-
},
66+
}
67+
}
6868
};
6969
</script>
7070
<style lang="scss" scoped></style>

src/packages/popup/overlay/overlay.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ const overlayProps = {
3333
},
3434
overlayClass: {
3535
type: String,
36-
default: '',
36+
default: ''
3737
},
3838
overlayStyle: {
3939
type: Object,
40-
default: () => {},
40+
default: () => {}
4141
},
4242
zIndex: {
43-
type: Number,
44-
},
43+
type: Number
44+
}
4545
};
4646
export { overlayProps };
4747
export default {

src/packages/popup/popup.vue

+21-22
Original file line numberDiff line numberDiff line change
@@ -34,48 +34,48 @@ const overflowScrollReg = /scroll|auto/i;
3434
const popupProps = {
3535
position: {
3636
type: String,
37-
default: 'center',
37+
default: 'center'
3838
},
3939
4040
transition: String,
4141
4242
closeable: {
4343
type: Boolean,
44-
default: false,
44+
default: false
4545
},
4646
closeIconPosition: {
4747
type: String,
48-
default: 'top-right',
48+
default: 'top-right'
4949
},
5050
closeIcon: {
5151
type: String,
52-
default: 'cross',
52+
default: 'cross'
5353
},
5454
5555
closeOnClickOverlay: {
5656
type: Boolean,
57-
default: true,
57+
default: true
5858
},
5959
6060
destroyOnClose: {
6161
type: Boolean,
62-
default: false,
62+
default: false
6363
},
6464
getContainer: String,
6565
round: {
6666
type: Boolean,
67-
default: false,
68-
},
67+
default: false
68+
}
6969
};
7070
export default {
7171
name: 'nut-popup',
7272
mixins: [touchMixins],
7373
components: {
74-
icon: Icon,
74+
icon: Icon
7575
},
7676
props: {
7777
...overlayProps,
78-
...popupProps,
78+
...popupProps
7979
},
8080
created() {
8181
this.transition ? (this.transitionName = this.transition) : (this.transitionName = `popup-slide-${this.position}`);
@@ -111,27 +111,27 @@ export default {
111111
val === 'center' ? (this.transitionName = 'popup-fade') : (this.transitionName = `popup-slide-${this.position}`);
112112
},
113113
getContainer: 'portal',
114-
overlay: 'renderOverlay',
114+
overlay: 'renderOverlay'
115115
},
116116
data() {
117117
return {
118118
showSlot: true,
119119
transitionName: 'popup-fade-center',
120-
overlayInstant: null,
120+
overlayInstant: null
121121
};
122122
},
123123
computed: {
124124
transitionDuration() {
125125
return this.duration ? this.duration + 's' : 'initial';
126-
},
126+
}
127127
},
128128
129129
methods: {
130130
open() {
131131
if (this.opened) {
132132
return;
133133
}
134-
if(this.destroyOnClose){
134+
if (this.destroyOnClose) {
135135
this.showSlot = true;
136136
}
137137
this.opened = true;
@@ -144,7 +144,7 @@ export default {
144144
overlayClass,
145145
overlayStyle,
146146
lockScroll,
147-
closeOnClickOverlay,
147+
closeOnClickOverlay
148148
};
149149
150150
this.renderOverlay(config);
@@ -206,13 +206,12 @@ export default {
206206
if (!overlayManager.lockCount) {
207207
document.body.classList.remove('nut-overflow-hidden');
208208
}
209-
}
210-
if(this.destroyOnClose){
211-
setTimeout(()=>{
209+
}
210+
if (this.destroyOnClose) {
211+
setTimeout(() => {
212212
this.showSlot = false;
213-
},this.duration*1000)
213+
}, this.duration * 1000);
214214
}
215-
216215
217216
overlayManager.closeOverlay(this);
218217
this.$emit('input', false);
@@ -235,8 +234,8 @@ export default {
235234
if (container && container !== el.parentNode) {
236235
container.appendChild(el);
237236
}
238-
},
239-
},
237+
}
238+
}
240239
};
241240
export { popupProps };
242241
</script>

0 commit comments

Comments
 (0)