diff --git a/components/_util/ContainerRender.jsx b/components/_util/ContainerRender.jsx index cef0a7c27..8c15e3f36 100644 --- a/components/_util/ContainerRender.jsx +++ b/components/_util/ContainerRender.jsx @@ -24,7 +24,7 @@ export default { } }, - beforeDestroy() { + beforeUnmount() { if (this.autoDestroy) { this.removeContainer(); } diff --git a/components/_util/Portal.js b/components/_util/Portal.js index 0cf4f50c5..e6b5669c2 100644 --- a/components/_util/Portal.js +++ b/components/_util/Portal.js @@ -24,7 +24,7 @@ export default { } }, - beforeDestroy() { + beforeUnmount() { this.removeContainer(); }, methods: { diff --git a/components/_util/PortalWrapper.js b/components/_util/PortalWrapper.js index ab72d8083..4da99e119 100644 --- a/components/_util/PortalWrapper.js +++ b/components/_util/PortalWrapper.js @@ -46,7 +46,7 @@ export default { } }, }, - beforeDestroy() { + beforeUnmount() { const { visible } = this.$props; // 离开时不会 render, 导到离开时数值不变,改用 func 。。 openCount = visible && openCount ? openCount - 1 : openCount; diff --git a/components/_util/createRefHooks.js b/components/_util/createRefHooks.js index 8ddb8a7d0..e73afe433 100644 --- a/components/_util/createRefHooks.js +++ b/components/_util/createRefHooks.js @@ -1,13 +1,13 @@ const createRef = fn => { return { - onVnodeBeforeMounted: vnode => { + onVnodeBeforeMount: vnode => { fn(vnode.component || vnode.el, vnode.key); }, onVnodeUpdated: vnode => { fn(vnode.component || vnode.el, vnode.key); }, - onVnodeDestroyed: vnode => { - fn(vnode.component || vnode.el, vnode.key); + onVnodeUnmounted: vnode => { + fn(null, vnode.key); }, }; }; diff --git a/components/_util/store/connect.jsx b/components/_util/store/connect.jsx index e6efe9623..b58f1670b 100644 --- a/components/_util/store/connect.jsx +++ b/components/_util/store/connect.jsx @@ -44,7 +44,7 @@ export default function connect(mapStateToProps) { this.trySubscribe(); }, - beforeDestroy() { + beforeUnmount() { this.tryUnsubscribe(); }, methods: { diff --git a/components/_util/wave.jsx b/components/_util/wave.jsx index 08ca3c3d1..7eed401bc 100644 --- a/components/_util/wave.jsx +++ b/components/_util/wave.jsx @@ -37,7 +37,7 @@ export default { configProvider, }; }, - beforeDestroy() { + beforeUnmount() { if (this.instance) { this.instance.cancel(); } diff --git a/components/affix/index.jsx b/components/affix/index.jsx index c35dcc8eb..087be8a2d 100644 --- a/components/affix/index.jsx +++ b/components/affix/index.jsx @@ -98,7 +98,7 @@ const Affix = { this.updatePosition(); }, }, - beforeDestroy() { + beforeUnmount() { clearTimeout(this.timeout); removeObserveTarget(this); this.updatePosition.cancel(); diff --git a/components/anchor/Anchor.jsx b/components/anchor/Anchor.jsx index 5a302df36..e41f0541a 100644 --- a/components/anchor/Anchor.jsx +++ b/components/anchor/Anchor.jsx @@ -152,7 +152,7 @@ export default { this.updateInk(); }); }, - beforeDestroy() { + beforeUnmount() { if (this.scrollEvent) { this.scrollEvent.remove(); } diff --git a/components/anchor/AnchorLink.jsx b/components/anchor/AnchorLink.jsx index c49c0fca3..1a7e8bdcf 100644 --- a/components/anchor/AnchorLink.jsx +++ b/components/anchor/AnchorLink.jsx @@ -36,7 +36,7 @@ export default { this.antAnchor.registerLink(this.href); }, - beforeDestroy() { + beforeUnmount() { this.antAnchor.unregisterLink(this.href); }, methods: { diff --git a/components/back-top/index.jsx b/components/back-top/index.jsx index 4a4df1bfc..cd491ed63 100644 --- a/components/back-top/index.jsx +++ b/components/back-top/index.jsx @@ -44,7 +44,7 @@ const BackTop = { }); }, - beforeDestroy() { + beforeUnmount() { if (this.scrollEvent) { this.scrollEvent.remove(); } diff --git a/components/badge/ScrollNumber.jsx b/components/badge/ScrollNumber.jsx index d4dd04107..d0899bd5c 100644 --- a/components/badge/ScrollNumber.jsx +++ b/components/badge/ScrollNumber.jsx @@ -65,7 +65,7 @@ export default { }); } }, - beforeDestroy() { + beforeUnmount() { this.clearTimeout(); }, methods: { diff --git a/components/button/button.jsx b/components/button/button.jsx index b06a8764f..b1565fb84 100644 --- a/components/button/button.jsx +++ b/components/button/button.jsx @@ -50,7 +50,7 @@ export default { updated() { this.fixTwoCNChar(); }, - beforeDestroy() { + beforeUnmount() { if (this.delayTimeout) { clearTimeout(this.delayTimeout); } diff --git a/components/carousel/index.jsx b/components/carousel/index.jsx index 60b42f87e..26f6d546e 100644 --- a/components/carousel/index.jsx +++ b/components/carousel/index.jsx @@ -108,7 +108,7 @@ const Carousel = { // https://github.com/ant-design/ant-design/issues/7191 this.innerSlider = this.$refs.slick && this.$refs.slick.innerSlider; }, - beforeDestroy() { + beforeUnmount() { const { autoplay } = this; if (autoplay) { window.removeEventListener('resize', this.onWindowResized); diff --git a/components/checkbox/Checkbox.jsx b/components/checkbox/Checkbox.jsx index 3334f7cbb..cec059dd2 100644 --- a/components/checkbox/Checkbox.jsx +++ b/components/checkbox/Checkbox.jsx @@ -53,7 +53,7 @@ export default { '`value` is not validate prop, do you mean `checked`?', ); }, - beforeDestroy() { + beforeUnmount() { const { value, checkboxGroupContext: checkboxGroup = {} } = this; if (checkboxGroup.cancelValue) { checkboxGroup.cancelValue(value); diff --git a/components/descriptions/index.jsx b/components/descriptions/index.jsx index f60a0c8a1..58d08a876 100644 --- a/components/descriptions/index.jsx +++ b/components/descriptions/index.jsx @@ -194,7 +194,7 @@ const Descriptions = { }); }); }, - beforeDestroy() { + beforeUnmount() { ResponsiveObserve.unsubscribe(this.token); }, render() { diff --git a/components/drawer/index.jsx b/components/drawer/index.jsx index f7d70826f..7fe386129 100644 --- a/components/drawer/index.jsx +++ b/components/drawer/index.jsx @@ -85,7 +85,7 @@ const Drawer = { this.preVisible = this.visible; }); }, - beforeDestroy() { + beforeUnmount() { // unmount drawer in child, clear push. if (this.parentDrawer) { this.parentDrawer.pull(); diff --git a/components/form-model/FormItem.jsx b/components/form-model/FormItem.jsx index bbd1a6778..aaf1db79c 100644 --- a/components/form-model/FormItem.jsx +++ b/components/form-model/FormItem.jsx @@ -121,7 +121,7 @@ export default { this.initialValue = cloneDeep(this.fieldValue); } }, - beforeDestroy() { + beforeUnmount() { const { removeField } = this.FormContext; removeField && removeField(this); }, diff --git a/components/form/FormItem.jsx b/components/form/FormItem.jsx index dedca1ae1..2b04268c1 100644 --- a/components/form/FormItem.jsx +++ b/components/form/FormItem.jsx @@ -106,7 +106,7 @@ export default { this.collectContext(); } }, - beforeDestroy() { + beforeUnmount() { this.collectFormItemContext(this.$vnode && this.$vnode.context, 'delete'); }, mounted() { diff --git a/components/grid/Row.jsx b/components/grid/Row.jsx index 04757e8fe..01d0c38bc 100644 --- a/components/grid/Row.jsx +++ b/components/grid/Row.jsx @@ -48,7 +48,7 @@ export default { }); }); }, - beforeDestroy() { + beforeUnmount() { ResponsiveObserve.unsubscribe(this.token); }, methods: { diff --git a/components/input/Input.jsx b/components/input/Input.jsx index e7a003e83..d0797114a 100644 --- a/components/input/Input.jsx +++ b/components/input/Input.jsx @@ -82,7 +82,7 @@ export default { this.clearPasswordValueAttribute(); }); }, - beforeDestroy() { + beforeUnmount() { if (this.removePasswordTimeout) { clearTimeout(this.removePasswordTimeout); } diff --git a/components/input/ResizableTextArea.jsx b/components/input/ResizableTextArea.jsx index ab986cf2a..024d859e3 100644 --- a/components/input/ResizableTextArea.jsx +++ b/components/input/ResizableTextArea.jsx @@ -31,7 +31,7 @@ const ResizableTextArea = { mounted() { this.resizeTextarea(); }, - beforeDestroy() { + beforeUnmount() { raf.cancel(this.nextFrameActionId); raf.cancel(this.resizeFrameId); }, diff --git a/components/layout/Sider.jsx b/components/layout/Sider.jsx index da9ae6518..c365ecaf6 100644 --- a/components/layout/Sider.jsx +++ b/components/layout/Sider.jsx @@ -145,7 +145,7 @@ export default { }); }, - beforeDestroy() { + beforeUnmount() { if (this.mql) { this.mql.removeListener(this.responsiveHandler); } diff --git a/components/locale-provider/index.jsx b/components/locale-provider/index.jsx index dc9a4db8c..c33b0e9a9 100644 --- a/components/locale-provider/index.jsx +++ b/components/locale-provider/index.jsx @@ -65,7 +65,7 @@ const LocaleProvider = { setMomentLocale(locale); changeConfirmLocale(locale && locale.Modal); }, - beforeDestroy() { + beforeUnmount() { changeConfirmLocale(); }, render() { diff --git a/components/menu/index.jsx b/components/menu/index.jsx index 180d02a0b..c5e2578ce 100644 --- a/components/menu/index.jsx +++ b/components/menu/index.jsx @@ -64,7 +64,7 @@ const Menu = { updated() { this.propsUpdating = false; }, - // beforeDestroy() { + // beforeUnmount() { // raf.cancel(this.mountRafId); // }, watch: { diff --git a/components/modal/ActionButton.jsx b/components/modal/ActionButton.jsx index 882a4a0fa..0871114ae 100644 --- a/components/modal/ActionButton.jsx +++ b/components/modal/ActionButton.jsx @@ -24,7 +24,7 @@ export default { this.timeoutId = setTimeout(() => this.$el.focus()); } }, - beforeDestroy() { + beforeUnmount() { clearTimeout(this.timeoutId); }, methods: { diff --git a/components/spin/Spin.jsx b/components/spin/Spin.jsx index 50d3cfef4..8412da161 100644 --- a/components/spin/Spin.jsx +++ b/components/spin/Spin.jsx @@ -66,7 +66,7 @@ export default { this.updateSpinning(); }); }, - beforeDestroy() { + beforeUnmount() { this.cancelExistingSpin(); }, methods: { diff --git a/components/statistic/Countdown.jsx b/components/statistic/Countdown.jsx index 79137efdb..23523f7c0 100644 --- a/components/statistic/Countdown.jsx +++ b/components/statistic/Countdown.jsx @@ -28,7 +28,7 @@ export default { this.syncTimer(); }, - beforeDestroy() { + beforeUnmount() { this.stopTimer(); }, diff --git a/components/table/SelectionBox.jsx b/components/table/SelectionBox.jsx index bbce3b519..7bf877245 100644 --- a/components/table/SelectionBox.jsx +++ b/components/table/SelectionBox.jsx @@ -18,7 +18,7 @@ export default { this.subscribe(); }, - beforeDestroy() { + beforeUnmount() { if (this.unsubscribe) { this.unsubscribe(); } diff --git a/components/table/SelectionCheckboxAll.jsx b/components/table/SelectionCheckboxAll.jsx index 7a8dd2074..49b144968 100644 --- a/components/table/SelectionCheckboxAll.jsx +++ b/components/table/SelectionCheckboxAll.jsx @@ -125,7 +125,7 @@ export default { this.subscribe(); }, - beforeDestroy() { + beforeUnmount() { if (this.unsubscribe) { this.unsubscribe(); } diff --git a/components/table/createBodyRow.jsx b/components/table/createBodyRow.jsx index a31f53427..0b70fce9a 100644 --- a/components/table/createBodyRow.jsx +++ b/components/table/createBodyRow.jsx @@ -25,7 +25,7 @@ export default function createBodyRow(Component = 'tr') { this.subscribe(); }, - beforeDestroy() { + beforeUnmount() { if (this.unsubscribe) { this.unsubscribe(); } diff --git a/components/transfer/list.jsx b/components/transfer/list.jsx index 8111509d9..1f7b65fa9 100644 --- a/components/transfer/list.jsx +++ b/components/transfer/list.jsx @@ -92,7 +92,7 @@ export default { // } // }); // }, - beforeDestroy() { + beforeUnmount() { clearTimeout(this.triggerScrollTimer); // if (this.scrollEvent) { // this.scrollEvent.remove(); diff --git a/components/transfer/renderListBody.jsx b/components/transfer/renderListBody.jsx index e58a239e6..0aee00595 100644 --- a/components/transfer/renderListBody.jsx +++ b/components/transfer/renderListBody.jsx @@ -46,7 +46,7 @@ const ListBody = { }); }, - beforeDestroy() { + beforeUnmount() { raf.cancel(this.mountId); raf.cancel(this.lazyId); }, diff --git a/components/upload/Upload.jsx b/components/upload/Upload.jsx index 83a30751f..50e6905f3 100644 --- a/components/upload/Upload.jsx +++ b/components/upload/Upload.jsx @@ -48,7 +48,7 @@ export default { this.sFileList = val || []; }, }, - beforeDestroy() { + beforeUnmount() { this.clearProgressTimer(); }, methods: { diff --git a/components/vc-align/Align.jsx b/components/vc-align/Align.jsx index a1b6b877c..51e95b078 100644 --- a/components/vc-align/Align.jsx +++ b/components/vc-align/Align.jsx @@ -94,7 +94,7 @@ export default { this.prevProps = { ...this.$props, align: clonedeep(this.$props.align) }; }); }, - beforeDestroy() { + beforeUnmount() { this.stopMonitorWindowResize(); }, methods: { diff --git a/components/vc-calendar/src/Picker.jsx b/components/vc-calendar/src/Picker.jsx index f1f9cc1a6..0c105e3a7 100644 --- a/components/vc-calendar/src/Picker.jsx +++ b/components/vc-calendar/src/Picker.jsx @@ -80,7 +80,7 @@ const Picker = { this.preSOpen = this.sOpen; }, - beforeDestroy() { + beforeUnmount() { clearTimeout(this.focusTimeout); }, methods: { diff --git a/components/vc-dialog/Dialog.jsx b/components/vc-dialog/Dialog.jsx index 7a81002a5..d8aa61bac 100644 --- a/components/vc-dialog/Dialog.jsx +++ b/components/vc-dialog/Dialog.jsx @@ -96,7 +96,7 @@ export default { } }); }, - beforeDestroy() { + beforeUnmount() { const { visible, getOpenCount } = this; if ((visible || this.inTransition) && !getOpenCount()) { this.switchScrollingEffect(); diff --git a/components/vc-drawer/src/Drawer.js b/components/vc-drawer/src/Drawer.js index 8c3382d95..2baf66a60 100644 --- a/components/vc-drawer/src/Drawer.js +++ b/components/vc-drawer/src/Drawer.js @@ -130,7 +130,7 @@ const Drawer = { } }); }, - beforeDestroy() { + beforeUnmount() { delete currentDrawer[this.drawerId]; delete this.isOpenChange; if (this.container) { diff --git a/components/vc-input-number/src/index.js b/components/vc-input-number/src/index.js index 40a5748cf..3a15712d9 100755 --- a/components/vc-input-number/src/index.js +++ b/components/vc-input-number/src/index.js @@ -174,7 +174,7 @@ export default { this.updatedFunc(); }); }, - beforeDestroy() { + beforeUnmount() { this.stop(); }, methods: { diff --git a/components/vc-lazy-load/src/LazyLoad.jsx b/components/vc-lazy-load/src/LazyLoad.jsx index fa8f90204..b980eecc0 100644 --- a/components/vc-lazy-load/src/LazyLoad.jsx +++ b/components/vc-lazy-load/src/LazyLoad.jsx @@ -73,7 +73,7 @@ export default { this.scrollHander = addEventListener(eventNode, 'scroll', this.lazyLoadHandler); }); }, - beforeDestroy() { + beforeUnmount() { this._mounted = false; if (this.lazyLoadHandler.cancel) { this.lazyLoadHandler.cancel(); diff --git a/components/vc-menu/DOMWrap.jsx b/components/vc-menu/DOMWrap.jsx index 83d7dc9a0..d956e5788 100644 --- a/components/vc-menu/DOMWrap.jsx +++ b/components/vc-menu/DOMWrap.jsx @@ -80,7 +80,7 @@ const DOMWrap = { }); }, - beforeDestroy() { + beforeUnmount() { if (this.resizeObserver) { this.resizeObserver.disconnect(); } diff --git a/components/vc-menu/MenuItem.jsx b/components/vc-menu/MenuItem.jsx index 1b04533aa..6dc53ca44 100644 --- a/components/vc-menu/MenuItem.jsx +++ b/components/vc-menu/MenuItem.jsx @@ -59,7 +59,7 @@ const MenuItem = { }); this.callRef(); }, - beforeDestroy() { + beforeUnmount() { const props = this.$props; this.__emit('destroy', props.eventKey); }, diff --git a/components/vc-menu/SubMenu.jsx b/components/vc-menu/SubMenu.jsx index 2ea57b48a..771accf5b 100644 --- a/components/vc-menu/SubMenu.jsx +++ b/components/vc-menu/SubMenu.jsx @@ -102,7 +102,7 @@ const SubMenu = { }); }, - beforeDestroy() { + beforeUnmount() { const { eventKey } = this; this.__emit('destroy', eventKey); diff --git a/components/vc-notification/Notice.jsx b/components/vc-notification/Notice.jsx index 83ab4bc8e..17aa8f32e 100644 --- a/components/vc-notification/Notice.jsx +++ b/components/vc-notification/Notice.jsx @@ -28,9 +28,9 @@ export default { } }, - beforeDestroy() { + beforeUnmount() { this.clearCloseTimer(); - this.willDestroy = true; // beforeDestroy调用后依然会触发onMouseleave事件 + this.willDestroy = true; // beforeUnmount调用后依然会触发onMouseleave事件 }, methods: { close(e) { diff --git a/components/vc-resize-observer/index.jsx b/components/vc-resize-observer/index.jsx index 7e3a3e548..8fe72418a 100644 --- a/components/vc-resize-observer/index.jsx +++ b/components/vc-resize-observer/index.jsx @@ -23,7 +23,7 @@ const VueResizeObserver = { updated() { this.onComponentUpdated(); }, - beforeDestroy() { + beforeUnmount() { this.destroyObserver(); }, methods: { diff --git a/components/vc-select/DropdownMenu.jsx b/components/vc-select/DropdownMenu.jsx index 67b3f6bb3..722494bd2 100644 --- a/components/vc-select/DropdownMenu.jsx +++ b/components/vc-select/DropdownMenu.jsx @@ -63,7 +63,7 @@ export default { this.lastInputValue = props.inputValue; this.prevVisible = this.visible; }, - beforeDestroy() { + beforeUnmount() { if (this.rafInstance) { raf.cancel(this.rafInstance); } diff --git a/components/vc-select/Select.jsx b/components/vc-select/Select.jsx index 754bd7d33..4caf3c04e 100644 --- a/components/vc-select/Select.jsx +++ b/components/vc-select/Select.jsx @@ -200,7 +200,7 @@ const Select = { this.forcePopupAlign(); }); }, - beforeDestroy() { + beforeUnmount() { this.clearFocusTime(); this.clearBlurTime(); this.clearComboboxTime(); diff --git a/components/vc-select/SelectTrigger.jsx b/components/vc-select/SelectTrigger.jsx index ba8e906a3..139f911dc 100644 --- a/components/vc-select/SelectTrigger.jsx +++ b/components/vc-select/SelectTrigger.jsx @@ -82,7 +82,7 @@ export default { this.setDropdownWidth(); }); }, - beforeDestroy() { + beforeUnmount() { this.cancelRafInstance(); }, methods: { diff --git a/components/vc-slick/src/inner-slider.js b/components/vc-slick/src/inner-slider.js index 9778b77ef..dfde18f69 100644 --- a/components/vc-slick/src/inner-slider.js +++ b/components/vc-slick/src/inner-slider.js @@ -489,7 +489,7 @@ export default { } }); }, - beforeDestroy() { + beforeUnmount() { if (this.animationEndCallback) { clearTimeout(this.animationEndCallback); } diff --git a/components/vc-slick/src/slider.js b/components/vc-slick/src/slider.js index 999627d61..139b0dd4c 100644 --- a/components/vc-slick/src/slider.js +++ b/components/vc-slick/src/slider.js @@ -87,7 +87,7 @@ export default { }); } }, - beforeDestroy() { + beforeUnmount() { this._responsiveMediaHandlers.forEach(function(obj) { enquire.unregister(obj.query, obj.handler); }); diff --git a/components/vc-slider/src/Handle.jsx b/components/vc-slider/src/Handle.jsx index 469facf73..b1081af8a 100644 --- a/components/vc-slider/src/Handle.jsx +++ b/components/vc-slider/src/Handle.jsx @@ -31,7 +31,7 @@ export default { // so we listen on document here. this.onMouseUpListener = addEventListener(document, 'mouseup', this.handleMouseUp); }, - beforeDestroy() { + beforeUnmount() { if (this.onMouseUpListener) { this.onMouseUpListener.remove(); } diff --git a/components/vc-slider/src/common/createSlider.jsx b/components/vc-slider/src/common/createSlider.jsx index a1377b7db..bf213c6c6 100644 --- a/components/vc-slider/src/common/createSlider.jsx +++ b/components/vc-slider/src/common/createSlider.jsx @@ -81,7 +81,7 @@ export default function createSlider(Component) { } }); }, - beforeDestroy() { + beforeUnmount() { this.$nextTick(() => { // if (super.componentWillUnmount) super.componentWillUnmount() this.removeDocumentEvents(); diff --git a/components/vc-steps/Steps.jsx b/components/vc-steps/Steps.jsx index b40ac30ac..25a9cda62 100644 --- a/components/vc-steps/Steps.jsx +++ b/components/vc-steps/Steps.jsx @@ -46,7 +46,7 @@ export default { this.calcStepOffsetWidth(); }); }, - beforeDestroy() { + beforeUnmount() { if (this.calcTimeout) { clearTimeout(this.calcTimeout); } diff --git a/components/vc-table/src/ExpandableRow.jsx b/components/vc-table/src/ExpandableRow.jsx index 09d5db4d9..6e9cfcbb3 100644 --- a/components/vc-table/src/ExpandableRow.jsx +++ b/components/vc-table/src/ExpandableRow.jsx @@ -25,7 +25,7 @@ const ExpandableRow = { // children: PropTypes.func.isRequired, }, - beforeDestroy() { + beforeUnmount() { this.handleDestroy(); }, methods: { diff --git a/components/vc-table/src/Table.jsx b/components/vc-table/src/Table.jsx index 90dce9b5c..0382fbb2e 100644 --- a/components/vc-table/src/Table.jsx +++ b/components/vc-table/src/Table.jsx @@ -203,7 +203,7 @@ export default { }); }, - beforeDestroy() { + beforeUnmount() { if (this.resizeEvent) { this.resizeEvent.remove(); } diff --git a/components/vc-tabs/src/ScrollableTabBarNode.jsx b/components/vc-tabs/src/ScrollableTabBarNode.jsx index 6282e9664..90b1eac4f 100644 --- a/components/vc-tabs/src/ScrollableTabBarNode.jsx +++ b/components/vc-tabs/src/ScrollableTabBarNode.jsx @@ -58,7 +58,7 @@ export default { }); }, - beforeDestroy() { + beforeUnmount() { if (this.resizeObserver) { this.resizeObserver.disconnect(); } diff --git a/components/vc-tabs/src/Tabs.jsx b/components/vc-tabs/src/Tabs.jsx index e7b2e3b9f..1364f21f4 100644 --- a/components/vc-tabs/src/Tabs.jsx +++ b/components/vc-tabs/src/Tabs.jsx @@ -80,7 +80,7 @@ export default { } }, }, - beforeDestroy() { + beforeUnmount() { this.destroy = true; raf.cancel(this.sentinelId); }, diff --git a/components/vc-tree/src/TreeNode.jsx b/components/vc-tree/src/TreeNode.jsx index ff6b65551..3348d609e 100644 --- a/components/vc-tree/src/TreeNode.jsx +++ b/components/vc-tree/src/TreeNode.jsx @@ -78,7 +78,7 @@ const TreeNode = { updated() { this.syncLoadData(this.$props); }, - beforeDestroy() { + beforeUnmount() { const { eventKey, vcTree: { registerTreeNode }, diff --git a/components/vc-trigger/Popup.jsx b/components/vc-trigger/Popup.jsx index 32d04f94e..e49f97a21 100644 --- a/components/vc-trigger/Popup.jsx +++ b/components/vc-trigger/Popup.jsx @@ -62,7 +62,7 @@ export default { this.setStretchSize(); }); }, - beforeDestroy() { + beforeUnmount() { if (this.$el.parentNode) { this.$el.parentNode.removeChild(this.$el); } else if (this.$el.remove) { diff --git a/components/vc-trigger/Trigger.jsx b/components/vc-trigger/Trigger.jsx index d052ee767..79c9be1be 100644 --- a/components/vc-trigger/Trigger.jsx +++ b/components/vc-trigger/Trigger.jsx @@ -125,7 +125,7 @@ export default { }); }, - beforeDestroy() { + beforeUnmount() { this.clearDelayTimer(); this.clearOutsideHandler(); clearTimeout(this.mouseDownTimeout); diff --git a/components/vc-upload/src/AjaxUploader.jsx b/components/vc-upload/src/AjaxUploader.jsx index 12100745e..9b551d02c 100644 --- a/components/vc-upload/src/AjaxUploader.jsx +++ b/components/vc-upload/src/AjaxUploader.jsx @@ -45,7 +45,7 @@ const AjaxUploader = { mounted() { this._isMounted = true; }, - beforeDestroy() { + beforeUnmount() { this._isMounted = false; this.abort(); }, diff --git a/examples/App.vue b/examples/App.vue index 65723acc5..68b3c48df 100644 --- a/examples/App.vue +++ b/examples/App.vue @@ -1,3 +1,18 @@ +