chore(docs): rebuild readme after update to vue usage docs.

This commit is contained in:
Josh Thomas
2019-03-02 12:04:45 -06:00
parent 928b2f7843
commit ab57b98e07

View File

@ -142,6 +142,58 @@ export class LoadingExample extends Component<Props, State> {
``` ```
### Vue
```vue
<template>
<IonVuePage :title="'Loading'">
<ion-button @click="presentLoading">Show Loading</ion-button>
<br />
<ion-button @click="presentLoadingWithOptions">Show Loading</ion-button>
</IonVuePage>
</template>
<script>
export default {
props: {
timeout: { type: Number, default: 1000 },
},
methods: {
presentLoading() {
return this.$ionic.loadingController
.create({
message: 'Loading',
duration: this.timeout,
})
.then(l => {
setTimeout(function() {
l.dismiss()
}, this.timeout)
return l.present()
})
},
presentLoadingWithOptions() {
return this.$ionic.loadingController
.create({
spinner: null,
duration: this.timeout,
message: 'Please wait...',
translucent: true,
cssClass: 'custom-class custom-loading',
})
.then(l => {
setTimeout(function() {
l.dismiss()
}, this.timeout)
return l.present()
})
},
},
}
</script>
```
## Properties ## Properties