简体   繁体   中英

How do I need to reference an external file in Vue.js

I am new to Vue.JS and I am adding an external component that only has a JavaScript reference. The component is Stimulsoft.js and I have the files loaded into the correct folders. I've tried to follow the github information at

        https://github.com/stimulsoft/Samples-JS/blob/master/Vue.js/02.%20Working%20with%20report%20viewer/index.html

but since my Vue.js file is structured as a module application I have different .vue page structure.

The GitHub sample show it referencing the .js files like.

         <script src="stimulsoft/stimulsoft.reports.js"></script>
         <script src="stimulsoft/stimulsoft.viewer.js"></script>

on the index.html. However when I use that structure I'm not sure the files even load and they give an error to the vue page that needs to use them. Do I need to reference them on the actual vue.js page? and if so how? 在此输入图像描述

The stimulsoft.vue files needs to reference the stimulsoft.viewer.js and stimulsoft.report.js file.

I have tried every combination of stimulsoft/stimulsoft.viewer.js, ./stimulsoft/stimulsoft.viewer.js and ../stimulsoft/stimulsoft.viewer.js but to no avail.

Thanks for the help

有一些机会你有一个打包版本的stimulsoft库: https ://www.npmjs.com/search q = stimtimoft

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