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 migrateRangeInput ( ) {
4+ const filePath = 'src/range-input/range-input.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 @@ -12,6 +12,7 @@ import migrateHooks from './hooks/index.mjs';
1212import migrateUpload from './components/upload.mjs' ;
1313import migrateTable from './components/table.mjs' ;
1414import migrateSelect from './components/select.mjs' ;
15+ import migrateRangeInput from './components/range-input.mjs' ;
1516
1617function run ( ) {
1718 migrateSingleFile ( ) ;
@@ -25,6 +26,7 @@ function run() {
2526 migrateSelect ( ) ;
2627 migrateTable ( ) ;
2728 migrateTree ( ) ;
29+ migrateRangeInput ( ) ;
2830
2931 migrateHelper ( ) ;
3032 migrateRenderTNode ( ) ;
You can’t perform that action at this time.
0 commit comments