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

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

Open
orangeed opened this issue Dec 6, 2021 · 2 comments
Open

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

orangeed opened this issue Dec 6, 2021 · 2 comments

Comments

@orangeed
Copy link

orangeed commented Dec 6, 2021

在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
Copy link

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
Copy link
Author

orangeed commented Dec 12, 2021 via email

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