当前位置 : 主页 > 网络编程 > 其它编程 >

vue后端返回数字回显成汉字写法

来源:互联网 收集:自由互联 发布时间:2023-07-02
{{scope.row.userStatus | formatUserStatus }} filters: { formatUserStatus (sta {{scope.row.userStatus | formatUserStatus }} filters: { formatUserStatus (status) { if (+status === 0) { // +是转为Number return '正常' } else if (+status ===
{{scope.row.userStatus | formatUserStatus }} filters: { formatUserStatus (sta

{{scope.row.userStatus | formatUserStatus }}

filters: { formatUserStatus (status) { if (+status === 0) { // +是转为Number return '正常' } else if (+status === 1) { return '异常' } else if (+status === 2) { return '关闭' } else { '' } } },

userStatusStatus (status) { if (+status === 0) { return 'color: green;' } else if (+status === 1) { return 'color: red;' } else if (+status === 2) { return 'color: yellow;' } else { '' } },

网友评论