From 0a251e40e30e7c8a96d71b3b9b6c459d4dfa4b22 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期三, 08 七月 2026 23:04:45 +0800
Subject: [PATCH] 暂存
---
src/components/PIMTable/PIMTable.vue | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/src/components/PIMTable/PIMTable.vue b/src/components/PIMTable/PIMTable.vue
index 61df179..aad24fa 100644
--- a/src/components/PIMTable/PIMTable.vue
+++ b/src/components/PIMTable/PIMTable.vue
@@ -8,9 +8,11 @@
:highlight-current-row="highlightCurrentRow"
:row-class-name="rowClassName"
:row-style="rowStyle"
+ :cell-style="cellStyle"
:row-key="rowKey"
:style="tableStyle"
tooltip-effect="dark"
+ :tooltip-options="{ appendTo: 'body' }"
:expand-row-keys="expandRowKeys"
:show-summary="isShowSummary"
:summary-method="summaryMethod"
@@ -21,6 +23,7 @@
class="lims-table">
<el-table-column align="center"
type="selection"
+ :selectable="selectable"
width="55"
v-if="isSelection" />
<el-table-column align="center"
@@ -118,6 +121,7 @@
<el-button v-show="o.type != 'upload'"
v-if="o.showHide ? o.showHide(scope.row) : true"
:disabled="isOperationDisabled(o, scope.row)"
+ :loading="isOperationLoading(o, scope.row)"
:plain="o.plain"
type="primary"
:style="{
@@ -258,6 +262,10 @@
type: Boolean,
default: false,
},
+ selectable: {
+ type: Function,
+ default: () => true,
+ },
isShowPagination: {
type: Boolean,
default: true,
@@ -283,6 +291,10 @@
default: () => "",
},
rowStyle: {
+ type: [Object, Function],
+ default: () => ({}),
+ },
+ cellStyle: {
type: [Object, Function],
default: () => ({}),
},
@@ -367,6 +379,13 @@
: !!operation.disabled;
};
+ const isOperationLoading = (operation, row) => {
+ if (!operation?.loading) return false;
+ return typeof operation.loading === "function"
+ ? !!operation.loading(row)
+ : !!operation.loading;
+ };
+
const parseHexToRgb = hex => {
const normalized = String(hex || "")
.trim()
--
Gitblit v1.9.3