| 
 | 1 | +import { readFileSync, writeFileSync } from 'node:fs';  | 
 | 2 | + | 
 | 3 | +function migrateThead() {  | 
 | 4 | +  const filePath = 'src/table/thead.tsx';  | 
 | 5 | +  let content = readFileSync(filePath, 'utf8');  | 
 | 6 | +  if (content.includes('setup(props: TheadProps')) {  | 
 | 7 | +    content = content.replace('setup(props: TheadProps', 'setup(props');  | 
 | 8 | +    writeFileSync(filePath, content, 'utf8');  | 
 | 9 | +  }  | 
 | 10 | +}  | 
 | 11 | +function migrateTbody() {  | 
 | 12 | +  const filePath = 'src/table/tbody.tsx';  | 
 | 13 | +  let content = readFileSync(filePath, 'utf8');  | 
 | 14 | +  if (content.includes('setup(props: TableBodyProps')) {  | 
 | 15 | +    content = content.replace('setup(props: TableBodyProps', 'setup(props');  | 
 | 16 | +    writeFileSync(filePath, content, 'utf8');  | 
 | 17 | +  }  | 
 | 18 | +}  | 
 | 19 | +function migrateTfoot() {  | 
 | 20 | +  const filePath = 'src/table/tfoot.tsx';  | 
 | 21 | +  let content = readFileSync(filePath, 'utf8');  | 
 | 22 | +  if (content.includes('setup(props: TFootProps')) {  | 
 | 23 | +    content = content.replace('setup(props: TFootProps', 'setup(props');  | 
 | 24 | +    writeFileSync(filePath, content, 'utf8');  | 
 | 25 | +  }  | 
 | 26 | +}  | 
 | 27 | +function migrateTr() {  | 
 | 28 | +  const filePath = 'src/table/tr.tsx';  | 
 | 29 | +  let content = readFileSync(filePath, 'utf8');  | 
 | 30 | +  if (content.includes('setup(props: TrProps')) {  | 
 | 31 | +    content = content.replace('setup(props: TrProps', 'setup(props');  | 
 | 32 | +    writeFileSync(filePath, content, 'utf8');  | 
 | 33 | +  }  | 
 | 34 | +}  | 
 | 35 | +export default function migrateTable() {  | 
 | 36 | +  migrateThead();  | 
 | 37 | +  migrateTbody();  | 
 | 38 | +  migrateTfoot();  | 
 | 39 | +  migrateTr();  | 
 | 40 | +}  | 
0 commit comments