vue-treeselect的文件为:@riophae/vue-treeselect/dist/vue-treeselect.css
打开这个文件,找到css的类.vue-treeselect__menu,默认值为:
.vue-treeselect__menu {
cursor: default;
padding-top: 5px;
padding-bottom: 5px;
display: block;
position: absolute;
overflow-x: hidden;
overflow-y: auto;
width: auto;
border: 1px solid #cfcfcf;
background: #fff;
line-height: 180%;
-webkit-overflow-scrolling: touch;
}
加入字体控制的属性(用红色字体表示),如下:
.vue-treeselect__menu {
cursor: default;
padding-top: 5px;
padding-bottom: 5px;
display: block;
position: absolute;
overflow-x: hidden;
overflow-y: auto;
width: auto;
border: 1px solid #cfcfcf;
background: #fff;
line-height: 180%;
-webkit-overflow-scrolling: touch;
font-family: Microsoft YaHei;
font-size: 14px;
font-weight: 500;
}
保存后,马上就生效,搞定。