diff --git a/src/index.ts b/src/index.ts index e955c8ce..05f58c73 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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}'` diff --git a/src/ui/tinyVue/tinyVue3/index.ts b/src/ui/tinyVue/tinyVue3/index.ts index 15117885..4f814466 100644 --- a/src/ui/tinyVue/tinyVue3/index.ts +++ b/src/ui/tinyVue/tinyVue3/index.ts @@ -333,7 +333,7 @@ export function tinyVue3Components() { map: componentsMap, isSeperatorByHyphen: true, prefix: 'tiny', - lib: '@opentiny/vue3', + lib: '@opentiny/vue', directives: directives.tinyVue3, }) } diff --git a/src/ui/uviewPlus/uviewPlus3/index.ts b/src/ui/uviewPlus/uviewPlus3/index.ts index cb40d060..7de17e55 100644 --- a/src/ui/uviewPlus/uviewPlus3/index.ts +++ b/src/ui/uviewPlus/uviewPlus3/index.ts @@ -269,6 +269,6 @@ export function uviewPlus3Components() { map, isSeperatorByHyphen: true, prefix: 'up', - lib: 'uviewPlus3', + lib: 'uviewPlus', }) }