mirror of
https://github.com/tnb-labs/panel.git
synced 2026-10-13 08:59:07 +08:00
fix(web): 修复文件勾选点偏变单选、长目录标签遮挡相邻列
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -72,3 +72,13 @@ body {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 表格里的长路径标签:限制在单元格内并省略,否则溢出会盖住相邻列 */
|
||||
.n-tag.tag-ellipsis {
|
||||
max-width: 100%;
|
||||
|
||||
.n-tag__content {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,8 +71,9 @@ const columns: any = [
|
||||
return h(
|
||||
NTag,
|
||||
{
|
||||
class: 'cursor-pointer hover:opacity-60',
|
||||
class: 'tag-ellipsis cursor-pointer hover:opacity-60',
|
||||
type: 'info',
|
||||
title: row.path,
|
||||
onClick: () => {
|
||||
if (fileStore.activeTab) fileStore.updateTabPath(fileStore.activeTabId, row.path)
|
||||
router.push({ name: 'file-index' })
|
||||
|
||||
@@ -1554,7 +1554,7 @@ onUnmounted(() => {
|
||||
|
||||
<!-- 列表视图 -->
|
||||
<template v-else>
|
||||
<div class="list-col col-checkbox">
|
||||
<div class="list-col col-checkbox" @click.stop="toggleCheckbox(item)">
|
||||
<n-checkbox
|
||||
:checked="isSelected(item)"
|
||||
@update:checked="toggleCheckbox(item)"
|
||||
@@ -1862,6 +1862,14 @@ onUnmounted(() => {
|
||||
&.cut {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
// 勾选格吃掉行的左侧和上下 padding,点偏了也不会落到整行单选上
|
||||
.col-checkbox {
|
||||
align-self: stretch;
|
||||
box-sizing: content-box;
|
||||
margin: -6px 0 -6px -8px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,8 +103,9 @@ const columns: any = [
|
||||
return h(
|
||||
NTag,
|
||||
{
|
||||
class: 'cursor-pointer hover:opacity-60',
|
||||
class: 'tag-ellipsis cursor-pointer hover:opacity-60',
|
||||
type: 'info',
|
||||
title: row.root_dir,
|
||||
onClick: () => {
|
||||
if (fileStore.activeTab) fileStore.updateTabPath(fileStore.activeTabId, row.root_dir)
|
||||
router.push({ name: 'file-index' })
|
||||
|
||||
@@ -154,8 +154,9 @@ const columns: any = [
|
||||
return h(
|
||||
NTag,
|
||||
{
|
||||
class: 'cursor-pointer hover:opacity-60',
|
||||
class: 'tag-ellipsis cursor-pointer hover:opacity-60',
|
||||
type: 'info',
|
||||
title: row.path,
|
||||
onClick: () => {
|
||||
if (fileStore.activeTab) fileStore.updateTabPath(fileStore.activeTabId, row.path)
|
||||
router.push({ name: 'file-index' })
|
||||
|
||||
Reference in New Issue
Block a user