How vue monitors localStorage is worth changing

how to monitor local storage in nuxt is worth changing. Do not use vuex.

Apr.03,2021

it is recommended that api for native localStorage are encapsulated in one layer to generate their own common modules, which can extend many custom functions, including meeting your needs, such as:

var myStorage = {
    setItem(key, val, ...rest){
        // do something
        window.localStorage.setItem(key,val)
    }
    getItem(key,..rest){
        // do something
        return window.localStorage. getItem(key)
    }
    // ...
}
export default myStorage

const oldSetItem = window.localStorage.setItem
window.localStorage.setItem = function(k, v) {
    if (k === 'key') {
      // 
    }
    oldSetItem(k,v)
}
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-1e9f8ab-4781d.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-1e9f8ab-4781d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?