page-nav.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view class="nav-wrap">
  3. <view class="nav-title">
  4. <u--image :showLoading="true" src="https://uview-plus.jiangruyi.com/h5/static/uview/common/logo.png" width="70px"
  5. height="70px" />
  6. <view class="nav-info">
  7. <view class="nav-info__title" @tap="jumpToWx">
  8. <text class="nav-info__title__text">uview-plus3
  9. <!-- #ifdef APP-HARMONY -->
  10. 鸿蒙
  11. <!-- #endif -->
  12. </text>
  13. <!-- #ifdef MP-WEIXIN -->
  14. <!-- uni-app不支持text内部的text组件的tap事件,所以放到外部响应tap -->
  15. <text class="nav-info__title__jump">查看演示</text>
  16. <!-- #endif -->
  17. </view>
  18. <text class="nav-slogan">多平台快速开发的UI框架</text>
  19. </view>
  20. </view>
  21. <text class="nav-desc">{{desc}}</text>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. props: {
  27. desc: String,
  28. title: String,
  29. },
  30. data() {
  31. return {
  32. version: uni.$u.config.v
  33. }
  34. },
  35. methods: {
  36. jumpToWx() {
  37. // #ifdef MP-WEIXIN
  38. // uni.navigateToMiniProgram({
  39. // appId: ''
  40. // })
  41. // #endif
  42. }
  43. },
  44. }
  45. </script>
  46. <style lang="scss" scoped>
  47. .nav-wrap {
  48. padding: 15px;
  49. position: relative;
  50. }
  51. .lang {
  52. position: absolute;
  53. top: 15px;
  54. right: 15px;
  55. }
  56. .nav-title {
  57. /* #ifndef APP-NVUE */
  58. display: flex;
  59. /* #endif */
  60. flex-direction: row;
  61. align-items: center;
  62. justify-content: flex-start;
  63. }
  64. .nav-info {
  65. margin-left: 15px;
  66. &__title {
  67. /* #ifndef APP-NVUE */
  68. display: flex;
  69. /* #endif */
  70. flex-direction: row;
  71. align-items: center;
  72. &__text {
  73. /* #ifndef APP-NVUE */
  74. display: flex;
  75. /* #endif */
  76. color: $u-main-color;
  77. font-size: 25px;
  78. font-weight: bold;
  79. text-align: left;
  80. }
  81. &__jump {
  82. font-size: 12px;
  83. color: $u-primary;
  84. font-weight: normal;
  85. margin-left: 20px;
  86. }
  87. }
  88. }
  89. .logo {
  90. width: 70px;
  91. height: 70px;
  92. /* #ifndef APP-NVUE */
  93. height: auto;
  94. /* #endif */
  95. }
  96. .nav-slogan {
  97. color: $u-tips-color;
  98. font-size: 14px;
  99. }
  100. .nav-desc {
  101. margin-top: 10px;
  102. font-size: 14px;
  103. color: $u-content-color;
  104. line-height: 20px;
  105. }
  106. </style>