extUI.nvue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. <template>
  2. <view class="uni-container">
  3. <view v-if="!hasLeftWin" class="uni-header-logo">
  4. <image class="uni-header-image" src="/static/extuiIndex.png"></image>
  5. </view>
  6. <view v-if="!hasLeftWin" 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'"
  9. :inWhiteList="true"></u-link>
  10. </view>
  11. <view :class="{'pc-hide': hideList.indexOf(item.url) !== -1 && hasLeftWin}" class="uni-panel"
  12. v-for="item in lists" :key="item.url">
  13. <view :class="{'left-win-active': leftWinActive === item.url && hasLeftWin}" class="uni-panel-h"
  14. @click="goDetailPage(item.url)">
  15. <text class="uni-panel-text">{{item.name}}</text>
  16. <text class="uni-panel-icon uni-icon">&#xe470;</text>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. props: {
  24. hasLeftWin: {
  25. type: Boolean
  26. },
  27. leftWinActive: {
  28. type: String
  29. }
  30. },
  31. data() {
  32. return {
  33. hideList: [
  34. 'load-more'
  35. ],
  36. lists: [{
  37. name: "uni-badge 数字角标",
  38. url: "badge"
  39. },
  40. {
  41. name: "uni-breadcrumb 面包屑",
  42. url: "breadcrumb"
  43. },
  44. // {
  45. // name: "uni-calendar 日历",
  46. // url: "calendar"
  47. // },
  48. {
  49. name: "uni-card 卡片",
  50. url: "card"
  51. },
  52. {
  53. name: "uni-collapse 折叠面板",
  54. url: "collapse"
  55. },
  56. // #ifndef APP-NVUE
  57. {
  58. name: "uni-combox 组合框",
  59. url: "combox"
  60. },
  61. // #endif
  62. {
  63. name: "uni-countdown 倒计时",
  64. url: "countdown"
  65. },
  66. {
  67. name: "uni-data-checkbox 数据选择器",
  68. url: "data-checkbox"
  69. },
  70. {
  71. name: "uni-data-picker 数据驱动的picker选择器",
  72. url: "data-picker"
  73. },
  74. {
  75. name: "uni-data-select 数据驱动的下拉框",
  76. url: "data-select"
  77. },
  78. {
  79. name: "uni-dateformat 日期格式化",
  80. url: "dateformat"
  81. },
  82. {
  83. name: "uni-datetime-picker 日期选择器",
  84. url: "datetime-picker"
  85. },
  86. {
  87. name: "uni-drawer 抽屉",
  88. url: "drawer"
  89. },
  90. {
  91. name: "uni-easyinput 增强输入框",
  92. url: "easyinput"
  93. },
  94. {
  95. name: "uni-fab 悬浮按钮",
  96. url: "fab"
  97. },
  98. {
  99. name: "uni-fav 收藏按钮",
  100. url: "fav"
  101. },
  102. // #ifndef APP-NVUE
  103. {
  104. name: "uni-file-picker 文件选择上传",
  105. url: "file-picker"
  106. },
  107. // #endif
  108. {
  109. name: "uni-forms 表单",
  110. url: "forms"
  111. },
  112. {
  113. name: "uni-goods-nav 商品导航",
  114. url: "goods-nav"
  115. },
  116. {
  117. name: "uni-grid 宫格",
  118. url: "grid"
  119. },
  120. {
  121. name: "uni-group 分组",
  122. url: "group"
  123. },
  124. {
  125. name: "uni-icons 图标",
  126. url: "icons"
  127. },
  128. {
  129. name: "uni-indexed-list 索引列表",
  130. url: "indexed-list"
  131. },
  132. {
  133. name: "uni-link 超链接",
  134. url: "link"
  135. },
  136. {
  137. name: "uni-list 列表",
  138. url: "list"
  139. },
  140. // #ifndef MP-JD
  141. {
  142. name: "uni-load-more 加载更多",
  143. url: "load-more"
  144. },
  145. // #endif
  146. {
  147. name: "uni-nav-bar 自定义导航栏",
  148. url: "nav-bar"
  149. },
  150. {
  151. name: "uni-notice-bar 通告栏",
  152. url: "notice-bar"
  153. },
  154. {
  155. name: "uni-number-box 数字输入框",
  156. url: "number-box"
  157. },
  158. {
  159. name: "uni-pagination 分页器",
  160. url: "pagination"
  161. },
  162. {
  163. name: "uni-popup 弹出层",
  164. url: "popup"
  165. },
  166. {
  167. name: "uni-rate 评分",
  168. url: "rate"
  169. },
  170. {
  171. name: "uni-row 布局-行",
  172. url: "row"
  173. },
  174. {
  175. name: "uni-search-bar 搜索栏",
  176. url: "search-bar"
  177. },
  178. {
  179. name: "uni-section 标题栏",
  180. url: "section"
  181. },
  182. {
  183. name: "uni-segmented-control 分段器",
  184. url: "segmented-control"
  185. },
  186. {
  187. name: "uni-steps 步骤条",
  188. url: "steps"
  189. },
  190. {
  191. name: "uni-swipe-action 滑动操作",
  192. url: "swipe-action"
  193. },
  194. {
  195. name: "uni-swiper-dot 轮播图指示点",
  196. url: "swiper-dot"
  197. },
  198. // #ifndef APP-NVUE || MP-TOUTIAO || MP-BAIDU
  199. {
  200. name: "uni-table 表格",
  201. url: "table"
  202. },
  203. // #endif
  204. {
  205. name: "uni-tag 标签",
  206. url: "tag"
  207. },
  208. {
  209. name: "uni-title 章节标题",
  210. url: "title"
  211. },
  212. {
  213. name: "uni-tooltip 文字提示",
  214. url: "tooltip"
  215. },
  216. {
  217. name: "uni-transition 过渡动画",
  218. url: "transition"
  219. },
  220. ]
  221. };
  222. },
  223. onLoad() {},
  224. onReady() {
  225. // #ifdef APP-NVUE
  226. uni.preloadPage({
  227. url: "/pages/extUI/calendar/calendar",
  228. success() {
  229. console.log("preloadPage /pages/extUI/calendar/calendar")
  230. },
  231. fail() {}
  232. })
  233. // #endif
  234. },
  235. onShareAppMessage() {
  236. return {
  237. title: '欢迎体验uni-app',
  238. path: '/pages/tabBar/extUI/extUI'
  239. }
  240. },
  241. onNavigationBarButtonTap(e) {
  242. uni.navigateTo({
  243. url: '/pages/about/about'
  244. });
  245. },
  246. methods: {
  247. goDetailPage(path) {
  248. const url = '/pages/extUI/' + path + '/' + path
  249. if (this.hasLeftWin) {
  250. uni.reLaunch({
  251. url: url
  252. })
  253. } else {
  254. uni.navigateTo({
  255. url: url
  256. })
  257. }
  258. }
  259. }
  260. }
  261. </script>
  262. <style>
  263. @import '../../../common/uni-nvue.css';
  264. </style>