index.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <div
  3. style="width: 100%;height: 100%"
  4. class="bs-design-wrap"
  5. >
  6. <dv-border-box-3
  7. :id="'dataV' + config.code"
  8. :background-color="backgroundColor"
  9. :key="updateKey"
  10. >
  11. <div class="element"
  12. v-if="config.border.isTitle"
  13. :style="`
  14. color:${color};
  15. font-size:${config.border.fontSize}px;
  16. line-height:${config.border.titleHeight}px;
  17. height:${config.border.titleHeight};
  18. padding:0 0 0 20px`"
  19. >
  20. {{config.title}}</div>
  21. </dv-border-box-3>
  22. </div>
  23. </template>
  24. <script>
  25. import { refreshComponentMixin } from 'data-room-ui/js/mixins/refreshComponent'
  26. import DvBorderBox3 from '@jiaminghi/data-view/lib/components/borderBox3/src/main.vue'
  27. import '@jiaminghi/data-view/lib/components/borderBox3/src/main.css'
  28. export default {
  29. name: 'Border2',
  30. components: {
  31. DvBorderBox3
  32. },
  33. mixins: [refreshComponentMixin],
  34. props: {
  35. // 卡片的属性
  36. config: {
  37. type: Object,
  38. default: () => ({})
  39. }
  40. },
  41. data () {
  42. return {
  43. }
  44. },
  45. computed: {
  46. color () {
  47. return this.config.border.fontColor ? this.config.border.fontColor
  48. : '#fff'
  49. },
  50. backgroundColor () {
  51. return this.config.border.backgroundColor
  52. ? this.config.border.backgroundColor
  53. : 'transparent'
  54. },
  55. // colorType () {
  56. // return this.config.border.colorType
  57. // }
  58. },
  59. watch: {
  60. },
  61. mounted () {},
  62. methods: {}
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. .bs-design-wrap {
  67. position: absolute;
  68. width: 100%;
  69. height: 100%;
  70. // padding: 0 16px;
  71. background-color: transparent;
  72. border-radius: 4px;
  73. box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.1);
  74. box-sizing: border-box;
  75. }
  76. /*滚动条样式*/
  77. ::v-deep ::-webkit-scrollbar {
  78. width: 4px;
  79. border-radius: 4px;
  80. height: 4px;
  81. }
  82. ::v-deep ::-webkit-scrollbar-thumb {
  83. background: #dddddd !important;
  84. border-radius: 10px;
  85. }
  86. </style>