Giter VIP home page Giter VIP logo

Comments (6)

jia000 avatar jia000 commented on July 28, 2024

runtime哪里引入element-plus?将路径,代码贴出来看看

from tmagic-editor.

wrr008123 avatar wrr008123 commented on July 28, 2024

感谢你的回复,让我确定了是在runtime中引入,这很重要!

我之前添加elementPlus是手动写在comp-entry.ts -> plugins 中的

刚刚准备去截图发现之前引入的不见了,发现这个类在build过程中会被重新写入

所以我又选择在playground目录下的main.ts中试了一次,这次成功了!

from tmagic-editor.

jia000 avatar jia000 commented on July 28, 2024

建议不要全局注册,而是在组件内使用components配置

from tmagic-editor.

wrr008123 avatar wrr008123 commented on July 28, 2024

好的,谢谢你的建议!

顺带提一下,由于runtime打包后playground.html、page.html中路径为/tmagic-editor/xx/runtime/.....

因此将runtime内容直接放到tmagic-admin -> web -> public -> /runtime/vue3 目录下时,导致最终目录为 public/runtime/vue3/playground.html

那后续将会找不到playground.html中引入的这些js与css文件

希望简单修改一下,不然会导致许多同学无法直接将项目跑起来,同时也减少相关问题的疑问

image

from tmagic-editor.

jia000 avatar jia000 commented on July 28, 2024

runtime的产物是需要放到一个静态资源服务器,不一定是在tmagic-admin/web中,这里的web只是扮演了资源服务器(cdn)的身份。playground.html里的资源路径可以通过vite.config.js配置

这里的路径确实有问题,我们修改下

from tmagic-editor.

wrr008123 avatar wrr008123 commented on July 28, 2024

好的,谢谢解答😘

from tmagic-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.