Skip to content

Commit 01dfbdd

Browse files
committed
docs
1 parent e765021 commit 01dfbdd

16 files changed

+84
-9
lines changed

docs/en/_sidebar.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@
1818
- [Complex example](/en/inheritance/complex-example/complex-example.md)
1919
- TSX
2020
- [TSX render](/en/tsx/tsx-render/tsx-render.md)
21-
- [Attribute types](/en/tsx/attribute-types/attribute-types.md)
21+
- [Attribute types](/en/tsx/attribute-types/attribute-types.md)
22+
- Compatibility
23+
- [reflect-metadata](/en/compatibility/reflect-metadata/reflect-metadata.md)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import {Component} from 'vue-facing-decorator/dist/index-return-cons'
2+
3+
@Component
4+
export default class MyComp{
5+
6+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
//...
3+
chainWebpack: config => {
4+
//...
5+
config.resolve.alias.set('vue-facing-decorator', 'vue-facing-decorator/dist/index-return-cons')
6+
}
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
//...
3+
resolve: {
4+
//...
5+
'vue-facing-decorator': 'vue-facing-decorator/dist/index-return-cons'
6+
}
7+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Usage
2+
3+
To work with `reflect-metadata`, we should use `vue-facing-decorator/dist/index-return-cons` instead of `vue-facing-decorator` in code.
4+
5+
[](./code-usage.ts ':include :type=code typescript')
6+
7+
## Webpack `alias`
8+
9+
In `webpack.config.js`.
10+
11+
[](./code-webpack-alias-webpack-config.js ':include :type=code typescript')
12+
13+
Or in `vue.config.js`.
14+
15+
[](./code-webpack-alias-vue-config.js ':include :type=code typescript')

docs/en/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Works on TypeScript and decorator.
99
* Community desired vue class component with typescript decorators.
1010
* Safety. Transform es class to vue options api according to specifications.
1111
* Performance. Once transform on project loading, ready for everywhere.
12-
* Support es class inherit, vue `extends` and vue `mixins`.
12+
* Support ES class inherit, vue `extends` and vue `mixins`.
1313

1414
[](./quick-start/code-what-it-is-example.ts ':include :type=code typescript')
1515

docs/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Works on TypeScript and decorator.
99
* Community desired vue class component with typescript decorators.
1010
* Safety. Transform es class to vue options api according to specifications.
1111
* Performance. Once transform on project loading, ready for everywhere.
12-
* Support es class inherit, vue `extends` and vue `mixins`.
12+
* Support ES class inherit, vue `extends` and vue `mixins`.
1313

1414
[](/en/quick-start/code-what-it-is-example.ts ':include :type=code typescript')
1515

docs/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"declarationMap": true,
2424
"noUnusedLocals": false,
2525
"paths": {
26-
"vue-facing-decorator": ["../dist"]
26+
"vue-facing-decorator": ["../dist"],
27+
"vue-facing-decorator/dist/index-return-cons": ["../dist/index-return-cons"]
2728
},
2829
"jsx": "preserve"
2930
},

docs/zh-cn/_sidebar.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@
1818
- [复杂示例](/zh-cn/inheritance/complex-example/complex-example.md)
1919
- TSX
2020
- [TSX](/zh-cn/tsx/tsx-render/tsx-render.md)
21-
- [属性类型](/zh-cn/tsx/attribute-types/attribute-types.md)
21+
- [属性类型](/zh-cn/tsx/attribute-types/attribute-types.md)
22+
- 兼容性
23+
- [reflect-metadata](/zh-cn/compatibility/reflect-metadata/reflect-metadata.md)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import {Component} from 'vue-facing-decorator/dist/index-return-cons'
2+
3+
@Component
4+
export default class MyComp{
5+
6+
}

0 commit comments

Comments
 (0)