gongchunyi
7 天以前 53531219512bd3085903ebb11cf1184b66b05461
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"
@@ -119,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="{
@@ -291,6 +294,10 @@
      type: [Object, Function],
      default: () => ({}),
    },
    cellStyle: {
      type: [Object, Function],
      default: () => ({}),
    },
    tableData: {
      type: Array,
      default: () => [],
@@ -372,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()