pagetype列表页操作栏图标没有权限时增加cursor: not-allowed效果
This commit is contained in:
parent
d418a9e693
commit
df89e43807
@ -66,10 +66,10 @@ const emit = defineEmits<Emits>()
|
||||
const authStore = useAuthStore()
|
||||
const likeLoading = ref(false)
|
||||
|
||||
// 权限检查(后端 _can_delete 已根据 if_owner 等约束计算)
|
||||
const canRead = computed(() => props.row._can_read === 1 || props.row._can_read === undefined)
|
||||
const canWrite = computed(() => props.row._can_write === 1 || props.row._can_write === undefined)
|
||||
const canDelete = computed(() => props.row._can_delete === 1 || props.row._can_delete === undefined)
|
||||
// 权限检查(后端 _can_write/_can_delete 已根据 if_owner 等约束计算)
|
||||
const canRead = computed(() => props.row._can_read === 1)
|
||||
const canWrite = computed(() => props.row._can_write === 1)
|
||||
const canDelete = computed(() => props.row._can_delete === 1)
|
||||
|
||||
// Like state
|
||||
const currentUser = computed(() => authStore.user?.username || authStore.user?.name || '')
|
||||
@ -166,22 +166,20 @@ function handleDelete() {
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Like 按钮已收藏状态 */
|
||||
.action-btn.like-btn.liked {
|
||||
color: #ef4444;
|
||||
background: #fef2f2;
|
||||
}
|
||||
|
||||
.action-btn.like-btn.liked:hover {
|
||||
background: #fecaca;
|
||||
color: #ef4444;
|
||||
}
|
||||
|
||||
/* 禁用状态 */
|
||||
/* 禁用状态:半透明 + 禁止光标,无悬浮变化 */
|
||||
.action-btn:disabled,
|
||||
.action-btn.disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
pointer-events: none;
|
||||
}
|
||||
.action-btn:disabled:hover,
|
||||
.action-btn.disabled:hover {
|
||||
background: #f3f4f6;
|
||||
color: #6b7280;
|
||||
}
|
||||
.action-btn.delete-btn:disabled:hover,
|
||||
.action-btn.delete-btn.disabled:hover {
|
||||
background: #f3f4f6;
|
||||
color: #6b7280;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user