import Vue from "vue";

Vue.filter("booleanYesNoFilter", function(val) {
  if (val === null) return "无";
  return { true: "是", false: "否" }[val];
});

Vue.filter("booleanEnableDisableFilter", function(val) {
  if (val === null) return "无";
  return { true: "启用", false: "禁用" }[val];
});

Vue.filter("booleanPassFilter", function(val) {
  if (val === null) return "无";
  return { true: "通过", false: "不通过" }[val];
});
