From 2075144baf459fe5ef89892d189784636f27f862 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 22 一月 2026 14:04:58 +0800
Subject: [PATCH] 湟水峡 1.发货分开类型货车和快递,并可以上传图片
---
src/components/PIMTable/PIMTable.vue | 31 +++++++++++++++++++++++--------
1 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/src/components/PIMTable/PIMTable.vue b/src/components/PIMTable/PIMTable.vue
index 0ad551f..dfbc231 100644
--- a/src/components/PIMTable/PIMTable.vue
+++ b/src/components/PIMTable/PIMTable.vue
@@ -40,12 +40,22 @@
:fixed="item.fixed"
:label="item.label"
:prop="item.prop"
- show-overflow-tooltip
+ :show-overflow-tooltip="item.dataType !== 'action' && item.dataType !== 'slot'"
:align="item.align"
:sortable="!!item.sortable"
:type="item.type"
:width="item.width"
>
+ <template #header="scope">
+ <div class="pim-table-header-cell">
+ <div class="pim-table-header-title">
+ {{ item.label }}
+ </div>
+ <div v-if="item.headerSlot" class="pim-table-header-extra">
+ <slot :name="item.headerSlot" :column="scope.column" />
+ </div>
+ </div>
+ </template>
<template
v-if="item.hasOwnProperty('colunmTemplate')"
#[item.colunmTemplate]="scope"
@@ -120,7 +130,7 @@
</div>
<!-- 鎸夐挳 -->
- <div v-else-if="item.dataType == 'action'">
+ <div v-else-if="item.dataType == 'action'" @click.stop>
<template v-for="(o, key) in item.operation" :key="key">
<el-button
v-show="o.type != 'upload'"
@@ -135,7 +145,7 @@
: o.color,
}"
link
- @click="o.clickFun(scope.row)"
+ @click.stop="o.clickFun(scope.row)"
:key="key"
>
{{ o.name }}
@@ -204,7 +214,7 @@
</el-table-column>
</el-table>
<pagination
- v-if="showPagination"
+ v-if="isShowPagination"
:total="page.total"
:layout="page.layout"
:page="page.current"
@@ -268,6 +278,10 @@
type: Boolean,
default: false,
},
+ isShowPagination: {
+ type: Boolean,
+ default: true,
+ },
isShowSummary: {
type: Boolean,
default: false,
@@ -316,10 +330,6 @@
tableStyle: {
type: [String, Object],
default: () => ({ width: "100%" }),
- },
- showPagination: {
- type: Boolean,
- default: true,
},
});
@@ -434,4 +444,9 @@
padding-right: 0 !important;
padding-left: 0 !important;
}
+
+.pim-table-header-extra :deep(.el-input),
+.pim-table-header-extra :deep(.el-select) {
+ width: 100%;
+}
</style>
--
Gitblit v1.9.3