1, into the page, the page information acquisition request to the server by a hook method, and assigned to the object data model
2, the page information by displaying data in a form bound
3, the user modification information click "Submit" edit page information request to the interface server
3.3. 3 modify page
3.3.3.1 write page_edit page
to modify the layout of pages with add pages, add pages can copy, modify, add page basis.
Written below page content:
1, write page_edit.vue
page layout with add pages, a little.
2, configure the routing
enter the edit page of incoming pageId
import page_edit from '@/module/cms/page/page_edit.vue';
{ path: '/cms/page/edit/:pageId', name:'修改页面',component: page_edit,hidden:true},
Provide good information oage_edi.vue
copied to the project inside
the Modify button
performs a modification submitted by the method
taken in the hook function and parameter query
We first need to open the edit page
In the table list is also modified to add a column
to get the data is the data of this line, so there is the corresponding page. From the page you can get in a line of data page.row
information on this line if you want to add a column, read out. Then define a template in this way slot. page is arbitrarily designated
a method of modifying the definition of
Route definition page
By url parameter passing, colon pageId
we finally opened this way
The method defined distal api
Click to enter the edit page
modify data on the page is loaded out
now routed through the url address parameter passing
it to go through params.pageId this value
if you define where the route is abc
then the value of the place that is abc