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

Click event emits twice in Vue3 #64

Open
Klieger opened this issue Aug 6, 2022 · 1 comment
Open

Click event emits twice in Vue3 #64

Klieger opened this issue Aug 6, 2022 · 1 comment

Comments

@Klieger
Copy link

Klieger commented Aug 6, 2022

https://v3-migration.vuejs.org/breaking-changes/emits-option.html#migration-strategy

I think all that is needed is to declare the click event in the new emits option...

@tnntwister
Copy link

tnntwister commented Nov 30, 2022

hi, i'm not sure it's the same problem, but my text inside the span after the unicon component is doubled.

i've got this error :
[Vue warn]: Failed to resolve component: unicon If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.

Sorry if it's not related.

my nuxt 3 plugin :

import Unicon from "vue-unicons";
import {
    uniEnvelope,
    uniEnvelopeAlt,
    uniMobileVibrate,
    uniBars,
    uniSearch,
    uniShoppingBag,
    uniTimes,
    uniUserCircle,
    uniEstate,
} from "vue-unicons/dist/icons";
import {
    GithubIcon,
    GitlabIcon,
    LinkedInIcon,
    DiscordIcon,
    VintedIcon,
    MoonIcon,
    SunIcon,
} from "../assets/icons/brand-icons";

Unicon.add([
    uniEnvelope,
    uniEnvelopeAlt,
    uniMobileVibrate,
    uniBars,
    uniSearch,
    uniShoppingBag,
    uniTimes,
    uniEstate,
    uniUserCircle,
    GithubIcon,
    GitlabIcon,
    LinkedInIcon,
    DiscordIcon,
    VintedIcon,
    MoonIcon,
    SunIcon,
]);

export default (nuxtApp) => nuxtApp.vueApp.use(Unicon);

my template code :

<ul class="flex items-center gap-6 text-sm">
                        <li>
                            <nuxt-link
                                href="mailto:dev@nuxt.art"
                                class="flex items-center gap-1"
                                ><unicon
                                    name="envelope-alt"
                                    fill="white"
                                    width="1em"
                                    height="1em"
                                    viewBox="0 0 24 24"
                                ></unicon>
                                <span>dev@nuxt.art</span></nuxt-link
                            >
                        </li>
                        <li>
                            <nuxt-link
                                href="tel:+33638056100"
                                class="flex items-center gap-1"
                                ><unicon
                                    name="mobile-vibrate"
                                    fill="white"
                                    width="1em"
                                    height="1em"
                                    viewBox="0 0 24 24"
                                ></unicon>
                                <span>(33) 638 056 100</span></nuxt-link
                            >
                        </li>
                    </ul>

Capture d’écran 2022-11-30 à 21 20 33

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

No branches or pull requests

2 participants