filters将后台给的数字,转换成对应文字

475 阅读1分钟

fileters 定义

filters: {
    toText(val) {
        switch(val) {
            case 1:
                return "默认仓库";
            case 2:
                return "自建仓库";
            default: 
                return "";
        }
    }
}