index.vue 2.0 KB

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