vue-unicons icon indicating copy to clipboard operation
vue-unicons copied to clipboard

Click event emits twice in Vue3

Open Klieger opened this issue 1 year ago • 1 comments

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...

Klieger avatar Aug 06 '22 03:08 Klieger

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:[email protected]"
                                class="flex items-center gap-1"
                                ><unicon
                                    name="envelope-alt"
                                    fill="white"
                                    width="1em"
                                    height="1em"
                                    viewBox="0 0 24 24"
                                ></unicon>
                                <span>[email protected]</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

tnntwister avatar Nov 30 '22 20:11 tnntwister