feiyu02
2025-09-17 b330e57051e54789eb83d10dc58c4d9d10c608e1
src/components/search-option/FYOptionUserType.vue
@@ -6,12 +6,7 @@
      placeholder="用户类型"
      style="width: 150px"
    >
      <el-option
        v-for="s in userTypes"
        :key="s.value"
        :label="s.label"
        :value="s"
      />
      <el-option v-for="s in userTypes" :key="s.value" :label="s.label" :value="s" />
    </el-select>
  </el-form-item>
</template>
@@ -24,21 +19,24 @@
    // 是否在首选项处添加“全部”选项
    allOption: {
      type: Boolean,
      default: true,
      default: true
    },
    // 返回结果
    value: Object,
    // 是否默认返回初始选项
    initValue: {
      type: Boolean,
      default: true,
      default: true
    },
    prop: String
    prop: {
      type: String,
      default: '_usertype'
    }
  },
  emits: ['update:value'],
  data() {
    return {
      userTypes: enumUser(this.allOption),
      userTypes: enumUser(this.allOption)
    };
  },
  methods: {
@@ -50,6 +48,6 @@
    if (this.initValue) {
      this.handleChange(this.userTypes[0]);
    }
  },
  }
};
</script>