index.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <div
  3. style="width: 100%;height: 100%"
  4. class="bs-design-wrap"
  5. >
  6. <dv-border-box-6
  7. :id="'dataV' + code"
  8. :key="updateKey"
  9. :color="color"
  10. :background-color="colorType === 'single' ? backgroundColor : `url(#${borderBgId})`"
  11. />
  12. </div>
  13. </template>
  14. <script>
  15. import { dataVMixins } from 'data-room-ui/js/mixins/dataVMixins'
  16. import DvBorderBox6 from '@jiaminghi/data-view/lib/components/borderBox6/src/main.vue'
  17. import '@jiaminghi/data-view/lib/components/borderBox6/src/main.css'
  18. export default {
  19. name: 'Border6',
  20. components: {
  21. DvBorderBox6
  22. },
  23. mixins: [dataVMixins],
  24. computed: {
  25. color () {
  26. return this.config.customize.borderMainColor ||
  27. this.config.customize.borderSecondaryColor
  28. ? [
  29. this.config.customize.borderMainColor,
  30. this.config.customize.borderSecondaryColor
  31. ]
  32. : null
  33. },
  34. backgroundColor () {
  35. return this.config.customize.backgroundColor
  36. ? this.config.customize.backgroundColor
  37. : 'transparent'
  38. }
  39. },
  40. watch: {},
  41. mounted () {},
  42. methods: {}
  43. }
  44. </script>
  45. <style lang="scss" scoped>
  46. .bs-design-wrap {
  47. position: relative;
  48. width: 100%;
  49. height: 100%;
  50. background-color: transparent;
  51. border-radius: 4px;
  52. box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.1);
  53. box-sizing: border-box;
  54. }
  55. .title-box {
  56. height: 40px;
  57. padding: 10px 10px 0 0;
  58. box-sizing: border-box;
  59. .title {
  60. font-size: 14px;
  61. color: #333;
  62. font-weight: bold;
  63. border-left: 3px solid var(--bs-el-color-primary);
  64. padding-left: 16px;
  65. }
  66. .target-value {
  67. overflow-y: auto;
  68. height: 60px;
  69. font-weight: bold;
  70. width: 100%;
  71. font-size: 20px;
  72. color: #333;
  73. padding: 16px 0 0 22px;
  74. box-sizing: border-box;
  75. }
  76. }
  77. .el-icon-warning {
  78. color: #ffd600;
  79. }
  80. .title-hover {
  81. &:hover {
  82. cursor: move;
  83. }
  84. }
  85. /*滚动条样式*/
  86. ::v-deep ::-webkit-scrollbar {
  87. width: 4px;
  88. border-radius: 4px;
  89. height: 4px;
  90. }
  91. ::v-deep ::-webkit-scrollbar-thumb {
  92. background: #dddddd !important;
  93. border-radius: 10px;
  94. }
  95. </style>