Commit 07e36d660bb9abf9af5f0c27d3eb1ba4431d2060

Authored by 王强
1 parent 9fed9c26

代码优化

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