Skip to content

[Fixed Bug] template里面写对象方法的简写形式报错 #42

@jayzun

Description

@jayzun
<div :rules="[{ transform(value) { return +value} }]"></div>

改成这样就不报错

<div :rules="[{ transform: function(value) { return +value} }]"></div>

报错信息:

[vite-plugin-vue2] /Users/admin/work/code/brick/esop2-support/VueTemplateBabelCompiler: Property key of ObjectMethod expected node to be of a type ["Identifier","StringLiteral","NumericLiteral"] but instead got "MemberExpression"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions