Skip to content

Commit 661acfe

Browse files
committed
fix: 修复联合类型错误提示
1 parent 1a269de commit 661acfe

File tree

6 files changed

+598
-473
lines changed

6 files changed

+598
-473
lines changed

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
registry=https://registry.npmmirror.com/
2+
strict-peer-dependencies=false
Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,37 @@
11
import { Card } from 'ant-design-vue'
22
import { VueComponent } from 'vue3-oop'
33

4+
type A = {
5+
mode: 'selector'
6+
range: string[]
7+
slots: {
8+
abc(name: string): void
9+
}
10+
}
11+
type B = {
12+
mode: 'normal'
13+
list: number[]
14+
slots: {
15+
def(abc: number): void
16+
}
17+
value?: string
18+
'onUpdate:value'?: (v: string) => void
19+
}
20+
21+
type C = B
22+
23+
class Union extends VueComponent<B> {
24+
render() {
25+
return <div>111</div>
26+
}
27+
}
28+
429
export default class UserInputView extends VueComponent {
530
render() {
6-
return <Card title={'增删改查'}></Card>
31+
return (
32+
<Card title={'增删改查'}>
33+
<Union mode="normal" list={[1]} style={{ display: 'block' }}></Union>
34+
</Card>
35+
)
736
}
837
}

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@
5454
"@abraham/reflection": "^0.10.0",
5555
"@commitlint/cli": "^16.2.3",
5656
"@nexhome/yorkie": "^2.0.8",
57-
"@release-it/conventional-changelog": "^4.2.2",
57+
"@release-it/conventional-changelog": "^4.3.0",
5858
"@types/lodash-es": "^4.17.6",
5959
"@types/markdown-it": "^12.2.3",
60-
"@types/node": "^17.0.23",
61-
"@types/prettier": "^2.4.4",
62-
"@typescript-eslint/eslint-plugin": "^5.18.0",
63-
"@typescript-eslint/parser": "^5.18.0",
60+
"@types/node": "^17.0.24",
61+
"@types/prettier": "^2.6.0",
62+
"@typescript-eslint/eslint-plugin": "^5.19.0",
63+
"@typescript-eslint/parser": "^5.19.0",
6464
"@vitejs/plugin-vue": "^2.3.1",
65-
"@vitest/ui": "^0.9.2",
66-
"@vue/test-utils": "^2.0.0-rc.19",
65+
"@vitest/ui": "^0.9.3",
66+
"@vue/test-utils": "2.0.0-rc.20",
6767
"@vue3-oop/plugin-vue-jsx": "^1.4.0",
6868
"ant-design-vue": "^3.1.1",
6969
"autobind-decorator": "^2.4.0",
@@ -79,15 +79,15 @@
7979
"lint-staged": "^12.3.7",
8080
"lodash-es": "^4.17.21",
8181
"prettier": "^2.6.2",
82-
"release-it": "^14.14.0",
82+
"release-it": "^14.14.2",
8383
"rimraf": "^3.0.2",
8484
"sass": "^1.50.0",
8585
"tslib": "^2.3.1",
8686
"typescript": "^4.6.3",
87-
"vite": "^2.9.1",
87+
"vite": "^2.9.5",
8888
"vitepress": "^0.22.3",
89-
"vitest": "^0.9.2",
90-
"vue": "^3.2.31",
89+
"vitest": "^0.9.3",
90+
"vue": "^3.2.33",
9191
"vue-router": "^4.0.14"
9292
},
9393
"gitHooks": {
@@ -108,8 +108,8 @@
108108
"access": "public"
109109
},
110110
"peerDependencies": {
111-
"injection-js": "^2.4.0",
112-
"vue": "^3.2.20"
111+
"injection-js": "*",
112+
"vue": "3"
113113
},
114114
"release-it": {
115115
"git": {

0 commit comments

Comments
 (0)