-
+
@@ -25,17 +30,28 @@ export default{
border-radius: 4px;
box-shadow: 0 1px 1px rgba(0,0,0,.05);
header{
- color: #333;
- border-color: #ddd;
- font-size: 18px;
- font-weight: 300;
- letter-spacing: 0.025em;
- height: 66px;
- line-height: 45px;
- padding: 10px 15px;
- border-bottom: 1px solid #eee;
- border-top-left-radius: 3px;
- border-top-right-radius: 3px;
+ position: relative;
+ z-index: 10;
+ >h2{
+ margin: 0;
+ color: #333;
+ border-color: #ddd;
+ font-size: 18px;
+ font-weight: 300;
+ letter-spacing: 0.025em;
+ height: 66px;
+ line-height: 45px;
+ padding: 10px 15px;
+ border-bottom: 1px solid #eee;
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+ }
+ >.header_right{
+ position: absolute;
+ top: 50%;
+ right: 20px;
+ transform: translate(0,-50%);
+ }
}
.body{
padding: 15px;
diff --git a/src/main.js b/src/main.js
index 6bd5439..ade32ee 100644
--- a/src/main.js
+++ b/src/main.js
@@ -3,21 +3,28 @@ import App from './App'
import Element from 'element-ui'
import 'element-ui/lib/theme-default/index.css'
import VueRouter from 'vue-router'
+// import VueI18n from 'vue-i18n'
Vue.use(Element)
Vue.use(VueRouter)
+// Vue.use(VueI18n)
// 引入 view 组件
-import { AnnounceMent } from './views'
+import { AnnounceMent, UserList } from './views'
const router = new VueRouter({
scrollBehavior: () => ({ y: 0 }),
routes: [
{
- path: '/announcement',
- name: 'announcement',
+ path: '/announce_ment',
+ name: 'announce_ment',
component: AnnounceMent
},
- { path: '*', redirect: '/announcement' }
+ {
+ path: '/user_list',
+ name: 'user_list',
+ component: UserList
+ },
+ { path: '*', redirect: '/announce_ment' }
]
})
new Vue(Vue.util.extend({ router }, App)).$mount('#app')
diff --git a/src/views/AnnounceMent.vue b/src/views/AnnounceMent.vue
index de6fb86..0ee6dba 100644
--- a/src/views/AnnounceMent.vue
+++ b/src/views/AnnounceMent.vue
@@ -3,7 +3,7 @@
@@ -132,7 +132,7 @@ export default {
// 切换页码回调
currentChange (page) {
// 清除上一页选择的的多选框
- this.$refs.announceTable.clearSelection()
+ this.$refs.table.clearSelection()
api.getAnnounceList((page - 1) * this.pageSize, this.pageSize).then(res => {
this.announceList = res.data.data.results
})
@@ -157,11 +157,9 @@ export default {
}
},
mounted () {
- api.login('root', '047e09').then(res => {
- api.getAnnounceList(1, this.pageSize).then(res => {
- this.count = res.data.data.count
- this.announceList = res.data.data.results
- })
+ api.getAnnounceList(1, this.pageSize).then(res => {
+ this.count = res.data.data.count
+ this.announceList = res.data.data.results
})
}
}
diff --git a/src/views/index.js b/src/views/index.js
index 3e4b3dc..5d423fa 100644
--- a/src/views/index.js
+++ b/src/views/index.js
@@ -1,5 +1,5 @@
import AnnounceMent from './AnnounceMent.vue'
-
+import UserList from './UserList.vue'
export {
- AnnounceMent
+ AnnounceMent, UserList
}