below.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template>
  2. <div class="below-layout">
  3. <div class="content">
  4. <img :src="a" alt="" />
  5. <p>无法打开页面,请升级或更换浏览器后重新打开</p>
  6. <span>建议使用以下浏览器</span>
  7. <div class="list">
  8. <div v-for="item in items">
  9. <img :src="item.icon" />
  10. <p @click="useClickHandler(item.link)"><img :src="b" /> {{ item.name }}</p>
  11. </div>
  12. </div>
  13. </div>
  14. </div>
  15. </template>
  16. <script lang="ts" setup>
  17. const a = "images/err.png";
  18. const b = "images/download.png";
  19. const items = [
  20. {
  21. name: "Firefox",
  22. icon: "images/ff.png",
  23. link: "http://www.firefox.com.cn/",
  24. },
  25. {
  26. name: "Microsoft Edge",
  27. icon: "images/eg.png",
  28. link: "https://www.microsoft.com/en-us/edge",
  29. },
  30. // {
  31. // icon: "images/safar.png",
  32. // link: "https://www.apple.com/safari/",
  33. // },
  34. {
  35. name: "Chrome",
  36. icon: "images/chrome.png",
  37. link: "https://www.google.com/chrome/",
  38. },
  39. ];
  40. const useClickHandler = (link: string) => {
  41. console.log(link);
  42. window.open(link);
  43. };
  44. </script>
  45. <style lang="scss" scoped>
  46. .below-layout {
  47. position: fixed;
  48. inset: 0;
  49. background: #f7f7f7;
  50. display: flex;
  51. align-items: center;
  52. justify-content: center;
  53. .content {
  54. color: #999;
  55. text-align: center;
  56. > img {
  57. width: 200px;
  58. }
  59. p {
  60. font-size: 16px;
  61. margin: 20px 0;
  62. }
  63. span {
  64. font-size: 14px;
  65. }
  66. }
  67. }
  68. .list {
  69. display: flex;
  70. align-items: center;
  71. justify-content: center;
  72. margin-top: 20px;
  73. p {
  74. color: #999;
  75. cursor: pointer;
  76. display: flex;
  77. align-items: center;
  78. img {
  79. width: 16px;
  80. }
  81. }
  82. > div {
  83. margin: 0 20px;
  84. > img {
  85. width: 70px !important;
  86. }
  87. }
  88. }
  89. </style>