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

"+" 运行算场景问题 #119

Closed
zhuguoxi opened this issue Aug 11, 2021 · 1 comment
Closed

"+" 运行算场景问题 #119

zhuguoxi opened this issue Aug 11, 2021 · 1 comment
Labels

Comments

@zhuguoxi
Copy link
Member

s-if 表达式中使用 +将 string 转 number

const { defineComponent, Component } = require('san')
module.exports = defineComponent({
    template: `
        <div>
            <div s-if="+num===123"></div>
        </div>
    `,
    initData() {
        return {
            num: '123'
        }
    }
})

错误信息:

throw new Error(`unexpected unary operator "${String.fromCharCode(e.operator)}"`);
    ^
Error: unexpected unary operator "+"
@meixg meixg closed this as completed in abf73e3 Aug 30, 2021
github-actions bot pushed a commit that referenced this issue Sep 9, 2021
# [4.9.0](v4.8.0...v4.9.0) (2021-09-09)

### Bug Fixes

* [#119](#119) ([abf73e3](abf73e3))
* binary, tertiary 表达式没有转义 ([a3a69a2](a3a69a2))
* slot 内容为字符串时,可能会反解失败 ([cbbeba5](cbbeba5))

### Features

* 支持使用名称不为 san 的包 ([b8ba4c2](b8ba4c2))
@github-actions
Copy link

github-actions bot commented Sep 9, 2021

🎉 This issue has been resolved in version 4.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

No branches or pull requests

1 participant