fix: 统一所有页面名称列点击编辑功能及样式
- material/list.vue: 名称列增加 clickable-text,有编辑权限可点击编辑 - material/buyOdoo.vue: 同上 - stock/inbound/semi.vue: 补上遗漏的 .clickable-text CSS 样式
This commit is contained in:
@ -240,7 +240,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column v-if="columns.name.visible" prop="name" label="名称" min-width="160" show-overflow-tooltip sortable="custom" />
|
<el-table-column v-if="columns.name.visible" label="名称" min-width="160" show-overflow-tooltip sortable="custom">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="userStore.hasPermission('material_list:operation')" class="clickable-text" @click="handleEdit(scope.row)">
|
||||||
|
{{ scope.row.name }}
|
||||||
|
</span>
|
||||||
|
<span v-else>{{ scope.row.name }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column v-if="columns.commonName.visible" prop="commonName" label="专业名称" min-width="140" show-overflow-tooltip sortable="custom">
|
<el-table-column v-if="columns.commonName.visible" prop="commonName" label="专业名称" min-width="140" show-overflow-tooltip sortable="custom">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -1569,4 +1576,6 @@ onMounted(() => {
|
|||||||
:deep(.el-table .danger-row), :deep(.el-table .danger-row > td.el-table__cell) { background-color: #fcd3d3 !important; }
|
:deep(.el-table .danger-row), :deep(.el-table .danger-row > td.el-table__cell) { background-color: #fcd3d3 !important; }
|
||||||
:deep(.el-table .el-table__cell.is-fixed) { background-color: inherit !important; }
|
:deep(.el-table .el-table__cell.is-fixed) { background-color: inherit !important; }
|
||||||
:deep(.el-table .el-table__cell.is-fixed .cell) { display: flex; gap: 6px; justify-content: flex-start; flex-wrap: nowrap; }
|
:deep(.el-table .el-table__cell.is-fixed .cell) { display: flex; gap: 6px; justify-content: flex-start; flex-wrap: nowrap; }
|
||||||
|
.clickable-text { color: #409EFF; cursor: pointer; font-weight: 500; text-decoration: underline; }
|
||||||
|
.clickable-text:hover { color: #66b1ff; }
|
||||||
</style>
|
</style>
|
||||||
@ -223,7 +223,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column v-if="columns.name.visible" prop="name" label="名称" min-width="160" show-overflow-tooltip sortable="custom" />
|
<el-table-column v-if="columns.name.visible" label="名称" min-width="160" show-overflow-tooltip sortable="custom">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="userStore.hasPermission('material_list:operation')" class="clickable-text" @click="handleEdit(scope.row)">
|
||||||
|
{{ scope.row.name }}
|
||||||
|
</span>
|
||||||
|
<span v-else>{{ scope.row.name }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column v-if="columns.commonName.visible" prop="commonName" label="专业名称" min-width="140" show-overflow-tooltip sortable="custom">
|
<el-table-column v-if="columns.commonName.visible" prop="commonName" label="专业名称" min-width="140" show-overflow-tooltip sortable="custom">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -2046,4 +2053,6 @@ onMounted(() => {
|
|||||||
justify-content: flex-start; /* 左对齐更自然 */
|
justify-content: flex-start; /* 左对齐更自然 */
|
||||||
flex-wrap: nowrap; /* 尽量不换行 */
|
flex-wrap: nowrap; /* 尽量不换行 */
|
||||||
}
|
}
|
||||||
|
.clickable-text { color: #409EFF; cursor: pointer; font-weight: 500; text-decoration: underline; }
|
||||||
|
.clickable-text:hover { color: #66b1ff; }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1655,6 +1655,9 @@ onMounted(() => {
|
|||||||
|
|
||||||
/* 左对齐数字框 */
|
/* 左对齐数字框 */
|
||||||
:deep(.el-input-number .el-input__inner) { text-align: left; }
|
:deep(.el-input-number .el-input__inner) { text-align: left; }
|
||||||
|
|
||||||
|
.clickable-text { color: #409EFF; cursor: pointer; font-weight: 500; text-decoration: underline; }
|
||||||
|
.clickable-text:hover { color: #66b1ff; }
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
Reference in New Issue
Block a user