简体   繁体   中英

How to add and run Three Js old code to Vue page component

我想知道如何在Vue Js的页面组件中添加旧的3个Js代码,就像在html 脚本标记上捕获的普通javascript一样,而无需使用Vue的方法或计算对象,而我正在使用节点10.14,Vue-cli 3和Vue脚手架

If I understand your question correctly, one way you could probably do this is to have the JavaScript extracted out into a helper file like /lib/3JS.js and then make sure to export it.

Then you could import it into your Vue file and use it there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM