🐛 [Bug]: 使用element-plus组件出码后,样式没有引入问题
Environment
chrome
Version
latest
Version
latest
Link to minimal reproduction
none
Step to reproduce
画布拖入一个element-plus表格,点击出码
启动后,没有自动引入element-plus样式
目前只能通过修改出码子项目(vue-generate)中的template文件引入样式文件,对普通用户并不友好,明明画布和预览页都有css的配置方式,引擎出码也应该提供css的配置方式
What is expected
No response
What is actually happening
No response
What is your project name
tiny-engine develop
Any additional comments (optional)
No response
Bot detected the issue body's language is not English, translate it automatically.
Title: 🐛 [Bug]: After using the element-plus component to generate code, the style does not introduce problems
Element-Plus 样式引入需要额外的插件或者手动引入。
https://element-plus.org/zh-CN/guide/quickstart.html#%E6%89%8B%E5%8A%A8%E5%AF%BC%E5%85%A5
可能的解决方案:
- 提供额外的 template 模板,按照上述文档引入
unplugin-element-plus插件;或者在 main.js 中,添加import 'element-plus/dist/index.css'语句,引入element-plus全部样式。 - 增加插件,往
vite.config.js和package.json中增加unplugin-element-plus插件。或者往main.js文件增加上述语句。
在官方正式提供 bugfix 代码之前,您可以依照上述解决方案临时 fix。
感谢反馈 @langyjn
Bot detected the issue body's language is not English, translate it automatically.
Element-Plus style introduction requires additional plug-ins or manual introduction.
https://element-plus.org/zh-CN/guide/quickstart.html#%E6%89%8B%E5%8A%A8%E5%AF%BC%E5%85%A5
Possible solutions:
- Provide additional templates and introduce the
unplugin-element-plusplug-in according to the above documents; or in main.js, add theimport 'element-plus/dist/index.css'statement to introduceelement-plusAll styles. - Add plugins, add
unplugin-element-plusplugin tovite.config.jsandpackage.json. Or add the above statement to themain.jsfile.
Before the bugfix code is officially provided, you can make a temporary fix according to the above solutions.
Thanks for the feedback @langyjn