customCard.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <view class="custom-card">
  3. <view class="custom-card-header">
  4. <view class="custom-card-action" @tap="BackPage">
  5. <u-icon name="arrow-left" color="#333333" size="32rpx" />
  6. <view class="custom-card-action-text">
  7. <slot name="backText"></slot>
  8. </view>
  9. </view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. name: 'custom-card',
  16. props: {},
  17. data() {
  18. return {};
  19. },
  20. methods: {
  21. BackPage() {
  22. uni.navigateBack({
  23. delta: 1,
  24. });
  25. },
  26. },
  27. };
  28. </script>
  29. <style scoped lang="scss">
  30. .custom-card {
  31. border-radius: 16upx;
  32. opacity: 1;
  33. padding-top: 80rpx;
  34. }
  35. .custom-card-header {
  36. padding: 0 23upx;
  37. height: 90rpx;
  38. color: #333333;
  39. font-size: 27upx;
  40. font-weight: 600;
  41. font-family: 'PingFang SC';
  42. line-height: 44upx;
  43. .custom-card-action {
  44. display: flex;
  45. align-items: center;
  46. height: 90rpx;
  47. line-height: 90rpx;
  48. .custom-card-action-text {
  49. width: 90%;
  50. text-align: center;
  51. color: #042118;
  52. font-size: 34rpx;
  53. }
  54. }
  55. }
  56. </style>