Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
Fix #319
Browse files Browse the repository at this point in the history
  • Loading branch information
kaorun343 committed Jun 12, 2020
1 parent f70446c commit 15be7ae
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ is equivalent to
export default {
props: {
propA: {
type: Number
type: Number,
},
propB: {
default: 'default value'
default: 'default value',
},
propC: {
type: [String, Boolean]
}
}
type: [String, Boolean],
},
},
}
```

Expand Down Expand Up @@ -105,8 +105,8 @@ is equivalent to
export default {
props: {
name: {
type: String
}
type: String,
},
},
computed: {
syncedName: {
Expand All @@ -115,9 +115,9 @@ export default {
},
set(value) {
this.$emit('update:name', value)
}
}
}
},
},
},
}
```

Expand All @@ -140,13 +140,13 @@ is equivalent to
export default {
model: {
prop: 'checked',
event: 'change'
event: 'change',
},
props: {
checked: {
type: Boolean
}
}
type: Boolean,
},
},
}
```

Expand Down Expand Up @@ -179,27 +179,27 @@ export default {
{
handler: 'onChildChanged',
immediate: false,
deep: false
}
deep: false,
},
],
person: [
{
handler: 'onPersonChanged1',
immediate: true,
deep: true
deep: true,
},
{
handler: 'onPersonChanged2',
immediate: false,
deep: false
}
]
deep: false,
},
],
},
methods: {
onChildChanged(val, oldVal) {},
onPersonChanged1(val, oldVal) {},
onPersonChanged2(val, oldVal) {}
}
onPersonChanged2(val, oldVal) {},
},
}
```

Expand Down Expand Up @@ -232,20 +232,20 @@ export const MyComponent = Vue.extend({
foo: 'foo',
bar: 'bar',
optional: { from: 'optional', default: 'default' },
[symbol]: symbol
baz: symbol,
},
data() {
return {
foo: 'foo',
baz: 'bar'
baz: 'bar',
}
},
provide() {
return {
foo: this.foo,
bar: this.baz
bar: this.baz,
}
}
},
})
```

Expand Down Expand Up @@ -303,7 +303,7 @@ export default class YourComponent extends Vue {

@Emit()
promise() {
return new Promise(resolve => {
return new Promise((resolve) => {
setTimeout(() => {
resolve(20)
}, 0)
Expand All @@ -318,7 +318,7 @@ is equivalent to
export default {
data() {
return {
count: 0
count: 0,
}
},
methods: {
Expand All @@ -337,17 +337,17 @@ export default {
this.$emit('on-input-change', e.target.value, e)
},
promise() {
const promise = new Promise(resolve => {
const promise = new Promise((resolve) => {
setTimeout(() => {
resolve(20)
}, 0)
})

promise.then(value => {
promise.then((value) => {
this.$emit('promise', value)
})
}
}
},
},
}
```

Expand Down

0 comments on commit 15be7ae

Please sign in to comment.