File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 1+ import { readFileSync , writeFileSync } from 'node:fs' ;
2+
3+ export default function migrateSelect ( ) {
4+ const filePath = 'src/select/select.tsx' ;
5+ let content = readFileSync ( filePath , 'utf8' ) ;
6+ if ( content . includes ( 'const instance = getCurrentInstance();' ) ) {
7+ content = content . replace ( 'const instance = getCurrentInstance();' , 'const instance = getCurrentInstance().proxy;' ) ;
8+ content = content . replaceAll ( 'instance.emit' , 'instance.$emit' ) ;
9+ writeFileSync ( filePath , content , 'utf8' ) ;
10+ }
11+ }
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import migrateRenderTNode from './utils/render-tnode.mjs';
1111import migrateHooks from './hooks/index.mjs' ;
1212import migrateUpload from './components/upload.mjs' ;
1313import migrateTable from './components/table.mjs' ;
14+ import migrateSelect from './components/select.mjs' ;
1415
1516function run ( ) {
1617 migrateSingleFile ( ) ;
@@ -21,6 +22,7 @@ function run() {
2122 migrateDropdown ( ) ;
2223 migrateCard ( ) ;
2324 migrateUpload ( ) ;
25+ migrateSelect ( ) ;
2426 migrateTable ( ) ;
2527 migrateTree ( ) ;
2628
You can’t perform that action at this time.
0 commit comments