item-title.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <view class="item-line" :class="{'line-one':lineType===1,'line-two':lineType===2,'line-three':lineType===3}">
  3. <view class="item-title" :class="{'title-two':titleType===2}">
  4. <view class="title-circle"></view>
  5. <view class="title-text">{{label}}</view>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. name: "item-title",
  12. components: {},
  13. props: {
  14. lineType:{
  15. type:Number,
  16. default:0
  17. },
  18. titleType:{
  19. type:Number,
  20. default:1
  21. },
  22. label: {
  23. type: String,
  24. default: '标题'
  25. },
  26. },
  27. data() {
  28. return {}
  29. },
  30. watch: {},
  31. mounted() {
  32. },
  33. methods: {}
  34. }
  35. </script>
  36. <style scoped lang="scss">
  37. .item-line{
  38. padding: 16rpx 0;
  39. .item-title{
  40. display: flex;
  41. justify-content: left;
  42. height: 45rpx;
  43. .title-circle{
  44. margin-top: 19rpx;
  45. margin-right: 8rpx;
  46. width: 12rpx;
  47. height: 12rpx;
  48. border-radius: 50%;
  49. background: #306AFB;
  50. }
  51. .title-text{
  52. font-size: 32rpx;
  53. color: #333;
  54. font-weight: 600;
  55. line-height: 45rpx;
  56. }
  57. }
  58. .title-two{
  59. .title-circle{
  60. display: none;
  61. }
  62. .title-text{
  63. color: #333333;
  64. font-weight: 400;
  65. font-size: 28rpx;
  66. }
  67. }
  68. }
  69. .line-one{
  70. padding-top: 0;
  71. }
  72. .line-two{
  73. padding-bottom: 0;
  74. }
  75. .line-three{
  76. padding-top: 32rpx;
  77. }
  78. </style>