index.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <div
  3. style="width: 100%;height: 100%"
  4. class="bs-design-wrap"
  5. >
  6. <dv-border-box-1
  7. :id="'dataV' + config.code"
  8. >
  9. <div class="element" :style="`font-size:${config.border.fontSize}px;line-height:${config.border.titleHeight}px;color:${config.border.color[0]};height:${config.border.titleHeight};margin:0 0 0 20px`">{{config.title}}</div>
  10. </dv-border-box-1>
  11. </div>
  12. </template>
  13. <script>
  14. import DvBorderBox1 from '@jiaminghi/data-view/lib/components/borderBox1/src/main.vue'
  15. import '@jiaminghi/data-view/lib/components/borderBox1/src/main.css'
  16. export default {
  17. name: 'Border1',
  18. components: {
  19. DvBorderBox1
  20. },
  21. props: {
  22. // 卡片的属性
  23. config: {
  24. type: Object,
  25. default: () => ({})
  26. }
  27. },
  28. watch: {},
  29. mounted () {},
  30. methods: {}
  31. }
  32. </script>
  33. <style lang="scss" scoped>
  34. .bs-design-wrap {
  35. position: absolute;
  36. width: 100%;
  37. height: 100%;
  38. // padding: 0 16px;
  39. background-color: transparent;
  40. border-radius: 4px;
  41. box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.1);
  42. box-sizing: border-box;
  43. .element{
  44. display: flex;
  45. align-items: center;
  46. }
  47. }
  48. .title-box {
  49. height: 40px;
  50. padding: 10px 10px 0 0;
  51. box-sizing: border-box;
  52. .title {
  53. font-size: 14px;
  54. color: #333;
  55. font-weight: bold;
  56. border-left: 3px solid #007aff;
  57. padding-left: 16px;
  58. }
  59. .target-value {
  60. overflow-y: auto;
  61. height: 60px;
  62. font-weight: bold;
  63. width: 100%;
  64. font-size: 20px;
  65. color: #333;
  66. padding: 16px 0 0 22px;
  67. box-sizing: border-box;
  68. }
  69. }
  70. .el-icon-warning {
  71. color: #ffd600;
  72. }
  73. .title-hover {
  74. &:hover {
  75. cursor: move;
  76. }
  77. }
  78. /*滚动条样式*/
  79. ::v-deep ::-webkit-scrollbar {
  80. width: 4px;
  81. border-radius: 4px;
  82. height: 4px;
  83. }
  84. ::v-deep ::-webkit-scrollbar-thumb {
  85. background: #dddddd !important;
  86. border-radius: 10px;
  87. }
  88. </style>