| | |
| | | } |
| | | }; |
| | | |
| | | const selectList = getSelectList(props.data.origin.step_value); |
| | | const selectList = getSelectList(props.data?.origin?.step_value); |
| | | // const fontSize = ref('14px'); |
| | | |
| | | const emit = defineEmits(['change']); |
| | | const SELECT_OFFSET = 47; |
| | |
| | | // 以最大字长为宽度 |
| | | const widthList = props.data.list.map((item) => |
| | | getTextWidth(item.title, { |
| | | size: fontSize.value, |
| | | size:'14px', |
| | | }) |
| | | ); |
| | | const maxWidth = Math.max(...widthList); |
| | |
| | | } |
| | | }); |
| | | |
| | | const fontSize = ref('14px'); |
| | | const selectValue = defineModel({ |
| | | type: String, |
| | | }); |
| | |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | :deep(.el-input) { |
| | | font-size: v-bind(fontSize); |
| | | font-size: 14px; |
| | | } |
| | | </style> |