Cookbook: a CRUD page

Everything from the other pages in the shape real screens have: a searchable paginated table, one form for create and edit in a slideover, delete with confirmation, server validation errors under the inputs, toasts for the outcome.

How the pieces fit

  1. loaders/users.ts declares the resource once; the page only calls it.
  2. The table renders users.fetch ; its events call fetchPageChange and fetchSearch .
  3. The form does not know about the API: submit calls addRun or updateRun .
  4. useWatchTrue on each status closes the form, shows a toast and refreshes the list.
  5. Try an email that exists ( [email protected] ) to see a server error land on the field.

Users

examples/cookbook/Crud.vue

0 จากทั้งหมด 0

NameEmailRoleSalaryStatus

ไม่พบข้อมูล!

0 จากทั้งหมด 0