style: 样式优化

--bug=1035283 --user=吕梦园
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001035283
--bug=1035615 --user=吕梦园
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001035615
This commit is contained in:
teukkk 2024-12-11 15:08:49 +08:00 committed by Craftsman
parent 5bc0c853b2
commit ee155ac24f
9 changed files with 56 additions and 14 deletions

View File

@ -216,3 +216,11 @@ body {
} }
} }
} }
// 表格选中行样式
.selected-row-class.arco-table-tr {
background: var(--color-fill-1) !important;
.arco-table-td {
background: var(--color-fill-1) !important;
}
}

View File

@ -194,15 +194,16 @@
class="minus" class="minus"
:class="[ :class="[
'flex', 'flex',
'h-full', 'h-[32px]',
'w-[32px]', 'w-[32px]',
'cursor-pointer', 'cursor-pointer',
'items-center', 'items-center',
'justify-center', 'justify-center',
'text-[var(--color-text-4)]', 'text-[var(--color-text-4)]',
'mt-[8px]', 'hover:bg-[var(--color-text-n9)]',
'rounded',
]" ]"
:style="{ 'margin-top': index === 0 && !props.isShowDrag ? '36px' : '' }" :style="{ 'margin-top': index === 0 && !props.isShowDrag ? '30px' : '' }"
@click="removeField(index)" @click="removeField(index)"
> >
<icon-minus-circle /> <icon-minus-circle />

View File

@ -19,8 +19,8 @@
<template #title> <template #title>
<div class="flex items-center justify-between gap-[4px]"> <div class="flex items-center justify-between gap-[4px]">
<slot name="title"> <slot name="title">
<div class="flex flex-1 items-center justify-between"> <div class="flex flex-1 items-center justify-between overflow-hidden">
<div class="flex items-center"> <div class="flex items-center overflow-hidden">
<a-tooltip :disabled="!props.title" :content="props.title"> <a-tooltip :disabled="!props.title" :content="props.title">
<span class="one-line-text max-w-[300px]"> {{ props.title }}</span> <span class="one-line-text max-w-[300px]"> {{ props.title }}</span>
</a-tooltip> </a-tooltip>

View File

@ -8,6 +8,17 @@
:mask="false" :mask="false"
@cancel="handleCancel" @cancel="handleCancel"
> >
<template #headerLeft>
<a-tooltip :content="props.currentName">
<div class="ml-[8px] flex flex-1 overflow-hidden text-[var(--color-text-4)]">
(
<div class="one-line-text flex-1">
{{ props.currentName }}
</div>
)
</div>
</a-tooltip>
</template>
<div> <div>
<div class="flex flex-row justify-between"> <div class="flex flex-row justify-between">
<a-button <a-button
@ -117,6 +128,7 @@
visible: boolean; visible: boolean;
organizationId?: string; organizationId?: string;
projectId?: string; projectId?: string;
currentName?: string;
} }
const { t } = useI18n(); const { t } = useI18n();
const props = defineProps<projectDrawerProps>(); const props = defineProps<projectDrawerProps>();

View File

@ -17,7 +17,7 @@
@clear="fetchData" @clear="fetchData"
></a-input-search> ></a-input-search>
</div> </div>
<MsBaseTable v-bind="propsRes" v-on="propsEvent" @enable-change="enableChange"> <MsBaseTable v-bind="propsRes" :row-class="getRowClass" v-on="propsEvent" @enable-change="enableChange">
<template #revokeDelete="{ record }"> <template #revokeDelete="{ record }">
<a-tooltip class="ms-tooltip-white"> <a-tooltip class="ms-tooltip-white">
<template #content> <template #content>
@ -271,6 +271,7 @@
const currentUserDrawer = reactive({ const currentUserDrawer = reactive({
visible: false, visible: false,
projectId: '', projectId: '',
currentName: '',
}); });
const tableActions: ActionsItem[] = [ const tableActions: ActionsItem[] = [
@ -339,10 +340,16 @@
const showUserDrawer = (record: TableData) => { const showUserDrawer = (record: TableData) => {
currentUserDrawer.visible = true; currentUserDrawer.visible = true;
currentUserDrawer.projectId = record.id; currentUserDrawer.projectId = record.id;
currentUserDrawer.currentName = record.name;
}; };
function getRowClass(record: TableData) {
return record.id === currentUserDrawer.projectId ? 'selected-row-class' : '';
}
const handleUserDrawerCancel = () => { const handleUserDrawerCancel = () => {
currentUserDrawer.visible = false; currentUserDrawer.visible = false;
currentUserDrawer.projectId = '';
}; };
const handleAddProjectModalCancel = (shouldSearch: boolean) => { const handleAddProjectModalCancel = (shouldSearch: boolean) => {

View File

@ -1,5 +1,5 @@
<template> <template>
<MsBaseTable v-bind="propsRes" v-on="propsEvent" @enable-change="enableChange"> <MsBaseTable v-bind="propsRes" :row-class="getRowClass" v-on="propsEvent" @enable-change="enableChange">
<template #revokeDelete="{ record }"> <template #revokeDelete="{ record }">
<a-tooltip class="ms-tooltip-white"> <a-tooltip class="ms-tooltip-white">
<template #content> <template #content>
@ -325,8 +325,13 @@
currentUserDrawer.currentName = record.name; currentUserDrawer.currentName = record.name;
}; };
function getRowClass(record: TableData) {
return record.id === currentUserDrawer.organizationId ? 'selected-row-class' : '';
}
const handleUserDrawerCancel = () => { const handleUserDrawerCancel = () => {
currentUserDrawer.visible = false; currentUserDrawer.visible = false;
currentUserDrawer.organizationId = '';
}; };
const handleAddOrgModalCancel = (shouldSearch: boolean) => { const handleAddOrgModalCancel = (shouldSearch: boolean) => {

View File

@ -1,5 +1,5 @@
<template> <template>
<MsBaseTable v-bind="propsRes" v-on="propsEvent" @enable-change="enableChange"> <MsBaseTable v-bind="propsRes" :row-class="getRowClass" v-on="propsEvent" @enable-change="enableChange">
<template #revokeDelete="{ record }"> <template #revokeDelete="{ record }">
<a-tooltip class="ms-tooltip-white"> <a-tooltip class="ms-tooltip-white">
<template #content> <template #content>
@ -292,6 +292,10 @@
currentUserDrawer.currentName = record.name; currentUserDrawer.currentName = record.name;
}; };
function getRowClass(record: TableData) {
return record.id === currentUserDrawer.projectId ? 'selected-row-class' : '';
}
const handleUserDrawerCancel = () => { const handleUserDrawerCancel = () => {
currentUserDrawer.visible = false; currentUserDrawer.visible = false;
currentUserDrawer.projectId = ''; currentUserDrawer.projectId = '';

View File

@ -9,6 +9,17 @@
:title="t('system.memberList')" :title="t('system.memberList')"
@cancel="handleCancel" @cancel="handleCancel"
> >
<template #headerLeft>
<a-tooltip :content="props.currentName">
<div class="ml-[8px] flex flex-1 overflow-hidden text-[var(--color-text-4)]">
(
<div class="one-line-text flex-1">
{{ props.currentName }}
</div>
)
</div>
</a-tooltip>
</template>
<div> <div>
<div class="flex flex-row justify-between"> <div class="flex flex-row justify-between">
<a-button <a-button

View File

@ -177,10 +177,4 @@
@apply overflow-y-auto; @apply overflow-y-auto;
.ms-scroll-bar(); .ms-scroll-bar();
} }
:deep(.selected-row-class.arco-table-tr) {
background: var(--color-fill-1) !important;
.arco-table-td {
background: var(--color-fill-1) !important;
}
}
</style> </style>