首页 > 其他 > 详细

Vue中引入cdn同时防止cdn挂掉

时间:2021-04-18 11:27:49      阅读:29      评论:0      收藏:0      [点我收藏+]
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.5.2/vue.min.js"></script>
  <script>!window.Vue && document.write(unescape(‘%3Cscript src="/study/static/js/vue.min.js"%3E%3C/script%3E‘))</script>
  <script src="https://cdn.bootcdn.net/ajax/libs/vuex/3.6.2/vuex.min.js"></script>
  <script>!window.Vuex && document.write(unescape(‘%3Cscript src="/study/static/js/vuex.min.js"%3E%3C/script%3E‘))</script>
  <!-- 解决兼容问题 -->
  <script src="https://cdn.bootcdn.net/ajax/libs/babel-polyfill/7.12.1/polyfill.min.js"></script>
  <!-- element-ui -->
  <script src="https://cdn.bootcdn.net/ajax/libs/element-ui/2.15.1/index.min.js"></script>
  <script>!window.ELEMENT && document.write(unescape(‘%3Cscript src="/study/static/js/index.min.js"%3E%3C/script%3E‘))</script>
  <link href="https://cdn.bootcdn.net/ajax/libs/element-ui/2.15.1/theme-chalk/index.min.css" rel="stylesheet">
  <!-- axios -->
  <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>
  <script>!window.axios && document.write(unescape(‘%3Cscript src="/study/static/js/axios.min.js"%3E%3C/script%3E‘))</script>
  <script src="https://cdn.bootcdn.net/ajax/libs/qs/6.9.6/qs.min.js"></script>
  <script>!window.Qs && document.write(unescape(‘%3Cscript src="/study/static/js/qs.min.js"%3E%3C/script%3E‘))</script>
  <!-- echarts -->
  <script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.0.2/echarts.min.js"></script>
  <script>!window.echarts && document.write(unescape(‘%3Cscript src="/study/static/js/echarts.min.js"%3E%3C/script%3E‘))</script>
  <!-- dayjs -->
  <script src="https://cdn.bootcdn.net/ajax/libs/dayjs/1.10.4/dayjs.min.js"></script>
  <script>!window.dayjs && document.write(unescape(‘%3Cscript src="/study/static/js/dayjs.min.js"%3E%3C/script%3E‘))</script>

 

Vue中引入cdn同时防止cdn挂掉

原文:https://www.cnblogs.com/lyt520/p/14672431.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!