-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMobileApp.vue
73 lines (67 loc) · 1.5 KB
/
MobileApp.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<template>
<el-container ref="main">
<el-header>
<el-affix>
<mobile-header @showSearch="showSearch" @show-category-search="showCategorySearch"/>
</el-affix>
</el-header>
<el-main>
<router-view />
</el-main>
</el-container>
<Search ref="search" />
<category-search ref="categorySearch" />
</template>
<script lang="ts">
import { defineComponent, } from 'vue'
import MobileHeader from './components/header/mobile/MobileHeader.vue'
import Search from "@/components/search/Search.vue";
import CategorySearch from './components/search/CategorySearch.vue';
export default defineComponent({
components: {
MobileHeader, Search, CategorySearch
},
methods: {
showSearch() {
(this.$refs.search as InstanceType<typeof Search>).show()
},
showCategorySearch() {
(this.$refs.categorySearch as InstanceType<typeof CategorySearch>).show()
},
},
setup() {
},
})
</script>
<style lang="less" scoped>
.el-main {
padding: 0 4px;
}
.el-header {
padding: 0;
height: 40px;
}
body[theme=dark] {
.el-main {
background-color:var(--main-dark-bg-color);
color: var(--main-dark-text-color);
}
.el-header {
background-color:var(--main-dark-bg-color);
color: var(--main-dark-text-color);
}
.header-toggle-button {
.el-button {
box-shadow: 2px 2px 13px #111;
}
}
}
</style>
<style lang="less">
#buildTime {
transition: all .2s;
font-size: 10px!important;
bottom: 2px!important;
right: 2px!important;
}
</style>