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

this.store.data 对unshift 的支持有点问题 #65

Open
Randyedu opened this issue Dec 24, 2018 · 5 comments
Open

this.store.data 对unshift 的支持有点问题 #65

Randyedu opened this issue Dec 24, 2018 · 5 comments

Comments

@Randyedu
Copy link

@Randyedu Randyedu commented Dec 24, 2018

我用的是 cloud版本,this.store.data.Array.push结果是正确的。
this.store.data.Array.push(object);

一用到this.store.data.Array.unshift(object)就有问题,感觉是在diff的时候出问题

@dntzhang
Copy link
Collaborator

@dntzhang dntzhang commented Dec 24, 2018

好的,收到。
另外推荐使用这个框架~ https://github.com/Tencent/omi/tree/master/packages/omi-mp-create

@hanwenbo
Copy link

@hanwenbo hanwenbo commented Jan 14, 2019

@dntzhang 您好 您推荐的这个框架如何用npm install进来呢?

@dntzhang
Copy link
Collaborator

@dntzhang dntzhang commented Jan 14, 2019

@hanwenbo 直接把这个目录拷下来~

@hanwenbo
Copy link

@hanwenbo hanwenbo commented Jan 14, 2019

哈哈 好的 简单粗暴

@dove8023
Copy link

@dove8023 dove8023 commented Apr 29, 2019

Hack 解法

const { typeList } = this.store.data;

typeList.unshift(res.data);
const buffer = typeList;
await this.update({
typeList: []
});

await this.update({
typeList: buffer
})

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

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.