|
|
@ -65,7 +65,6 @@ export default {
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
destroyPopup: false,
|
|
|
|
|
|
|
|
inTransition: false,
|
|
|
|
inTransition: false,
|
|
|
|
titleId: `rcDialogTitle${uuid++}`,
|
|
|
|
titleId: `rcDialogTitle${uuid++}`,
|
|
|
|
dialogMouseDown: undefined,
|
|
|
|
dialogMouseDown: undefined,
|
|
|
@ -74,9 +73,6 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
visible(val) {
|
|
|
|
visible(val) {
|
|
|
|
if (val) {
|
|
|
|
|
|
|
|
this.destroyPopup = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.updatedCallback(!val);
|
|
|
|
this.updatedCallback(!val);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -147,15 +143,12 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onAnimateLeave() {
|
|
|
|
onAnimateLeave() {
|
|
|
|
const { afterClose, destroyOnClose } = this;
|
|
|
|
const { afterClose } = this;
|
|
|
|
// need demo?
|
|
|
|
// need demo?
|
|
|
|
// https://github.com/react-component/dialog/pull/28
|
|
|
|
// https://github.com/react-component/dialog/pull/28
|
|
|
|
if (this.$refs.wrap) {
|
|
|
|
if (this.$refs.wrap) {
|
|
|
|
this.$refs.wrap.style.display = 'none';
|
|
|
|
this.$refs.wrap.style.display = 'none';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (destroyOnClose) {
|
|
|
|
|
|
|
|
this.destroyPopup = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.inTransition = false;
|
|
|
|
this.inTransition = false;
|
|
|
|
this.switchScrollingEffect();
|
|
|
|
this.switchScrollingEffect();
|
|
|
|
if (afterClose) {
|
|
|
|
if (afterClose) {
|
|
|
@ -295,7 +288,7 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Transition key="dialog" {...dialogTransitionProps}>
|
|
|
|
<Transition key="dialog" {...dialogTransitionProps}>
|
|
|
|
{visible || !this.destroyPopup ? dialogElement : null}
|
|
|
|
{visible || !this.destroyOnClose ? dialogElement : null}
|
|
|
|
</Transition>
|
|
|
|
</Transition>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|