以定制的Vutify文本字段为例
<template>
<v-app>
<v-container>
<v-text-field
label="label goes here"
variant="plain"
density="compact"
hide-details="auto"
color="primary"
class="my-1"
model-value="some text goes here"
/>
</v-container>
</v-app>
</template>
<style scoped>
:deep(.v-input),
:deep(.v-field),
:deep(.v-label--clickable) {
font-size: 12px;
}
:deep(.v-label.v-field-label) {
font-size: 10px;
}
</style>
标签和内容之间的垂直间距太大
降低空间的最好方法是什么?我试着加了
.v-input {
height: 4px;
min-height: 4px;
max-height: 4px;
}
.v-field {
height: 4px;
min-height: 4px;
max-height: 4px;
}
.v-text-field {
height: 4px;
min-height: 4px;
max-height: 4px;
}
想看看会发生什么,但什么都没有改变.