"treesele"
v-show="userInfo.orgType !== 3"
v-model="params.departmentId"
:placeholder="$STR('hint.orgUser.searchByDept', '按部门搜索')"
:searchPlaceholder="$STR('hint.orgUser.inputDeptName', '请输入部门名称')"
:tree-data="depaTreeData"
show-search
treeNodeFilterProp="title"
:replaceFields="{
children: 'children',
title: 'name',
key: 'id',
value: 'id'
}"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
allow-clear
tree-default-expand-all
@click="fanzhuan">
#suffixIcon>
"icon-bian" :style="{ transform: focusicon == true ? 'rotate(180deg)' : '' }">
"iconfont icon-yonghuzuzhi">
data() {
return {
focusicon: false,
}
}
methods: {
fanzhuan() {
this.focusicon = true
},}
this.focusicon=!this.focusicon
绑定一个失去焦点事件将this.focusicon=false
<span class="icon-bian" :style="{ transform: focusicon == true ? 'rotate(180deg)' : 'rotate(360deg' }">
这样效果看下