Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(vue): refactor vue code snippets to use <script setup> #3120

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions static/usage/v7/avatar/basic/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
</ion-avatar>
</template>

<script lang="ts">
import { IonAvatar } from '@ionic/vue';
import { defineComponent } from 'vue';

export default defineComponent({
components: { IonAvatar },
});
<script lang="ts" setup>
import { IonAvatar } from '@ionic/vue';
</script>
```
9 changes: 2 additions & 7 deletions static/usage/v7/avatar/chip/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@
</ion-chip>
</template>

<script lang="ts">
import { IonAvatar, IonChip, IonLabel } from '@ionic/vue';
import { defineComponent } from 'vue';

export default defineComponent({
components: { IonAvatar, IonChip, IonLabel },
});
<script lang="ts" setup>
import { IonAvatar, IonChip, IonLabel } from '@ionic/vue';
</script>
```
9 changes: 2 additions & 7 deletions static/usage/v7/avatar/item/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@
</ion-item>
</template>

<script lang="ts">
import { IonAvatar, IonItem, IonLabel } from '@ionic/vue';
import { defineComponent } from 'vue';

export default defineComponent({
components: { IonAvatar, IonItem, IonLabel },
});
<script lang="ts" setup>
import { IonAvatar, IonItem, IonLabel } from '@ionic/vue';
</script>
```
9 changes: 2 additions & 7 deletions static/usage/v7/avatar/theming/css-properties/vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@
</ion-avatar>
</template>

<script lang="ts">
import { IonAvatar } from '@ionic/vue';
import { defineComponent } from 'vue';

export default defineComponent({
components: { IonAvatar },
});
<script lang="ts" setup>
import { IonAvatar } from '@ionic/vue';
</script>

<style scoped>
Expand Down
8 changes: 2 additions & 6 deletions static/usage/v7/back-button/basic/vue/page_two_vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
</ion-content>
</template>

<script lang="ts">
import { IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/vue';

export default {
components: { IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar },
};
<script lang="ts" setup>
import { IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/vue';
</script>
```
13 changes: 3 additions & 10 deletions static/usage/v7/back-button/custom/vue/page_two_vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,8 @@
</ion-content>
</template>

<script lang="ts">
import { IonHeader, IonTitle, IonToolbar, IonContent, IonButtons, IonBackButton } from '@ionic/vue';
import { caretBack } from 'ionicons/icons';

export default {
components: { IonHeader, IonTitle, IonToolbar, IonContent, IonButtons, IonBackButton },
setup() {
return { caretBack };
},
};
<script lang="ts" setup>
import { IonHeader, IonTitle, IonToolbar, IonContent, IonButtons, IonBackButton } from '@ionic/vue';
import { caretBack } from 'ionicons/icons';
</script>
```