RuoYi
2021-09-16 ab8215d1ce6487d33a726e76cd64032a31b9698d
ruoyi-ui/src/components/DictTag/index.vue
@@ -11,6 +11,7 @@
        >
        <el-tag
          v-else
          :disable-transitions="true"
          :key="item.dictValue"
          :index="index"
          :type="item.listClass == 'primary' ? '' : item.listClass"
@@ -31,12 +32,12 @@
      type: Array,
      default: null,
    },
    value: [String, Array],
    value: [Number, String, Array],
  },
  computed: {
    values() {
      if (this.value) {
        return Array.isArray(this.value) ? this.value : [this.value];
      if (this.value !== null && typeof this.value !== 'undefined') {
        return Array.isArray(this.value) ? this.value : [String(this.value)];
      } else {
        return [];
      }
@@ -48,4 +49,4 @@
.el-tag + .el-tag {
  margin-left: 10px;
}
</style>
</style>