index.vue 1.9 KB

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