mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-30 12:52:43 +08:00
type: remove NxButtin componnet (#2590)
* type: remove NxButtin componnet * Update scripts/gen-component-declaration.js Co-authored-by: yugang.cao <yugang.cao@tusimple.ai> Co-authored-by: 07akioni <07akioni2@gmail.com>
This commit is contained in:
parent
0c12a97b01
commit
3cad05961c
@ -4,6 +4,9 @@ import fs from 'fs-extra'
|
||||
|
||||
const TYPE_ROOT = resolve(__dirname, '..')
|
||||
|
||||
// XButton is for tsx type checking, shouldn't be exported
|
||||
const excludeComponents = ['NxButton']
|
||||
|
||||
function exist (path) {
|
||||
return fs.existsSync(path)
|
||||
}
|
||||
@ -23,7 +26,7 @@ async function generateComponentsType () {
|
||||
const components = {}
|
||||
Object.keys(globalComponents).forEach((key) => {
|
||||
const entry = `typeof import('naive-ui')['${key}']`
|
||||
if (key.startsWith('N')) {
|
||||
if (key.startsWith('N') && !excludeComponents.includes(key)) {
|
||||
components[key] = entry
|
||||
}
|
||||
})
|
||||
|
1
volar.d.ts
vendored
1
volar.d.ts
vendored
@ -14,7 +14,6 @@ declare module 'vue' {
|
||||
NBreadcrumbItem: typeof import('naive-ui')['NBreadcrumbItem']
|
||||
NButton: typeof import('naive-ui')['NButton']
|
||||
NButtonGroup: typeof import('naive-ui')['NButtonGroup']
|
||||
NxButton: typeof import('naive-ui')['NxButton']
|
||||
NCalendar: typeof import('naive-ui')['NCalendar']
|
||||
NColorPicker: typeof import('naive-ui')['NColorPicker']
|
||||
NCard: typeof import('naive-ui')['NCard']
|
||||
|
Loading…
Reference in New Issue
Block a user