Skip to content

Commit ce79304

Browse files
committed
chore: 🚑 import style of function components
1 parent b066df2 commit ce79304

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ import './app.less'
99
// Vant 桌面端适配
1010
import '@vant/touch-emulator'
1111

12+
/* --------------------------------
13+
Vant 中有个别组件是以函数的形式提供的,
14+
包括 Toast,Dialog,Notify 和 ImagePreview 组件。
15+
在使用函数组件时,unplugin-vue-components
16+
无法自动引入对应的样式,因此需要手动引入样式。
17+
------------------------------------- */
18+
import 'vant/es/toast/style'
19+
import 'vant/es/dialog/style'
20+
import 'vant/es/notify/style'
21+
import 'vant/es/image-preview/style'
22+
1223
const app = createApp(App)
1324
const pinia = createPinia()
1425
pinia.use(piniaPluginPersistedstate)

0 commit comments

Comments
 (0)