blankPage.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <!-- 辅助空白 -->
  3. <common-wrapper v-show="!isSortType" :config="configData">
  4. <view class="blankPage">
  5. <view class="bankCon" :style="[blankStyle]"></view>
  6. </view>
  7. </common-wrapper>
  8. </template>
  9. <script>
  10. import commonWrapper from "./commonWrapper.vue";
  11. export default {
  12. components: { commonWrapper },
  13. name: "blankPage",
  14. props: {
  15. dataConfig: {
  16. type: Object,
  17. default: () => {},
  18. },
  19. isSortType: {
  20. type: String | Number,
  21. default: 0,
  22. },
  23. },
  24. data() {
  25. return {
  26. bgColor: "",
  27. heightConfig: 0,
  28. };
  29. },
  30. computed: {
  31. configData() {
  32. return {
  33. ...this.dataConfig,
  34. paddingConfig: this.dataConfig.paddingConfig || {
  35. isAll: false,
  36. valList: [
  37. {
  38. val: this.dataConfig.topConfig
  39. ? this.dataConfig.topConfig.val
  40. : 0,
  41. },
  42. {
  43. val: this.dataConfig.lrEdge ? this.dataConfig.lrEdge.val : 0,
  44. },
  45. {
  46. val: this.dataConfig.bottomConfig
  47. ? this.dataConfig.bottomConfig.val
  48. : 0,
  49. },
  50. {
  51. val: this.dataConfig.lrEdge ? this.dataConfig.lrEdge.val : 0,
  52. },
  53. ],
  54. },
  55. marginConfig: this.dataConfig.marginConfig || {
  56. isAll: false,
  57. valList: [
  58. {
  59. val: 0,
  60. },
  61. {
  62. val: 0,
  63. },
  64. {
  65. val: 0,
  66. },
  67. {
  68. val: 0,
  69. },
  70. ],
  71. },
  72. componentBgConfig:
  73. this.dataConfig.componentBgConfig || this.dataConfig.bottomBgColor,
  74. };
  75. },
  76. blankStyle() {
  77. let borderRadius = `${this.dataConfig.fillet.val * 2}rpx`;
  78. if (this.dataConfig.fillet.type) {
  79. borderRadius = `${this.dataConfig.fillet.valList[0].val * 2}rpx ${
  80. this.dataConfig.fillet.valList[1].val * 2
  81. }rpx ${this.dataConfig.fillet.valList[3].val * 2}rpx ${
  82. this.dataConfig.fillet.valList[2].val * 2
  83. }rpx`;
  84. }
  85. return {
  86. height: `${this.dataConfig.heightConfig.val * 2}rpx`,
  87. "border-radius": borderRadius,
  88. background: this.dataConfig.bgColor.color[0].item,
  89. };
  90. },
  91. },
  92. created() {},
  93. methods: {},
  94. };
  95. </script>
  96. <style lang="scss">
  97. .blankPage {
  98. .bankCon {
  99. width: 100%;
  100. height: 100%;
  101. background-color: blue;
  102. }
  103. }
  104. </style>