pageComponent.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <template>
  2. <page :total="total" :page-size="pageSize" :current="current"
  3. show-elevator v-on:on-change="listenPage"></page>
  4. </template>
  5. <script>
  6. import Page from 'iview/src/components/page'
  7. export default {
  8. props: {
  9. current: {
  10. default: 1
  11. },
  12. total: {
  13. default: 100
  14. },
  15. pageSize: {
  16. default: 10
  17. },
  18. showType: {
  19. default: 'show-elevator'
  20. }
  21. },
  22. methods: {
  23. listenPage: function (changedPage) {
  24. this.$emit('childEvent', changedPage)
  25. }
  26. },
  27. components: {
  28. Page
  29. }
  30. }
  31. </script>
  32. <style>
  33. a {
  34. color: #2d8cf0;
  35. background: 0 0;
  36. text-decoration: none;
  37. outline: 0;
  38. cursor: pointer;
  39. transition: color .2s ease;
  40. }
  41. .ivu-page-item-jump-next, .ivu-page-item-jump-prev, .ivu-page-next, .ivu-page-prev {
  42. display: inline-block;
  43. vertical-align: middle;
  44. min-width: 32px;
  45. height: 32px;
  46. line-height: 30px;
  47. list-style: none;
  48. text-align: center;
  49. cursor: pointer;
  50. color: #666;
  51. font-family: Arial;
  52. border: 1px solid #dddee1;
  53. border-radius: 4px;
  54. transition: all .2s ease-in-out;
  55. }
  56. .ivu-icon {
  57. display: inline-block;
  58. font-family: Ionicons;
  59. speak: none;
  60. font-style: normal;
  61. font-weight: 400;
  62. font-variant: normal;
  63. text-transform: none;
  64. text-rendering: auto;
  65. line-height: 1;
  66. -webkit-font-smoothing: antialiased;
  67. -moz-osx-font-smoothing: grayscale;
  68. }
  69. .ivu-icon-ios-arrow-left{
  70. display: inline-block;
  71. font: normal normal normal 14px/1 FontAwesome;
  72. font-size: inherit;
  73. text-rendering: auto;
  74. -webkit-font-smoothing: antialiased;
  75. -moz-osx-font-smoothing: grayscale;
  76. }
  77. .ivu-icon-ios-arrow-left:before{
  78. content: "\f060";
  79. }
  80. .ivu-icon-ios-arrow-right{
  81. display: inline-block;
  82. font: normal normal normal 14px/1 FontAwesome;
  83. font-size: inherit;
  84. text-rendering: auto;
  85. -webkit-font-smoothing: antialiased;
  86. -moz-osx-font-smoothing: grayscale;
  87. }
  88. .ivu-icon-ios-arrow-right:before{
  89. content: "\f054";
  90. }
  91. .ivu-page-disabled:hover a {
  92. color: #ccc;
  93. cursor: not-allowed;
  94. }
  95. .ivu-page-next{
  96. content: '<';
  97. }
  98. .ivu-page-next, .ivu-page-prev {
  99. background-color: #fff;
  100. }
  101. .ivu-page-next a, .ivu-page-prev a {
  102. color: #666;
  103. font-size: 14px;
  104. }
  105. .ivu-icon {
  106. display: inline-block;
  107. font-family: Ionicons;
  108. speak: none;
  109. font-style: normal;
  110. font-weight: 400;
  111. font-variant: normal;
  112. text-transform: none;
  113. text-rendering: auto;
  114. line-height: 1;
  115. -webkit-font-smoothing: antialiased;
  116. -moz-osx-font-smoothing: grayscale;
  117. }
  118. .ivu-page-item-active {
  119. background-color: #2d8cf0;
  120. border-color: #2d8cf0;
  121. }
  122. .ivu-page-item {
  123. display: inline-block;
  124. vertical-align: middle;
  125. min-width: 32px;
  126. height: 32px;
  127. line-height: 30px;
  128. margin-right: 4px;
  129. text-align: center;
  130. list-style: none;
  131. background-color: #fff;
  132. -webkit-user-select: none;
  133. -moz-user-select: none;
  134. -ms-user-select: none;
  135. user-select: none;
  136. cursor: pointer;
  137. font-family: Arial;
  138. border: 1px solid #dddee1;
  139. border-radius: 4px;
  140. transition: border .2s ease-in-out,color .2s ease-in-out;
  141. }
  142. .ivu-page-item-active a {
  143. color: #fff;
  144. }
  145. .ivu-page-item a {
  146. margin: 0 6px;
  147. text-decoration: none;
  148. color: #495060;
  149. }
  150. .ivu-page-options {
  151. display: inline-block;
  152. vertical-align: middle;
  153. margin-left: 15px;
  154. }
  155. .ivu-page-options-elevator {
  156. display: inline-block;
  157. vertical-align: middle;
  158. height: 32px;
  159. line-height: 32px;
  160. }
  161. .ivu-page-options-elevator input {
  162. display: inline-block;
  163. width: 100%;
  164. height: 32px;
  165. line-height: 1.5;
  166. padding: 4px 7px;
  167. font-size: 12px;
  168. border: 1px solid #dddee1;
  169. color: #495060;
  170. background-color: #fff;
  171. background-image: none;
  172. position: relative;
  173. cursor: text;
  174. transition: border .2s ease-in-out,background .2s ease-in-out,box-shadow .2s ease-in-out;
  175. border-radius: 4px;
  176. margin: 0 8px;
  177. width: 50px;
  178. }
  179. .ivu-page{
  180. display: inline-block;
  181. padding-left: 0;
  182. margin: 20px 0;
  183. border-radius: 4px;
  184. float: right;
  185. }
  186. .ivu-page >li{
  187. margin: 0!important;
  188. }
  189. .ivu-page >li:hover{
  190. color: #23527c;
  191. background-color: #eee;
  192. }
  193. .ivu-page-item-jump-next, .ivu-page-item, .ivu-page-item-jump-prev, .ivu-page-next, .ivu-page-prev {
  194. width: 33.64px;
  195. height: 30.8px!important;
  196. font-family: normal!important;
  197. border: 1px solid #ddd!important;
  198. border-radius: 0px!important;
  199. }
  200. .ivu-page >li >a{
  201. color: #337ab7;
  202. font-size: 12px;
  203. }
  204. .ivu-page-item-active{
  205. background-color: #5078cb!important;
  206. border-color: #5078cb!important;
  207. cursor: default!important;
  208. }
  209. .ivu-page-item-active >a{
  210. color: #fff!important;
  211. cursor: default!important;
  212. }
  213. .ivu-page-options-elevator input {
  214. width: 33.64px!important;
  215. height: 30.8px!important;
  216. text-align: center;
  217. }
  218. </style>