SlyImg.vue 574 B

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <view :style="$getStyle(styles)" >
  3. <u-image :width="`${attrs['width'] || defaultConfig.width}%`"
  4. :height="`${attrs['height'] || defaultConfig.height}rpx`"
  5. :mode="attrs['mode']"
  6. :shape="attrs['shape']"
  7. :border-radius="attrs['border-radius']"
  8. :src="dataVal.dataList"></u-image>
  9. </view>
  10. </template>
  11. <script>
  12. import Mixin from "../Mixin";
  13. export default {
  14. name: "SlyImg",
  15. mixins: [Mixin],
  16. data() {
  17. return {
  18. defaultConfig: {
  19. width: 100,
  20. height: 300
  21. },
  22. src: ''
  23. };
  24. }
  25. }
  26. </script>
  27. <style lang="scss">
  28. </style>