Home.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <div
  3. class="home"
  4. >
  5. <img
  6. src="@/assets/images/logo.png"
  7. alt=""
  8. class="logo"
  9. >
  10. <div
  11. class="worthless"
  12. >
  13. <img
  14. src="@/assets/images/home-title.jpg"
  15. alt=""
  16. class="title"
  17. draggable="false"
  18. >
  19. <button
  20. class="begin"
  21. @click="onClickBegin"
  22. />
  23. </div>
  24. </div>
  25. </template>
  26. <script>
  27. export default {
  28. name: 'HomeView',
  29. inject: ['$uaInfo', '$env'],
  30. data() {
  31. return {
  32. }
  33. },
  34. computed: {
  35. ...mapState([
  36. ]),
  37. },
  38. mounted() {
  39. },
  40. unmounted() {
  41. },
  42. methods: {
  43. onClickBegin() {
  44. this.$router.push({
  45. name: 'UnitList',
  46. })
  47. }
  48. },
  49. }
  50. </script>
  51. <style lang="less" scoped>
  52. .home{
  53. width: 100%;
  54. height: 100%;
  55. position: relative;
  56. >.logo{
  57. position: absolute;
  58. top: 35px;
  59. left: 38px;
  60. width: 364px;
  61. z-index: 3;
  62. }
  63. >.worthless{
  64. position: absolute;
  65. left: 0;
  66. top: 0;
  67. width: 100%;
  68. height: 100%;
  69. background-image: url(@/assets/images/home-bg.jpg);
  70. background-size: cover;
  71. background-repeat: no-repeat;
  72. background-position: center center;
  73. >img.title{
  74. position: absolute;
  75. top: 0;
  76. left: 50%;
  77. height: 100%;
  78. transform: translateX(-50%);
  79. }
  80. >button.begin{
  81. position: absolute;
  82. bottom: 58px;
  83. left: 50%;
  84. transform: translateX(-50%);
  85. width: 76px;
  86. height: 79px;
  87. background-image: url(@/assets/images/btn_start.png);
  88. background-size: contain;
  89. background-repeat: no-repeat;
  90. background-position: center center;
  91. }
  92. }
  93. }
  94. </style>