<template>
<!
‐‐
编写页面静态部分,即view部分
‐‐
>
测试页面显示
...
</template>
<script>
/
*
编写页面静态部分,即model及vm部分。
*
/
</script>
<style>
/
*
编写页面样式,不是必须
*
/
</style>
import Home from
'
@/module/home/page/home.vue
'
;
import page_list from
'
@/module/cms/page/page_list.vue
'
;
export default [{
path:
'
/cms
'
,
component: Home,
name:
'
CMS内容管理
'
,
hidden: false,
children:[
{path:
'
/cms/page/list
'
,name:
'
页面列表
'
,component: page_list,hidden:false}
]
}
]
// // 导入路由规则
import HomeRouter from
'
@/module/home/router
'
import CmsRouter from
'
@/module/cms/router
'
// 合并路由规则
concat(HomeRouter)
concat(CmsRouter)
<template>
<div>
<!
‐‐
相当于编写html的内容
‐‐
>
<el
‐
table
:data
=
"
tableData
"
stripe
style
=
"
width: 100%
"
>
<el
‐
table
‐
column
prop
=
"
date
"
label=
"
日期
"
width=
"
180
"
>
</el
‐
table
‐
column>
<el
‐
table
‐
column
prop
=
"
name
"
label=
"
姓名
"
width=
"
180
"
>
</el
‐
table
‐
column>
<el
‐
table
‐
column
prop
=
"
address
"
label=
"
地址
"
>
</el
‐
table
‐
column>
</el
‐
table>
</div>
</template>
<script>
//填写js代码,实现VM的功能,创建vue实例
export default {
data() {
return {
tableData: [{
date:
'
2016
‐
05
‐
02
'
,
name:
'
王小虎
'
,
address:
'
上海市普陀区金沙江路 1518 弄
'
}, {
date:
'
2016
‐
05
‐
04
'
,
name:
'
王小虎
'
,
address:
'
上海市普陀区金沙江路 1517 弄
'
}, {
date:
'
2016
‐
05
‐
01
'
,
name:
'
王小虎
'
,
address:
'
上海市普陀区金沙江路 1519 弄
'
}, {
date:
'
2016
‐
05
‐
03
'
,
name:
'
王小虎
'
,
address:
'
上海市普陀区金沙江路 1516 弄
'
}]
}
}
}
</script>
<style>
/
*
css样式
*
/
</style>
<template>
<div>
<el
‐
button type
=
"
primary
"
v
‐
on:click=
"
query
"
size
=
"
small
"
>查询</el
‐
button>
<el
‐
table
:data
=
"
list
"
stripe
style
=
"
width: 100%
"
>
<el
‐
table
‐
column type
=
"
index
"
width=
"
60
"
>
</el
‐
table
‐
column>
<el
‐
table
‐
column prop
=
"
pageName
"
label=
"
页面名称
"
width=
"
120
"
>
</el
‐
table
‐
column>
<el
‐
table
‐
column prop
=
"
pageAliase
"
label=
"
别名
"
width=
"
120
"
>
</el
‐
table
‐
column>
<el
‐
table
‐
column prop
=
"
pageType
"
label=
"
页面类型
"
width=
"
150
"
>
</el
‐
table
‐
column>
<el
‐
table
‐
column prop
=
"
pageWebPath
"
label=
"
访问路径
"
width=
"
250
"
>
</el
‐
table
‐
column>
<el
‐
table
‐
column prop
=
"
pagePhysicalPath
"
label=
"
物理路径
"
width=
"
250
"
>
</el
‐
table
‐
column>
<el
‐
table
‐
column prop
=
"
pageCreateTime
"
label=
"
创建时间
"
width=
"
180
"
>
</el
‐
table
‐
column>
</el
‐
table>
<el
‐
pagination
layout
=
"
prev, pager, next
"
:page
‐
size
=
"
this.
params.size
"
v
‐
on:current
‐
change
=
"
changePage
"
:total=
"
total
"
:current
‐
page
=
"
this.
params.
page
"
style
=
"
float:right;
"
>
</el
‐
pagination>
</div>
</template>
<script>
export default {
data() {
return {
list:[],
total:50,
params:{
page:1,//页码
size:2//每页显示个数
}
}
},
methods:{
//分页查询
changePage:function () {
this.
query()
},
//查询
query:function () {
alert(
"
查询
"
)
}
}
}
</script>
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |