Skip to content

计算属性直接使用get会报错,如何设置set更优雅那? #7

@PeanutQAQ

Description

@PeanutQAQ

尝试使用get来设置某个参数,结果报TypeError: Cannot set property hoverText of # which has only a getter。加了个set函数,但是很丑陋。
set hoverText(no) {
this._hoverText = 0;
}
请问有什么处理的建议吗?

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