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

vant以及nutui的Toast 无法展示 #141

Open
TUSIDENG opened this issue Mar 24, 2024 · 4 comments
Open

vant以及nutui的Toast 无法展示 #141

TUSIDENG opened this issue Mar 24, 2024 · 4 comments

Comments

@TUSIDENG
Copy link

No description provided.

@sunbeams001
Copy link

同遇到,哥们后来怎么解决的

@Ignorantforce
Copy link

因为那个自动导入组件不会生成,所以简单解决就是手工在页面导入组件和样式再使用

@joriewong
Copy link

<nut-toast v-if="false" />

@felix-he
Copy link

在main.ts中引入toast的样式即可,import '@nutui/nutui/dist/packages/toast/index.scss';

`import { createApp } from 'vue';
import App from './App.vue';
import { i18n } from '@/i18n';
import router from '@/router';
import store from '@/store';
import './assets/font/iconfont.css';
import './assets/app.css';
import '@nutui/nutui/dist/packages/toast/index.scss';

const app = createApp(App);

// 路由
app.use(router);

// 国际化
app.use(i18n);

// 状态管理
app.use(store);

app.mount('#app');
`

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

5 participants