vuetify treeview 修改展开箭头颜色
时间: 2024-01-18 13:03:47 浏览: 33
你可以使用 Vuetify 的 `theme` 属性来修改 `v-treeview` 组件的展开箭头颜色。具体的做法是在 `theme` 属性中设置 `treeview` 对象的 `arrowColor` 属性为你想要的颜色值,如下所示:
```html
<template>
<v-treeview
:items="items"
:active.sync="active"
:open.sync="open"
:load-children="loadChildren"
:item-key="itemKey"
:selectable="selectable"
:multiple-active="multipleActive"
:open-on-click="openOnClick"
:open-transition="openTransition"
:close-transition="closeTransition"
:transition="transition"
:hoverable="hoverable"
:item-children="itemChildren"
:search="search"
:filter="filter"
:disable-default-context-menu="disableDefaultContextMenu"
:active-class="activeClass"
:selected-class="selectedClass"
:open-class="openClass"
:item-class="itemClass"
:item-children-class="itemChildrenClass"
:transition-hide-on-close="transitionHideOnClose"
:transition-hide-on-open="transitionHideOnOpen"
:theme="{ treeview: { arrowColor: 'red' } }"
></v-treeview>
</template>
```
在上面的代码中,`theme` 属性中的 `treeview` 对象设置了 `arrowColor` 属性为 `'red'`,表示展开箭头的颜色为红色。你可以将 `'red'` 替换为你想要的颜色值。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)