vue3项目如果启用typescript,单独引入ElMessage,ElMessageBox样式时写法略有不同,如下
import 'element-plus/es/components/message-box/style/index'
import 'element-plus/es/components/message/style/index'
注,如果按以下写法会报错
import 'element-plus/es/components/message-box/style'
import 'element-plus/es/components/message/style'
报错:
Module not found: Error: Can’t resolve ‘element-plus/es/components/message-box/style’ Module not found: Error: Can’t resolve ‘element-plus/es/components/message/style’