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