Skip to content

Commit 1662836

Browse files
committed
Merge branch 'main' into docs/quickstart-updates
2 parents aec2b7f + 69b13b3 commit 1662836

File tree

19 files changed

+380
-274
lines changed

19 files changed

+380
-274
lines changed

docs/vue/build-options.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Also note that locally registered components are not available in subcomponents.
2828

2929
Let's take a look at how local component registration works:
3030

31-
```html
31+
```vue
3232
<template>
3333
<ion-page>
3434
<ion-content>
@@ -38,8 +38,8 @@ Let's take a look at how local component registration works:
3838
</template>
3939
4040
<script setup lang="ts">
41-
import { IonContent, IonPage } from '@ionic/vue';
42-
import SubComponent from '@/components/SubComponent.vue';
41+
import { IonContent, IonPage } from '@ionic/vue';
42+
import SubComponent from '@/components/SubComponent.vue';
4343
</script>
4444
```
4545

@@ -70,7 +70,7 @@ app.component('ion-page', IonPage);
7070

7171
**MyComponent.vue**
7272

73-
```html
73+
```vue
7474
<template>
7575
<ion-page>
7676
<ion-content>
@@ -80,7 +80,7 @@ app.component('ion-page', IonPage);
8080
</template>
8181
8282
<script setup lang="ts">
83-
import SubComponent from '@/components/SubComponent.vue';
83+
import SubComponent from '@/components/SubComponent.vue';
8484
</script>
8585
```
8686

docs/vue/lifecycle.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ These lifecycles are only called on components directly mapped by a router. This
2121

2222
The lifecycles are defined the same way Vue lifecycle methods are - as functions at the root of your Vue component:
2323

24-
```tsx
24+
```vue
2525
<script setup lang="ts">
2626
import { IonPage } from '@ionic/vue';
2727
@@ -47,7 +47,7 @@ const ionViewWillLeave = () => {
4747

4848
These lifecycles can also be expressed using Vue 3's Composition API:
4949

50-
```tsx
50+
```vue
5151
<script setup lang="ts">
5252
import { IonPage, onIonViewWillEnter, onIonViewDidEnter, onIonViewWillLeave, onIonViewDidLeave } from '@ionic/vue';
5353

docs/vue/navigation.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Say we start on the `home` route, and we want to add a button that takes us to t
103103

104104
We can also programmatically navigate in our app by using the router API:
105105

106-
```html
106+
```vue
107107
<template>
108108
<ion-page>
109109
<ion-content>
@@ -113,10 +113,10 @@ We can also programmatically navigate in our app by using the router API:
113113
</template>
114114
115115
<script setup lang="ts">
116-
import { IonButton, IonContent, IonPage } from '@ionic/vue';
117-
import { useRouter } from 'vue-router';
116+
import { IonButton, IonContent, IonPage } from '@ionic/vue';
117+
import { useRouter } from 'vue-router';
118118
119-
const router = useRouter();
119+
const router = useRouter();
120120
</script>
121121
```
122122

@@ -364,7 +364,7 @@ Here, our `tabs` path loads a `Tabs` component. We provide each tab as a route o
364364

365365
Let's start by taking a look at our `Tabs` component:
366366

367-
```html
367+
```vue
368368
<template>
369369
<ion-page>
370370
<ion-tabs>
@@ -390,8 +390,8 @@ Let's start by taking a look at our `Tabs` component:
390390
</template>
391391
392392
<script setup lang="ts">
393-
import { IonTabBar, IonTabButton, IonTabs, IonLabel, IonIcon, IonPage, IonRouterOutlet } from '@ionic/vue';
394-
import { ellipse, square, triangle } from 'ionicons/icons';
393+
import { IonTabBar, IonTabButton, IonTabs, IonLabel, IonIcon, IonPage, IonRouterOutlet } from '@ionic/vue';
394+
import { ellipse, square, triangle } from 'ionicons/icons';
395395
</script>
396396
```
397397

@@ -494,7 +494,7 @@ Nothing should be provided inside of `IonRouterOutlet` when setting it up in you
494494

495495
The `IonPage` component wraps each view in an Ionic Vue app and allows page transitions and stack navigation to work properly. Each view that is navigated to using the router must include an `IonPage` component.
496496

497-
```html
497+
```vue
498498
<template>
499499
<ion-page>
500500
<ion-header>
@@ -507,7 +507,7 @@ The `IonPage` component wraps each view in an Ionic Vue app and allows page tran
507507
</template>
508508
509509
<script setup lang="ts">
510-
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/vue';
510+
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/vue';
511511
</script>
512512
```
513513

@@ -550,7 +550,7 @@ Notice that we have now added `:id` to the end of our `detail` path string. URL
550550

551551
Let's look at how to use it in our component:
552552

553-
```html
553+
```vue
554554
<template>
555555
<ion-page>
556556
<ion-header>
@@ -564,11 +564,11 @@ Let's look at how to use it in our component:
564564
</template>
565565
566566
<script setup lang="ts">
567-
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/vue';
568-
import { useRoute } from 'vue-router';
567+
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/vue';
568+
import { useRoute } from 'vue-router';
569569
570-
const route = useRoute();
571-
const { id } = route.params;
570+
const route = useRoute();
571+
const { id } = route.params;
572572
</script>
573573
```
574574

docs/vue/performance.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ When using `v-for` with Ionic components, we recommend using Vue's `key` attribu
1111

1212
By using `key` you can provide a stable identity for each loop element so Vue can track insertions and deletions within the iterator. Below is an example of how to use `key`:
1313

14-
```html
14+
```vue
1515
<template>
1616
<ion-page>
1717
<ion-content>
@@ -23,14 +23,14 @@ By using `key` you can provide a stable identity for each loop element so Vue ca
2323
</template>
2424
2525
<script setup lang="ts">
26-
import { IonContent, IonItem, IonLabel, IonPage } from '@ionic/vue';
27-
import { ref } from 'vue';
28-
29-
const items = ref([
30-
{ id: 0, value: 'Item 0' },
31-
{ id: 1, value: 'Item 1' },
32-
...
33-
]);
26+
import { IonContent, IonItem, IonLabel, IonPage } from '@ionic/vue';
27+
import { ref } from 'vue';
28+
29+
const items = ref([
30+
{ id: 0, value: 'Item 0' },
31+
{ id: 1, value: 'Item 1' },
32+
...
33+
]);
3434
</script>
3535
```
3636

0 commit comments

Comments
 (0)