mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
docs(vue): update component usage examples for vue 3 (#22050)
This commit is contained in:
@ -164,15 +164,20 @@ export class BackdropExample {
|
||||
</ion-backdrop>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
<script>
|
||||
import { IonBackdrop } from '@ionic/vue';
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
@Component()
|
||||
export default class Example extends Vue {
|
||||
enableBackdropDismiss = false;
|
||||
showBackdrop = false;
|
||||
shouldPropagate = false;
|
||||
export default defineComponent({
|
||||
components: { IonBackdrop },
|
||||
setup() {
|
||||
return {
|
||||
enableBackdropDismiss: true,
|
||||
showBackdrop: true,
|
||||
shouldPropagate: true
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
```
|
||||
|
||||
|
||||
@ -20,14 +20,19 @@
|
||||
</ion-backdrop>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
<script>
|
||||
import { IonBackdrop } from '@ionic/vue';
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
@Component()
|
||||
export default class Example extends Vue {
|
||||
enableBackdropDismiss = false;
|
||||
showBackdrop = false;
|
||||
shouldPropagate = false;
|
||||
export default defineComponent({
|
||||
components: { IonBackdrop },
|
||||
setup() {
|
||||
return {
|
||||
enableBackdropDismiss: true,
|
||||
showBackdrop: true,
|
||||
shouldPropagate: true
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
```
|
||||
Reference in New Issue
Block a user