We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在页面{{xxxx.toLocalString()}}的时候Vue显示如下警告:
{{xxxx.toLocalString()}}
Error in render function: "TypeError: Cannot read property 'toLocaleString' of undefined"
后改为过滤器方式{{xxxx | convertNum}}
{{xxxx | convertNum}}
filters: { convertNum (val) { return val.toLocalString() } }
依然报错。
filters: { convertNum (val) { if (val) return val.toLocalString() } }
加一个 if 判断即可
The text was updated successfully, but these errors were encountered:
No branches or pull requests
😡 错误描述
在页面
{{xxxx.toLocalString()}}
的时候Vue显示如下警告:后改为过滤器方式
{{xxxx | convertNum}}
依然报错。
😃 正解
加一个 if 判断即可
The text was updated successfully, but these errors were encountered: