Skip to content

Commit

Permalink
fix: fix issue opencurve#5, limit the display length of the text box …
Browse files Browse the repository at this point in the history
…content
  • Loading branch information
lvchenjia committed Dec 1, 2023
1 parent 2dfc5f8 commit 64e633e
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 24 deletions.
8 changes: 6 additions & 2 deletions src/layout/components/admin/UserList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,16 @@ const columns = ref([
{
title: '用户名',
key: 'userName',
ellipsis: {
tooltip: true
},
},
{
title: '邮箱',
key: 'email',
ellipsis: {
tooltip: true
},
},
{
title: '用户角色',
Expand Down
13 changes: 12 additions & 1 deletion src/views/alertPage/alert-config.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ const columns = ref([
title: '名称',
width: 'auto',
key: 'name',
ellipsis: {
tooltip: true
},
},
{
title: '级别',
Expand Down Expand Up @@ -84,17 +87,25 @@ const columns = ref([
title: '规则',
width: 'auto',
key: 'rule',
ellipsis: {
tooltip: true
},
},
{
title: '描述',
width: 'auto',
key: 'desc',
ellipsis: {
tooltip: true
},
},
{
title: '接收人',
width: 'auto',
key: 'alertUsers',
ellipsis: {
tooltip: true
},
render: row => {
return <span>{row.alertUsers.join('')}</span>
},
Expand Down
27 changes: 11 additions & 16 deletions src/views/alertPage/system-log.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ const columns = ref([
title: '访问者',
width: 'auto',
key: 'user',
ellipsis: {
tooltip: true
},
},
{
title: '模块',
Expand All @@ -99,7 +102,9 @@ const columns = ref([
title: '操作',
width: 'auto',
key: 'method',
ellipsis: {
tooltip: true
},
// render: (row) => {
// return (
// <span>{row.enable? '开启' : '关闭'}</span>
Expand All @@ -110,26 +115,16 @@ const columns = ref([
title: '结果',
width: 'auto',
key: 'errorMsg',
ellipsis: {
tooltip: true
},
},
{
title: '内容',
width: 'auto',
key: 'content',
render(row) {
return (
<NTooltip trigger='hover'>
{{
trigger: () => (
<span>
{row.content.length < 15
? row.content
: row.content.substring(0, 15) + '...'}
</span>
),
default: () => <span>{row.content}</span>,
}}
</NTooltip>
)
ellipsis: {
tooltip: true
},
},
])
Expand Down
16 changes: 12 additions & 4 deletions src/views/clusterManagement/DiskManagement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ const columns = ref([
title: '主机名',
width: 'auto',
key: 'hostName',
ellipsis: {
tooltip: true
},
},
{
title: '盘符',
Expand All @@ -104,13 +106,17 @@ const columns = ref([
title: '类型',
width: 'auto',
key: 'diskType',
ellipsis: {
tooltip: true
},
},
{
title: '型号',
width: 'auto',
key: 'model',
ellipsis: {
tooltip: true
},
},
// {
// title: '写缓存',
Expand All @@ -121,7 +127,9 @@ const columns = ref([
title: '挂载点',
key: 'mountPoint',
width: 'auto',
ellipsis: {
tooltip: true
},
render(row) {
if (row.mountPoint) {
return <span>{row.mountPoint}</span>
Expand Down
4 changes: 3 additions & 1 deletion src/views/clusterManagement/ServerManagement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ const columns = ref([
title: '主机名',
key: 'hostName',
width: 'auto',
ellipsis: {
tooltip: true
},
render(row) {
return h(
NButton,
Expand Down
3 changes: 3 additions & 0 deletions src/views/storagePool/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ const columns: DataTableColumns<StoragePoolInfo> = [
title: '逻辑池名称',
width: 'auto',
key: 'name',
ellipsis: {
tooltip: true
},
render(row) {
return h(
NButton,
Expand Down

0 comments on commit 64e633e

Please sign in to comment.