Skip to content

Proof of concept Vue 2.7 composition API bridge#1525

Merged
ebkr merged 2 commits intodevelopfrom
vue-2.7
Nov 10, 2024
Merged

Proof of concept Vue 2.7 composition API bridge#1525
ebkr merged 2 commits intodevelopfrom
vue-2.7

Conversation

@ebkr
Copy link
Owner

@ebkr ebkr commented Nov 5, 2024

No description provided.

@ebkr ebkr requested a review from anttimaki November 5, 2024 21:17
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The equivalent template is:

<template>
    <section :class="['hero', heroType]" ref="section">
        <div class="hero-body non-selectable">
            <div class="container">
                <h1 class="title" ref="title">
                    {{title}}
                </h1>
                <h2 class="subtitle" ref="subtitle">
                    {{subtitle}}
                </h2>
            </div>
        </div>
    </section>
</template>

<script lang="ts">
import Vue from 'vue';
import { Component, Prop } from 'vue-property-decorator'

@Component
export default class Hero extends Vue {
    @Prop({default: ''})
    heroType: string | undefined;

    @Prop({default: ''})
    title: string | undefined;

    @Prop({default: ''})
    subtitle: string | undefined;
}
</script>

@anttimaki
Copy link
Collaborator

@VilppeRiskidev this moving to new style of components is something you need to be aware of too.

Copy link
Collaborator

@VilppeRiskidev VilppeRiskidev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, nice to know! 👍

@ebkr ebkr merged commit a030181 into develop Nov 10, 2024
@ebkr ebkr deleted the vue-2.7 branch November 10, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants