<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                `審查人:白占寧` `被審核代碼負責人:歐陽德才` `代碼地址:https://192.168.1.240:8443/svn/repos/diaisi-quxian` #### 1、缺少必要的注釋(已修改) 很多JS文件里面一句注釋都沒有,差評!!! #### 2、mock URL不符合規范(已修改) 文件路徑:`mock/index.js` ``` import Map from './map' import Time from './time' ``` 建議統一添加`fetch`前綴。 #### 3、原生DOM方法與jQuery混用(已修改) 文件路徑:`components/time/index.js` ``` const div = document.createElement('div') div.setAttribute('class','time') $(el).append(div) ``` 統一使用jQuery的方式,避免原生方法和jQuery混用。 #### 4、不符合基本的JS規范(已修改) ``` import {fetch} from '@/util/request' import './index.css' const mapConfig = { height: 1600, width: 1700, scaleTimes: 50 } class Map{ constructor(el){ this.Jiulongpo = new Jiulongpo(el, mapConfig) } render(){ fetch('Map', data => { this.Jiulongpo.render(data) }) } } ``` 以上代碼不規范的地方如下: - `{ }`兩邊沒有留空格; - `import`、變量定義和類定義之間沒有留空行; - 縮進不對,建議使用2個空格縮進,添加eslint檢測; - `render(){`方法定義和`{`之間差個空格。 #### 5、代碼可讀性差(已修改) ``` {startAngle: 0, endAngle: percent * 2 * Math.PI, innerRadius: 69, outerRadius: 75}, {startAngle: percent == 1 ? 0 : (percent + 0.01) * 2 * Math.PI, endAngle: percent == 1 ? 0 : 1.98 * Math.PI, innerRadius: 70, outerRadius: 74} ``` 建議每行不超過120個字符。 #### 6、這個什么操作?(已修改) ``` ( function repeat() { $('.important-into .case-list').css('top',$('.case-info').outerHeight() + 'px') $('.important-into .case-list').animate({ 'top' : -ulHeight + 'px'}, liCount * 5000, 'linear', repeat) }() ) ``` #### 7、圖表組件結構不對(已修改) ``` export default class CasePie{ constructor(config){ this.config = config this.arcPath = d3.svg.arc() } ``` 容器與配置項分離,所有圖表組件提供默認配置項。 #### 8、可優化的代碼(已修改) ``` .attr('transform', 'translate(' + this.config.centroid.x + ', ' + this.config.centroid.y + ')') .attr('fill', (d, i) => { return this.config.fill[i] }) .attr('stroke', this.config.stroke) ``` 以上代碼存在的問題: - 使用字符串模板代替字符串拼接; - `return`后只有一句時可以簡寫,省略`{}`和`return`; - 先定義`fill`、`stroke`等變量,不要到處都是`this.config.xxx`。 #### 9、方法定義位置不對(已修改) ``` // 獲取地圖縮放比例 this.getZoomScale = function (features, width, height) { ``` 各個實例可以復用的方法定義到原型上,不要定義到構造方法里面。 #### 10、復用性及可擴展性體現在哪里? 如果有另外一個區縣,和現在的樣式很類似,如何用現有的代碼快速開發出來,并且修改的地方很少?
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看