index.vue 771 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <view class="jnpf-group-title" :style="{'text-align':contentPosition}" @click="handleClick()">{{content}}
  3. <u-icon :name="helpMessage? 'question-circle-fill':''" class="u-m-l-10" color="#a0acb7"></u-icon>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. name: 'jnpf-group-title',
  9. props: {
  10. content: {
  11. type: String,
  12. default: ''
  13. },
  14. helpMessage: {
  15. type: String,
  16. default: ''
  17. },
  18. contentPosition: {
  19. type: String,
  20. default: 'left'
  21. },
  22. },
  23. methods: {
  24. handleClick() {
  25. if (!this.helpMessage) return
  26. this.$emit('groupIcon')
  27. }
  28. }
  29. }
  30. </script>
  31. <style lang="scss" scoped>
  32. .jnpf-group-title {
  33. width: 100%;
  34. color: #333333;
  35. font-size: 32rpx;
  36. line-height: 70rpx;
  37. margin: 0;
  38. padding: 0 20rpx;
  39. }
  40. </style>