Webvideoctrl can never be referenced in vue

use webvideoctrl+vue for video surveillance. Webvideoctrl.js is a pure js file provided by Haikangwei"s web surveillance video component. I import it in the corresponding vue file, and I can see that it is referenced in source, but the console has been reporting errors of
Uncaught ReferenceError: WebVideoCtrl is not defined
. Other js files and css files referenced in the component can be referenced correctly

.

clipboard.png

clipboard.png


<script>


export default{


// else {
// this.$message({message:"",type:"error",showClose:true});
// }


// this.search(obj,function(obj){
// for(var key in obj){
// alert(obj[key].ipAddr);
// }
// })


}
</script>

vueDeleting local variable in strict mode:

clipboard.png

jqueryvue$demo.jsvar jq=jQuery.noConflict();alertWevVideoCtrl

webVideoCtrldemowebVideoCtr.jsdemo

clipboard.png

May.24,2021

js file should be put in static, and then use index.HTML to reference
although your problem has been solved, I still want to pass on the solution for the convenience of later people

. < hr >

besides, I passed the exam, so you don't have to support me / manually funny


direct reference is certainly not possible, because the old version of the JS library does not have export, so you can not get the object you need, you can encapsulate it yourself and export it.


is a js reference error. You should put the three js that need to be referenced in the static folder, and then reference them in index.html

.

clipboard.png

clipboard.png

Menu