index.vue 945 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <view class="base-title-box">
  3. <view class="base-title-line" />
  4. <u--text :lines="1" align='left' :size='fontSize' :text="txt" :color="color"></u--text>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. // BaseTitle
  10. name: "base-title",
  11. props: {
  12. txt: {
  13. type: String,
  14. default: "",
  15. },
  16. fontSize: {
  17. type: String,
  18. default: "28rpx",
  19. },
  20. color: {
  21. type: String,
  22. default: "#232323",
  23. },
  24. },
  25. computed: {
  26. getTitleStyle() {
  27. return "font-size:" + this.fontSize + ";"
  28. },
  29. },
  30. data() {
  31. return {
  32. };
  33. }
  34. }
  35. </script>
  36. <style lang="scss" scoped>
  37. .base-title-box {
  38. width: 100%;
  39. height: 80rpx;
  40. display: flex;
  41. flex-direction: row;
  42. align-items: center;
  43. }
  44. .base-title-line {
  45. margin-left: 20rpx;
  46. margin-right: 8rpx;
  47. width: 4rpx;
  48. height: 24rpx;
  49. background: linear-gradient(180deg, #9276FE 0%, rgba(225, 217, 255, 0.85) 93%, rgba(231, 224, 255, 0) 100%);
  50. }
  51. </style>