| | |
| | | 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; |
| | |
| | | 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") { |
| | |
| | | |
| | | // 获取父组件方法(示例实现) |
| | | const getParentMethod = methodName => { |
| | | const parentMethods = inject("parentMethods", {}); |
| | | return parentMethods[methodName]; |
| | | return parentMethods?.[methodName]; |
| | | }; |
| | | |
| | | const dataTypeFn = (val, format) => { |