This commit is contained in:
@@ -4,7 +4,13 @@
|
||||
<Transition name="context-menu" @before-enter="onBeforeEnter" @after-leave="onAfterLeave">
|
||||
<div v-show="visible" :style="menuStyle" class="context-menu">
|
||||
<ul class="menu-list" :style="menuListStyle">
|
||||
<template v-for="item in menuItems" :key="item.key">
|
||||
<!-- 无权限提示 -->
|
||||
<li v-if="menuItems.length === 0" class="menu-item no-permission" :style="menuItemStyle">
|
||||
<span class="menu-label">您暂无更多权限</span>
|
||||
</li>
|
||||
|
||||
<!-- 菜单项 -->
|
||||
<template v-else v-for="item in menuItems" :key="item.key">
|
||||
<!-- 普通菜单项 -->
|
||||
<li
|
||||
v-if="!item.children"
|
||||
@@ -249,10 +255,23 @@
|
||||
user-select: none;
|
||||
transition: background-color 0.15s ease;
|
||||
|
||||
&:hover:not(.is-disabled) {
|
||||
&:hover:not(.is-disabled):not(.no-permission) {
|
||||
background-color: rgba(var(--art-gray-200-rgb), 0.7);
|
||||
}
|
||||
|
||||
&.no-permission {
|
||||
justify-content: center;
|
||||
color: var(--el-text-color-secondary);
|
||||
cursor: default;
|
||||
|
||||
.menu-label {
|
||||
color: var(--el-text-color-secondary);
|
||||
text-align: center;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
&.has-line {
|
||||
margin-bottom: 10px;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user