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

🐛 [Bug]: 使用element-plus组件出码后,样式没有引入问题 #762

Open
langyjn opened this issue Aug 27, 2024 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@langyjn
Copy link

langyjn commented Aug 27, 2024

Environment

chrome

Version

latest

Version

latest

Link to minimal reproduction

none

Step to reproduce

1
画布拖入一个element-plus表格,点击出码
2
启动后,没有自动引入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

@Issues-translate-bot
Copy link

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

@chilingling
Copy link
Member

Element-Plus 样式引入需要额外的插件或者手动引入。
https://element-plus.org/zh-CN/guide/quickstart.html#%E6%89%8B%E5%8A%A8%E5%AF%BC%E5%85%A5

可能的解决方案:

  1. 提供额外的 template 模板,按照上述文档引入 unplugin-element-plus 插件;或者在 main.js 中,添加 import 'element-plus/dist/index.css' 语句,引入 element-plus 全部样式。
  2. 增加插件,往 vite.config.jspackage.json 中增加 unplugin-element-plus 插件。或者往 main.js 文件增加上述语句。

在官方正式提供 bugfix 代码之前,您可以依照上述解决方案临时 fix。

感谢反馈 @langyjn

@Issues-translate-bot
Copy link

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:

  1. Provide additional templates and introduce the unplugin-element-plus plug-in according to the above documents; or in main.js, add the import 'element-plus/dist/index.css' statement to introduce element-plus All styles.
  2. Add plugins, add unplugin-element-plus plugin to vite.config.js and package.json. Or add the above statement to the main.js file.

Before the bugfix code is officially provided, you can make a temporary fix according to the above solutions.

Thanks for the feedback @langyjn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants