BeforeDestroy does not work

problem description

use window.localStorage to cache some simple data in the vue lifecycle beforeDestroy, but none of it works.
tried console.log or something, and it didn"t work in this life cycle.

related codes

beforeDestroy(){
    let vm = this;
    window.localStorage.card = "11";
}

Jun.29,2021

how do you judge that it didn't work?

is it just that this method is not executed? But the execution of this method requires the component to be uninstalled. How do you make the component uninstall

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e51e51-45174.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e51e51-45174.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?