Skip to content

Commit 56ef500

Browse files
committed
chore: fix conflict
1 parent 0874a44 commit 56ef500

File tree

6 files changed

+39
-19
lines changed

6 files changed

+39
-19
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ pids
1515
*.pid
1616
*.seed
1717
*.pid.lock
18+
.idea
19+
.vscode
1820

1921
# Directory for instrumented libs generated by jscoverage/JSCover
2022
lib-cov

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"dependencies": {
3636
"@nuxt/kit": "^3.5.2",
3737
"@ant-design/icons-vue": "^6.1.0",
38-
"ant-design-vue": "^4.0.0"
38+
"ant-design-vue": "^4.0.1"
3939
},
4040
"devDependencies": {
4141
"@nuxt/eslint-config": "^0.1.1",
@@ -48,4 +48,4 @@
4848
"nuxt": "^3.5.1",
4949
"vitest": "^0.31.1"
5050
}
51-
}
51+
}

pnpm-lock.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/antdv.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
export const allComponents = [
1+
export const allComponents:(string | [string,string])[] = [
2+
'App',
23
'Affix',
34
'Alert',
45
'Anchor',
@@ -30,6 +31,7 @@ export const allComponents = [
3031
'CollapsePanel',
3132
'Comment',
3233
'ConfigProvider',
34+
['Compact','SpaceCompact'],
3335
'DatePicker',
3436
'Descriptions',
3537
'DescriptionsItem',
@@ -74,7 +76,7 @@ export const allComponents = [
7476
'Popconfirm',
7577
'Popover',
7678
'Progress',
77-
'QRCode',
79+
['QRCode','Qrcode'],
7880
'QuarterPicker',
7981
'Radio',
8082
'RadioButton',
@@ -136,4 +138,4 @@ export const allComponents = [
136138
]
137139

138140

139-
export const allImports = ['message','notification','Modal'];
141+
export const allImports = ['message','notification','Modal','App'];

src/core/components.ts

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,38 @@ import { iconLibraryName, libraryName, prefix } from "../config"
33
import { addComponent } from "@nuxt/kit";
44

55
export const resolveComponents = (config:Options) =>{
6-
const { components, icons } = config;
6+
const { components,icons } = config;
77
const allComponents = components === false ? [] : components;
8-
allComponents.forEach(component => {
9-
addComponent({
10-
export: component,
11-
name: prefix + component,
12-
filePath: libraryName + '/es'
13-
})
8+
allComponents.forEach(component=>{
9+
if (typeof component === 'string'){
10+
addComponent({
11+
export: component,
12+
name: prefix + component,
13+
filePath: libraryName + '/es'
14+
})
15+
}else if (Array.isArray(component)){
16+
addComponent({
17+
export: component[0],
18+
name: prefix + component[1],
19+
filePath: libraryName + '/es'
20+
})
21+
}
1422
})
1523

1624
const allIcons = icons === false ? [] : icons;
1725
allIcons.forEach(icon=>{
18-
addComponent({
19-
export: icon,
20-
name: icon,
21-
filePath: iconLibraryName
22-
})
26+
if (typeof icon === 'string'){
27+
addComponent({
28+
export: icon,
29+
name: icon,
30+
filePath: iconLibraryName
31+
})
32+
}else if (Array.isArray(icon)){
33+
addComponent({
34+
export: icon[0],
35+
name: icon[1],
36+
filePath: iconLibraryName
37+
})
38+
}
2339
})
2440
}

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export type PresetImport = string
1+
export type PresetImport = string | [string,string]
22

33

44
export interface Options {

0 commit comments

Comments
 (0)