zp-page-list.vue
1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!--
* @Descripttion:
* @Author: givon.chen
* @Date: 2020-05-07 21:05:06
* @LastEditTime: 2020-06-29 12:09:31
-->
<template>
<zp-page>
<!-- 页面标题 -->
<template v-slot:header v-if="!hideHeader">
<zp-page-header :back="back" @back="back && $emit('back')">
<slot name="header">{{ header }}</slot>
</zp-page-header>
</template>
<!-- 搜索框 -->
<div class="zp-page-filter" v-if="this.$slots['filter']">
<slot name="filter"></slot>
</div>
<!-- 搜索框按钮组 -->
<div class="zp-search-button" v-if="this.$slots['button']">
<slot name="button"></slot>
</div>
<!-- 列表、分页 -->
<div class="zp-page-list">
<slot name="list"></slot>
</div>
</zp-page>
</template>
<script>
import zpPage from "./zp-page";
import zpPageHeader from "./zp-page-header";
export default {
name: "zpPageList",
components: {
zpPage,
zpPageHeader,
},
props: {
back: {
type: Boolean,
default: false,
},
header: {
type: String,
default: "",
},
hideHeader: {
type: Boolean,
default: false,
},
},
created() {},
methods: {},
};
</script>
<style lang="less" scope>
.zp-search-button {
padding-bottom: 20px;
padding-top: 0;
.el-button {
border-radius: 1px;
width: 100px !important;
}
}
.el-table {
th {
font-size: 14px;
}
td {
font-size: 13px;
}
.el-button--text {
padding-top: 0;
padding-bottom: 0;
height: 18px;
line-height: 18px;
font-size: 13px;
border: 0 none;
span {
vertical-align: top;
display: inline-block;
line-height: 18px;
}
}
}
.el-pagination {
padding-bottom: 0 !important;
margin-top: 24px;
}
.el-pagination__sizes {
.el-select {
.el-input {
.el-input__inner {
padding-left: 0 !important;
}
}
}
}
</style>