zhangwencui
10 小时以前 645b989aff40a95bd2f99d18afa253271381a969
src/components/PIMTable/PIMTable.vue
@@ -85,9 +85,9 @@
              typeof dataTypeFn(scope.row[item.prop], item.formatData) ===
              'string'
            "
                  :title="formatters(scope.row[item.prop], item.formatData)"
                  :title="formatters(scope.row[item.prop], item.formatData, scope.row)"
                  :type="formatType(scope.row[item.prop], item.formatType)">
            {{ formatters(scope.row[item.prop], item.formatData) }}
            {{ formatters(scope.row[item.prop], item.formatData, scope.row) }}
          </el-tag>
          <el-tag v-for="(tag, index) in dataTypeFn(
              scope.row[item.prop],
@@ -98,14 +98,14 @@
              'object'
            "
                  :key="index"
                  :title="formatters(scope.row[item.prop], item.formatData)"
                  :title="formatters(scope.row[item.prop], item.formatData, scope.row)"
                  :type="formatType(tag, item.formatType)">
            {{ item.tagGroup ? tag[item.tagGroup.label] ?? tag : tag }}
          </el-tag>
          <el-tag v-else
                  :title="formatters(scope.row[item.prop], item.formatData)"
                  :title="formatters(scope.row[item.prop], item.formatData, scope.row)"
                  :type="formatType(scope.row[item.prop], item.formatType)">
            {{ formatters(scope.row[item.prop], item.formatData) }}
            {{ formatters(scope.row[item.prop], item.formatData, scope.row) }}
          </el-tag>
        </div>
        <!-- 按钮 -->
@@ -181,7 +181,7 @@
             style="width: 100%">
          <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span>
          <span v-else>{{
            formatters(scope.row[item.prop], item.formatData)
            formatters(scope.row[item.prop], item.formatData, scope.row)
          }}</span>
        </div>
      </template>
@@ -217,8 +217,8 @@
    return typeof val === "function" ? val(row) : val;
  };
  const formatters = (val, format) => {
    return typeof format === "function" ? format(val) : val;
  const formatters = (val, format, row) => {
    return typeof format === "function" ? format(val, row) : val;
  };
  // Props(使用 defineProps 的非 TS 形式)