Skip to content

Commit ca50670

Browse files
committed
docs
1 parent 573280d commit ca50670

File tree

6 files changed

+53
-2
lines changed

6 files changed

+53
-2
lines changed

docs/en/_sidebar.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@
2626
- Migration
2727
- [Migrate from v2 to v3](/en/migration/from-v2-to-v3.md)
2828
- 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 numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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 numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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.

docs/zh-cn/_sidebar.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@
2626
- 从旧版迁移
2727
- [v2迁移到v3](/zh-cn/migration/from-v2-to-v3.md)
2828
- 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 numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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作为渲染器。我们会持续加强类型支持。

readme.md

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ Welcome to suggest and contribute.
2828

2929
Document languages: English, 简体中文, Portuguese
3030

31+
# Wellknown issues
32+
33+
https://facing-dev.github.io/vue-facing-decorator/#/en/wellknown-issues/wellknown-issues
34+
3135
# Discussion
3236

3337
To discord [https://discord.gg/4exxtFgkcz](https://discord.gg/4exxtFgkcz)

0 commit comments

Comments
 (0)