page-nav.vue 1.9 KB

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