| | |
| | | <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> |
| | | |
| | |
| | | |
| | | <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']); |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .el-scrollbar { |
| | | max-height: calc(50vh - 100px)!important; |
| | | overflow-y: auto; |
| | | } |
| | | .el-divider--horizontal { |
| | | margin: 10px auto !important; |
| | | } |