index.vue 2.2 KB

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