| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <template>
- <div class="home">
- <div class="btnR" @touchstart="goIndex">
- <p>进 入</p>
- <p>史 馆</p>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: "home",
- components: {},
- data() {
- // 这里存放数据
- return {};
- },
- // 监听属性 类似于data概念
- computed: {},
- // 监控data中的数据变化
- watch: {},
- // 方法集合
- methods: {
- goIndex() {
- this.$router.replace("/index?m=TEST");
- this.$nextTick(() => {
- setTimeout(() => {
- location.reload(true);
- }, 300);
- });
- },
- },
- // 生命周期 - 创建完成(可以访问当前this实例)
- created() {},
- // 生命周期 - 挂载完成(可以访问DOM元素)
- mounted() {},
- beforeCreate() {}, // 生命周期 - 创建之前
- beforeMount() {}, // 生命周期 - 挂载之前
- beforeUpdate() {}, // 生命周期 - 更新之前
- updated() {}, // 生命周期 - 更新之后
- beforeDestroy() {}, // 生命周期 - 销毁之前
- destroyed() {}, // 生命周期 - 销毁完成
- activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
- };
- </script>
- <style lang='less' scoped>
- /deep/.all{
- display: none !important;
- }
- .home {
- position: relative;
- width: 100%;
- height: 100%;
- background: url("../../assets/img/indexBac.png") center center;
- .btnR {
- color: #fff;
- font-size: 18px;
- border-radius: 8px;
- cursor: pointer;
- position: absolute;
- left: 50%;
- bottom: 80px;
- transform: translateX(-50%);
- width: 80px;
- height: 80px;
- background: url('../../assets/img/homeBtn.png');
- background-size: 100% 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
- }
- }
- </style>
|