选项卡封装看上篇
实现效果
实现右键自定义选项卡菜单
创建自定义右键菜单
// tabs.vue
render() {
return (
<div class="l_tabs_wrap">
<el-tabs ref="tabs" type="card" value={
this.activeKey} on-tab-click={
this.switchTab} on-tab-remove={
this.removeTab} closable={
this.RoutingPathData.length > 1}>
{
this.createTab()}
</el-tabs>
{
this.visible> 1 ? (
<div class="l_dropdown_wrapper" style={
{
left: `${
this.position.x + 10}px`, top: `${
this.position.y + 2}px` }}>
<el-dropdown-item nativeOnClick={
() => this.closeTabs('left')}>关闭左侧</el-dropdown-item>
<el-dropdown-item nativeOnClick={
() => this.closeTabs(