index.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <template>
  2. <div
  3. :class="`bs-card`"
  4. style="width: 100%;height: 100%;position: relative;"
  5. >
  6. <div
  7. :style="{
  8. width: '100%',
  9. height: '100%',
  10. display: 'flex',
  11. flexDirection: 'column',
  12. boxSizing: 'border-box',
  13. backgroundColor: customize.backgroundColor,
  14. border:`${customize.border}px` + ' ' + customize.borderStyle + ' ' + customize.borderColor,
  15. }"
  16. >
  17. <header
  18. :style="{
  19. color: customize.headerColor,
  20. padding: '8px 0',
  21. lineHeight: '16px',
  22. borderBottom: `${customize.titleBottomLineWidth}px solid ${customize.titleBottomLineColor}`,
  23. fontSize: '16px',
  24. boxSizing: 'border-box',
  25. display: 'flex',
  26. justifyContent: 'space-between',
  27. }"
  28. >
  29. <span
  30. :style="{
  31. display: 'inline-block',
  32. borderLeft: `${customize.titleLineWidth}px solid ${customize.titleLineColor}`,
  33. paddingLeft: customize.titlePaddingLeft+'px'
  34. }"
  35. >
  36. {{ config.title }}
  37. </span>
  38. </header>
  39. <div
  40. :style="{
  41. flex: 1,
  42. position: 'relative'
  43. }"
  44. />
  45. </div>
  46. </div>
  47. </template>
  48. <script>
  49. export default {
  50. name: 'Card',
  51. components: {},
  52. props: {
  53. // 卡片的属性
  54. config: {
  55. type: Object,
  56. default: () => ({})
  57. }
  58. },
  59. data () {
  60. return {
  61. customClass: {}
  62. }
  63. },
  64. mounted () {
  65. },
  66. watch: {},
  67. computed: {
  68. customize () {
  69. return this.config.option.customize
  70. }
  71. },
  72. methods: { }
  73. }
  74. </script>
  75. <style lang="scss" scoped>
  76. </style>