Element-ui 's el-tree enables the mouse to move into the child node and display the delete button.

official documents show the delete button all the time, trying to show the hidden effect by moving the mouse in and out of the control button.
tried to pass both the mouseenter and render-content methods. Is there anything you can do?

Apr.18,2022

is very simple. Use mouseenter and mouseenter to dynamically change a new del field to control hiding and show
Preview: https://jsfiddle.net/7angv9cy/

.
<el-table-column label="">
    <template slot-scope="scope">
        <div @mouseenter="mouseenter(scope)" @mouseleave="mouseleave(scope)">
          <el-button size="mini" @click="handleEdit(scope.$index, scope.row)"></el-button>
        <el-button v-show="scope.row.del" size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)"></el-button>
    </div>
    </template>
</el-table-column>
mouseenter(scope){
    this.$set(scope.row, 'del', true)
},
mouseleave(scope){
    this.$set(scope.row, 'del', false)
}

clipboard.png

Menu