Skip to content

Commit e5ba2bb

Browse files
authored
Merge pull request #109 from SaitoYuto/master
Doc Japanese Translation
2 parents 52dc2f4 + 5421889 commit e5ba2bb

File tree

94 files changed

+2262
-5
lines changed

Some content is hidden

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

94 files changed

+2262
-5
lines changed

docs/en/_navbar.md

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

docs/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
'/pt-br/(.*)': '/pt-br/$1',
4747
'/zh-cn/(.*)': '/zh-cn/$1',
4848
'/en/(.*)': '/en/$1',
49+
'/ja/(.*)': '/ja/$1',
4950
'/': '/readme.md',
5051
'^/_(.*)': '/en/_$1'
5152
}

docs/ja/_navbar.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- [英語](/)
2+
- [简体中文](/zh-cn/readme.md)
3+
- [ポルトガル語](/pt-br/readme.md)
4+
- [日本語](/ja/readme.md)

docs/ja/_sidebar.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
- [インフォメーション](/ja/readme.md)
2+
- [クイックスタート](/ja/quick-start/quick-start.md)
3+
- クラスコンポーネント
4+
- [コンポーネント](/ja/class-component/component/component.md)
5+
- [プロパティ](/ja/class-component/property/property.md)
6+
- [メソッド](/ja/class-component/method/method.md)
7+
- [フック](/ja/class-component/hooks/hooks.md)
8+
- [コンポーネントプロパティ](/ja/class-component/component-property/component-property.md)
9+
- [アクセサ](/ja/class-component/accessor/accessor.md)
10+
- [イベント](/ja/class-component/event/event.md)
11+
- [リファレンス](/ja/class-component/reference/reference.md)
12+
- [ウォッチャー](/ja/class-component/watcher/watcher.md)
13+
- [プロバイド](/ja/class-component/provide/provide.md)
14+
- [インジェクション](/ja/class-component/injection/injection.md)
15+
- [モデル](/ja/class-component/model/model.md)
16+
- [セットアップ](/ja/class-component/setup/setup.md)
17+
- 継承
18+
- [ECMAScript クラス](/ja/inheritance/es-class/es-class.md)
19+
- [コンポーネント](/ja/inheritance/component/component.md)
20+
- [高度な例](/ja/inheritance/complex-example/complex-example.md)
21+
- TSX
22+
- [TSX レンダー](/ja/tsx/tsx-render/tsx-render.md)
23+
- [アトリビュート タイプ](/ja/tsx/attribute-types/attribute-types.md)
24+
- Custom Decorator
25+
- [カスタム デコレーター](/ja/custom/custom.md)
26+
- v2 からのマイグレーション
27+
- [v2 からのマイグレーション](/ja/migrate-from-v2/migrate-from-v2.md)
28+
- Stage3 decorators
29+
- [Stage3 デコレーター](/ja/stage3-decorators/stage3-decorators.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## 使用方法
2+
3+
`getters`プロパティは`{computed:{get:Foo}}`に変換されます。
4+
5+
[](./code-usage.ts ':include :type=code typescript')
6+
7+
## 書き込み可能な算出関数
8+
9+
`setters`プロパティは`{computed:{set:Foo}}`に変換されます。
10+
11+
[](./code-writable.ts ':include :type=code typescript')
12+
13+
## Vanilla ゲッター
14+
15+
`@Vanilla`でES vanillaのゲッターを定義できます。
16+
17+
[](./code-vanilla-getter.ts ':include :type=code typescript')
18+
19+
## Vanilla セッター
20+
21+
`@Vanilla`でES vanillaのセッターを定義できます。
22+
23+
[](./code-vanilla-setter.ts ':include :type=code typescript')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
import { Component, Vue, toNative } 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+
class MyComponent extends Vue {
17+
get getter() {
18+
return 'value'
19+
}
20+
}
21+
22+
export default toNative(MyComponent)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
import { Component, Vue, Vanilla, toNative } from 'vue-facing-decorator'
3+
4+
@Component
5+
class MyComponent extends Vue {
6+
@Vanilla
7+
get getter() {
8+
return 'value'
9+
}
10+
}
11+
12+
export default toNative(MyComponent)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
import { Component, Vue, Vanilla, toNative } from 'vue-facing-decorator'
3+
4+
@Component
5+
class MyComponent extends Vue {
6+
foo = ''
7+
@Vanilla
8+
set setter(bar: string) {
9+
this.foo = bar
10+
}
11+
}
12+
13+
export default toNative(MyComponent)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
import { Component, Vue, toNative } 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+
class MyComponent extends Vue {
22+
foo = ''
23+
set setter(bar: string) {
24+
this.foo = bar
25+
}
26+
}
27+
28+
export default toNative(MyComponent)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
import { Prop, Component, Vue, toNative } 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+
class MyComponent extends Vue {
18+
@Prop({
19+
default: 'foo'
20+
})
21+
p!: string
22+
}
23+
24+
export default toNative(MyComponent)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
import { Prop, Component, Vue, toNative } 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+
class MyComponent extends Vue {
18+
@Prop({
19+
required: true
20+
})
21+
p!: string
22+
}
23+
24+
export default toNative(MyComponent)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
import { Prop, Component, Vue, toNative } 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+
class MyComponent extends Vue {
18+
@Prop({
19+
type: String
20+
})
21+
p?: string
22+
}
23+
24+
export default toNative(MyComponent)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
import { Prop, Component, Vue, toNative } 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+
class MyComponent extends Vue {
20+
@Prop({
21+
validator(val: any) {
22+
return true
23+
}
24+
})
25+
p?: string
26+
}
27+
28+
export default toNative(MyComponent)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
import { Prop, Component, Vue, toNative } 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+
class MyComponent extends Vue {
18+
@Prop
19+
p?: string
20+
}
21+
22+
export default toNative(MyComponent)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## 使用方法
2+
3+
`Prop`デコレーターを使用して、Vue の`props`を定義できます。
4+
5+
[](./code-usage.ts ':include :type=code typescript')
6+
7+
## オプション
8+
9+
### default
10+
11+
以下のソースコードでは`props`のデフォルト値を設定しています。
12+
13+
[](./code-option-default.ts ':include :type=code typescript')
14+
15+
### required
16+
17+
以下のソースコードでは`props`の必須是非を設定しています。
18+
19+
[](./code-option-required.ts ':include :type=code typescript')
20+
21+
### type
22+
23+
以下のソースコードでは`props`のデータ型を設定しています。
24+
25+
[](./code-option-type.ts ':include :type=code typescript')
26+
27+
### validator
28+
29+
以下のソースコードでは`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, toNative } 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+
class MyComponent extends Vue {
24+
25+
}
26+
27+
export default toNative(MyComponent)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
import { Component, Vue, toNative } 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+
class MyComponent extends Vue {
19+
20+
}
21+
22+
export default toNative(MyComponent)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
import { Component, Vue, toNative } from 'vue-facing-decorator'
3+
4+
/*
5+
Vue options component
6+
{
7+
emits:['MyEvent']
8+
}
9+
*/
10+
11+
@Component({
12+
emits: ['MyEvent']
13+
})
14+
class MyComponent extends Vue {
15+
16+
}
17+
18+
export default toNative(MyComponent)

0 commit comments

Comments
 (0)