You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Vuetify v-select选择选项后下方显示数字1问题求助

解决v-select选择选项后显示数字1的问题
  • 首先绑定v-model:Vuetify的表单组件需要通过v-model维护选中状态,未绑定可能导致渲染异常。修改代码如下:
<template>
  <v-select 
    label="Select" 
    :items="['One', 'Two', 'Three', 'Four', 'Five']"
    v-model="selectedItem"
  ></v-select>
</template>

<script>
export default {
  data() {
    return {
      selectedItem: null
    }
  }
}
</script>
  • 排查全局样式冲突:检查项目中是否有全局CSS规则(比如::after伪元素)给.v-select或其内部元素添加了内容'1',这类自定义样式会干扰组件默认渲染。

  • 核对Vuetify版本:如果项目使用的Vuetify版本与官网示例差异较大,可能存在已知bug,尝试升级到最新稳定版。

  • 检查全局混入/指令:确认是否有全局混入、自定义指令意外修改了v-select的DOM结构或内容。

内容的提问来源于stack exchange,提问作者user22453190

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.09 16:52:10