index.nvue
1.53 KB
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
74
75
76
77
78
<template>
<view class="nvue">
<mainView ref="mainView" />
</view>
</template>
<script>
import mainView from "./components/main.vue";
export default {
components: {
mainView,
},
onLoad(options) {
let that = this;
that.$nextTick(() => {
that.$refs.mainView.pageOnLoad(options);
});
},
onBackPress(e) {
if (e.from == "navigateBack") {
return false;
}
this.$refs.mainView.hide();
return true;
},
};
</script>
<style lang="scss" scoped>
.nvue {
width: 750rpx;
/* #ifndef APP-PLUS */
height: 100vh;
/* #endif */
/* #ifdef APP-PLUS */
flex: 1;
/* #endif */
}
/* #ifdef H5 */
@media only screen and (pointer: fine) {
.showScrollbars {
::-webkit-scrollbar-thumb:horizontal {
/*水平滚动条的样式*/
width: 4px;
background-color: rgba(0, 0, 0, 0.1);
-webkit-border-radius: 6px;
}
::-webkit-scrollbar-track-piece {
background-color: #fff;
/*滚动条的背景颜色*/
-webkit-border-radius: 0;
/*滚动条的圆角宽度*/
}
::-webkit-scrollbar {
width: 10px;
/*滚动条的宽度*/
height: 5px;
/*滚动条的高度*/
// ✅ UVUE 不支持 display: block,注释掉
// display: block !important;
}
::-webkit-scrollbar-thumb:vertical {
display: none;
}
::-webkit-scrollbar-thumb:hover {
/*滚动条的hover样式*/
height: 50px;
background-color: rgba(0, 0, 0, 0.25);
-webkit-border-radius: 4px;
}
}
}
/* #endif */
</style>