input.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <template>
  2. <view class="desc">
  3. <uni-row>
  4. <uni-col :span="labelSize">
  5. <view class="desc" style="font-size: 25rpx;">
  6. {{label}}
  7. </view>
  8. </uni-col>
  9. <uni-col :span="inputSpan">
  10. <view>
  11. <uni-easyinput v-if="!textarea" primaryColor="#37babd" v-model="value" @input="input"
  12. :disabled="disabled">
  13. </uni-easyinput>
  14. <uni-easyinput v-if="textarea" type="textarea" primaryColor="#37babd" v-model="value" @input="input"
  15. :disabled="disabled">
  16. </uni-easyinput>
  17. </view>
  18. </uni-col>
  19. </uni-row>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. name: 'hs-input',
  25. props: {
  26. value: {
  27. Type: String,
  28. default: null
  29. },
  30. label: {
  31. Type: String,
  32. default: ''
  33. },
  34. labelSize: {
  35. Type: Number,
  36. default: 5
  37. },
  38. inputSpan: {
  39. Type: Number,
  40. default: 19
  41. },
  42. disabled: false,
  43. textarea: false
  44. },
  45. data() {
  46. return {
  47. }
  48. },
  49. mounted() {
  50. },
  51. methods: {
  52. input: function(e) {
  53. this.$emit('input', this.value)
  54. },
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .desc {
  60. padding: 10rpx 5rpx;
  61. color: #818181;
  62. font-size: 20rpx;
  63. }
  64. .pickerView {
  65. // align-items: flex-end;
  66. padding: 10rpx 20rpx;
  67. border: 1rpx #eeeeee solid;
  68. }
  69. .pickerText {
  70. font-size: 26rpx;
  71. color: #b1b1b1;
  72. }
  73. </style>