opinion.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <div class="user-info py-10 px-20 w-full h-full">
  3. <div class="max-w-5xl flex flex-col justify-center">
  4. <div class=" text-xl mb-4 mt-10">意见反馈</div>
  5. <div class=" w-full rounded-xl w-full overflow-hidden">
  6. <div class="px-6 bg-white form">
  7. <div class="row flex justify-between items-start py-6">
  8. <div class="w-40">反馈内容</div>
  9. <el-input type="textarea" resize="none" :autosize="{ minRows: 5, maxRows: 5 }" v-model="form.content"
  10. placeholder="请输入内容"></el-input>
  11. </div>
  12. <div class="flex justify-between items-center py-6">
  13. <div class="w-52"></div>
  14. <div>
  15. <!-- <el-button round @click="showButton = false">取消</el-button> -->
  16. <el-button type="primary" round @click="submitForm">提交</el-button>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. </div>
  23. </template>
  24. <script>
  25. import { addFeedBackApi } from '@/api/user'
  26. export default {
  27. data() {
  28. return {
  29. form: {
  30. content: '',
  31. },
  32. }
  33. },
  34. methods: {
  35. submitForm() {
  36. addFeedBackApi(this.form).then(res => {
  37. this.form = {
  38. content: '',
  39. }
  40. this.$message({
  41. type: 'success',
  42. message: '提交成功!'
  43. });
  44. })
  45. }
  46. }
  47. }
  48. </script>
  49. <style></style>