index.vue 1.8 KB

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