app-head.vue 851 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <template>
  2. <image class="head-bg" :style="{'height': height,'background-color': theme.background}" :src="apply ? community.apply : community.bg" ></image>
  3. </template>
  4. <script>
  5. import {mapGetters, mapState} from 'vuex';
  6. export default {
  7. name: 'app-head',
  8. props: {
  9. apply: Boolean,
  10. height: {
  11. type: String,
  12. default() {
  13. return '360rpx';
  14. }
  15. },
  16. theme: Object
  17. },
  18. data() {
  19. return {
  20. head: '',
  21. }
  22. },
  23. computed: {
  24. ...mapState({
  25. community: state => state.mallConfig.__wxapp_img.community,
  26. })
  27. }
  28. }
  29. </script>
  30. <style scoped lang="scss">
  31. .head-bg {
  32. width: #{750rpx};
  33. height: #{360rpx};
  34. }
  35. </style>