Skip to content

Commit 83caad5

Browse files
author
brendon silva
committed
docs: initializing pt-br translation
1 parent 6453ae5 commit 83caad5

File tree

82 files changed

+1782
-2
lines changed

Some content is hidden

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

82 files changed

+1782
-2
lines changed

docs/en/_navbar.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
- [English](/)
2-
- [简体中文](/zh-cn/readme.md)
2+
- [简体中文](/zh-cn/readme.md)
3+
- [Portuguese](/pt-br/readme.md)

docs/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
loadNavbar: true,
4444
mergeNavbar: true,
4545
alias: {
46+
'/pt-br/(.*)': '/pt-br/$1',
4647
'/zh-cn/(.*)': '/zh-cn/$1',
4748
'/en/(.*)': '/en/$1',
4849
'/': '/readme.md',

docs/pt-br/_coverpage.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# vue-facing-decorator
2+
3+
> Designed for vue 3.
4+
5+
> Write class components by TypeScript decorator.
6+
7+
![GitHub](https://img.shields.io/github/license/facing-dev/vue-facing-decorator) ![GitHub package.json version (branch)](https://img.shields.io/github/package-json/v/facing-dev/vue-facing-decorator/release) ![npm peer dependency version (scoped)](https://img.shields.io/npm/dependency-version/vue-facing-decorator/peer/vue) ![lts](https://img.shields.io/badge/LTS-prepared-blue)
8+
9+
[GitHub](https://github.com/facing-dev/vue-facing-decorator) [Discord](https://discord.gg/4exxtFgkcz) [Donate](https://facing-dev.github.io/vue-facing-decorator/donate/donate.html) [Getting Started](#information)

docs/pt-br/_navbar.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- [Inglês](/en/readme.md)
2+
- [Chinês](/zh-cn/readme.md)
3+
- [Portuguese](/pt-br/readme.md)

docs/pt-br/_sidebar.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
- [Information](/en/readme.md)
2+
- [Quick start](/en/quick-start/quick-start.md)
3+
- Class component
4+
- [Component](/en/class-component/component/component.md)
5+
- [Property](/en/class-component/property/property.md)
6+
- [Method](/en/class-component/method/method.md)
7+
- [Hooks](/en/class-component/hooks/hooks.md)
8+
- [Component property](/en/class-component/component-property/component-property.md)
9+
- [Accessor](/en/class-component/accessor/accessor.md)
10+
- [Event](/en/class-component/event/event.md)
11+
- [Reference](/en/class-component/reference/reference.md)
12+
- [Watcher](/en/class-component/watcher/watcher.md)
13+
- [Injection](/en/class-component/injection/injection.md)
14+
- [Model](/en/class-component/model/model.md)
15+
- [Use](/en/class-component/use/use.md)
16+
- Inheritance
17+
- [ECMAScript class](/en/inheritance/es-class/es-class.md)
18+
- [Component](/en/inheritance/component/component.md)
19+
- [Complex example](/en/inheritance/complex-example/complex-example.md)
20+
- TSX
21+
- [TSX render](/en/tsx/tsx-render/tsx-render.md)
22+
- [Attribute types](/en/tsx/attribute-types/attribute-types.md)
23+
- Compatibility
24+
- [reflect-metadata](/en/compatibility/reflect-metadata/reflect-metadata.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Usage
2+
3+
Property getters will be tranformed into `{computed:{get:Foo}}`.
4+
5+
[](./code-usage.ts ':include :type=code typescript')
6+
7+
## Writable
8+
9+
Property setters will be tranformed into `{computed:{set:Foo}}`.
10+
11+
[](./code-writable.ts ':include :type=code typescript')
12+
13+
## Vanilla getter
14+
15+
We can define a ES vanilla getter by `@Vanilla`.
16+
17+
[](./code-vanilla-getter.ts ':include :type=code typescript')
18+
19+
## Vanilla setter
20+
21+
We can define a ES vanilla setter by `@Vanilla`.
22+
23+
[](./code-vanilla-setter.ts ':include :type=code typescript')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
import { Component, Vue } from 'vue-facing-decorator'
3+
4+
/*
5+
Vue options API
6+
{
7+
computed:{
8+
get(){
9+
return 'value'
10+
}
11+
}
12+
}
13+
*/
14+
15+
@Component
16+
export default class MyComponent extends Vue {
17+
get getter() {
18+
return 'value'
19+
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
import { Component, Vue, Vanilla } from 'vue-facing-decorator'
3+
4+
@Component
5+
export default class MyComponent extends Vue {
6+
@Vanilla
7+
get getter() {
8+
return 'value'
9+
}
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
import { Component, Vue, Vanilla } from 'vue-facing-decorator'
3+
4+
@Component
5+
export default class MyComponent extends Vue {
6+
foo = ''
7+
@Vanilla
8+
set setter(bar: string) {
9+
this.foo = bar
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
import { Component, Vue } from 'vue-facing-decorator'
3+
4+
/*
5+
Vue options API
6+
{
7+
data(){
8+
return {
9+
foo:''
10+
}
11+
},
12+
computed:{
13+
set(bar){
14+
this.foo = bar
15+
}
16+
}
17+
}
18+
*/
19+
20+
@Component
21+
export default class MyComponent extends Vue {
22+
foo = ''
23+
set setter(bar: string) {
24+
this.foo = bar
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
import { Prop, Component, Vue } from 'vue-facing-decorator'
3+
4+
/*
5+
6+
Vue options API
7+
{
8+
props:{
9+
p:{
10+
default: 'foo'
11+
}
12+
}
13+
}
14+
*/
15+
16+
@Component
17+
export default class MyComponent extends Vue {
18+
@Prop({
19+
default: 'foo'
20+
})
21+
p!: string
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
import { Prop, Component, Vue } from 'vue-facing-decorator'
3+
4+
/*
5+
6+
Vue options API
7+
{
8+
props:{
9+
p:{
10+
required:true
11+
}
12+
}
13+
}
14+
*/
15+
16+
@Component
17+
export default class MyComponent extends Vue {
18+
@Prop({
19+
required: true
20+
})
21+
p!: string
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
import { Prop, Component, Vue } from 'vue-facing-decorator'
3+
4+
/*
5+
6+
Vue options API
7+
{
8+
props:{
9+
p:{
10+
type: String
11+
}
12+
}
13+
}
14+
*/
15+
16+
@Component
17+
export default class MyComponent extends Vue {
18+
@Prop({
19+
type: String
20+
})
21+
p?: string
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
import { Prop, Component, Vue } from 'vue-facing-decorator'
3+
4+
/*
5+
6+
Vue options API
7+
{
8+
props:{
9+
p:{
10+
validator(val:any){
11+
return true
12+
}
13+
}
14+
}
15+
}
16+
*/
17+
18+
@Component
19+
export default class MyComponent extends Vue {
20+
@Prop({
21+
validator(val:any){
22+
return true
23+
}
24+
})
25+
p?: string
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
import { Prop, Component, Vue } from 'vue-facing-decorator'
3+
4+
/*
5+
6+
Vue options API
7+
{
8+
props:{
9+
p:{
10+
11+
}
12+
}
13+
}
14+
*/
15+
16+
@Component
17+
export default class MyComponent extends Vue {
18+
@Prop
19+
p?: string
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## Usage
2+
3+
Use `Prop` decorator to define a property in vue's `props`.
4+
5+
[](./code-usage.ts ':include :type=code typescript')
6+
7+
## Options
8+
9+
### default
10+
11+
This is the `default` in vue `props`.
12+
13+
[](./code-option-default.ts ':include :type=code typescript')
14+
15+
### required
16+
17+
This is the `required` in vue `props`.
18+
19+
[](./code-option-required.ts ':include :type=code typescript')
20+
21+
### type
22+
23+
This is the `type` in vue `props`.
24+
25+
[](./code-option-type.ts ':include :type=code typescript')
26+
27+
### validator
28+
29+
This is the `validator` in vue `props`.
30+
31+
[](./code-option-validator.ts ':include :type=code typescript')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
import { Component, Vue } from 'vue-facing-decorator'
3+
4+
@Component
5+
class MyAnotherComponent extends Vue {
6+
7+
}
8+
9+
/*
10+
Vue options component
11+
{
12+
components:{
13+
MyAnotherComponent
14+
}
15+
}
16+
*/
17+
18+
@Component({
19+
components: {
20+
MyAnotherComponent
21+
}
22+
})
23+
export default class MyComponent extends Vue {
24+
25+
}
26+
27+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
import { Component, Vue } from 'vue-facing-decorator'
3+
4+
/*
5+
Vue options component
6+
{
7+
directives:{
8+
MyDirective:{}
9+
}
10+
}
11+
*/
12+
13+
@Component({
14+
directives: {
15+
MyDirective: {}
16+
}
17+
})
18+
export default class MyComponent extends Vue {
19+
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
import { Component, Vue } from 'vue-facing-decorator'
3+
4+
/*
5+
Vue options component
6+
{
7+
emits:['MyEvent']
8+
}
9+
*/
10+
11+
@Component({
12+
emits: ['MyEvent']
13+
})
14+
export default class MyComponent extends Vue {
15+
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
import { Component, Vue } from 'vue-facing-decorator'
3+
4+
/*
5+
Vue options component
6+
{
7+
expose:['name']
8+
}
9+
*/
10+
11+
@Component({
12+
expose: ['Name']
13+
})
14+
export default class MyComponent extends Vue {
15+
16+
}

0 commit comments

Comments
 (0)