如何更改 vuetify 复选框标签样式?

Bul*_*hsu 1 javascript css vue.js vuetify.js

谁能解释一下如何将 css 设置为 vuetify 复选框?我想更改字体、大小等,但我不知道如何在样式部分访问它。这是我的复选框:

<v-checkbox
  class="type-box"
  dense
  v-for="type in feedTypeFilterList"
  :key="type.name"
  v-model="type.isSelected"
  :label="type.name"
/>
Run Code Online (Sandbox Code Playgroud)

谢谢你的帮助。

Tha*_*erg 9

我不确定这是否是正确的方法。但通过 Vuetify,您还可以使用插槽。

通过这种方式,您可以添加标签并根据需要设置其样式。

<v-checkbox>
  <template v-slot:label>
    <span id="checkboxLabel">Label Content</span>
  </template>
</v-checkbox>

<style>
#checkboxLabel {
   color: blue;
   font-size: 16px;
}
</style>
Run Code Online (Sandbox Code Playgroud)

如果还有其他情况请告诉我!