mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-11-27 04:09:51 +08:00
fix: gen-component-declaration (#2267)
This commit is contained in:
parent
faed3b7955
commit
a684528062
@ -65,7 +65,7 @@ app.use(naive)
|
|||||||
|
|
||||||
### Volar 支持(2.24.2)
|
### Volar 支持(2.24.2)
|
||||||
|
|
||||||
如果你在使用了 Volar,那么可以在 `tsconfig.json` 中配置 `compilerOptions.types` 来指定全局组件类型。
|
如果你在使用 Volar,那么可以在 `tsconfig.json` 中配置 `compilerOptions.types` 来指定全局组件类型。
|
||||||
|
|
||||||
```json
|
```json
|
||||||
// tsconfig.json
|
// tsconfig.json
|
||||||
|
@ -27,8 +27,8 @@ async function generateComponentsType () {
|
|||||||
components[key] = entry
|
components[key] = entry
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const originalContent = exist(resolve(TYPE_ROOT, 'components.d.ts'))
|
const originalContent = exist(resolve(TYPE_ROOT, 'volar.d.ts'))
|
||||||
? await fs.readFile(resolve(TYPE_ROOT, 'components.d.ts'), 'utf-8')
|
? await fs.readFile(resolve(TYPE_ROOT, 'volar.d.ts'), 'utf-8')
|
||||||
: ''
|
: ''
|
||||||
|
|
||||||
const originImports = parseComponentsDeclaration(originalContent)
|
const originImports = parseComponentsDeclaration(originalContent)
|
||||||
|
Loading…
Reference in New Issue
Block a user