Fix: 调整文件结构 & 隐藏垂直滚动条 & 修正Tauri构建错误

This commit is contained in:
2025-07-05 16:18:23 +08:00
parent dab57fbadf
commit 216f65966a
13 changed files with 73 additions and 17 deletions

View File

@ -0,0 +1,36 @@
<template>
<v-text-field
density="compact"
hide-details
:label="label"
:model-value="modelValue.value.toString()"
:suffix="modelValue.unit"
type="number"
variant="outlined"
@update:model-value="handleUpdate"
/>
</template>
<script setup lang="ts">
import type { Param } from '@/types/param'
interface Props {
label: string
modelValue: Param
}
interface Emits {
(e: 'update:modelValue', value: Param): void
}
const props = defineProps<Props>()
const emit = defineEmits<Emits>()
function handleUpdate (value: string) {
const numValue = value === '' ? 0 : Number.parseFloat(value)
emit('update:modelValue', {
value: numValue,
unit: props.modelValue.unit,
})
}
</script>