8 changed files with 3 additions and 78 deletions
@ -1,21 +0,0 @@ |
|||
// TODO
|
|||
import type { GetManualChunk } from 'rollup'; |
|||
|
|||
//
|
|||
const vendorLibs: { match: string[]; output: string }[] = [ |
|||
// {
|
|||
// match: ['xlsx'],
|
|||
// output: 'xlsx',
|
|||
// },
|
|||
]; |
|||
|
|||
// @ts-ignore
|
|||
export const configManualChunk: GetManualChunk = (id: string) => { |
|||
if (/[\\/]node_modules[\\/]/.test(id)) { |
|||
const matchItem = vendorLibs.find((item) => { |
|||
const reg = new RegExp(`[\\/]node_modules[\\/]_?(${item.match.join('|')})(.*)`, 'ig'); |
|||
return reg.test(id); |
|||
}); |
|||
return matchItem ? matchItem.output : null; |
|||
} |
|||
}; |
|||
@ -1,25 +0,0 @@ |
|||
import type { Plugin } from 'vite'; |
|||
|
|||
/** |
|||
* TODO |
|||
* Temporarily solve the Vite circular dependency problem, and wait for a better solution to fix it later. I don't know what problems this writing will bring. |
|||
* @returns |
|||
*/ |
|||
|
|||
export function configHmrPlugin(): Plugin { |
|||
return { |
|||
name: 'singleHMR', |
|||
// handleHotUpdate({ modules, file }) {
|
|||
// if (file.match(/xml$/)) return [];
|
|||
|
|||
// modules.forEach((m) => {
|
|||
// if (!m.url.match(/\.(css|less)/)) {
|
|||
// m.importedModules = new Set();
|
|||
// m.importers = new Set();
|
|||
// }
|
|||
// });
|
|||
|
|||
// return modules;
|
|||
// },
|
|||
}; |
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
import { BasicArrow } from '/@/components/Basic'; |
|||
|
|||
export default () => { |
|||
return (props: Recordable) => { |
|||
if (!props.expandable) { |
|||
if (props.needIndentSpaced) { |
|||
return <span class="ant-table-row-expand-icon ant-table-row-spaced" />; |
|||
} else { |
|||
return <span />; |
|||
} |
|||
} |
|||
return ( |
|||
<BasicArrow |
|||
style="margin-right: 8px" |
|||
iconStyle="margin-top: -2px;" |
|||
onClick={(e: Event) => { |
|||
props.onExpand(props.record, e); |
|||
}} |
|||
expand={props.expanded} |
|||
/> |
|||
); |
|||
}; |
|||
}; |
|||
Loading…
Reference in new issue