Home.vue 1.3 KB

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