gongchunyi
2 天以前 06661fa6408ac922959dc6d79dab41596acdb375
src/components/PIMTable/PIMTable.vue
@@ -333,6 +333,7 @@
  const uploadRefs = ref([]);
  const currentFiles = ref({});
  const uploadKeys = ref({});
  const parentMethods = inject("parentMethods", {});
  const indexMethod = index => {
    return (props.page.current - 1) * props.page.size + index + 1;
@@ -342,6 +343,10 @@
  const goLink = (row, linkMethod) => {
    if (!linkMethod) {
      return ElMessage.warning("请配置 link 事件");
    }
    if (typeof linkMethod === "function") {
      linkMethod(row);
      return;
    }
    const parentMethod = getParentMethod(linkMethod);
    if (typeof parentMethod === "function") {
@@ -353,8 +358,7 @@
  // 获取父组件方法(示例实现)
  const getParentMethod = methodName => {
    const parentMethods = inject("parentMethods", {});
    return parentMethods[methodName];
    return parentMethods?.[methodName];
  };
  const dataTypeFn = (val, format) => {