cats-image.vue 841 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <!-- <image
  3. class="cats"
  4. v-show="is_loading" @load="imgLoad"
  5. :src="catsImg.cats" :style="{'background-color': theme.background}"
  6. ></image> -->
  7. </template>
  8. <script>
  9. import { mapGetters, mapState } from 'vuex';
  10. export default {
  11. name: "cats-image",
  12. computed: {
  13. ...mapState({
  14. catsImg: state => state.mallConfig.__wxapp_img.cats,
  15. })
  16. },
  17. props: {
  18. theme: Object
  19. },
  20. data() {
  21. return {
  22. is_loading: false
  23. }
  24. },
  25. methods: {
  26. imgLoad() {
  27. this.is_loading = true;
  28. }
  29. }
  30. }
  31. </script>
  32. <style scoped lang="scss">
  33. .cats {
  34. width:#{56rpx};
  35. height:#{56rpx};
  36. }
  37. </style>