index.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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,
  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. </div>
  23. </div>
  24. </template>
  25. <script>
  26. import { refreshComponentMixin } from 'data-room-ui/js/mixins/refreshComponent'
  27. export default {
  28. name: 'PictureChart',
  29. components: {},
  30. mixins: [refreshComponentMixin],
  31. props: {
  32. config: {
  33. type: Object,
  34. default: () => ({})
  35. }
  36. },
  37. data () {
  38. return {
  39. noImageUrl: require('data-room-ui/BasicComponents/Picture/images/noImage.png')
  40. }
  41. },
  42. computed: {},
  43. watch: {},
  44. mounted () {},
  45. methods: {
  46. }
  47. }
  48. </script>
  49. <style lang="scss" scoped>
  50. .bs-design-wrap {
  51. padding: 0 16px;
  52. width: 100%;
  53. background-color: rgba(0, 0, 0, 0);
  54. .content-box {
  55. width: 100%;
  56. height: 100%;
  57. }
  58. }
  59. </style>