popupHeader.vue 686 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <view class="header">
  3. <view class="title">{{title}} <text v-show="num">{{num?num:0}}</text></view>
  4. <view class="bottom_close" @click="close"><view class="iconfont icon-ic_close f-s-24"></view></view>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. props: {
  10. //是否展示小字样式
  11. title: {
  12. type: String,
  13. default: '',
  14. },
  15. num: {
  16. type: Number,
  17. default: 0,
  18. }
  19. },
  20. methods: {
  21. close() {
  22. this.$emit('close');
  23. },
  24. }
  25. }
  26. </script>
  27. <style scoped lang="scss">
  28. .header {
  29. position: relative;
  30. text-align: center;
  31. margin-bottom: 50rpx;
  32. .title {
  33. color: #282828;
  34. font-size: 36rpx;
  35. font-weight: bold;
  36. }
  37. }
  38. </style>