Skip to content

Commit 4cfc5af

Browse files
committed
docs
1 parent b100478 commit 4cfc5af

File tree

149 files changed

+347
-1556
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+347
-1556
lines changed

docs/en/_sidebar.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
- [Attribute types](/en/tsx/attribute-types/attribute-types.md)
2323
- Custom Decorator
2424
- [Custom Decorator](/en/custom/custom.md)
25-
- Compatibility
26-
- [reflect-metadata](/en/compatibility/reflect-metadata/reflect-metadata.md)
27-
- Next version
28-
- [Next version](/en/next-version/next-version.md)
25+
- Migrate from v2
26+
- [Migrate from v2](/en/migrate-from-v2/migrate-from-v2.md)
27+
- Stage3 decorators
28+
- [Stage3 decorators](/en/stage3-decorators/stage3-decorators.md)

docs/en/class-component/accessor/code-usage.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import { Component, Vue } from 'vue-facing-decorator'
2+
import { Component, Vue, toNative } from 'vue-facing-decorator'
33

44
/*
55
Vue options API
@@ -13,8 +13,10 @@ Vue options API
1313
*/
1414

1515
@Component
16-
export default class MyComponent extends Vue {
16+
class MyComponent extends Vue {
1717
get getter() {
1818
return 'value'
1919
}
2020
}
21+
22+
export default toNative(MyComponent)
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11

2-
import { Component, Vue, Vanilla } from 'vue-facing-decorator'
2+
import { Component, Vue, Vanilla, toNative } from 'vue-facing-decorator'
33

44
@Component
5-
export default class MyComponent extends Vue {
5+
class MyComponent extends Vue {
66
@Vanilla
77
get getter() {
88
return 'value'
99
}
1010
}
11+
12+
export default toNative(MyComponent)
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11

2-
import { Component, Vue, Vanilla } from 'vue-facing-decorator'
2+
import { Component, Vue, Vanilla, toNative } from 'vue-facing-decorator'
33

44
@Component
5-
export default class MyComponent extends Vue {
5+
class MyComponent extends Vue {
66
foo = ''
77
@Vanilla
88
set setter(bar: string) {
99
this.foo = bar
1010
}
1111
}
12+
13+
export default toNative(MyComponent)

docs/en/class-component/accessor/code-writable.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import { Component, Vue } from 'vue-facing-decorator'
2+
import { Component, Vue, toNative } from 'vue-facing-decorator'
33

44
/*
55
Vue options API
@@ -18,9 +18,11 @@ Vue options API
1818
*/
1919

2020
@Component
21-
export default class MyComponent extends Vue {
21+
class MyComponent extends Vue {
2222
foo = ''
2323
set setter(bar: string) {
2424
this.foo = bar
2525
}
2626
}
27+
28+
export default toNative(MyComponent)

docs/en/class-component/component-property/code-option-default.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import { Prop, Component, Vue } from 'vue-facing-decorator'
2+
import { Prop, Component, Vue, toNative } from 'vue-facing-decorator'
33

44
/*
55
@@ -14,9 +14,11 @@ Vue options API
1414
*/
1515

1616
@Component
17-
export default class MyComponent extends Vue {
17+
class MyComponent extends Vue {
1818
@Prop({
1919
default: 'foo'
2020
})
2121
p!: string
2222
}
23+
24+
export default toNative(MyComponent)

docs/en/class-component/component-property/code-option-required.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import { Prop, Component, Vue } from 'vue-facing-decorator'
2+
import { Prop, Component, Vue, toNative } from 'vue-facing-decorator'
33

44
/*
55
@@ -14,9 +14,11 @@ Vue options API
1414
*/
1515

1616
@Component
17-
export default class MyComponent extends Vue {
17+
class MyComponent extends Vue {
1818
@Prop({
1919
required: true
2020
})
2121
p!: string
2222
}
23+
24+
export default toNative(MyComponent)

docs/en/class-component/component-property/code-option-type.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import { Prop, Component, Vue } from 'vue-facing-decorator'
2+
import { Prop, Component, Vue, toNative } from 'vue-facing-decorator'
33

44
/*
55
@@ -14,9 +14,11 @@ Vue options API
1414
*/
1515

1616
@Component
17-
export default class MyComponent extends Vue {
17+
class MyComponent extends Vue {
1818
@Prop({
1919
type: String
2020
})
2121
p?: string
2222
}
23+
24+
export default toNative(MyComponent)

docs/en/class-component/component-property/code-option-validator.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import { Prop, Component, Vue } from 'vue-facing-decorator'
2+
import { Prop, Component, Vue, toNative } from 'vue-facing-decorator'
33

44
/*
55
@@ -16,11 +16,13 @@ Vue options API
1616
*/
1717

1818
@Component
19-
export default class MyComponent extends Vue {
19+
class MyComponent extends Vue {
2020
@Prop({
21-
validator(val:any){
21+
validator(val: any) {
2222
return true
2323
}
2424
})
2525
p?: string
2626
}
27+
28+
export default toNative(MyComponent)

docs/en/class-component/component-property/code-usage.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import { Prop, Component, Vue } from 'vue-facing-decorator'
2+
import { Prop, Component, Vue, toNative } from 'vue-facing-decorator'
33

44
/*
55
@@ -14,7 +14,9 @@ Vue options API
1414
*/
1515

1616
@Component
17-
export default class MyComponent extends Vue {
17+
class MyComponent extends Vue {
1818
@Prop
1919
p?: string
2020
}
21+
22+
export default toNative(MyComponent)

docs/en/class-component/component/code-option-components.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import { Component, Vue } from 'vue-facing-decorator'
2+
import { Component, Vue, toNative } from 'vue-facing-decorator'
33

44
@Component
55
class MyAnotherComponent extends Vue {
@@ -20,8 +20,8 @@ Vue options component
2020
MyAnotherComponent
2121
}
2222
})
23-
export default class MyComponent extends Vue {
23+
class MyComponent extends Vue {
2424

2525
}
2626

27-
27+
export default toNative(MyComponent)

docs/en/class-component/component/code-option-directives.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import { Component, Vue } from 'vue-facing-decorator'
2+
import { Component, Vue, toNative } from 'vue-facing-decorator'
33

44
/*
55
Vue options component
@@ -15,6 +15,8 @@ Vue options component
1515
MyDirective: {}
1616
}
1717
})
18-
export default class MyComponent extends Vue {
18+
class MyComponent extends Vue {
1919

2020
}
21+
22+
export default toNative(MyComponent)

docs/en/class-component/component/code-option-emits.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import { Component, Vue } from 'vue-facing-decorator'
2+
import { Component, Vue, toNative } from 'vue-facing-decorator'
33

44
/*
55
Vue options component
@@ -11,6 +11,8 @@ Vue options component
1111
@Component({
1212
emits: ['MyEvent']
1313
})
14-
export default class MyComponent extends Vue {
14+
class MyComponent extends Vue {
1515

1616
}
17+
18+
export default toNative(MyComponent)

docs/en/class-component/component/code-option-expose.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import { Component, Vue } from 'vue-facing-decorator'
2+
import { Component, Vue, toNative } from 'vue-facing-decorator'
33

44
/*
55
Vue options component
@@ -11,6 +11,8 @@ Vue options component
1111
@Component({
1212
expose: ['Name']
1313
})
14-
export default class MyComponent extends Vue {
14+
class MyComponent extends Vue {
1515

1616
}
17+
18+
export default toNative(MyComponent)

docs/en/class-component/component/code-option-inherit-attrs.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import { Component, Vue } from 'vue-facing-decorator'
2+
import { Component, Vue, toNative } from 'vue-facing-decorator'
33

44
/*
55
Vue options component
@@ -11,6 +11,8 @@ Vue options component
1111
@Component({
1212
inheritAttrs: true
1313
})
14-
export default class MyComponent extends Vue {
14+
class MyComponent extends Vue {
1515

1616
}
17+
18+
export default toNative(MyComponent)
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
11

2-
import { Component, Vue } from 'vue-facing-decorator'
2+
import { Component, Vue, toNative } from 'vue-facing-decorator'
33
import { defineComponent } from 'vue'
44

55
const VueComponent = defineComponent({
66

77
})
88

9+
@Component
10+
class ClassComponent extends Vue {
11+
12+
}
13+
914
/*
1015
Vue options component
1116
{
12-
mixins:[VueComponent]
17+
mixins:[VueComponent, nativeClassComponent]
1318
}
1419
*/
1520

1621
@Component({
17-
mixins: [VueComponent]
22+
mixins: [VueComponent, toNative(ClassComponent)]
1823
})
19-
export default class MyComponent extends Vue {
24+
class MyComponent extends Vue {
2025

2126
}
27+
28+
export default toNative(MyComponent)

docs/en/class-component/component/code-option-modifier.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import { Component, Vue } from 'vue-facing-decorator'
2+
import { Component, Vue, toNative } from 'vue-facing-decorator'
33

44
/*
55
Vue options component
@@ -18,6 +18,8 @@ Vue options component
1818
option.methods.customMethod = function () { }
1919
}
2020
})
21-
export default class MyComponent extends Vue {
21+
class MyComponent extends Vue {
2222

2323
}
24+
25+
export default toNative(MyComponent)
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Vue } from 'vue-facing-decorator'
1+
import { Component, Vue, toNative } from 'vue-facing-decorator'
22

33
/*
44
Vue options API
@@ -8,8 +8,10 @@ Vue options API
88
*/
99

1010
@Component({
11-
name:'VueComponentName'
11+
name: 'VueComponentName'
1212
})
13-
export default class MyComponent extends Vue {
13+
class MyComponent extends Vue {
1414

1515
}
16+
17+
export default toNative(MyComponent)

docs/en/class-component/component/code-option-options.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Vue } from 'vue-facing-decorator'
1+
import { Component, Vue, toNative } from 'vue-facing-decorator'
22

33
/*
44
Vue options API
@@ -12,6 +12,8 @@ Vue options API
1212
name: 'VueComponentName'
1313
}
1414
})
15-
export default class MyComponent extends Vue {
15+
class MyComponent extends Vue {
1616

1717
}
18+
19+
export default toNative(MyComponent)

docs/en/class-component/component/code-option-provide.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import { Component, Vue } from 'vue-facing-decorator'
2+
import { Component, Vue, toNative } from 'vue-facing-decorator'
33

44
/*
55
Vue options API
@@ -15,6 +15,8 @@ Vue options API
1515
key: 'value'
1616
}
1717
})
18-
export default class MyComponent extends Vue {
18+
class MyComponent extends Vue {
1919

2020
}
21+
22+
export default toNative(MyComponent)

0 commit comments

Comments
 (0)