index.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <div class="bs-design-wrap bs-picture">
  3. <div class="content-box">
  4. <el-image
  5. :src="config.customize.url || noImageUrl"
  6. fit="fill"
  7. :style="{
  8. width: '100%',
  9. height: '100%',
  10. opacity: config.customize.opacity / 100,
  11. borderRadius: config.customize.radius + 'px'
  12. }"
  13. draggable="false"
  14. >
  15. <div
  16. slot="placeholder"
  17. class="image-slot"
  18. >
  19. 加载中···
  20. </div>
  21. </el-image>
  22. <!-- <img
  23. :src="config.customize.url || noImageUrl"
  24. :style="{
  25. width: '100%',
  26. height: '100%',
  27. opacity: config.customize.opacity / 100,
  28. borderRadius: config.customize.radius + 'px'
  29. }"
  30. draggable="false"
  31. > -->
  32. </div>
  33. </div>
  34. </template>
  35. <script>
  36. export default {
  37. name: 'PictureChart',
  38. components: {},
  39. props: {
  40. config: {
  41. type: Object,
  42. default: () => ({})
  43. }
  44. },
  45. data () {
  46. return {
  47. noImageUrl: require('packages/BasicComponents/Picture/images/noImage.png')
  48. }
  49. },
  50. computed: {},
  51. watch: {},
  52. mounted () {},
  53. methods: {}
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .bs-design-wrap {
  58. width: 100%;
  59. background-color: rgba(0, 0, 0, 0);
  60. .content-box {
  61. width: 100%;
  62. height: 100%;
  63. }
  64. }
  65. </style>