mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix: rename unmount lifecycles
This commit is contained in:
parent
3a290ce564
commit
6c85294d35
@ -63,7 +63,7 @@ export default createComponent({
|
||||
}
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.pause();
|
||||
},
|
||||
|
||||
|
@ -174,7 +174,7 @@ test('incomplate format prop', () => {
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('pause when destroyed', () => {
|
||||
test('pause when unmounted', () => {
|
||||
const wrapper = mount(CountDown);
|
||||
expect(wrapper.vm.counting).toBeTruthy();
|
||||
wrapper.destroy();
|
||||
|
@ -117,7 +117,7 @@ export default createComponent({
|
||||
}
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
if (this.vanForm) {
|
||||
this.vanForm.removeField(this);
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ export default createComponent({
|
||||
}
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
const { $Lazyload } = this;
|
||||
|
||||
if ($Lazyload) {
|
||||
|
@ -28,6 +28,6 @@ export function BindEventMixin(handler: BindEventHandler) {
|
||||
mounted: bind,
|
||||
activated: bind,
|
||||
deactivated: unbind,
|
||||
beforeDestroy: unbind,
|
||||
beforeUnmount: unbind,
|
||||
};
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ export const ClickOutsideMixin = (config) => ({
|
||||
on(document, config.event, this.clickOutsideHandler);
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
off(document, config.event, this.clickOutsideHandler);
|
||||
},
|
||||
});
|
||||
|
@ -83,7 +83,7 @@ export function PopupMixin(options = {}) {
|
||||
}
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
if (this.opened) {
|
||||
this.removeLock();
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ export default createComponent({
|
||||
this.bindTouchEvent(this.$el);
|
||||
},
|
||||
|
||||
destroyed() {
|
||||
unmounted() {
|
||||
const { children } = this.$parent;
|
||||
|
||||
if (children) {
|
||||
|
@ -50,7 +50,7 @@ export default createComponent({
|
||||
this.toggleClickable();
|
||||
},
|
||||
|
||||
destroyed() {
|
||||
unmounted() {
|
||||
this.toggleClickable();
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user