平安校园
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

handlingSuggestions.vue 1.8 KiB

hace 2 meses
hace 2 meses
hace 2 meses
hace 2 meses
hace 2 meses
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <view class="handlingSuggestions">
  3. <view class="formBox">
  4. <u-form :model="form" ref="uForm" labelPosition="top" labelWidth="100">
  5. <u-form-item label="处理意见" prop="remark" required>
  6. <u--textarea v-model="form.remark" placeholder="请输入处理意见"></u--textarea>
  7. </u-form-item>
  8. </u-form>
  9. </view>
  10. <view class="btn">
  11. <u-button shape="circle" type="primary" @click="submit">确定</u-button>
  12. <u-button style="margin-top: 30rpx;" shape="circle" :plain="true" :hairline="true">取消</u-button>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. data() {
  19. return {
  20. form: {
  21. remark: '',
  22. },
  23. rules: {
  24. remark: [{
  25. required: true,
  26. message: '请输入处理意见',
  27. // 可以单个或者同时写两个触发验证方式
  28. trigger: 'blur,change'
  29. }]
  30. }
  31. }
  32. },
  33. methods: {
  34. submit() {
  35. uni.navigateTo({
  36. url: '/pages/earlyWarning/processingResults'
  37. });
  38. this.$refs.uForm.validate(valid => {
  39. if (valid) {
  40. console.log('验证通过');
  41. } else {
  42. console.log('验证失败');
  43. }
  44. });
  45. }
  46. },
  47. onReady() {
  48. this.$refs.uForm.setRules(this.rules);
  49. },
  50. }
  51. </script>
  52. <style lang="scss" scoped>
  53. .handlingSuggestions {
  54. height: 100%;
  55. position: relative;
  56. .formBox {
  57. background: #fff;
  58. padding: 20rpx 30rpx;
  59. box-sizing: border-box;
  60. ::v-deep .u-form-item__body__left__content__label{
  61. margin-left: 8rpx!important;
  62. }
  63. ::v-deep .u-form-item__body__right{
  64. margin-top: 24rpx!important;
  65. }
  66. }
  67. .btn {
  68. width: 100%;
  69. position: absolute;
  70. bottom: 50rpx;
  71. padding: 20rpx 30rpx;
  72. box-sizing: border-box;
  73. .u-button--primary {
  74. background: #2388FF;
  75. }
  76. .u-button {
  77. height:90rpx;
  78. font-size: 32rpx;
  79. font-weight: 700;
  80. }
  81. }
  82. }
  83. </style>