Skip to content

filetree: 奇怪的 props 更新状态 #138

@zjp-CN

Description

@zjp-CN

Image

watch(() => get, (val) => {
  const { fileTree } = val;
  got.value = val;
  console.log("get", val, fileTree) // fileTree 换成 val.fileTree 也是一样
});

watch(() => got.value.fileTree.data, data => console.log("watch got fileTree", data.length));

val 看到的值,和 val.fileTree 得到的值不一样,一个以及更新,而另一个依然是初始状态。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions