Skip to content

Commit ab7bdec

Browse files
committed
文档: 修改示例代码
1 parent 839a04c commit ab7bdec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pnpm add vue3-oop
4141
### 定义组件
4242

4343
```typescript jsx
44-
import { Autobind, ComponentPropsArray, Computed, Hook, Link, Ref, VueComponent } from 'vue3-oop'
44+
import { Autobind, ComponentProps, Computed, Hook, Link, Ref, VueComponent } from 'vue3-oop'
4545
import { Directive, VNodeChild, watch } from 'vue'
4646

4747
const focusDirective: Directive = {
@@ -60,7 +60,7 @@ interface Foo_Props {
6060

6161
class Foo extends VueComponent<Foo_Props> {
6262
// vue需要的运行时属性检查
63-
static defaultProps: ComponentPropsArray<Foo_Props> = ['size']
63+
static defaultProps: ComponentProps<Foo_Props> = ['size']
6464
// 组件需要的局部指令
6565
static directives: Record<string, Directive> = {
6666
focus: focusDirective,

0 commit comments

Comments
 (0)