This commit is contained in:
张成
2025-11-06 11:52:41 +08:00
parent bd7704f2c9
commit 2bd32e9a34
3 changed files with 26 additions and 25 deletions

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Framework Demo</title>
<title>Admin Framework </title>
</head>
<body>
<div id="app"></div>

View File

@@ -4,18 +4,14 @@
<tbody class="endTbody" v-for="(row, index) in subData" :key="row.id">
<tr class="tr-row" v-if="row">
<td v-for="(col, sonColIndex) in columns"
:key="sonColIndex"
:class="[
<td v-for="(col, sonColIndex) in columns" :key="sonColIndex" :class="[
{ 'td-expand': sonColIndex === 0 },
{ 'td-operations': col.type === 'operation' },
col.className
]"
:style="{
]" :style="{
width: col.width || 'auto',
minWidth: col.minWidth || (sonColIndex === 0 ? '200px' : '100px')
}"
>
}">
<RenderCol v-if="col.render" :col="col.render" :param="{ row, index, col }" />
<template v-else>
<div class="first-box" v-if="sonColIndex == 1">
@@ -212,7 +208,8 @@ table {
/* 确保表格可以在容器内滚动 */
.endTbody {
max-height: calc(100vh - 200px); /* 预留头部和其他元素的空间 */
max-height: calc(100vh - 200px);
/* 预留头部和其他元素的空间 */
overflow-y: auto;
}
@@ -256,6 +253,7 @@ table {
.tr-row {
padding: 0px 5px;
td {
text-align: center;
word-wrap: break-word;
@@ -307,7 +305,8 @@ table {
/* 展开列样式 */
.td-expand {
width: auto;
min-width: 200px; /* 给展开图标和文本预留足够空间 */
min-width: 200px;
/* 给展开图标和文本预留足够空间 */
}
/* 操作列样式 */
@@ -315,11 +314,14 @@ table {
text-align: right;
white-space: nowrap;
width: auto;
min-width: 180px; /* 增加按钮空间 */
min-width: 180px;
/* 增加按钮空间 */
padding-right: 16px;
overflow: visible !important; /* 强制确保内容可见 */
overflow: visible !important;
/* 强制确保内容可见 */
position: relative;
z-index: 1; /* 确保按钮在最上层 */
z-index: 1;
/* 确保按钮在最上层 */
}
/* 确保操作列中的按钮组样式 */

View File

@@ -167,7 +167,6 @@ export default {
{
key: 'operat',
title: '操作',
type: 'template',
width: 500,
render: (h, params) => {
let btns = [