const STORAGY_KEY = 'demo-vue'
    const todosStorage = {
        fetch: function () {
            return JSON.parse(localStorage.getItem(STORAGY_KEY ) || '[]')
        },
        save: function (items) {
            localStorage.setItem(STORAGY_KEY , JSON.stringify(items))
        }
posted on 2019-12-02 09:16  宅到深夜  阅读(329)  评论(0)    收藏  举报