1- <template >
2- <div class =" home" >
3- <div class =" head" >
4- <div class =" location" >
5- <Dropdown >
6- <a href =" javascript:void(0)" >
7- 北京市
8- <Icon type =" ios-arrow-down" ></Icon >
9- </a >
10- <DropdownMenu slot =" list" >
11- <DropdownItem >上海市</DropdownItem >
12- <DropdownItem >天津市</DropdownItem >
13- <DropdownItem >广州市</DropdownItem >
14- </DropdownMenu >
15- </Dropdown >
16- </div >
17- <div class =" text" >首页</div >
18- <div class =" search" >
19- <Icon type =" ios-search" />
20- </div >
21- <!-- <Input search placeholder="搜索..." /> -->
22- </div >
23- <div class =" home-content" >
24- <!-- autoplay -->
25- <div class =" title" style =" border-left : 2px solid #00BCD4 ;" >优选功能</div >
26- <Carousel class =" carouse" style =" display :none ;" :height =" 180" v-model =" value2" loop >
27- <CarouselItem v-for =" (item,i) in carouse" :key =" i" >
28- <img :src =" item.src" />
29- </CarouselItem >
30- </Carousel >
31- <div >
32- <!-- <div class="title">快捷功能</div> -->
33- <div class =" icon-item" >
34- <a class =" item" v-for =" (item,index) in icons" :key =" index" >
35- <!-- <Icon :type="item.icon" /> -->
36- <Avatar :style =" {'background':item.color}" :icon =" item.icon" size =" large" />
37- <br />
38- <span >{{item.name}}</span >
39- </a >
40- </div >
41- <div style =" margin-top : 1rem ;" >
42- <list ></list >
43- </div >
44- </div >
45- </div >
46- </div >
47- <!-- -->
48- </template >
49- <script >
50- import list from " @/../src/components/Community/list.vue" ;
51- export default {
52- components: { list: list },
53- data () {
54- return {
55- icons: [
56- {
57- name: " 热 点" ,
58- path: " /app/home" ,
59- icon: " ios-aperture" ,
60- color: " #FF9800"
61- },
62- {
63- name: " 商 圈" ,
64- path: " /app/home" ,
65- icon: " ios-cart" ,
66- color: " #7dbcee"
67- },
68- {
69- name: " 社 圈" ,
70- path: " /app/home" ,
71- icon: " ios-globe-outline" ,
72- color: " #fa805a"
73- },
74- {
75- name: " 话 题" ,
76- path: " /app/home" ,
77- icon: " ios-contacts" ,
78- color: " rgb(224, 140, 238)"
79- },
80- {
81- name: " 服 务" ,
82- path: " /app/home" ,
83- icon: " ios-appstore" ,
84- color: " rgb(0, 201, 8)"
85- },
86- { name: " 交 友" , path: " /app/home" , icon: " md-cafe" , color: " #fa805a" },
87- {
88- name: " 二 手" ,
89- path: " /app/home" ,
90- icon: " ios-hand" ,
91- color: " rgb(255, 121, 167)"
92- },
93- {
94- name: " 其 他" ,
95- path: " /app/home" ,
96- icon: " ios-ionic" ,
97- color: " #7dbcee"
98- }
99- ],
100- carouse: [
101- {
102- src: " https://imgs-1256993465.cos.ap-chengdu.myqcloud.com/h5/h51.jpg"
103- },
104- {
105- src: " https://imgs-1256993465.cos.ap-chengdu.myqcloud.com/h5/h52.jpg"
106- },
107- {
108- src: " https://imgs-1256993465.cos.ap-chengdu.myqcloud.com/h5/h53.jpg"
109- },
110- {
111- src: " https://imgs-1256993465.cos.ap-chengdu.myqcloud.com/h5/h54.jpg"
112- }
113- ],
114- value2: 0
115- };
116- }
117- };
118- </script >
119- <style lang="less" scoped>
120- .home {
121- background : #f9f8f8 ;
122- height : 100% ;
123- }
124- .home-content {
125- margin-top : 42px ;
126- overflow-y : auto ;
127- }
128- .carouse {
129- height : 180px ;
130- img {
131- height : 100% ;
132- width : 100% ;
133- }
134- }
135- .head {
136- width : 100% ;
137- padding : 0.6rem ;
138- background : white ;
139- display : inline-block ;
140- border-bottom : 1px solid #eee ;
141- top : 0 ;
142- position : fixed ;
143- z-index : 100 ;
144- > div {
145- float : left ;
146- width : 33.3333% ;
147- }
148- .location .ivu-dropdown {
149- top : 5px ;
150- position : relative ;
151- }
152- .text {
153- text-align : center ;
154- font-size : 1rem ;
155- color : forestgreen ;
156- }
157- .search {
158- text-align : right ;
159- font-size : 1.1rem ;
160- color : forestgreen ;
161- }
162- }
163- .title {
164- padding : 0.6rem ;
165- }
166- .icon-item {
167- width : 100% ;
168- display : inline-block ;
169- position : relative ;
170- background : white ;
171- /* height: 3.7rem; */
172- /* background: red; */
173- border : 1px solid #eee ;
174- // padding: 1rem 0;
175- // margin-top: 1rem;
176- > a {
177- float : left ;
178- width : 25% ;
179- padding : 0.6rem 0.3rem ;
180- text-align : center ;
181- color : #7c7979 ;
182- border : 1px solid #f1eded ;
183- > i {
184- font-size : 1.8rem ;
185- }
186- }
187- }
188- </style >
189- <style scoped>
190- .head >>> input {
191- border-radius : 20px ;
192- }
193- </style >
0 commit comments