fix: ui
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m47s

This commit is contained in:
sexygoat
2026-04-25 16:23:17 +08:00
parent a770984ef7
commit f0f054390a
2 changed files with 12 additions and 14 deletions

View File

@@ -94,8 +94,8 @@
<script setup lang="ts">
import { h } from 'vue'
import { ElButton, ElDropdown, ElDropdownMenu, ElDropdownItem, ElIcon } from 'element-plus'
import { ArrowDown } from '@element-plus/icons-vue'
import { ElDropdown, ElDropdownMenu, ElDropdownItem } from 'element-plus'
import { useTableStore } from '@/store/modules/table'
const { width } = useWindowSize()
const isMobile = computed(() => width.value < 500)
@@ -374,20 +374,19 @@
)
}
// 如果操作数量 <= inlineActionsCount直接显示所有按钮
// 如果操作数量 <= inlineActionsCount直接显示所有文本
if (actionList.length <= props.inlineActionsCount) {
return h(
'div',
{ style: 'display: flex; gap: 8px;' },
actionList.map((action) =>
h(
ElButton,
'span',
{
type: action.type === 'danger' ? 'danger' : 'primary',
link: true,
style: `color: ${action.type === 'danger' ? 'var(--el-color-danger)' : 'var(--el-color-primary)'}; cursor: pointer;`,
onClick: () => action.handler(row)
},
() => action.label
action.label
)
)
)
@@ -400,13 +399,12 @@
return h('div', { style: 'display: flex; gap: 12px; align-items: center;' }, [
...inlineActions.map((action) =>
h(
ElButton,
'span',
{
type: action.type === 'danger' ? 'danger' : 'primary',
link: true,
style: `color: ${action.type === 'danger' ? 'var(--el-color-danger)' : 'var(--el-color-primary)'}; cursor: pointer;`,
onClick: () => action.handler(row)
},
() => action.label
action.label
)
),
h(
@@ -422,7 +420,7 @@
style:
'display: flex; align-items: center; cursor: pointer; color: var(--el-color-primary);'
},
[h('span', '更多'), h(ElIcon, { style: 'margin-left: 4px;' }, () => h(ArrowDown))]
[h('span', '更多操作')]
),
dropdown: () =>
h(ElDropdownMenu, {}, () =>

View File

@@ -35,8 +35,8 @@
:total="pagination.total"
:marginTop="10"
:actions="getActions"
:actionsWidth="230"
:inlineActionsCount="2"
:actionsWidth="220"
:inlineActionsCount="3"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>