hundredWebSite.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  1. <template>
  2. <div class="hundredWebSite">
  3. <div class="topNavList">
  4. <div class="topNavItem">
  5. <NuxtLink href="#">全部</NuxtLink>
  6. </div>
  7. <div class="topNavItem">
  8. <NuxtLink href="#">法制调研类</NuxtLink>
  9. </div>
  10. <div class="topNavItem">
  11. <NuxtLink href="#">资讯信息类</NuxtLink>
  12. </div>
  13. <div class="topNavItem">
  14. <NuxtLink href="#">舆情测控类</NuxtLink>
  15. </div>
  16. <div class="topNavItem">
  17. <NuxtLink href="#">发展促进类</NuxtLink>
  18. </div>
  19. </div>
  20. <div class="webSiteList">
  21. <div class="webSiteItem" v-for="item in 21">
  22. <NuxtLink href="">
  23. <span>法制资讯网</span>
  24. <span>http://fzzxw.org.cn</span>
  25. </NuxtLink>
  26. </div>
  27. </div>
  28. <!-- 分页器 -->
  29. <div class="pagination pagination_phone_none" v-if="total > 0">
  30. <el-pagination size="small" background layout="total, prev, pager, next" :total="total" class="mt-4"
  31. :page-size="pageSize" :current-page="pageNum" prev-text="上一页" next-text="下一页"
  32. @current-change="changePage" />
  33. </div>
  34. <div class="pagination pagination_pc_none" v-if="total > 0">
  35. <el-pagination pager-count="5" size="small" background layout="pager" :total="total" class="mt-4"
  36. :page-size="pageSize" :current-page="pageNum" @current-change="changePage" />
  37. </div>
  38. </div>
  39. </template>
  40. <script setup>
  41. import { ref, onMounted } from 'vue'
  42. import { ElPagination } from 'element-plus'
  43. // 分页器
  44. let pageNum = ref(1);
  45. let total = ref(1);
  46. let pageSize = ref(10);
  47. // 分页器切换页码
  48. const changePage = (val) => {
  49. pageNum.value = val;
  50. }
  51. </script>
  52. <style lang="less" scoped>
  53. @media screen and (min-width: 1401px) {
  54. .hundredWebSite {
  55. font-family: '微软雅黑', Microsoft YaHei;
  56. .topNavList {
  57. width: 100%;
  58. height: auto;
  59. overflow: hidden;
  60. padding: 20PX 0;
  61. border-bottom: 5PX solid #ccc;
  62. box-sizing: border-box;
  63. display: flex;
  64. .topNavItem {
  65. width: 16%;
  66. height: 40PX;
  67. line-height: 38PX;
  68. overflow: hidden;
  69. text-align: center;
  70. margin: 0 2%;
  71. border: 1PX solid #ccc;
  72. border-radius: 10PX;
  73. a {
  74. font-size: 20PX;
  75. color: #333;
  76. font-weight: bold;
  77. display: block;
  78. width: 100%;
  79. }
  80. &:first-child {
  81. border: 1PX solid #036af7;
  82. color: #036af7;
  83. a {
  84. color: #036af7;
  85. }
  86. }
  87. &:hover {
  88. a {
  89. text-decoration: underline;
  90. }
  91. }
  92. }
  93. }
  94. .webSiteList {
  95. width: 100%;
  96. height: auto;
  97. overflow: hidden;
  98. padding: 20PX 0;
  99. box-sizing: border-box;
  100. display: flex;
  101. flex-wrap: wrap;
  102. justify-content: space-between;
  103. .webSiteItem {
  104. width: 23%;
  105. height: auto;
  106. overflow: hidden;
  107. border: 1PX solid #ccc;
  108. border-radius: 10PX;
  109. text-align: center;
  110. margin: 15PX 1%;
  111. padding: 10PX 0;
  112. box-sizing: border-box;
  113. a {
  114. margin: 10PX 0;
  115. span {
  116. display: block;
  117. width: 100%;
  118. height: 25PX;
  119. line-height: 25PX;
  120. overflow: hidden;
  121. font-size: 16PX;
  122. color: #333;
  123. text-align: center;
  124. padding: 5PX 0;
  125. }
  126. }
  127. &:hover {
  128. border: 1PX solid #036af7;
  129. a {
  130. text-decoration: underline;
  131. text-decoration-color: #666;
  132. span {
  133. color: #036af7;
  134. }
  135. }
  136. }
  137. }
  138. }
  139. // 分页器
  140. .pagination {
  141. width: 100%;
  142. height: 34PX;
  143. margin-left: 141PX;
  144. display: flex;
  145. justify-content: center;
  146. margin: 20PX 0;
  147. padding: 10PX 0;
  148. .el-pagination::v-deep {
  149. font-size: 12px;
  150. }
  151. // 鼠标移入后字体颜色
  152. .el-pagination::v-deep :hover {
  153. color: #1aa0f7;
  154. }
  155. .el-pagination.is-background::v-deep .btn-next,
  156. .el-pagination.is-background::v-deep .btn-prev {
  157. width: 70PX;
  158. height: 34PX;
  159. margin: 0PX 10PX;
  160. border-radius: 4PX;
  161. }
  162. .el-pagination.is-background::v-deep .el-pager li {
  163. margin: 0PX 10PX;
  164. width: 38PX;
  165. height: 34PX;
  166. border-radius: 4PX;
  167. }
  168. .el-pagination.is-background::v-deep .btn-next.is-active,
  169. .el-pagination.is-background::v-deep .btn-prev.is-active,
  170. .el-pagination.is-background::v-deep .el-pager li.is-active {
  171. background-color: #1aa0f7;
  172. color: #fff;
  173. }
  174. }
  175. .pagination_pc_none {
  176. display: none;
  177. }
  178. }
  179. }
  180. @media screen and (min-width: 801px) and (max-width: 1400px) {
  181. .hundredWebSite {
  182. font-family: '微软雅黑', Microsoft YaHei;
  183. .topNavList {
  184. width: 100%;
  185. height: auto;
  186. overflow: hidden;
  187. padding: 20PX 0;
  188. border-bottom: 5PX solid #ccc;
  189. box-sizing: border-box;
  190. display: flex;
  191. .topNavItem {
  192. width: 16%;
  193. height: 40PX;
  194. line-height: 38PX;
  195. overflow: hidden;
  196. text-align: center;
  197. margin: 0 2%;
  198. border: 1PX solid #ccc;
  199. border-radius: 10PX;
  200. a {
  201. font-size: 20PX;
  202. color: #333;
  203. font-weight: bold;
  204. display: block;
  205. width: 100%;
  206. }
  207. &:first-child {
  208. border: 1PX solid #036af7;
  209. color: #036af7;
  210. a {
  211. color: #036af7;
  212. }
  213. }
  214. &:hover {
  215. a {
  216. text-decoration: underline;
  217. }
  218. }
  219. }
  220. }
  221. .webSiteList {
  222. width: 100%;
  223. height: auto;
  224. overflow: hidden;
  225. padding: 20PX 0;
  226. box-sizing: border-box;
  227. display: flex;
  228. flex-wrap: wrap;
  229. justify-content: flex-start;
  230. .webSiteItem {
  231. height: auto;
  232. overflow: hidden;
  233. border: 1PX solid #ccc;
  234. border-radius: 10PX;
  235. text-align: center;
  236. margin: 15PX 1%;
  237. padding: 10PX 25PX;
  238. box-sizing: border-box;
  239. a {
  240. margin: 10PX 0;
  241. span {
  242. display: block;
  243. width: 100%;
  244. height: 25PX;
  245. line-height: 25PX;
  246. overflow: hidden;
  247. font-size: 16PX;
  248. color: #333;
  249. text-align: center;
  250. padding: 5PX 0;
  251. }
  252. }
  253. &:hover {
  254. border: 1PX solid #036af7;
  255. a {
  256. text-decoration: underline;
  257. text-decoration-color: #666;
  258. span {
  259. color: #036af7;
  260. }
  261. }
  262. }
  263. }
  264. }
  265. // 分页器
  266. .pagination {
  267. width: 100%;
  268. height: 34PX;
  269. margin-left: 141PX;
  270. display: flex;
  271. justify-content: center;
  272. margin: 20PX 0;
  273. padding: 10PX 0;
  274. .el-pagination::v-deep {
  275. font-size: 12px;
  276. }
  277. // 鼠标移入后字体颜色
  278. .el-pagination::v-deep :hover {
  279. color: #1aa0f7;
  280. }
  281. .el-pagination.is-background::v-deep .btn-next,
  282. .el-pagination.is-background::v-deep .btn-prev {
  283. width: 70PX;
  284. height: 34PX;
  285. margin: 0PX 10PX;
  286. border-radius: 4PX;
  287. }
  288. .el-pagination.is-background::v-deep .el-pager li {
  289. margin: 0PX 10PX;
  290. width: 38PX;
  291. height: 34PX;
  292. border-radius: 4PX;
  293. }
  294. .el-pagination.is-background::v-deep .btn-next.is-active,
  295. .el-pagination.is-background::v-deep .btn-prev.is-active,
  296. .el-pagination.is-background::v-deep .el-pager li.is-active {
  297. background-color: #1aa0f7;
  298. color: #fff;
  299. }
  300. }
  301. .pagination_pc_none {
  302. display: none;
  303. }
  304. }
  305. }
  306. @media screen and (max-width: 800px) {
  307. .hundredWebSite {
  308. font-family: '微软雅黑', Microsoft YaHei;
  309. .topNavList {
  310. width: 100%;
  311. height: auto;
  312. overflow: hidden;
  313. padding: 20px 0;
  314. border-bottom: 10px solid #ccc;
  315. box-sizing: border-box;
  316. display: flex;
  317. .topNavItem {
  318. width: 16%;
  319. height: 80px;
  320. line-height: 80px;
  321. overflow: hidden;
  322. text-align: center;
  323. margin: 0 2%;
  324. border: 2px solid #ccc;
  325. border-radius: 20px;
  326. a {
  327. font-size: 40px;
  328. color: #333;
  329. font-weight: bold;
  330. display: block;
  331. width: 100%;
  332. }
  333. &:first-child {
  334. border: 2px solid #036af7;
  335. color: #036af7;
  336. a {
  337. color: #036af7;
  338. }
  339. }
  340. &:active {
  341. a {
  342. text-decoration: underline;
  343. }
  344. }
  345. }
  346. }
  347. .webSiteList {
  348. width: 100%;
  349. height: auto;
  350. overflow: hidden;
  351. padding: 20px 0;
  352. box-sizing: border-box;
  353. display: flex;
  354. flex-wrap: wrap;
  355. justify-content: space-between;
  356. .webSiteItem {
  357. width: 100%;
  358. height: auto;
  359. overflow: hidden;
  360. border: 2px solid #ccc;
  361. border-radius: 20px;
  362. text-align: center;
  363. margin: 15px 1%;
  364. padding: 10px 0;
  365. box-sizing: border-box;
  366. a {
  367. margin: 20px 0;
  368. span {
  369. display: block;
  370. width: 100%;
  371. height: 50px;
  372. line-height: 50px;
  373. overflow: hidden;
  374. font-size: 32px;
  375. color: #333;
  376. text-align: center;
  377. padding: 10px 0;
  378. }
  379. }
  380. &:active {
  381. border: 1PX solid #036af7;
  382. a {
  383. text-decoration: underline;
  384. text-decoration-color: #666;
  385. span {
  386. color: #036af7;
  387. }
  388. }
  389. }
  390. }
  391. }
  392. // 分页器
  393. .pagination {
  394. width: 100%;
  395. height: 68px;
  396. margin-left: 282px;
  397. display: flex;
  398. justify-content: center;
  399. margin: 40px 0;
  400. // 鼠标移入后字体颜色
  401. .el-pagination::v-deep :hover {
  402. color: #1aa0f7;
  403. }
  404. .el-pagination.is-background::v-deep .btn-next,
  405. .el-pagination.is-background::v-deep .btn-prev {
  406. width: 140px;
  407. height: 68px;
  408. margin: 0px 20px;
  409. border-radius: 8px;
  410. }
  411. .el-pagination.is-background::v-deep .el-pager li {
  412. margin: 0px 20px;
  413. width: 68px;
  414. height: 68px;
  415. border-radius: 8px;
  416. font-size: 28px;
  417. }
  418. .el-pagination.is-background::v-deep .btn-next.is-active,
  419. .el-pagination.is-background::v-deep .btn-prev.is-active,
  420. .el-pagination.is-background::v-deep .el-pager li.is-active {
  421. background-color: #1aa0f7;
  422. color: #fff;
  423. }
  424. }
  425. .pagination_phone_none {
  426. display: none;
  427. }
  428. }
  429. }
  430. </style>