兰宝车间质量管理系统-前端
疯狂的狮子Li
2023-11-30 e1023bb3313282b00d6dcdefd5d7e30d7aaa1bfc
src/components/IconSelect/index.vue
@@ -2,7 +2,7 @@
  <div class="relative" :style="{ width: width }">
    <el-input v-model="modelValue" readonly @click="visible = !visible" placeholder="点击选择图标">
      <template #prepend>
        <svg-icon :icon-class="modelValue as string" />
        <svg-icon :icon-class="modelValue" />
      </template>
    </el-input>
@@ -31,17 +31,11 @@
<script setup lang="ts">
import icons from '@/components/IconSelect/requireIcons';
import { propTypes } from '@/utils/propTypes';
const props = defineProps({
  modelValue: {
    type: String,
    require: true
  },
  width: {
    type: String,
    require: false,
    default: '400px'
  }
  modelValue: propTypes.string.isRequired,
  width: propTypes.string.def('400px')
});
const emit = defineEmits(['update:modelValue']);
@@ -74,6 +68,10 @@
</script>
<style scoped lang="scss">
.el-scrollbar {
  max-height: calc(50vh - 100px)!important;
  overflow-y: auto;
}
.el-divider--horizontal {
  margin: 10px auto !important;
}