From ac7bfeacfed1c8c882cfb0f289f4fc38ad850adc Mon Sep 17 00:00:00 2001 From: ZhuRui Date: Fri, 7 Aug 2026 20:12:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=B7=E5=BC=8F=E6=89=93=E5=8C=85?= =?UTF-8?q?=E5=A4=B1=E6=95=88=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/system/params/index.module.less | 59 +++++++++++------------ src/pages/system/params/index.tsx | 8 +-- 2 files changed, 32 insertions(+), 35 deletions(-) diff --git a/src/pages/system/params/index.module.less b/src/pages/system/params/index.module.less index bd78f4d..158a6ae 100644 --- a/src/pages/system/params/index.module.less +++ b/src/pages/system/params/index.module.less @@ -1,36 +1,33 @@ -// 参数值单元格:文字最多 2 行省略,末尾带"查看"链接 -:global { - .param-value-cell { - display: flex; - align-items: center; - gap: 6px; - width: 100%; - cursor: default; - } +.cell { + display: flex; + align-items: center; + gap: 6px; + width: 100%; + cursor: default; +} - .param-value-text { - flex: 1; - min-width: 0; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - overflow: hidden; - text-overflow: ellipsis; - line-height: 1.5; - word-break: break-all; - color: rgba(0, 0, 0, 0.88); - } +.text { + flex: 1; + min-width: 0; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; + line-height: 1.5; + word-break: break-all; + color: rgba(0, 0, 0, 0.88); +} - .param-value-view { - flex-shrink: 0; - color: #1677ff; - cursor: pointer; - user-select: none; - line-height: 1.5; - white-space: nowrap; +.view { + flex-shrink: 0; + color: #1677ff; + cursor: pointer; + user-select: none; + line-height: 1.5; + white-space: nowrap; - &:hover { - opacity: 0.85; - } + &:hover { + opacity: 0.85; } } diff --git a/src/pages/system/params/index.tsx b/src/pages/system/params/index.tsx index 06884b0..fcc58c6 100644 --- a/src/pages/system/params/index.tsx +++ b/src/pages/system/params/index.tsx @@ -5,7 +5,7 @@ import { saveParam, updateParam } from './model/services'; import { useState, useThrottleFn, useContainerSize, useEffect } from '@/hooks'; import ParamFormModal from './components/ParamFormModal'; import pageStyles from '@/assets/styles/pageLayout.module.less'; -import './index.module.less'; +import cellStyles from './index.module.less'; /** * 参数值单元格:最多 2 行截断,溢出时显示"查看"按钮 @@ -38,12 +38,12 @@ const ParamValueCell = defineComponent({ return () => { const raw = props.text; return ( -
-
+
+
{raw}
{overflow.value ? ( - setModalOpen(true)}> + setModalOpen(true)}> 查看 ) : null}