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

mixin中data某对象属性不能修改 #274

Closed
627443839 opened this issue Jul 23, 2017 · 3 comments
Closed

mixin中data某对象属性不能修改 #274

627443839 opened this issue Jul 23, 2017 · 3 comments

Comments

@627443839
Copy link

627443839 commented Jul 23, 2017

export default class formField extends wepy.mixin {
        data = {
            name: { age: '10' }
        }
        methods = {
            tap() {
                this.name.age = '20'
            }
}

真机有问题, 模拟机是好的

在page中调用tap方法. name.age 修改不了.

当假如不是对象. name: 10 this.name = 20 这个是可以的

@Gcaufy
Copy link
Collaborator

Gcaufy commented Jul 23, 2017

试试关闭代码压缩上传选项呢

@627443839
Copy link
Author

是这个原因. 谢谢了

@Gcaufy
Copy link
Collaborator

Gcaufy commented Jul 24, 2017

#270

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