问题:
1:public中引用外部js
2:在根index.html使用script标签引入
3:由于使用了eslint检测,单文件中直接使用定义的变量编译出现error,但不影响功能
Module Warning (from ./node_modules/eslint-loader/index.js):
error: 'PLAY_ADDRESS' is not defined (no-undef) at src\components\play\play.vue:98:25:
解决办法:
在引用前加上 eslint 忽略
/* eslint-disable no-undef */
/* eslint-disable no-undef */
this.WS_URI = VIAS_VIDEO_PLAY_ADDRESS