You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To resolve the import issue with the ViewUIPlus library in your Vue 3 project, you need to ensure that you are importing the library correctly since it does not provide a default export. You should import it as a named import. Here is how you can do it:
import{createApp}from'vue';import{createRouter,createWebHistory}from'vue-router';importAppfrom'./app.vue';import{installasViewUIPlus}from'view-ui-plus';// Use named importconstrouter=createRouter({esModule: false,mode: 'history',history: createWebHistory(),routes: [// your routes here]});constapp=createApp(App);app.use(ViewUIPlus);// Use the named import directlyapp.use(router);app.mount('#app');exportdefaultapp;
This approach ensures that you are correctly importing and using the ViewUIPlus library in your project. For more details, you can refer to the similar issue here.
Environment
windows11 / chrom127 / vue3
Reproduction link
https://github.com/view-design/view-ui-project-nuxt
Steps to reproduce
pnpm install --shamefully-hoist
What is expected?
正确使用iview-ui-plus
What is actually happening?
无法使用
The text was updated successfully, but these errors were encountered: