Commit 07e36d660bb9abf9af5f0c27d3eb1ba4431d2060

Authored by 王强
1 parent 9fed9c26

代码优化

src/components/horizList/horizList.vue
... ... @@ -39,11 +39,11 @@
39 39 <goods-item-3 v-if="com == '3'" @jump="jump" @primary="primary"
40 40 :item="item">
41 41 </goods-item-3>
  42 +
42 43 <!--菜单-->
43   - <swiper-Item v-if="com == '4'" @jump="jump"
44   - :item="item"
45   - >
46   - </swiper-Item>
  44 + <swiper-item v-if="com == '4'" @jump="jump"
  45 + :item="item">
  46 + </swiper-item>
47 47 </div>
48 48 </div>
49 49 </div>
... ... @@ -138,7 +138,7 @@
138 138 if (typeof newVal === "object" && newVal.length > 0) {
139 139  
140 140 // 下一周期处理
141   - this.$nextTick(function() {
  141 + this.$nextTick(() => {
142 142  
143 143 // 设置横向滚动
144 144 this.setScrollBox(this.$refs.scrollBox);
... ... @@ -152,7 +152,7 @@
152 152 if (this.lists && this.lists.length) {
153 153  
154 154 // 下一周期处理
155   - this.$nextTick(function() {
  155 + this.$nextTick(() => {
156 156  
157 157 // 设置横向滚动
158 158 this.setScrollBox(this.$refs.scrollBox);
... ... @@ -163,6 +163,6 @@
163 163 </script>
164 164  
165 165 <!-- Add "scoped" attribute to limit CSS to this component only -->
166   -<style rel="stylesheet/less" lang="less">
  166 +<style rel="stylesheet/less" lang="less" scoped>
167 167 @import './horizList';
168 168 </style>
... ...