index.vue 820 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <v-form
  3. ref="form"
  4. v-model="valid"
  5. lazy-validation
  6. @submit.prevent="createAdsItem"
  7. >
  8. <v-text-field
  9. v-model="adsSection.section_code"
  10. label="section_code"
  11. required
  12. ></v-text-field>
  13. <v-text-field
  14. v-model="adsSection.display_name"
  15. label="display_name"
  16. required
  17. ></v-text-field>
  18. <v-btn type="submit"> submit </v-btn>
  19. </v-form>
  20. </template>
  21. <script>
  22. export default {
  23. layout: "admin",
  24. data() {
  25. return {
  26. adsSection: {
  27. display_name: "",
  28. section_code: "",
  29. },
  30. };
  31. },
  32. methods: {
  33. async createAdsItem({ $axios }) {
  34. let response = await this.$axios.$post(
  35. "/authorized/admin/advertising/sections/create",
  36. this.adsSection
  37. );
  38. },
  39. },
  40. };
  41. </script>
  42. <style>
  43. </style>