pop.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <view>
  3. <view class="title">
  4. <u-icon name="close" @click="close()"></u-icon>
  5. <view class="font-thirty-two font-color3" style="margin-left: 180rpx;">
  6. 原因说明
  7. </view>
  8. </view>
  9. <view class="border">
  10. <view class="font-twenty font-color3" style="margin: 20rpx 0 10rpx;">
  11. 原因
  12. </view>
  13. <textarea value="" placeholder="请输入原因" class="area" v-model="remark" />
  14. </view>
  15. <button type="default" class="btn" @click="submit">确认</button>
  16. <u-toast ref="uToast" />
  17. </view>
  18. </template>
  19. <script>
  20. export default{
  21. data(){
  22. return{
  23. remark:'',
  24. type: null
  25. }
  26. },
  27. methods:{
  28. show(type){
  29. this.type = type;
  30. },
  31. close(){
  32. this.remark = '';
  33. this.$emit('close')
  34. },
  35. submit(){
  36. if(this.type === '不通过'){
  37. if(this.remark === ''){
  38. this.$refs.uToast.show({
  39. title: '请输入原因!',
  40. type: 'default',
  41. })
  42. return
  43. }else{
  44. this.$emit('noPass', this.remark);
  45. this.$emit('close');
  46. this.remark = '';
  47. }
  48. }else{
  49. this.$emit('noPass', this.remark);
  50. this.$emit('close');
  51. this.remark = '';
  52. }
  53. }
  54. }
  55. }
  56. </script>
  57. <style lang="scss" scoped>
  58. .title {
  59. display: flex;
  60. align-items: center;
  61. text-align: center;
  62. .close {
  63. width: 50rpx;
  64. height: 50rpx;
  65. }
  66. }
  67. .border {
  68. border: 2rpx #E0E0E0 solid;
  69. border-left: none;
  70. border-right: none;
  71. margin: 30rpx 0;
  72. .area {
  73. height: 200rpx;
  74. }
  75. }
  76. .btn {
  77. width: 560rpx;
  78. margin: 0 auto;
  79. color: #ffffff;
  80. background: #2E4F1C;
  81. border-radius: 48rpx;
  82. }
  83. </style>