index.nvue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <view class="nvue">
  3. <mainView ref="mainView" />
  4. </view>
  5. </template>
  6. <script>
  7. import mainView from "./components/main.vue";
  8. export default {
  9. components: {
  10. mainView,
  11. },
  12. onLoad(options) {
  13. let that = this;
  14. that.$nextTick(() => {
  15. that.$refs.mainView.pageOnLoad(options);
  16. });
  17. },
  18. onBackPress(e) {
  19. if (e.from == "navigateBack") {
  20. return false;
  21. }
  22. this.$refs.mainView.hide();
  23. return true;
  24. },
  25. };
  26. </script>
  27. <style lang="scss" scoped>
  28. .nvue {
  29. width: 750rpx;
  30. /* #ifndef APP-PLUS */
  31. height: 100vh;
  32. /* #endif */
  33. /* #ifdef APP-PLUS */
  34. flex: 1;
  35. /* #endif */
  36. }
  37. /* #ifdef H5 */
  38. @media only screen and (pointer: fine) {
  39. .showScrollbars {
  40. ::-webkit-scrollbar-thumb:horizontal {
  41. /*水平滚动条的样式*/
  42. width: 4px;
  43. background-color: rgba(0, 0, 0, 0.1);
  44. -webkit-border-radius: 6px;
  45. }
  46. ::-webkit-scrollbar-track-piece {
  47. background-color: #fff;
  48. /*滚动条的背景颜色*/
  49. -webkit-border-radius: 0;
  50. /*滚动条的圆角宽度*/
  51. }
  52. ::-webkit-scrollbar {
  53. width: 10px;
  54. /*滚动条的宽度*/
  55. height: 5px;
  56. /*滚动条的高度*/
  57. display: block !important;
  58. }
  59. ::-webkit-scrollbar-thumb:vertical {
  60. display: none;
  61. }
  62. ::-webkit-scrollbar-thumb:hover {
  63. /*滚动条的hover样式*/
  64. height: 50px;
  65. background-color: rgba(0, 0, 0, 0.25);
  66. -webkit-border-radius: 4px;
  67. }
  68. }
  69. }
  70. /* #endif */
  71. </style>