Skip to content

不再覆写浏览器 localStorage 存取数据 #6956

Closed
@88250

Description

@88250

#6404 中覆写了浏览器 localStorage 存取数据函数,这里不再覆写(不改变浏览器的实现),也不再使用浏览器的 localStorage,以便后续支持工作空间多开 #4567

对于开发者来说,建议不要使用 localStorage,否则切换工作空间后可能会造成数据覆盖丢失。如果需要持久化数据,可考虑使用 /api/storage/setLocalStorage /api/storage/getLocalStorage 等接口 #6960

Activity

added this to the 2.6.1 milestone on Dec 31, 2022
Zuoqiu-Yingyi

Zuoqiu-Yingyi commented on Jan 1, 2023

@Zuoqiu-Yingyi
Contributor

接口 /api/storage/setLocalStorage 可以只复写部分字段吗, 可以删除指定字段吗❓

88250

88250 commented on Jan 1, 2023

@88250
MemberAuthor

接口 /api/storage/setLocalStorage 可以只复写部分字段吗, 可以删除指定字段吗❓

#6960 这里讨论提一下需求吧。

added 2 commits that reference this issue on Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250@Vanessa219@Zuoqiu-Yingyi

      Issue actions

        不再覆写浏览器 localStorage 存取数据 · Issue #6956 · siyuan-note/siyuan