Creating the views
With the schema and settings defined we can proceed to the next step which is to create the views responsible for rendering the screens
The standard presentation components are relatively simple and do not need a very extensive implementation.
The suggestion of the structure is to place the views of theCategory
entity of theGeneral
domain within theDashboard
module inside a folder with the path src/views/dashboard/general/category
. After creating this directory we can create the two views that are necessary to maintain the operations of creating, viewing, editing, deleting and searching the records of this entity: CategoryForm.vue
and CategoryTable.vue
. Below we can see examples of implementation of the two.
Thisform
will be responsible for defining the display of the entity's data. It is possible to notice that the Category schema
is imported to configure the component.
The above component is thetable
that will be used to display the records that will be consumed by the service we create. As in theform
, theschema
plays an important role in this component.
Now that we have created thedomain
(and configured), theservice
, theschema
and theviews
, we will create the routes to be able to see the components being displayed.
Last updated
Was this helpful?