rough-stuff / wired-elements

Collection of custom elements that appear hand drawn. Great for wireframes or a fun look.
https://wiredjs.com
MIT License
10.5k stars 329 forks source link

请问支持vue3吗?我在vue3中使用似乎用不了 #180

Open orangeed opened 2 years ago

orangeed commented 2 years ago

在vue3按需引入报错了

import { App } from "vue";
import { WiredButton, WiredInput, WiredDialog } from 'wired-elements'

const wiredELments = [
    WiredButton, WiredInput, WiredDialog
]

export const setWired = (app: App<Element>) => {
    wiredELments.forEach(v => {
        app.use(v)  //这里类型错误了
    })
}

在控制台报错为 Uncaught TypeError: Class constructor WiredButton2 cannot be invoked without 'new'

JamesBoon commented 2 years ago

See Vue and Web Components for your project setup.

Then copy the content of HelloWiredElements.vue.

At least that worked for me using webpack.

orangeed commented 2 years ago

这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。