【问题标题】:Font color v-select item cannot be changed字体颜色 v-select 项不能更改
【发布时间】:2021-01-20 07:08:28
【问题描述】:

我使用.v-list-items__title 更改选择项中的字体颜色,但它不能 改变

     <v-select
        :items="dataOption"
        label="item"
        solo
        class="header-select"
        :dark="$colorMode.value === 'night'"
      ></v-select>

css

.v-list-items__title {
  color: #ffd54f;
}

【问题讨论】:

  • 试试这个.v-select__selection--comma{ color:#ffd54f !important; }

标签: vue.js nuxt.js vuetify.js


【解决方案1】:

你可以使用item slot然后你可以定义它的风格:

 <v-select
        :items="dataOption"
        label="item"
        solo
        class="header-select"
        :dark="$colorMode.value === 'night'"
#item="{item}"     
 >
<span style="color: #ffd54f;">{{item.label}}</span>
</v-select>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-06-22
    • 2011-03-19
    • 1970-01-01
    • 1970-01-01
    • 2013-11-14
    • 2014-01-19
    • 2015-01-02
    相关资源
    最近更新 更多