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

  <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>

 

posted @ 2021-04-17 22:50  yw3692582  阅读(1019)  评论(0编辑  收藏  举报