index.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <view class="panel-wrap">
  3. <view class="panel-title">
  4. <slot name="header"></slot>
  5. </view>
  6. <up-line></up-line>
  7. <view class="panel-content">
  8. <slot name="content"></slot>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. name: "Panel",
  15. options: {styleIsolation: 'shared'},
  16. data() {
  17. return {}
  18. },
  19. methods: {}
  20. };
  21. </script>
  22. <style lang="scss">
  23. .panel-wrap {
  24. width: 100%;
  25. font-size: 28rpx;
  26. border-radius: 20rpx;
  27. background-color: #fff;
  28. display: flex;
  29. flex-direction: column;
  30. align-items: flex-start;
  31. .panel-title {
  32. width: 100%;
  33. padding: 25rpx;
  34. margin: 10rpx 0;
  35. box-sizing: border-box;
  36. display: flex;
  37. align-items: center;
  38. justify-content: flex-start;
  39. color: #333333;
  40. font-weight: 700;
  41. > view {
  42. display: flex;
  43. align-items: center;
  44. justify-content: flex-start;
  45. width: 100%;
  46. }
  47. :deep(.u-icon) {
  48. margin-right: 20rpx;
  49. }
  50. }
  51. .panel-content {
  52. width: 100%;
  53. display: flex;
  54. align-items: center;
  55. padding: 0 20rpx 20rpx 20rpx;
  56. box-sizing: border-box;
  57. > view {
  58. width: 100%;
  59. }
  60. .grid-list {
  61. width: 100%;
  62. }
  63. }
  64. }
  65. </style>