Skip to content

Commit

Permalink
fix: 修复联合类型错误提示
Browse files Browse the repository at this point in the history
  • Loading branch information
agileago committed Apr 15, 2022
1 parent 1a269de commit 661acfe
Show file tree
Hide file tree
Showing 6 changed files with 598 additions and 473 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
registry=https://registry.npmmirror.com/
strict-peer-dependencies=false
31 changes: 30 additions & 1 deletion example/module/basic/user-input/user-input.view.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,37 @@
import { Card } from 'ant-design-vue'
import { VueComponent } from 'vue3-oop'

type A = {
mode: 'selector'
range: string[]
slots: {
abc(name: string): void
}
}
type B = {
mode: 'normal'
list: number[]
slots: {
def(abc: number): void
}
value?: string
'onUpdate:value'?: (v: string) => void
}

type C = B

class Union extends VueComponent<B> {
render() {
return <div>111</div>
}
}

export default class UserInputView extends VueComponent {
render() {
return <Card title={'增删改查'}></Card>
return (
<Card title={'增删改查'}>
<Union mode="normal" list={[1]} style={{ display: 'block' }}></Union>
</Card>
)
}
}
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@
"@abraham/reflection": "^0.10.0",
"@commitlint/cli": "^16.2.3",
"@nexhome/yorkie": "^2.0.8",
"@release-it/conventional-changelog": "^4.2.2",
"@release-it/conventional-changelog": "^4.3.0",
"@types/lodash-es": "^4.17.6",
"@types/markdown-it": "^12.2.3",
"@types/node": "^17.0.23",
"@types/prettier": "^2.4.4",
"@typescript-eslint/eslint-plugin": "^5.18.0",
"@typescript-eslint/parser": "^5.18.0",
"@types/node": "^17.0.24",
"@types/prettier": "^2.6.0",
"@typescript-eslint/eslint-plugin": "^5.19.0",
"@typescript-eslint/parser": "^5.19.0",
"@vitejs/plugin-vue": "^2.3.1",
"@vitest/ui": "^0.9.2",
"@vue/test-utils": "^2.0.0-rc.19",
"@vitest/ui": "^0.9.3",
"@vue/test-utils": "2.0.0-rc.20",
"@vue3-oop/plugin-vue-jsx": "^1.4.0",
"ant-design-vue": "^3.1.1",
"autobind-decorator": "^2.4.0",
Expand All @@ -79,15 +79,15 @@
"lint-staged": "^12.3.7",
"lodash-es": "^4.17.21",
"prettier": "^2.6.2",
"release-it": "^14.14.0",
"release-it": "^14.14.2",
"rimraf": "^3.0.2",
"sass": "^1.50.0",
"tslib": "^2.3.1",
"typescript": "^4.6.3",
"vite": "^2.9.1",
"vite": "^2.9.5",
"vitepress": "^0.22.3",
"vitest": "^0.9.2",
"vue": "^3.2.31",
"vitest": "^0.9.3",
"vue": "^3.2.33",
"vue-router": "^4.0.14"
},
"gitHooks": {
Expand All @@ -108,8 +108,8 @@
"access": "public"
},
"peerDependencies": {
"injection-js": "^2.4.0",
"vue": "^3.2.20"
"injection-js": "*",
"vue": "3"
},
"release-it": {
"git": {
Expand Down
Loading

0 comments on commit 661acfe

Please sign in to comment.