save-component.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <view class="save-component">
  3. <u-navbar :title="topTitle" :safeAreaInsetTop="true" :fixed="true" height="50px"
  4. bgColor="#afc3fc" leftIcon="arrow-left" @leftClick="handlerToggle">
  5. </u-navbar>
  6. <u-list :height="666">
  7. <u-list-item v-for="(item, index) in zcList" :key="index">
  8. <u-cell icon="list-dot">
  9. <view slot="title" class="u-slot-title">
  10. <text class="u-cell-text">
  11. <text>{{ item.bc }}</text>
  12. <text style="margin-left:75px">{{ item.count }}</text>
  13. </text>
  14. </view>
  15. <view slot="value" class="u-slot-title">
  16. <u-tag text="提交" plain size="mini" type="primary" @click="getsubmit(item)">
  17. </u-tag>
  18. </view>
  19. </u-cell>
  20. </u-list-item>
  21. </u-list>
  22. </view>
  23. </template>
  24. <script>
  25. import api from "@/api/api";
  26. import moment from 'moment'
  27. export default {
  28. name: 'save-component',
  29. props: {},
  30. data() {
  31. return {
  32. indexList: [],
  33. topTitle: '暂存列表',//标题
  34. }
  35. },
  36. computed: {
  37. zcList: function () {
  38. return uni.getStorageSync('zcList')
  39. },
  40. },
  41. mounted() { },
  42. methods: {
  43. //点击返回上一级
  44. handlerToggle() {
  45. this.$emit('closeZc',null)
  46. },
  47. //提交
  48. getsubmit(item) {
  49. this.$emit('closeZc', item)
  50. }
  51. }
  52. };
  53. </script>
  54. <style lang="scss" scoped>
  55. .save-component {
  56. position: relative;
  57. width: 100%;
  58. height: 100%;
  59. background-color: #fff;
  60. }
  61. ::v-deep .u-cell__body {
  62. font-size: 14px;
  63. }
  64. ::v-deep .u-popup {
  65. flex: 0
  66. }
  67. ::v-deep .u-slot-title {
  68. display: flex;
  69. }
  70. </style>