chore: update destory to unmount
parent
7555f2c65b
commit
585bb7495b
|
@ -24,7 +24,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.autoDestroy) {
|
if (this.autoDestroy) {
|
||||||
this.removeContainer();
|
this.removeContainer();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.removeContainer();
|
this.removeContainer();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -46,7 +46,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
const { visible } = this.$props;
|
const { visible } = this.$props;
|
||||||
// 离开时不会 render, 导到离开时数值不变,改用 func 。。
|
// 离开时不会 render, 导到离开时数值不变,改用 func 。。
|
||||||
openCount = visible && openCount ? openCount - 1 : openCount;
|
openCount = visible && openCount ? openCount - 1 : openCount;
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
const createRef = fn => {
|
const createRef = fn => {
|
||||||
return {
|
return {
|
||||||
onVnodeBeforeMounted: vnode => {
|
onVnodeBeforeMount: vnode => {
|
||||||
fn(vnode.component || vnode.el, vnode.key);
|
fn(vnode.component || vnode.el, vnode.key);
|
||||||
},
|
},
|
||||||
onVnodeUpdated: vnode => {
|
onVnodeUpdated: vnode => {
|
||||||
fn(vnode.component || vnode.el, vnode.key);
|
fn(vnode.component || vnode.el, vnode.key);
|
||||||
},
|
},
|
||||||
onVnodeDestroyed: vnode => {
|
onVnodeUnmounted: vnode => {
|
||||||
fn(vnode.component || vnode.el, vnode.key);
|
fn(null, vnode.key);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -44,7 +44,7 @@ export default function connect(mapStateToProps) {
|
||||||
this.trySubscribe();
|
this.trySubscribe();
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.tryUnsubscribe();
|
this.tryUnsubscribe();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -37,7 +37,7 @@ export default {
|
||||||
configProvider,
|
configProvider,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.instance) {
|
if (this.instance) {
|
||||||
this.instance.cancel();
|
this.instance.cancel();
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ const Affix = {
|
||||||
this.updatePosition();
|
this.updatePosition();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
clearTimeout(this.timeout);
|
clearTimeout(this.timeout);
|
||||||
removeObserveTarget(this);
|
removeObserveTarget(this);
|
||||||
this.updatePosition.cancel();
|
this.updatePosition.cancel();
|
||||||
|
|
|
@ -152,7 +152,7 @@ export default {
|
||||||
this.updateInk();
|
this.updateInk();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.scrollEvent) {
|
if (this.scrollEvent) {
|
||||||
this.scrollEvent.remove();
|
this.scrollEvent.remove();
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ export default {
|
||||||
this.antAnchor.registerLink(this.href);
|
this.antAnchor.registerLink(this.href);
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.antAnchor.unregisterLink(this.href);
|
this.antAnchor.unregisterLink(this.href);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -44,7 +44,7 @@ const BackTop = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.scrollEvent) {
|
if (this.scrollEvent) {
|
||||||
this.scrollEvent.remove();
|
this.scrollEvent.remove();
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.clearTimeout();
|
this.clearTimeout();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -50,7 +50,7 @@ export default {
|
||||||
updated() {
|
updated() {
|
||||||
this.fixTwoCNChar();
|
this.fixTwoCNChar();
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.delayTimeout) {
|
if (this.delayTimeout) {
|
||||||
clearTimeout(this.delayTimeout);
|
clearTimeout(this.delayTimeout);
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ const Carousel = {
|
||||||
// https://github.com/ant-design/ant-design/issues/7191
|
// https://github.com/ant-design/ant-design/issues/7191
|
||||||
this.innerSlider = this.$refs.slick && this.$refs.slick.innerSlider;
|
this.innerSlider = this.$refs.slick && this.$refs.slick.innerSlider;
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
const { autoplay } = this;
|
const { autoplay } = this;
|
||||||
if (autoplay) {
|
if (autoplay) {
|
||||||
window.removeEventListener('resize', this.onWindowResized);
|
window.removeEventListener('resize', this.onWindowResized);
|
||||||
|
|
|
@ -53,7 +53,7 @@ export default {
|
||||||
'`value` is not validate prop, do you mean `checked`?',
|
'`value` is not validate prop, do you mean `checked`?',
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
const { value, checkboxGroupContext: checkboxGroup = {} } = this;
|
const { value, checkboxGroupContext: checkboxGroup = {} } = this;
|
||||||
if (checkboxGroup.cancelValue) {
|
if (checkboxGroup.cancelValue) {
|
||||||
checkboxGroup.cancelValue(value);
|
checkboxGroup.cancelValue(value);
|
||||||
|
|
|
@ -194,7 +194,7 @@ const Descriptions = {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
ResponsiveObserve.unsubscribe(this.token);
|
ResponsiveObserve.unsubscribe(this.token);
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -85,7 +85,7 @@ const Drawer = {
|
||||||
this.preVisible = this.visible;
|
this.preVisible = this.visible;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
// unmount drawer in child, clear push.
|
// unmount drawer in child, clear push.
|
||||||
if (this.parentDrawer) {
|
if (this.parentDrawer) {
|
||||||
this.parentDrawer.pull();
|
this.parentDrawer.pull();
|
||||||
|
|
|
@ -121,7 +121,7 @@ export default {
|
||||||
this.initialValue = cloneDeep(this.fieldValue);
|
this.initialValue = cloneDeep(this.fieldValue);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
const { removeField } = this.FormContext;
|
const { removeField } = this.FormContext;
|
||||||
removeField && removeField(this);
|
removeField && removeField(this);
|
||||||
},
|
},
|
||||||
|
|
|
@ -106,7 +106,7 @@ export default {
|
||||||
this.collectContext();
|
this.collectContext();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.collectFormItemContext(this.$vnode && this.$vnode.context, 'delete');
|
this.collectFormItemContext(this.$vnode && this.$vnode.context, 'delete');
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
|
@ -48,7 +48,7 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
ResponsiveObserve.unsubscribe(this.token);
|
ResponsiveObserve.unsubscribe(this.token);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -82,7 +82,7 @@ export default {
|
||||||
this.clearPasswordValueAttribute();
|
this.clearPasswordValueAttribute();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.removePasswordTimeout) {
|
if (this.removePasswordTimeout) {
|
||||||
clearTimeout(this.removePasswordTimeout);
|
clearTimeout(this.removePasswordTimeout);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ const ResizableTextArea = {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.resizeTextarea();
|
this.resizeTextarea();
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
raf.cancel(this.nextFrameActionId);
|
raf.cancel(this.nextFrameActionId);
|
||||||
raf.cancel(this.resizeFrameId);
|
raf.cancel(this.resizeFrameId);
|
||||||
},
|
},
|
||||||
|
|
|
@ -145,7 +145,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.mql) {
|
if (this.mql) {
|
||||||
this.mql.removeListener(this.responsiveHandler);
|
this.mql.removeListener(this.responsiveHandler);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ const LocaleProvider = {
|
||||||
setMomentLocale(locale);
|
setMomentLocale(locale);
|
||||||
changeConfirmLocale(locale && locale.Modal);
|
changeConfirmLocale(locale && locale.Modal);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
changeConfirmLocale();
|
changeConfirmLocale();
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -64,7 +64,7 @@ const Menu = {
|
||||||
updated() {
|
updated() {
|
||||||
this.propsUpdating = false;
|
this.propsUpdating = false;
|
||||||
},
|
},
|
||||||
// beforeDestroy() {
|
// beforeUnmount() {
|
||||||
// raf.cancel(this.mountRafId);
|
// raf.cancel(this.mountRafId);
|
||||||
// },
|
// },
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
@ -24,7 +24,7 @@ export default {
|
||||||
this.timeoutId = setTimeout(() => this.$el.focus());
|
this.timeoutId = setTimeout(() => this.$el.focus());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
clearTimeout(this.timeoutId);
|
clearTimeout(this.timeoutId);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -66,7 +66,7 @@ export default {
|
||||||
this.updateSpinning();
|
this.updateSpinning();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.cancelExistingSpin();
|
this.cancelExistingSpin();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -28,7 +28,7 @@ export default {
|
||||||
this.syncTimer();
|
this.syncTimer();
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.stopTimer();
|
this.stopTimer();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ export default {
|
||||||
this.subscribe();
|
this.subscribe();
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.unsubscribe) {
|
if (this.unsubscribe) {
|
||||||
this.unsubscribe();
|
this.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,7 +125,7 @@ export default {
|
||||||
this.subscribe();
|
this.subscribe();
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.unsubscribe) {
|
if (this.unsubscribe) {
|
||||||
this.unsubscribe();
|
this.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ export default function createBodyRow(Component = 'tr') {
|
||||||
this.subscribe();
|
this.subscribe();
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.unsubscribe) {
|
if (this.unsubscribe) {
|
||||||
this.unsubscribe();
|
this.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ export default {
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
// },
|
// },
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
clearTimeout(this.triggerScrollTimer);
|
clearTimeout(this.triggerScrollTimer);
|
||||||
// if (this.scrollEvent) {
|
// if (this.scrollEvent) {
|
||||||
// this.scrollEvent.remove();
|
// this.scrollEvent.remove();
|
||||||
|
|
|
@ -46,7 +46,7 @@ const ListBody = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
raf.cancel(this.mountId);
|
raf.cancel(this.mountId);
|
||||||
raf.cancel(this.lazyId);
|
raf.cancel(this.lazyId);
|
||||||
},
|
},
|
||||||
|
|
|
@ -48,7 +48,7 @@ export default {
|
||||||
this.sFileList = val || [];
|
this.sFileList = val || [];
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.clearProgressTimer();
|
this.clearProgressTimer();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -94,7 +94,7 @@ export default {
|
||||||
this.prevProps = { ...this.$props, align: clonedeep(this.$props.align) };
|
this.prevProps = { ...this.$props, align: clonedeep(this.$props.align) };
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.stopMonitorWindowResize();
|
this.stopMonitorWindowResize();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -80,7 +80,7 @@ const Picker = {
|
||||||
this.preSOpen = this.sOpen;
|
this.preSOpen = this.sOpen;
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
clearTimeout(this.focusTimeout);
|
clearTimeout(this.focusTimeout);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -96,7 +96,7 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
const { visible, getOpenCount } = this;
|
const { visible, getOpenCount } = this;
|
||||||
if ((visible || this.inTransition) && !getOpenCount()) {
|
if ((visible || this.inTransition) && !getOpenCount()) {
|
||||||
this.switchScrollingEffect();
|
this.switchScrollingEffect();
|
||||||
|
|
|
@ -130,7 +130,7 @@ const Drawer = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
delete currentDrawer[this.drawerId];
|
delete currentDrawer[this.drawerId];
|
||||||
delete this.isOpenChange;
|
delete this.isOpenChange;
|
||||||
if (this.container) {
|
if (this.container) {
|
||||||
|
|
|
@ -174,7 +174,7 @@ export default {
|
||||||
this.updatedFunc();
|
this.updatedFunc();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.stop();
|
this.stop();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -73,7 +73,7 @@ export default {
|
||||||
this.scrollHander = addEventListener(eventNode, 'scroll', this.lazyLoadHandler);
|
this.scrollHander = addEventListener(eventNode, 'scroll', this.lazyLoadHandler);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this._mounted = false;
|
this._mounted = false;
|
||||||
if (this.lazyLoadHandler.cancel) {
|
if (this.lazyLoadHandler.cancel) {
|
||||||
this.lazyLoadHandler.cancel();
|
this.lazyLoadHandler.cancel();
|
||||||
|
|
|
@ -80,7 +80,7 @@ const DOMWrap = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.resizeObserver) {
|
if (this.resizeObserver) {
|
||||||
this.resizeObserver.disconnect();
|
this.resizeObserver.disconnect();
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ const MenuItem = {
|
||||||
});
|
});
|
||||||
this.callRef();
|
this.callRef();
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
const props = this.$props;
|
const props = this.$props;
|
||||||
this.__emit('destroy', props.eventKey);
|
this.__emit('destroy', props.eventKey);
|
||||||
},
|
},
|
||||||
|
|
|
@ -102,7 +102,7 @@ const SubMenu = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
const { eventKey } = this;
|
const { eventKey } = this;
|
||||||
this.__emit('destroy', eventKey);
|
this.__emit('destroy', eventKey);
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,9 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.clearCloseTimer();
|
this.clearCloseTimer();
|
||||||
this.willDestroy = true; // beforeDestroy调用后依然会触发onMouseleave事件
|
this.willDestroy = true; // beforeUnmount调用后依然会触发onMouseleave事件
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
close(e) {
|
close(e) {
|
||||||
|
|
|
@ -23,7 +23,7 @@ const VueResizeObserver = {
|
||||||
updated() {
|
updated() {
|
||||||
this.onComponentUpdated();
|
this.onComponentUpdated();
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.destroyObserver();
|
this.destroyObserver();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -63,7 +63,7 @@ export default {
|
||||||
this.lastInputValue = props.inputValue;
|
this.lastInputValue = props.inputValue;
|
||||||
this.prevVisible = this.visible;
|
this.prevVisible = this.visible;
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.rafInstance) {
|
if (this.rafInstance) {
|
||||||
raf.cancel(this.rafInstance);
|
raf.cancel(this.rafInstance);
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,7 +200,7 @@ const Select = {
|
||||||
this.forcePopupAlign();
|
this.forcePopupAlign();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.clearFocusTime();
|
this.clearFocusTime();
|
||||||
this.clearBlurTime();
|
this.clearBlurTime();
|
||||||
this.clearComboboxTime();
|
this.clearComboboxTime();
|
||||||
|
|
|
@ -82,7 +82,7 @@ export default {
|
||||||
this.setDropdownWidth();
|
this.setDropdownWidth();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.cancelRafInstance();
|
this.cancelRafInstance();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -489,7 +489,7 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.animationEndCallback) {
|
if (this.animationEndCallback) {
|
||||||
clearTimeout(this.animationEndCallback);
|
clearTimeout(this.animationEndCallback);
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this._responsiveMediaHandlers.forEach(function(obj) {
|
this._responsiveMediaHandlers.forEach(function(obj) {
|
||||||
enquire.unregister(obj.query, obj.handler);
|
enquire.unregister(obj.query, obj.handler);
|
||||||
});
|
});
|
||||||
|
|
|
@ -31,7 +31,7 @@ export default {
|
||||||
// so we listen on document here.
|
// so we listen on document here.
|
||||||
this.onMouseUpListener = addEventListener(document, 'mouseup', this.handleMouseUp);
|
this.onMouseUpListener = addEventListener(document, 'mouseup', this.handleMouseUp);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.onMouseUpListener) {
|
if (this.onMouseUpListener) {
|
||||||
this.onMouseUpListener.remove();
|
this.onMouseUpListener.remove();
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ export default function createSlider(Component) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// if (super.componentWillUnmount) super.componentWillUnmount()
|
// if (super.componentWillUnmount) super.componentWillUnmount()
|
||||||
this.removeDocumentEvents();
|
this.removeDocumentEvents();
|
||||||
|
|
|
@ -46,7 +46,7 @@ export default {
|
||||||
this.calcStepOffsetWidth();
|
this.calcStepOffsetWidth();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.calcTimeout) {
|
if (this.calcTimeout) {
|
||||||
clearTimeout(this.calcTimeout);
|
clearTimeout(this.calcTimeout);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ const ExpandableRow = {
|
||||||
// children: PropTypes.func.isRequired,
|
// children: PropTypes.func.isRequired,
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.handleDestroy();
|
this.handleDestroy();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -203,7 +203,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.resizeEvent) {
|
if (this.resizeEvent) {
|
||||||
this.resizeEvent.remove();
|
this.resizeEvent.remove();
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.resizeObserver) {
|
if (this.resizeObserver) {
|
||||||
this.resizeObserver.disconnect();
|
this.resizeObserver.disconnect();
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.destroy = true;
|
this.destroy = true;
|
||||||
raf.cancel(this.sentinelId);
|
raf.cancel(this.sentinelId);
|
||||||
},
|
},
|
||||||
|
|
|
@ -78,7 +78,7 @@ const TreeNode = {
|
||||||
updated() {
|
updated() {
|
||||||
this.syncLoadData(this.$props);
|
this.syncLoadData(this.$props);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
const {
|
const {
|
||||||
eventKey,
|
eventKey,
|
||||||
vcTree: { registerTreeNode },
|
vcTree: { registerTreeNode },
|
||||||
|
|
|
@ -62,7 +62,7 @@ export default {
|
||||||
this.setStretchSize();
|
this.setStretchSize();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
if (this.$el.parentNode) {
|
if (this.$el.parentNode) {
|
||||||
this.$el.parentNode.removeChild(this.$el);
|
this.$el.parentNode.removeChild(this.$el);
|
||||||
} else if (this.$el.remove) {
|
} else if (this.$el.remove) {
|
||||||
|
|
|
@ -125,7 +125,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this.clearDelayTimer();
|
this.clearDelayTimer();
|
||||||
this.clearOutsideHandler();
|
this.clearOutsideHandler();
|
||||||
clearTimeout(this.mouseDownTimeout);
|
clearTimeout(this.mouseDownTimeout);
|
||||||
|
|
|
@ -45,7 +45,7 @@ const AjaxUploader = {
|
||||||
mounted() {
|
mounted() {
|
||||||
this._isMounted = true;
|
this._isMounted = true;
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeUnmount() {
|
||||||
this._isMounted = false;
|
this._isMounted = false;
|
||||||
this.abort();
|
this.abort();
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
<template>
|
<template>
|
||||||
<a-empty />
|
<div>
|
||||||
|
<a-button @click="show = !show">按钮</a-button>
|
||||||
|
<a-tooltip class="ddddd" style="color: blue" v-if="show">
|
||||||
|
<template v-slot:title>prompt text</template>
|
||||||
|
<a-button class="test" style="color: red">Tooltip will show when mouse enter.</a-button>
|
||||||
|
</a-tooltip>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: true,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue