File tree 6 files changed +53
-2
lines changed
6 files changed +53
-2
lines changed Original file line number Diff line number Diff line change 26
26
- Migration
27
27
- [ Migrate from v2 to v3] ( /en/migration/from-v2-to-v3.md )
28
28
- Stage3 decorators
29
- - [ Stage3 decorators] ( /en/stage3-decorators/stage3-decorators.md )
29
+ - [ Stage3 decorators] ( /en/stage3-decorators/stage3-decorators.md )
30
+ - Wellknown issues
31
+ - [ Wellknown issues] ( /en/wellknown-issues/wellknown-issues.md )
Original file line number Diff line number Diff line change
1
+ import { Component , Vue , Prop } from 'vue-facing-decorator'
2
+ @Component
3
+ class Comp extends Vue {
4
+ @Prop
5
+ prop ! : number
6
+
7
+ method ( ) { return '' }
8
+
9
+ field1 = this . prop //NOT SUPPORT
10
+ field2 = this . method ( ) //NOT SUPPORT
11
+ }
Original file line number Diff line number Diff line change
1
+ ## Don't use ` this ` context while declaring class fields
2
+
3
+ When ` useDefineForClassFields ` is ` true ` in ts config, we can't access fields on ` this ` context while declaring class fields.
4
+
5
+ [ ] ( ./do-not-use-this.ts ' :include :type=code typescript ')
6
+
7
+ ## Use Vitest
8
+
9
+ If you have some error when use v-f-d with test framework, use Vitest instead of it.
10
+
11
+ https://github.com/facing-dev/vue-facing-decorator/issues/54#issuecomment-1500019388
12
+ https://github.com/facing-dev/vue-facing-decorator/issues/33#issuecomment-1410648544
13
+
14
+ ## Lake of IDE type supports
15
+
16
+ We can't provide full IDE type support at the moment. It's recommended to use tsx as render to have type supports as more as we can do. It will be kept improving in the future.
Original file line number Diff line number Diff line change 26
26
- 从旧版迁移
27
27
- [ v2迁移到v3] ( /zh-cn/migration/from-v2-to-v3.md )
28
28
- Stage3装饰器
29
- - [ Stage3装饰器] ( /zh-cn/stage3-decorators/stage3-decorators.md )
29
+ - [ Stage3装饰器] ( /zh-cn/stage3-decorators/stage3-decorators.md )
30
+ - 常见问题
31
+ - [ 常见问题] ( /zh-cn/wellknown-issues/wellknown-issues.md )
Original file line number Diff line number Diff line change
1
+ ## 声明类组件属性时不要使用` this ` 上下文
2
+
3
+ 当TS配置文件中` useDefineForClassFields ` 为` true ` 时,我们不能用` this ` 上下文来声明类组件的属性。
4
+
5
+ [ ] ( ../../en/wellknown-issues/do-not-use-this.ts ' :include :type=code typescript ')
6
+
7
+ ## 使用Vitest
8
+
9
+ 如果你在使用测试框架出现错误时,尝试使用Vitest。
10
+
11
+ https://github.com/facing-dev/vue-facing-decorator/issues/54#issuecomment-1500019388
12
+ https://github.com/facing-dev/vue-facing-decorator/issues/33#issuecomment-1410648544
13
+
14
+ ## 缺少IDE类型是吃
15
+
16
+ 目前我们不能为IDE提供完整的类型支持。如果你需要目前尽可能多的类型支持,建议使用TSX作为渲染器。我们会持续加强类型支持。
Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ Welcome to suggest and contribute.
28
28
29
29
Document languages: English, 简体中文, Portuguese
30
30
31
+ # Wellknown issues
32
+
33
+ https://facing-dev.github.io/vue-facing-decorator/#/en/wellknown-issues/wellknown-issues
34
+
31
35
# Discussion
32
36
33
37
To discord [ https://discord.gg/4exxtFgkcz ] ( https://discord.gg/4exxtFgkcz )
You can’t perform that action at this time.
0 commit comments