Skip to content

Commit

Permalink
fix: auto import lib deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 committed Aug 4, 2024
1 parent c6d23a1 commit fb00294
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ export function activate(context: vscode.ExtensionContext) {

const offsetStart = code.match(uiComponents[lib].match[0])!.index!
const offsetEnd = offsetStart + uiComponents[lib].match[0].length
const posStart = getPosition(offsetStart)
const posEnd = getPosition(offsetEnd)
const posStart = getPosition(offsetStart).position
const posEnd = getPosition(offsetEnd).position

const str = importWay === 'as default'
? `import * as ${deps.join(', ')} from '${from}'`
Expand Down
2 changes: 1 addition & 1 deletion src/ui/tinyVue/tinyVue3/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ export function tinyVue3Components() {
map: componentsMap,
isSeperatorByHyphen: true,
prefix: 'tiny',
lib: '@opentiny/vue3',
lib: '@opentiny/vue',
directives: directives.tinyVue3,
})
}
2 changes: 1 addition & 1 deletion src/ui/uviewPlus/uviewPlus3/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,6 @@ export function uviewPlus3Components() {
map,
isSeperatorByHyphen: true,
prefix: 'up',
lib: 'uviewPlus3',
lib: 'uviewPlus',
})
}

0 comments on commit fb00294

Please sign in to comment.