cart.vue 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <v-header title="购物车" mode="">
  3. <view class="screen_all flex">
  4. <view class="flex-all-1 overflow flex">
  5. <view class="car-header row aCenter">
  6. <view class="flex-all-1 row aCenter">
  7. <image src="/static/images/shop.png" class="car-header-icon"></image>
  8. <view class="car-shop-label">沣胜食品商城</view>
  9. <text class="iconfont iconfont-more car-header-more"></text>
  10. </view>
  11. <view @click="triggerEdit" class="car-header-edit">{{edit?'完成':'编辑'}}</view>
  12. </view>
  13. <view class="flex-all-1 overflow">
  14. <!-- <flat-list-->
  15. <!-- background="transparent"-->
  16. <!-- @changeData="flatChangeData"-->
  17. <!-- @fetch="fetch"-->
  18. <!-- >-->
  19. <!-- </flat-list>-->
  20. <view class="car-padding">
  21. <view class="car-shop row aCenter"
  22. v-for="(item,index) in data"
  23. :key="index"
  24. @click.stop="triggerSelect(item)"
  25. >
  26. <v-radio disabled :value="!!selectObject[item.id]" borderColor="#999999" class="car-shop-radio" activeBorderColor="#41AE3C" activeColor="#41AE3C"></v-radio>
  27. <view class="flex-all-1 overflow">
  28. <layout-shop-item
  29. :item="item"
  30. numberEdit
  31. @input="triggerInput"
  32. ></layout-shop-item>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="car-footer row aCenter">
  39. <view class="row aCenter">
  40. <v-radio :value="allSelect" disabled size="small" class="car-footer-radio" borderColor="#999999" activeBorderColor="#41AE3C" activeColor="#41AE3C"></v-radio>
  41. <text>全选</text>
  42. </view>
  43. <view class="flex-all-1"></view>
  44. <view v-if="!edit" class="car-footer-right row aCenter">
  45. <view>合计:</view>
  46. <view class="car-footer-price">¥128.00</view>
  47. </view>
  48. <view v-if="edit" class="car-footer-button center">删除</view>
  49. <view v-else class="car-footer-button center">结算</view>
  50. </view>
  51. </view>
  52. </v-header>
  53. </template>
  54. <script>
  55. import vHeader from '@/components/v-header/main';
  56. import vRadio from '@/components/v-radio/main';
  57. import flatList from '@/components/flat-list/src/main';
  58. import mixins from './mixins';
  59. import layoutShopItem from '../../layout/layout-shop-item/main';
  60. export default {
  61. components:{
  62. vHeader,
  63. vRadio,
  64. flatList,
  65. layoutShopItem
  66. },
  67. mixins
  68. }
  69. </script>
  70. <style lang='scss' scoped src="./style.scss">
  71. </style>