Ver código fonte

不使用let, 使用var

wzl_h
wangzhonglu 2 anos atrás
pai
commit
d69e144fc2
7 arquivos alterados com 16 adições e 16 exclusões
  1. 1
    1
      js/index.js
  2. 1
    1
      js/preface.js
  3. 1
    1
      js/section_1.js
  4. 1
    1
      js/section_2.js
  5. 5
    5
      js/section_3.js
  6. 5
    5
      js/section_4.js
  7. 2
    2
      librarys/utils/index.js

+ 1
- 1
js/index.js Ver arquivo

@@ -1,5 +1,5 @@
1 1
 $(function () {
2
-  let loadHtmlArr = [
2
+  var loadHtmlArr = [
3 3
     // "cover",
4 4
     // // "catalog",
5 5
     // "preface",

+ 1
- 1
js/preface.js Ver arquivo

@@ -1,5 +1,5 @@
1 1
 $(function() {
2 2
   // outerHeight(true) 高度为 height+margin+padding+border
3
-  let parameter = $(".preface_html_root").data("page-params");
3
+  var parameter = $(".preface_html_root").data("page-params");
4 4
   console.log("preface:parameter", parameter);
5 5
 });

+ 1
- 1
js/section_1.js Ver arquivo

@@ -1,5 +1,5 @@
1 1
 $(function() {
2 2
   // outerHeight(true) 高度为 height+margin+padding+border
3
-  let parameter = $(".section_1_html_root").data("page-params");
3
+  var parameter = $(".section_1_html_root").data("page-params");
4 4
   console.log("section_1:parameter", parameter);
5 5
 });

+ 1
- 1
js/section_2.js Ver arquivo

@@ -1,5 +1,5 @@
1 1
 $(function() {
2 2
   // outerHeight(true) 高度为 height+margin+padding+border
3
-  let parameter = $(".section_2_html_root").data("page-params");
3
+  var parameter = $(".section_2_html_root").data("page-params");
4 4
   console.log("section_2:parameter", parameter);
5 5
 });

+ 5
- 5
js/section_3.js Ver arquivo

@@ -1,5 +1,5 @@
1 1
 function initSubjectBadEcharts() {
2
-  let xAxis_data = [
2
+  var xAxis_data = [
3 3
     "语文",
4 4
     "数学",
5 5
     "英语",
@@ -10,8 +10,8 @@ function initSubjectBadEcharts() {
10 10
     "历史",
11 11
     "生物"
12 12
   ];
13
-  let series_data = [12, 20, 15, 8, 7, 11, 13,  15, 8];
14
-  let option = {
13
+  var series_data = [12, 20, 15, 8, 7, 11, 13,  15, 8];
14
+  var option = {
15 15
     animation: false,
16 16
     title: {
17 17
       text: "人",
@@ -104,13 +104,13 @@ function initSubjectBadEcharts() {
104 104
       },
105 105
     ],
106 106
   };
107
-  let myEcharts = echarts.init(document.querySelector(".section_3 #subjectBadEcharts"));
107
+  var myEcharts = echarts.init(document.querySelector(".section_3 #subjectBadEcharts"));
108 108
   myEcharts.clear();
109 109
   myEcharts.setOption(option);
110 110
 }
111 111
 $(function () {
112 112
   // outerHeight(true) 高度为 height+margin+padding+border
113
-  let parameter = $(".section_3_html_root").data("page-params");
113
+  var parameter = $(".section_3_html_root").data("page-params");
114 114
   console.log("section_3:parameter", parameter);
115 115
 
116 116
   initSubjectBadEcharts();

+ 5
- 5
js/section_4.js Ver arquivo

@@ -1,5 +1,5 @@
1 1
 function initSubjectGoodEcharts() {
2
-  let xAxis_data = [
2
+  var xAxis_data = [
3 3
     "语文",
4 4
     "数学",
5 5
     "英语",
@@ -10,8 +10,8 @@ function initSubjectGoodEcharts() {
10 10
     "历史",
11 11
     "生物"
12 12
   ];
13
-  let series_data = [12, 20, 15, 8, 7, 11, 13,  15, 8];
14
-  let option = {
13
+  var series_data = [12, 20, 15, 8, 7, 11, 13,  15, 8];
14
+  var option = {
15 15
     animation: false,
16 16
     title: {
17 17
       text: "人",
@@ -104,13 +104,13 @@ function initSubjectGoodEcharts() {
104 104
       },
105 105
     ],
106 106
   };
107
-  let myEcharts = echarts.init(document.querySelector(".section_4 #subjectGoodEcharts"));
107
+  var myEcharts = echarts.init(document.querySelector(".section_4 #subjectGoodEcharts"));
108 108
   myEcharts.clear();
109 109
   myEcharts.setOption(option);
110 110
 }
111 111
 $(function() {
112 112
   // outerHeight(true) 高度为 height+margin+padding+border
113
-  let parameter = $(".section_4_html_root").data("page-params");
113
+  var parameter = $(".section_4_html_root").data("page-params");
114 114
   console.log("section_4:parameter", parameter);
115 115
 
116 116
   initSubjectGoodEcharts();

+ 2
- 2
librarys/utils/index.js Ver arquivo

@@ -1,7 +1,7 @@
1 1
 jQuery.extend({
2 2
   UnitUtil: (function() {
3
-    let pxWidth = 0;
4
-    let tmpNode = document.createElement("DIV");
3
+    var pxWidth = 0;
4
+    var tmpNode = document.createElement("DIV");
5 5
     tmpNode.style.cssText =
6 6
       "width:1mm;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden";
7 7
     document.body.appendChild(tmpNode);

Carregando…
Cancelar
Salvar