vue“或“-多条件判断
背景想通过文章的状态status,判断并确定当前背景颜色代码如下<tag :type="Number(scope.row.status) === 2?'success':Number(scope.row.status) === 1?'warning':'info'">{{scope.row.status|EnxStatus(scope.row.status)}}</tag>
·
背景
想通过文章的状态status,判断并确定当前背景颜色
代码如下
<tag :type="Number(scope.row.status) === 2?'success':Number(scope.row.status) === 1?'warning':'info'">
{{scope.row.status|EnxStatus(scope.row.status)}}
</tag>
// 通过组件tag的type确定不同颜色,
//:type="Number(scope.row.status) === 2?'success':Number(scope.row.status) === 1?'warning':'info'"
更多推荐
已为社区贡献1条内容
所有评论(0)