海南旅游项目 前端仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.3 KiB

  1. <template>
  2. <view class="decorative-box" :class="{'padding-tb': isPadding}" @click="onClick">
  3. <view class="decorative-liner"></view>
  4. <view class="lf-flex decorative-content">
  5. <view class="rhombus lf-m-r-23" v-if="isRhombus"></view>
  6. <view class="lf-font-32 lf-font-bold title">{{ title }}</view>
  7. <view class="rhombus lf-m-l-23" v-if="isRhombus"></view>
  8. </view>
  9. <view class="decorative-liner"></view>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. props: {
  15. title: {
  16. type: [String, Number], // 标题
  17. default: '猜你喜欢'
  18. },
  19. isRhombus: {
  20. type: Boolean, // 是否显示菱形,默认显示
  21. default: true
  22. },
  23. isPadding: {
  24. type: Boolean,
  25. default: true
  26. }
  27. },
  28. methods: {
  29. onClick(event){
  30. this.$emit('click', event);
  31. }
  32. }
  33. }
  34. </script>
  35. <style lang="scss" scoped="scoped">
  36. .decorative-box {
  37. width: 100%;
  38. height: max-content;
  39. display: flex;
  40. justify-content: center;
  41. align-content: center;
  42. align-items: center;
  43. box-sizing: border-box;
  44. .decorative-liner{
  45. width: 110rpx;
  46. height: 1rpx;
  47. border: 1rpx solid #DCDCDC;
  48. }
  49. .decorative-content{
  50. padding: 0 30rpx;
  51. .rhombus{
  52. width: 16rpx;
  53. height: 16rpx;
  54. transform: rotateZ(45deg);
  55. background: #222;
  56. }
  57. .title{
  58. max-width: 340rpx;
  59. }
  60. }
  61. }
  62. .padding-tb{
  63. padding: 25rpx 0;
  64. }
  65. </style>