mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
docs(vue): update component usage examples for vue 3 (#22050)
This commit is contained in:
@ -618,17 +618,21 @@ ion-slides {
|
||||
</template>
|
||||
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
<script>
|
||||
import { IonSlides, IonSlide } from '@ionic/vue';
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
@Component()
|
||||
export default class Example extends Vue {
|
||||
export default defineComponent({
|
||||
components: { IonSlides, IonSlide },
|
||||
setup() {
|
||||
// Optional parameters to pass to the swiper instance. See http://idangero.us/swiper/api/ for valid options.
|
||||
slideOpts = {
|
||||
const slideOpts = {
|
||||
initialSlide: 1,
|
||||
speed: 400
|
||||
};
|
||||
return { slideOpts }
|
||||
}
|
||||
});
|
||||
</script>
|
||||
```
|
||||
|
||||
|
@ -14,16 +14,20 @@
|
||||
</template>
|
||||
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
<script>
|
||||
import { IonSlides, IonSlide } from '@ionic/vue';
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
@Component()
|
||||
export default class Example extends Vue {
|
||||
export default defineComponent({
|
||||
components: { IonSlides, IonSlide },
|
||||
setup() {
|
||||
// Optional parameters to pass to the swiper instance. See http://idangero.us/swiper/api/ for valid options.
|
||||
slideOpts = {
|
||||
const slideOpts = {
|
||||
initialSlide: 1,
|
||||
speed: 400
|
||||
};
|
||||
return { slideOpts }
|
||||
}
|
||||
});
|
||||
</script>
|
||||
```
|
||||
|
Reference in New Issue
Block a user