Skip to content

Commit 0358832

Browse files
committed
样式调整
1 parent a13e93f commit 0358832

File tree

5 files changed

+141
-35
lines changed

5 files changed

+141
-35
lines changed

pnpm-lock.yaml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/config.xml

Lines changed: 62 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,62 @@
1-
<widget id="A6109160055223" version="0.0.1">
2-
<name>vue-apicloud</name>
3-
<description>
4-
Example For APICloud.
5-
</description>
6-
<author email="developer@apicloud.com" href="http://www.apicloud.com">
7-
Developer
8-
</author>
9-
<content src="index.html" />
10-
<access origin="*" />
11-
<preference name="pageBounce" value="false"/>
12-
<preference name="appBackground" value="rgba(0,0,0,0.0)"/>
13-
<preference name="windowBackground" value="rgba(0,0,0,0.0)"/>
14-
<preference name="frameBackgroundColor" value="rgba(0,0,0,0.0)"/>
15-
<preference name="hScrollBarEnabled" value="false"/>
16-
<preference name="vScrollBarEnabled" value="false"/>
17-
<preference name="autoLaunch" value="true"/>
18-
<preference name="fullScreen" value="false"/>
19-
<preference name="autoUpdate" value="true" />
20-
<preference name="smartUpdate" value="false" />
21-
<preference name="debug" value="true"/>
22-
<preference name="statusBarAppearance" value="true"/>
23-
<permission name="readPhoneState" />
24-
<permission name="camera" />
25-
<permission name="record" />
26-
<permission name="location" />
27-
<permission name="fileSystem" />
28-
<permission name="internet" />
29-
<permission name="bootCompleted" />
30-
<permission name="hardware" />
31-
</widget>
1+
<widget id="A6109160055223" version="0.0.1">
2+
3+
<name>vue-apicloud</name>
4+
5+
<description>
6+
7+
Example For APICloud.
8+
9+
</description>
10+
11+
<author email="developer@apicloud.com" href="http://www.apicloud.com">
12+
13+
Developer
14+
15+
</author>
16+
17+
<content src="index.html" />
18+
19+
<access origin="*" />
20+
21+
<preference name="pageBounce" value="false"/>
22+
23+
<preference name="appBackground" value="rgba(0,0,0,0.0)"/>
24+
25+
<preference name="windowBackground" value="rgba(0,0,0,0.0)"/>
26+
27+
<preference name="frameBackgroundColor" value="rgba(0,0,0,0.0)"/>
28+
29+
<preference name="hScrollBarEnabled" value="false"/>
30+
31+
<preference name="vScrollBarEnabled" value="false"/>
32+
33+
<preference name="autoLaunch" value="false"/>
34+
35+
<preference name="fullScreen" value="false"/>
36+
37+
<preference name="autoUpdate" value="true" />
38+
39+
<preference name="smartUpdate" value="false" />
40+
41+
<preference name="debug" value="true"/>
42+
43+
<preference name="statusBarAppearance" value="true"/>
44+
45+
<permission name="readPhoneState" />
46+
47+
<permission name="camera" />
48+
49+
<permission name="record" />
50+
51+
<permission name="location" />
52+
53+
<permission name="fileSystem" />
54+
55+
<permission name="internet" />
56+
57+
<permission name="bootCompleted" />
58+
59+
<permission name="hardware" />
60+
61+
</widget>
62+

src/assets/css/app.css

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,47 @@ textarea {
6161
-webkit-appearance: text;
6262
appearance: text;
6363
}
64+
.border_t,
65+
.border_b {
66+
position: relative;
67+
}
68+
.border_t::before,
69+
.border_b::after {
70+
content: '';
71+
position: absolute;
72+
left: 0;
73+
right: 0;
74+
margin: 0 auto;
75+
height: 1px;
76+
width: 100%;
77+
}
78+
.border_t::before {
79+
top: 0;
80+
background-image: -webkit-gradient(
81+
linear,
82+
left top,
83+
left bottom,
84+
color-stop(60%, rgba(0, 0, 0, 0.05)),
85+
color-stop(0%, rgba(0, 0, 0, 0))
86+
);
87+
background-image: linear-gradient(
88+
to bottom,
89+
rgba(0, 0, 0, 0.05) 60%,
90+
rgba(0, 0, 0, 0) 0%
91+
);
92+
}
93+
.border_b::after {
94+
bottom: 0;
95+
background-image: -webkit-gradient(
96+
linear,
97+
left bottom,
98+
left top,
99+
color-stop(60%, rgba(0, 0, 0, 0.05)),
100+
color-stop(0%, rgba(0, 0, 0, 0))
101+
);
102+
background-image: linear-gradient(
103+
to top,
104+
rgba(0, 0, 0, 0.05) 60%,
105+
rgba(0, 0, 0, 0) 0%
106+
);
107+
}

src/views/main/index.vue

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,21 @@
2424
<van-icon name="chat-o" class="icon" />
2525
</div>
2626
</van-row>
27+
<van-nav-bar
28+
class="border_b"
29+
v-show="active === 'sort'"
30+
:title="'分类'"
31+
:border="false"
32+
/>
33+
<van-nav-bar
34+
class="border_b"
35+
v-show="active === 'cart'"
36+
:title="'购物车'"
37+
:border="false"
38+
/>
2739
</header>
2840
<div class="view"></div>
29-
<div ref="footer">
41+
<div class="border_t" ref="footer">
3042
<van-tabbar
3143
v-model="active"
3244
:route="false"
@@ -96,14 +108,15 @@ const tabbarChange = async (name) => {
96108
})
97109
}
98110
const index = tabbars.findIndex((item) => item.name === name)
111+
await nextTick()
99112
/* DOM更新 */
100113
const item = tabbars[index]
101114
const data = {
102115
name: item.name,
103116
url: item.to,
104117
rect: {
105118
marginLeft: 0,
106-
marginTop: name === 'home' ? header.value.offsetHeight : 0,
119+
marginTop: name === 'user' ? 0 : header.value.offsetHeight,
107120
marginBottom: footer.value.offsetHeight,
108121
marginRight: 0
109122
},
@@ -118,8 +131,15 @@ const tabbarChange = async (name) => {
118131
openFrame(data)
119132
}
120133
onMounted(() => {
121-
console.log(process.env)
122134
window.apiready = () => {
135+
setTimeout(() => {
136+
api.removeLaunchView({
137+
animation: {
138+
type: 'fade',
139+
duration: 300
140+
}
141+
})
142+
}, 2000)
123143
api.setStatusBarStyle({
124144
style: 'dark'
125145
})

src/views/sort/index.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ const list = reactive([
12361236
}
12371237
])
12381238
</script>
1239-
<style scoped>
1239+
<style scoped lang="less">
12401240
.sidebar {
12411241
position: fixed;
12421242
left: 0;
@@ -1246,6 +1246,11 @@ const list = reactive([
12461246
background-color: #fafafa;
12471247
z-index: 1;
12481248
}
1249+
.sort {
1250+
:deep(.van-sidebar-item) {
1251+
padding: 20px 10px;
1252+
}
1253+
}
12491254
.sort_list {
12501255
margin-left: 85px;
12511256
height: 100vh;

0 commit comments

Comments
 (0)