Construction.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <FlexCol center :height="height" :padding="padding" :gap="gap">
  3. <view class="construction-frame">
  4. <view class="construction-inner">
  5. <FlexCol center :gap="16" :padding="[40, 32]">
  6. <Icon icon="warning-filling" :size="56" color="#f5c518" />
  7. <Text :text="title" fontConfig="title" textAlign="center" bold />
  8. <Text :text="text" fontConfig="subText" textAlign="center" color="text.second" />
  9. <slot />
  10. </FlexCol>
  11. </view>
  12. </view>
  13. </FlexCol>
  14. </template>
  15. <script setup lang="ts">
  16. import Icon from '@/components/basic/Icon.vue';
  17. import Text from '@/components/basic/Text.vue';
  18. import FlexCol from '@/components/layout/FlexCol.vue';
  19. withDefaults(defineProps<{
  20. /** 说明文字 */
  21. text?: string;
  22. /** 标题 */
  23. title?: string;
  24. /** 占位区域高度 */
  25. height?: number | string;
  26. /** 外层内边距 */
  27. padding?: number | number[];
  28. /** 内容间距 */
  29. gap?: number | string;
  30. }>(), {
  31. text: '此功能正在开发中,敬请期待',
  32. title: '开发建设中',
  33. height: 300,
  34. padding: 30,
  35. gap: 0,
  36. });
  37. </script>
  38. <style lang="scss" scoped>
  39. .construction-frame {
  40. width: 100%;
  41. max-width: 640rpx;
  42. padding: 10rpx;
  43. border-radius: 20rpx;
  44. background-color: #f5c518;
  45. background-image: repeating-linear-gradient(
  46. -45deg,
  47. #1a1a1a 0,
  48. #1a1a1a 18rpx,
  49. #f5c518 18rpx,
  50. #f5c518 36rpx
  51. );
  52. box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08);
  53. }
  54. .construction-inner {
  55. border-radius: 14rpx;
  56. background: #fff;
  57. overflow: hidden;
  58. }
  59. </style>