mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
docs(vue): update component usage examples for vue 3 (#22050)
This commit is contained in:
@@ -241,7 +241,7 @@ export class ReorderExample {
|
||||
```html
|
||||
<template>
|
||||
<!-- The reorder gesture is disabled by default, enable it to drag and drop items -->
|
||||
<ion-reorder-group disabled="false">
|
||||
<ion-reorder-group :disabled="false">
|
||||
<!-- Default reorder icon, end aligned items -->
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
@@ -309,6 +309,31 @@ export class ReorderExample {
|
||||
</ion-reorder>
|
||||
</ion-reorder-group>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
IonIcon,
|
||||
IonItem,
|
||||
IonLabel,
|
||||
IonReorder,
|
||||
IonReorderGroup
|
||||
} from '@ionic/vue';
|
||||
import { pizza } from 'ionicons/icons';
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
IonIcon,
|
||||
IonItem,
|
||||
IonLabel,
|
||||
IonReorder,
|
||||
IonReorderGroup
|
||||
},
|
||||
setup() {
|
||||
return { pizza }
|
||||
}
|
||||
});
|
||||
</script>
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
```html
|
||||
<template>
|
||||
<!-- The reorder gesture is disabled by default, enable it to drag and drop items -->
|
||||
<ion-reorder-group disabled="false">
|
||||
<ion-reorder-group :disabled="false">
|
||||
<!-- Default reorder icon, end aligned items -->
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
@@ -69,4 +69,29 @@
|
||||
</ion-reorder>
|
||||
</ion-reorder-group>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
IonIcon,
|
||||
IonItem,
|
||||
IonLabel,
|
||||
IonReorder,
|
||||
IonReorderGroup
|
||||
} from '@ionic/vue';
|
||||
import { pizza } from 'ionicons/icons';
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
IonIcon,
|
||||
IonItem,
|
||||
IonLabel,
|
||||
IonReorder,
|
||||
IonReorderGroup
|
||||
},
|
||||
setup() {
|
||||
return { pizza }
|
||||
}
|
||||
});
|
||||
</script>
|
||||
```
|
||||
Reference in New Issue
Block a user