25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

46 lines
777 B

  1. <template>
  2. <view class="cu-form-group">
  3. <view class="title">
  4. <slot name="title">
  5. <text v-if="required" class="lr-required">*</text>
  6. {{ title }}
  7. </slot>
  8. </view>
  9. <view @click="itemClick" :class="[arrow ? 'form-item-arrow' : 'form-item-noarrow']" class="action form-item-action">
  10. <view class="picker"><slot></slot></view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. name: 'l-label',
  17. props: {
  18. title: {},
  19. arrow: {},
  20. required: {}
  21. },
  22. methods: {
  23. itemClick(e) {
  24. this.$emit('click', e)
  25. }
  26. }
  27. }
  28. </script>
  29. <style>
  30. .form-item-action {
  31. flex: 1;
  32. padding-right: 40rpx;
  33. overflow: hidden;
  34. position: relative;
  35. text-align: right;
  36. }
  37. .form-item-noarrow {
  38. padding-right: 0;
  39. }
  40. </style>