Commit b448b2bc40a8224c618c658ee36d79a3b3db8c9c

Authored by zhiyangdu
1 parent 1cf390cf

规范命名

src/components/giftItem/giftItem.less renamed to src/components/receivingGiftsItem/receivingGiftsItem.less
src/components/giftItem/giftItem.vue renamed to src/components/receivingGiftsItem/receivingGiftsItem.vue
1 <template> 1 <template>
2 - <div> 2 + <div v-if="receivingGiftsInfo && receivingGiftsInfo.length>0">
3 <div 3 <div
4 class="giftItem_box" 4 class="giftItem_box"
5 - v-for="(item, index) in orderGiftList" 5 + v-for="(item, index) in receivingGiftsInfo"
6 :key="index" 6 :key="index"
7 > 7 >
8 <!--用户信息--> 8 <!--用户信息-->
@@ -133,7 +133,7 @@ export default { @@ -133,7 +133,7 @@ export default {
133 data() { 133 data() {
134 return {}; 134 return {};
135 }, 135 },
136 - props: ["orderGiftList"], 136 + props: ["receivingGiftsInfo"],
137 created() {}, 137 created() {},
138 methods: { 138 methods: {
139 } 139 }
@@ -142,5 +142,5 @@ export default { @@ -142,5 +142,5 @@ export default {
142 142
143 <!-- Add "scoped" attribute to limit CSS to this component only --> 143 <!-- Add "scoped" attribute to limit CSS to this component only -->
144 <style rel="stylesheet/less" lang="less" scoped> 144 <style rel="stylesheet/less" lang="less" scoped>
145 -@import "giftItem"; 145 +@import "receivingGiftsItem";
146 </style> 146 </style>
src/pages/myGiftBox/myGiftBox.vue
@@ -18,9 +18,9 @@ @@ -18,9 +18,9 @@
18 infinite-scroll-disabled="loading" 18 infinite-scroll-disabled="loading"
19 :infinite-scroll-distance="50" 19 :infinite-scroll-distance="50"
20 > 20 >
21 - <giftItem  
22 - :orderGiftList="orderGiftList"  
23 - ></giftItem> 21 + <receiving-gifts-item
  22 + :receivingGiftsInfo="receivingGiftsInfo"
  23 + ></receiving-gifts-item>
24 </div> 24 </div>
25 </div> 25 </div>
26 </template> 26 </template>
@@ -28,19 +28,19 @@ @@ -28,19 +28,19 @@
28 <script> 28 <script>
29 // 引入组件 29 // 引入组件
30 import { Toast, Indicator } from "mint-ui"; 30 import { Toast, Indicator } from "mint-ui";
31 -import giftItem from "@/components/giftItem/giftItem"; 31 +import receivingGiftsItem from "@/components/receivingGiftsItem/receivingGiftsItem";
32 export default { 32 export default {
33 name: "myGiftBox", 33 name: "myGiftBox",
34 data() { 34 data() {
35 return { 35 return {
36 active: 0, 36 active: 0,
37 - orderGiftList: null, // 礼物数据 37 + receivingGiftsInfo: null, // 礼物数据
38 loading: false, // 加载 38 loading: false, // 加载
39 pages: 0 // 分页 39 pages: 0 // 分页
40 }; 40 };
41 }, 41 },
42 components: { 42 components: {
43 - giftItem 43 + receivingGiftsItem
44 }, 44 },
45 created() { 45 created() {
46 // 收礼订单列表 46 // 收礼订单列表
@@ -94,12 +94,12 @@ export default { @@ -94,12 +94,12 @@ export default {
94 // 隐藏加载圈 94 // 隐藏加载圈
95 this.loading = false; 95 this.loading = false;
96 if (this.pages > 1) { 96 if (this.pages > 1) {
97 - this.$set(this, "orderGiftList", [  
98 - ...this.orderGiftList, 97 + this.$set(this, "receivingGiftsInfo", [
  98 + ...this.receivingGiftsInfo,
99 ...datas.list 99 ...datas.list
100 ]); 100 ]);
101 } else { 101 } else {
102 - this.$set(this, "orderGiftList", datas.list); 102 + this.$set(this, "receivingGiftsInfo", datas.list);
103 } 103 }
104 } 104 }
105 /* 获取达人动态数据 结束 */ 105 /* 获取达人动态数据 结束 */