Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

头条channel-edit 中 有问题 #25

Open
LiaoZhiYuan0201 opened this issue Jul 13, 2021 · 1 comment
Open

头条channel-edit 中 有问题 #25

LiaoZhiYuan0201 opened this issue Jul 13, 2021 · 1 comment

Comments

@LiaoZhiYuan0201
Copy link

我数据持久化的时候 刷新页面没有保存,但是在请求里 也有,就是页面上保存不了.

    async deleteChannel(channel, index) {
      //如果删除激活频道前面的频道
      if (index <= this.active) {
        this.$emit("updata-active", this.active - 1);
      }
      this.userChannels.splice(index, 1);
      //数据持久化
      if (this.user) {
        await deleteUserChannel(channel.id);
      } else {
        setItem("user-channel", this.userChannels);
      }
    },
    //切换频道
    switchChannel(index) {
      this.$emit("update-active", index);
      //关闭弹出层
      this.$emit("close");
    },
  },```
![image](https://user-images.githubusercontent.com/84443293/125442821-3d57adc5-5471-4881-b829-a3ff8b796ee9.png)
@myHee
Copy link

myHee commented Aug 5, 2021

同求,我也遇到了这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants