opentiny / tiny-engine

TinyEngine is a low-code engine based on which you can build or develop low-code platforms in different domains/TinyEngine是一个低代码引擎,基于这个引擎可以构建或者开发出不同领域的低代码平台
https://opentiny.design/tiny-engine
MIT License
1.97k stars 304 forks source link

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

Open langyjn opened 3 months ago

langyjn commented 3 months ago

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 commented 3 months ago

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 commented 2 months ago

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 commented 2 months ago

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