extUI.nvue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <view class="uni-container">
  3. <view class="uni-header-logo">
  4. <image class="uni-header-image" src="/static/extuiIndex.png"></image>
  5. </view>
  6. <view class="uni-hello-text">
  7. <text class="hello-text">以下是uni-app扩展组件示例,更多组件见插件市场:</text>
  8. <u-link class="hello-link" :href="'https://ext.dcloud.net.cn/'" :text="'https://ext.dcloud.net.cn'" :inWhiteList="true"></u-link>
  9. </view>
  10. <view class="uni-panel" v-for="item in lists" :key="item.url">
  11. <view class="uni-panel-h" @click="goDetailPage(item.url)">
  12. <text class="uni-panel-text">{{item.name}}</text>
  13. <text class="uni-panel-icon uni-icon">&#xe470;</text>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. import uLink from "@/components/uLink.vue"
  20. export default {
  21. components: {
  22. uLink
  23. },
  24. data() {
  25. return {
  26. navigateFlag: false,
  27. lists: [{
  28. name: "Badge 数字角标",
  29. url: "badge"
  30. },
  31. {
  32. name: "Card 卡片",
  33. url: "card"
  34. },
  35. {
  36. name: "Collapse 折叠面板",
  37. url: "collapse"
  38. },
  39. {
  40. name: "Combox 组合框",
  41. url: "combox"
  42. },
  43. {
  44. name: "Countdown 倒计时",
  45. url: "countdown"
  46. },
  47. {
  48. name: "Drawer 抽屉",
  49. url: "drawer"
  50. },
  51. {
  52. name: "Fab 悬浮按钮",
  53. url: "fab"
  54. },
  55. {
  56. name: "Fav 收藏按钮",
  57. url: "fav"
  58. },
  59. {
  60. name: "Field 输入框",
  61. url: "field"
  62. },
  63. {
  64. name: "Forms 表单",
  65. url: "forms"
  66. },
  67. {
  68. name: "GoodsNav 商品导航",
  69. url: "goods-nav"
  70. },
  71. {
  72. name: "Grid 宫格",
  73. url: "grid"
  74. },
  75. {
  76. name: "Group 分组",
  77. url: "group"
  78. },
  79. {
  80. name: "Icons 图标",
  81. url: "icons"
  82. },
  83. {
  84. name: "IndexedList 索引列表",
  85. url: "indexed-list"
  86. },
  87. {
  88. name: "Link 超链接",
  89. url: "link"
  90. },
  91. {
  92. name: "List 列表",
  93. url: "list"
  94. },
  95. {
  96. name: "LoadMore 加载更多",
  97. url: "load-more"
  98. },
  99. {
  100. name: "NavBar 自定义导航栏",
  101. url: "nav-bar"
  102. },
  103. // #ifndef QUICKAPP-WEBVIEW
  104. {
  105. name: "NoticeBar 通告栏",
  106. url: "notice-bar"
  107. },
  108. // #endif
  109. {
  110. name: "NumberBox 数字输入框",
  111. url: "number-box"
  112. },
  113. {
  114. name: "Pagination 分页器",
  115. url: "pagination"
  116. },
  117. // #ifndef QUICKAPP-WEBVIEW-HUAWEI
  118. {
  119. name: "PopUp 弹出层",
  120. url: "popup"
  121. },
  122. // #endif
  123. {
  124. name: "Rate 评分",
  125. url: "rate"
  126. },
  127. {
  128. name: "SearchBar 搜索栏",
  129. url: "search-bar"
  130. },
  131. {
  132. name: "SegmentedControl 分段器",
  133. url: "segmented-control"
  134. },
  135. {
  136. name: "Steps 步骤条",
  137. url: "steps"
  138. },
  139. {
  140. name: "SwipeAction 滑动操作",
  141. url: "swipe-action"
  142. },
  143. {
  144. name: "SwiperDot 轮播图指示点",
  145. url: "swiper-dot"
  146. },
  147. {
  148. name: "Tag 标签",
  149. url: "tag"
  150. },
  151. {
  152. name: "Transition 过渡动画",
  153. url: "transition"
  154. },
  155. ]
  156. };
  157. },
  158. onLoad() {},
  159. onReady() {
  160. // #ifdef APP-NVUE
  161. uni.preloadPage({
  162. url: "/pages/extUI/calendar/calendar",
  163. success() {
  164. console.log("preloadPage /pages/extUI/calendar/calendar")
  165. },
  166. fail() {}
  167. })
  168. // #endif
  169. },
  170. onShareAppMessage() {
  171. return {
  172. title: '欢迎体验uni-app',
  173. path: '/pages/tabBar/extUI/extUI'
  174. }
  175. },
  176. onNavigationBarButtonTap(e) {
  177. uni.navigateTo({
  178. url: '/pages/about/about'
  179. });
  180. },
  181. methods: {
  182. goDetailPage(path) {
  183. if (this.navigateFlag) {
  184. return;
  185. }
  186. this.navigateFlag = true;
  187. uni.navigateTo({
  188. url: '/pages/extUI/' + path + '/' + path
  189. });
  190. setTimeout(() => {
  191. this.navigateFlag = false;
  192. }, 200)
  193. }
  194. }
  195. }
  196. </script>
  197. <style>
  198. @import '../../../common/uni-nvue.css';
  199. </style>