index.vue 1.9 KB

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