Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
add636fc
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6132
Star
98
Fork
169
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
add636fc
编写于
7月 08, 2023
作者:
W
wanganxp
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
缩短了tabbar页面的层级,把api里的页面和界面分开。遗留页面生命周期和页面下拉刷新待完善
上级
e4667d08
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
1446 addition
and
1335 deletion
+1446
-1335
pages.json
pages.json
+585
-597
pages/API/modal/modal.uvue
pages/API/modal/modal.uvue
+1
-1
pages/API/page-lifecircle/page-lifecircle.uvue
pages/API/page-lifecircle/page-lifecircle.uvue
+40
-0
pages/API/pull-down-refresh/pull-down-refresh.uvue
pages/API/pull-down-refresh/pull-down-refresh.uvue
+83
-0
pages/tabBar/API.uvue
pages/tabBar/API.uvue
+475
-475
pages/tabBar/CSS.uvue
pages/tabBar/CSS.uvue
+2
-2
pages/tabBar/component.uvue
pages/tabBar/component.uvue
+260
-260
未找到文件。
pages.json
浏览文件 @
add636fc
{
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/tabBar/component
/component"
,
"style"
:
{
"navigationBarTitleText"
:
"内置组件"
,
"backgroundColor"
:
"#F8F8F8"
}
},
{
"path"
:
"pages/component/view/view"
,
"style"
:
{
"navigationBarTitleText"
:
"view"
}
},
{
"path"
:
"pages/component/scroll-view/scroll-view"
,
"style"
:
{
"navigationBarTitleText"
:
"scroll-view"
}
},
{
"path"
:
"pages/component/text/text"
,
"style"
:
{
"navigationBarTitleText"
:
"text"
}
},
{
"path"
:
"pages/component/progress/progress"
,
"style"
:
{
"navigationBarTitleText"
:
"progress"
}
},
{
"path"
:
"pages/component/button/button"
,
"style"
:
{
"navigationBarTitleText"
:
"button"
}
},
{
"path"
:
"pages/component/radio/radio"
,
"style"
:
{
"navigationBarTitleText"
:
"radio"
}
},
{
"path"
:
"pages/component/checkbox/checkbox"
,
"style"
:
{
"navigationBarTitleText"
:
"checkbox"
}
},
{
"path"
:
"pages/component/input/input"
,
"style"
:
{
"navigationBarTitleText"
:
"input"
}
},
{
"path"
:
"pages/component/textarea/textarea"
,
"style"
:
{
"navigationBarTitleText"
:
"textarea"
}
},
{
"path"
:
"pages/component/slider/slider"
,
"style"
:
{
"navigationBarTitleText"
:
"slider"
}
},
{
"path"
:
"pages/component/slider-100/slider-100"
,
"style"
:
{
"navigationBarTitleText"
:
"slider x 100"
}
},
{
"path"
:
"pages/component/switch/switch"
,
"style"
:
{
"navigationBarTitleText"
:
"switch"
}
},
{
"path"
:
"pages/component/swiper/swiper"
,
"style"
:
{
"navigationBarTitleText"
:
"swiper"
}
},
{
"path"
:
"pages/component/image/image"
,
"style"
:
{
"navigationBarTitleText"
:
"image"
}
},
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/tabBar
/component"
,
"style"
:
{
"navigationBarTitleText"
:
"内置组件"
,
"backgroundColor"
:
"#F8F8F8"
}
},
{
"path"
:
"pages/component/view/view"
,
"style"
:
{
"navigationBarTitleText"
:
"view"
}
},
{
"path"
:
"pages/component/scroll-view/scroll-view"
,
"style"
:
{
"navigationBarTitleText"
:
"scroll-view"
}
},
{
"path"
:
"pages/component/text/text"
,
"style"
:
{
"navigationBarTitleText"
:
"text"
}
},
{
"path"
:
"pages/component/progress/progress"
,
"style"
:
{
"navigationBarTitleText"
:
"progress"
}
},
{
"path"
:
"pages/component/button/button"
,
"style"
:
{
"navigationBarTitleText"
:
"button"
}
},
{
"path"
:
"pages/component/radio/radio"
,
"style"
:
{
"navigationBarTitleText"
:
"radio"
}
},
{
"path"
:
"pages/component/checkbox/checkbox"
,
"style"
:
{
"navigationBarTitleText"
:
"checkbox"
}
},
{
"path"
:
"pages/component/input/input"
,
"style"
:
{
"navigationBarTitleText"
:
"input"
}
},
{
"path"
:
"pages/component/textarea/textarea"
,
"style"
:
{
"navigationBarTitleText"
:
"textarea"
}
},
{
"path"
:
"pages/component/slider/slider"
,
"style"
:
{
"navigationBarTitleText"
:
"slider"
}
},
{
"path"
:
"pages/component/slider-100/slider-100"
,
"style"
:
{
"navigationBarTitleText"
:
"slider x 100"
}
},
{
"path"
:
"pages/component/switch/switch"
,
"style"
:
{
"navigationBarTitleText"
:
"switch"
}
},
{
"path"
:
"pages/component/swiper/swiper"
,
"style"
:
{
"navigationBarTitleText"
:
"swiper"
}
},
{
"path"
:
"pages/component/image/image"
,
"style"
:
{
"navigationBarTitleText"
:
"image"
}
},
{
"path"
:
"pages/component/image/image-format"
,
"style"
:
{
...
...
@@ -108,521 +108,509 @@
"style"
:
{
"navigationBarTitleText"
:
"image-path"
}
},
{
"path"
:
"pages/component/image/image-large"
,
"style"
:
{
"navigationBarTitleText"
:
"image-large"
}
},
{
"path"
:
"pages/component/web-view/web-view"
,
"style"
:
{
"navigationBarTitleText"
:
"web-view"
}
},
{
"path"
:
"pages/component/web-view-local/web-view-local"
,
"style"
:
{
"navigationBarTitleText"
:
"web-view-local"
}
},
{
"path"
:
"pages/tabBar/API/API"
,
"style"
:
{
"navigationBarTitleText"
:
"接口"
,
"backgroundColor"
:
"#F8F8F8"
}
},
{
"path"
:
"pages/API/navigator/navigator"
,
"style"
:
{
"navigationBarTitleText"
:
"页面跳转"
}
},
{
"path"
:
"pages/API/navigator/new-page/new-uvue-page-1"
,
"style"
:
{
"navigationBarTitleText"
:
"新UVUE页面1"
}
},
{
"path"
:
"pages/API/navigator/new-page/new-uvue-page-2"
,
"style"
:
{
"navigationBarTitleText"
:
"新UVUE页面2"
}
},
{
"path"
:
"pages/API/storage/storage"
,
"style"
:
{
"navigationBarTitleText"
:
"数据存储"
}
},
{
"path"
:
"pages/API/action-sheet/action-sheet"
,
"style"
:
{
"navigationBarTitleText"
:
"操作菜单"
}
},
{
"path"
:
"pages/API/modal/modal"
,
"style"
:
{
"navigationBarTitleText"
:
"模态弹窗"
}
},
{
"path"
:
"pages/API/show-loading/show-loading"
,
"style"
:
{
"navigationBarTitleText"
:
"加载提示框"
}
},
{
"path"
:
"pages/API/toast/toast"
,
"style"
:
{
"navigationBarTitleText"
:
"消息提示框"
}
},
{
"path"
:
"pages/API/get-location/get-location"
,
"style"
:
{
"navigationBarTitleText"
:
"获取定位"
}
},
{
"path"
:
"pages/tabBar/CSS/CSS"
,
"style"
:
{
"navigationBarTitleText"
:
"CSS"
,
"backgroundColor"
:
"#F8F8F8"
}
},
{
"path"
:
"pages/CSS/background/background-color"
,
"style"
:
{
"navigationBarTitleText"
:
"background-color"
}
},
{
"path"
:
"pages/CSS/background/background-image"
,
"style"
:
{
"navigationBarTitleText"
:
"background-image"
}
},
{
"path"
:
"pages/CSS/border/border-color"
,
"style"
:
{
"navigationBarTitleText"
:
"border-color"
}
},
{
"path"
:
"pages/CSS/border/border-radius"
,
"style"
:
{
"navigationBarTitleText"
:
"border-radius"
}
},
{
"path"
:
"pages/CSS/border/border-style"
,
"style"
:
{
"navigationBarTitleText"
:
"border-style"
}
},
{
"path"
:
"pages/CSS/border/border-width"
,
"style"
:
{
"navigationBarTitleText"
:
"border-width"
}
},
{
"path"
:
"pages/CSS/border/border"
,
"style"
:
{
"navigationBarTitleText"
:
"border"
}
},
{
"path"
:
"pages/CSS/box-shadow/box-shadow"
,
"style"
:
{
"navigationBarTitleText"
:
"box-shadow"
}
},
{
"path"
:
"pages/CSS/flex/align-content"
,
"style"
:
{
"navigationBarTitleText"
:
"align-content"
}
},
{
"path"
:
"pages/CSS/flex/align-items"
,
"style"
:
{
"navigationBarTitleText"
:
"align-items"
}
},
{
"path"
:
"pages/CSS/flex/flex-basis"
,
"style"
:
{
"navigationBarTitleText"
:
"flex-basis"
}
},
{
"path"
:
"pages/CSS/flex/flex-direction"
,
"style"
:
{
"navigationBarTitleText"
:
"flex-direction"
}
},
{
"path"
:
"pages/CSS/flex/flex-flow"
,
"style"
:
{
"navigationBarTitleText"
:
"flex-flow"
}
},
{
"path"
:
"pages/CSS/flex/flex-grow"
,
"style"
:
{
"navigationBarTitleText"
:
"flex-grow"
}
},
{
"path"
:
"pages/CSS/flex/flex-shrink"
,
"style"
:
{
"navigationBarTitleText"
:
"flex-shrink"
}
},
{
"path"
:
"pages/CSS/flex/flex"
,
"style"
:
{
"navigationBarTitleText"
:
"flex"
}
},
{
"path"
:
"pages/CSS/flex/justify-content"
,
"style"
:
{
"navigationBarTitleText"
:
"justify-content"
}
},
{
"path"
:
"pages/CSS/layout/height"
,
"style"
:
{
"navigationBarTitleText"
:
"height"
}
},
{
"path"
:
"pages/CSS/layout/max-height"
,
"style"
:
{
"navigationBarTitleText"
:
"max-height"
}
},
{
"path"
:
"pages/CSS/layout/max-width"
,
"style"
:
{
"navigationBarTitleText"
:
"max-width"
}
},
{
"path"
:
"pages/CSS/layout/min-height"
,
"style"
:
{
"navigationBarTitleText"
:
"min-height"
}
},
{
"path"
:
"pages/CSS/layout/min-width"
,
"style"
:
{
"navigationBarTitleText"
:
"min-width"
}
},
{
"path"
:
"pages/CSS/layout/position"
,
"style"
:
{
"navigationBarTitleText"
:
"position"
}
},
{
"path"
:
"pages/CSS/layout/width"
,
"style"
:
{
"navigationBarTitleText"
:
"width"
}
},
{
"path"
:
"pages/CSS/margin/margin-bottom"
,
"style"
:
{
"navigationBarTitleText"
:
"margin-bottom"
}
},
{
"path"
:
"pages/CSS/margin/margin-left"
,
"style"
:
{
"navigationBarTitleText"
:
"margin-left"
}
},
{
"path"
:
"pages/CSS/margin/margin-right"
,
"style"
:
{
"navigationBarTitleText"
:
"margin-right"
}
},
{
"path"
:
"pages/CSS/margin/margin-top"
,
"style"
:
{
"navigationBarTitleText"
:
"margin-top"
}
},
{
"path"
:
"pages/CSS/margin/margin"
,
"style"
:
{
"navigationBarTitleText"
:
"margin"
}
},
{
"path"
:
"pages/CSS/padding/padding-bottom"
,
"style"
:
{
"navigationBarTitleText"
:
"padding-bottom"
}
},
{
"path"
:
"pages/CSS/padding/padding-left"
,
"style"
:
{
"navigationBarTitleText"
:
"padding-left"
}
},
{
"path"
:
"pages/CSS/padding/padding-right"
,
"style"
:
{
"navigationBarTitleText"
:
"padding-right"
}
},
{
"path"
:
"pages/CSS/padding/padding-top"
,
"style"
:
{
"navigationBarTitleText"
:
"padding-top"
}
},
{
"path"
:
"pages/CSS/padding/padding"
,
"style"
:
{
"navigationBarTitleText"
:
"padding"
}
},
{
"path"
:
"pages/CSS/text/color"
,
"style"
:
{
"navigationBarTitleText"
:
"color"
}
},
{
"path"
:
"pages/CSS/text/font-family"
,
"style"
:
{
"navigationBarTitleText"
:
"font-family"
}
},
{
"path"
:
"pages/CSS/text/font-size"
,
"style"
:
{
"navigationBarTitleText"
:
"font-size"
}
},
{
"path"
:
"pages/CSS/text/font-style"
,
"style"
:
{
"navigationBarTitleText"
:
"font-style"
}
},
{
"path"
:
"pages/CSS/text/font-weight"
,
"style"
:
{
"navigationBarTitleText"
:
"font-weight"
}
},
{
"path"
:
"pages/CSS/text/line-height"
,
"style"
:
{
"navigationBarTitleText"
:
"line-height"
}
},
{
"path"
:
"pages/CSS/text/text-align"
,
"style"
:
{
"navigationBarTitleText"
:
"text-align"
}
},
{
"path"
:
"pages/CSS/text/text-decoration-line"
,
"style"
:
{
"navigationBarTitleText"
:
"text-decoration-line"
}
},{
"path"
:
"pages/CSS/transition/transition"
,
"style"
:
{
"navigationBarTitleText"
:
"Transition"
}
},{
"path"
:
"pages/CSS/transform/transform"
,
"style"
:
{
"navigationBarTitleText"
:
"Transform"
}
},
{
"path"
:
"pages/API/request/request"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/component/image/image-large"
,
"style"
:
{
"navigationBarTitleText"
:
"image-large"
}
},
{
"path"
:
"pages/component/web-view/web-view"
,
"style"
:
{
"navigationBarTitleText"
:
"web-view"
}
},
{
"path"
:
"pages/component/web-view-local/web-view-local"
,
"style"
:
{
"navigationBarTitleText"
:
"web-view-local"
}
},
{
"path"
:
"pages/tabBar/API"
,
"style"
:
{
"navigationBarTitleText"
:
"接口"
,
"backgroundColor"
:
"#F8F8F8"
}
},
{
"path"
:
"pages/API/navigator/navigator"
,
"style"
:
{
"navigationBarTitleText"
:
"页面跳转"
}
},
{
"path"
:
"pages/API/navigator/new-page/new-uvue-page-1"
,
"style"
:
{
"navigationBarTitleText"
:
"新UVUE页面1"
}
},
{
"path"
:
"pages/API/navigator/new-page/new-uvue-page-2"
,
"style"
:
{
"navigationBarTitleText"
:
"新UVUE页面2"
}
},
{
"path"
:
"pages/API/page-scrollTo/page-scrollTo"
,
"style"
:
{
"navigationBarTitleText"
:
"页面滚动"
}
},
{
"path"
:
"pages/API/page-lifecircle/page-lifecircle"
,
"style"
:
{
"navigationBarTitleText"
:
"页面生命周期"
}
},
{
"path"
:
"pages/API/storage/storage"
,
"style"
:
{
"navigationBarTitleText"
:
"数据存储"
}
},
{
"path"
:
"pages/API/action-sheet/action-sheet"
,
"style"
:
{
"navigationBarTitleText"
:
"操作菜单"
}
},
{
"path"
:
"pages/API/modal/modal"
,
"style"
:
{
"navigationBarTitleText"
:
"模态弹窗"
}
},
{
"path"
:
"pages/API/show-loading/show-loading"
,
"style"
:
{
"navigationBarTitleText"
:
"加载提示框"
}
},
{
"path"
:
"pages/API/toast/toast"
,
"style"
:
{
"navigationBarTitleText"
:
"消息提示框"
}
},
{
"path"
:
"pages/API/get-location/get-location"
,
"style"
:
{
"navigationBarTitleText"
:
"获取定位"
}
},
{
"path"
:
"pages/tabBar/CSS"
,
"style"
:
{
"navigationBarTitleText"
:
"CSS"
,
"backgroundColor"
:
"#F8F8F8"
}
},
{
"path"
:
"pages/CSS/background/background-color"
,
"style"
:
{
"navigationBarTitleText"
:
"background-color"
}
},
{
"path"
:
"pages/CSS/background/background-image"
,
"style"
:
{
"navigationBarTitleText"
:
"background-image"
}
},
{
"path"
:
"pages/CSS/border/border-color"
,
"style"
:
{
"navigationBarTitleText"
:
"border-color"
}
},
{
"path"
:
"pages/CSS/border/border-radius"
,
"style"
:
{
"navigationBarTitleText"
:
"border-radius"
}
},
{
"path"
:
"pages/CSS/border/border-style"
,
"style"
:
{
"navigationBarTitleText"
:
"border-style"
}
},
{
"path"
:
"pages/CSS/border/border-width"
,
"style"
:
{
"navigationBarTitleText"
:
"border-width"
}
},
{
"path"
:
"pages/CSS/border/border"
,
"style"
:
{
"navigationBarTitleText"
:
"border"
}
},
{
"path"
:
"pages/CSS/box-shadow/box-shadow"
,
"style"
:
{
"navigationBarTitleText"
:
"box-shadow"
}
},
{
"path"
:
"pages/CSS/flex/align-content"
,
"style"
:
{
"navigationBarTitleText"
:
"align-content"
}
},
{
"path"
:
"pages/CSS/flex/align-items"
,
"style"
:
{
"navigationBarTitleText"
:
"align-items"
}
},
{
"path"
:
"pages/CSS/flex/flex-basis"
,
"style"
:
{
"navigationBarTitleText"
:
"flex-basis"
}
},
{
"path"
:
"pages/CSS/flex/flex-direction"
,
"style"
:
{
"navigationBarTitleText"
:
"flex-direction"
}
},
{
"path"
:
"pages/CSS/flex/flex-flow"
,
"style"
:
{
"navigationBarTitleText"
:
"flex-flow"
}
},
{
"path"
:
"pages/CSS/flex/flex-grow"
,
"style"
:
{
"navigationBarTitleText"
:
"flex-grow"
}
},
{
"path"
:
"pages/CSS/flex/flex-shrink"
,
"style"
:
{
"navigationBarTitleText"
:
"flex-shrink"
}
},
{
"path"
:
"pages/CSS/flex/flex"
,
"style"
:
{
"navigationBarTitleText"
:
"flex"
}
},
{
"path"
:
"pages/CSS/flex/justify-content"
,
"style"
:
{
"navigationBarTitleText"
:
"justify-content"
}
},
{
"path"
:
"pages/CSS/layout/height"
,
"style"
:
{
"navigationBarTitleText"
:
"height"
}
},
{
"path"
:
"pages/CSS/layout/max-height"
,
"style"
:
{
"navigationBarTitleText"
:
"max-height"
}
},
{
"path"
:
"pages/CSS/layout/max-width"
,
"style"
:
{
"navigationBarTitleText"
:
"max-width"
}
},
{
"path"
:
"pages/CSS/layout/min-height"
,
"style"
:
{
"navigationBarTitleText"
:
"min-height"
}
},
{
"path"
:
"pages/CSS/layout/min-width"
,
"style"
:
{
"navigationBarTitleText"
:
"min-width"
}
},
{
"path"
:
"pages/CSS/layout/position"
,
"style"
:
{
"navigationBarTitleText"
:
"position"
}
},
{
"path"
:
"pages/CSS/layout/width"
,
"style"
:
{
"navigationBarTitleText"
:
"width"
}
},
{
"path"
:
"pages/CSS/margin/margin-bottom"
,
"style"
:
{
"navigationBarTitleText"
:
"margin-bottom"
}
},
{
"path"
:
"pages/CSS/margin/margin-left"
,
"style"
:
{
"navigationBarTitleText"
:
"margin-left"
}
},
{
"path"
:
"pages/CSS/margin/margin-right"
,
"style"
:
{
"navigationBarTitleText"
:
"margin-right"
}
},
{
"path"
:
"pages/CSS/margin/margin-top"
,
"style"
:
{
"navigationBarTitleText"
:
"margin-top"
}
},
{
"path"
:
"pages/CSS/margin/margin"
,
"style"
:
{
"navigationBarTitleText"
:
"margin"
}
},
{
"path"
:
"pages/CSS/padding/padding-bottom"
,
"style"
:
{
"navigationBarTitleText"
:
"padding-bottom"
}
},
{
"path"
:
"pages/CSS/padding/padding-left"
,
"style"
:
{
"navigationBarTitleText"
:
"padding-left"
}
},
{
"path"
:
"pages/CSS/padding/padding-right"
,
"style"
:
{
"navigationBarTitleText"
:
"padding-right"
}
},
{
"path"
:
"pages/CSS/padding/padding-top"
,
"style"
:
{
"navigationBarTitleText"
:
"padding-top"
}
},
{
"path"
:
"pages/CSS/padding/padding"
,
"style"
:
{
"navigationBarTitleText"
:
"padding"
}
},
{
"path"
:
"pages/CSS/text/color"
,
"style"
:
{
"navigationBarTitleText"
:
"color"
}
},
{
"path"
:
"pages/CSS/text/font-family"
,
"style"
:
{
"navigationBarTitleText"
:
"font-family"
}
},
{
"path"
:
"pages/CSS/text/font-size"
,
"style"
:
{
"navigationBarTitleText"
:
"font-size"
}
},
{
"path"
:
"pages/CSS/text/font-style"
,
"style"
:
{
"navigationBarTitleText"
:
"font-style"
}
},
{
"path"
:
"pages/CSS/text/font-weight"
,
"style"
:
{
"navigationBarTitleText"
:
"font-weight"
}
},
{
"path"
:
"pages/CSS/text/line-height"
,
"style"
:
{
"navigationBarTitleText"
:
"line-height"
}
},
{
"path"
:
"pages/CSS/text/text-align"
,
"style"
:
{
"navigationBarTitleText"
:
"text-align"
}
},
{
"path"
:
"pages/CSS/text/text-decoration-line"
,
"style"
:
{
"navigationBarTitleText"
:
"text-decoration-line"
}
},
{
"path"
:
"pages/CSS/transition/transition"
,
"style"
:
{
"navigationBarTitleText"
:
"Transition"
}
},
{
"path"
:
"pages/CSS/transform/transform"
,
"style"
:
{
"navigationBarTitleText"
:
"Transform"
}
},
{
"path"
:
"pages/API/request/request"
,
"style"
:
{
"navigationBarTitleText"
:
"request网络"
}
},
{
"path"
:
"pages/API/upload-file/upload-file"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/API/upload-file/upload-file"
,
"style"
:
{
"navigationBarTitleText"
:
"上传文件"
}
},
{
"path"
:
"pages/API/download-file/download-file"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/API/download-file/download-file"
,
"style"
:
{
"navigationBarTitleText"
:
"下载文件"
}
},
{
"path"
:
"pages/API/websocket-socketTask/websocket-socketTask"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/API/websocket-socketTask/websocket-socketTask"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/API/websocket-global/websocket-global"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/API/websocket-global/websocket-global"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/API/get-system-info/get-system-info"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/API/get-system-info/get-system-info"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/API/get-device-info/get-device-info"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/API/get-device-info/get-device-info"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/API/get-app-base-info/get-app-base-info"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/API/get-app-base-info/get-app-base-info"
,
"style"
:
{
"navigationBarTitleText"
:
""
},
{
"path"
:
"pages/API/get-system-setting/get-system-setting"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
},
{
"path"
:
"pages/API/get-system-setting/get-system-setting"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/API/get-app-authorize-setting/get-app-authorize-setting"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/API/preview-image/preview-image"
,
"style"
:
{
"navigationBarTitleText"
:
"图片预览"
}
},
{
"path"
:
"pages/component/scroll-view/scroll-view-refresher"
,
"style"
:
{
"navigationBarTitleText"
:
"scroll-view-refresher"
}
},
{
"path"
:
"pages/API/get-app-authorize-setting/get-app-authorize-setting"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/component/list/list"
,
"style"
:
{
"navigationBarTitleText"
:
"列表到详情示例"
}
},
{
"path"
:
"pages/API/get-network-type/get-network-type"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/API/preview-image/preview-image"
,
"style"
:
{
"navigationBarTitleText"
:
"图片预览"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/component/list/detail/detail"
,
"style"
:
{
"navigationBarTitleText"
:
"详情示例"
}
},
{
"path"
:
"pages/component/scroll-view/scroll-view-refresher"
,
"style"
:
{
"navigationBarTitleText"
:
"scroll-view-refresher"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/component/list/list"
,
"style"
:
{
"navigationBarTitleText"
:
"列表到详情示例"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/API/get-network-type/get-network-type"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/component/list/detail/detail"
,
"style"
:
{
"navigationBarTitleText"
:
"详情示例"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/API/page-scrollTo/page-scrollTo"
,
"style"
:
{
"navigationBarTitleText"
:
"pageScrollTo"
,
"enablePullDownRefresh"
:
false
}
}
],
"globalStyle"
:
{
"pageOrientation"
:
"portrait"
,
"navigationBarTitleText"
:
"Hello uniapp x"
,
"navigationBarTextStyle"
:
"white"
,
"navigationBarBackgroundColor"
:
"#007AFF"
,
"backgroundColor"
:
"#efeff4"
,
"backgroundColorTop"
:
"#F4F5F6"
,
"backgroundColorBottom"
:
"#F4F5F6"
,
"h5"
:
{
"maxWidth"
:
1190
,
"navigationBarTextStyle"
:
"black"
,
"navigationBarBackgroundColor"
:
"#F1F1F1"
}
},
"tabBar"
:
{
"color"
:
"#7A7E83"
,
"selectedColor"
:
"#007AFF"
,
"borderStyle"
:
"black"
,
"backgroundColor"
:
"#F8F8F8"
,
"list"
:
[{
"pagePath"
:
"pages/tabBar/component/component"
,
"iconPath"
:
"static/component.png"
,
"selectedIconPath"
:
"static/componentHL.png"
,
"text"
:
"内置组件"
},
{
"pagePath"
:
"pages/tabBar/API/API"
,
"iconPath"
:
"static/api.png"
,
"selectedIconPath"
:
"static/apiHL.png"
,
"text"
:
"接口"
},
{
"pagePath"
:
"pages/tabBar/CSS/CSS"
,
"iconPath"
:
"static/extui.png"
,
"selectedIconPath"
:
"static/extuiHL.png"
,
"text"
:
"CSS"
}
]
},
"uniIdRouter"
:
{},
"condition"
:
{
//模式配置,仅开发期间生效
"current"
:
0
,
//当前激活的模式(list
的索引项)
"list"
:
[{
"name"
:
""
,
//模式名称
"path"
:
""
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}]
}
//
,
{
//
"path"
:
"pages/API/pull-down-refresh/pull-down-refresh"
,
//
"style"
:
{
//
"navigationBarTitleText"
:
"页面下拉刷新"
,
//
"enablePullDownRefresh"
:
true
//
}
//
}
],
"globalStyle"
:
{
"pageOrientation"
:
"portrait"
,
"navigationBarTitleText"
:
"Hello uniapp x"
,
"navigationBarTextStyle"
:
"white"
,
"navigationBarBackgroundColor"
:
"#007AFF"
,
"backgroundColor"
:
"#efeff4"
,
"backgroundColorTop"
:
"#F4F5F6"
,
"backgroundColorBottom"
:
"#F4F5F6"
,
"h5"
:
{
"maxWidth"
:
1190
,
"navigationBarTextStyle"
:
"black"
,
"navigationBarBackgroundColor"
:
"#F1F1F1"
}
},
"tabBar"
:
{
"color"
:
"#7A7E83"
,
"selectedColor"
:
"#007AFF"
,
"borderStyle"
:
"black"
,
"backgroundColor"
:
"#F8F8F8"
,
"list"
:
[{
"pagePath"
:
"pages/tabBar/component"
,
"iconPath"
:
"static/component.png"
,
"selectedIconPath"
:
"static/componentHL.png"
,
"text"
:
"内置组件"
},
{
"pagePath"
:
"pages/tabBar/API"
,
"iconPath"
:
"static/api.png"
,
"selectedIconPath"
:
"static/apiHL.png"
,
"text"
:
"接口"
},
{
"pagePath"
:
"pages/tabBar/CSS"
,
"iconPath"
:
"static/extui.png"
,
"selectedIconPath"
:
"static/extuiHL.png"
,
"text"
:
"CSS"
}
]
},
"uniIdRouter"
:
{},
"condition"
:
{
//模式配置,仅开发期间生效
"current"
:
0
,
//当前激活的模式(list
的索引项)
"list"
:
[{
"name"
:
""
,
//模式名称
"path"
:
""
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}]
}
}
\ No newline at end of file
pages/API/modal/modal.uvue
浏览文件 @
add636fc
...
...
@@ -41,7 +41,7 @@
</view>
</template>
<script lang="ts">
<script lang="
u
ts">
type ItemType = {
value : string,
name : string,
...
...
pages/API/page-lifecircle/page-lifecircle.uvue
0 → 100644
浏览文件 @
add636fc
<template>
<view>
<text>onLoad触发时间</text>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
// const d = Date.now();
// const s = d.toDateString()
console.log("onLoad");
},
onShow() {
console.log("onShow");
},
onReady() {
console.log("onReady");
},
onHide() {
console.log("onHide");
},
onUnload() {
console.log("onUnLoad");
},
methods: {
}
}
</script>
<style>
</style>
pages/API/pull-down-refresh/pull-down-refresh.uvue
0 → 100644
浏览文件 @
add636fc
<template>
<view>
<page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view style="font-size: 12px; color: #666;">注:PC 不支持下拉刷新</view>
<view class="text" v-for="(num,index) in data" :key="index">list - {{num}}</view>
<view class="uni-loadmore" v-if="showLoadMore">{{loadMoreText}}</view>
</view>
</view>
</template>
<script lang="uts">
export default {
data() {
return {
title: '下拉刷新 + 加载更多',
data: [],
loadMoreText: "加载中...",
showLoadMore: false,
max: 0
}
},
onLoad() {
this.initData();
},
onUnload() {
this.max = 0,
this.data = [],
this.loadMoreText = "加载更多",
this.showLoadMore = false;
},
onReachBottom() {
console.log("onReachBottom");
if (this.max > 40) {
this.loadMoreText = "没有更多数据了!"
return;
}
this.showLoadMore = true;
setTimeout(() => {
this.setListData();
}, 300);
},
onPullDownRefresh() {
console.log('onPullDownRefresh');
this.initData();
},
methods: {
initData(){
setTimeout(() => {
this.max = 0;
this.data = [];
let data = [];
this.max += 20;
for (var i = this.max - 19; i < this.max + 1; i++) {
data.push(i)
}
this.data = this.data.concat(data);
uni.stopPullDownRefresh();
}, 300);
},
setListData() {
let data = [];
this.max += 10;
for (var i = this.max - 9; i < this.max + 1; i++) {
data.push(i)
}
this.data = this.data.concat(data);
}
}
}
</script>
<style>
.text {
margin: 16rpx 0;
width:100%;
background-color: #fff;
height: 120rpx;
line-height: 120rpx;
text-align: center;
color: #555;
border-radius: 8rpx;
}
</style>
pages/tabBar/API
/API
.uvue
→
pages/tabBar/API.uvue
浏览文件 @
add636fc
<template>
<view class="uni-container">
<view class="uni-header-logo">
<image class="uni-header-image" src="/static/apiIndex.png"></image>
</view>
<view class="uni-hello-text">
<text class="hello-text">以下将演示uni-app接口能力,详细文档见:</text>
<u-link :href="'https://uniapp.dcloud.io/api/'" :text="'https://uniapp.dcloud.io/api/'"
:inWhiteList="true"></u-link>
</view>
<view class="uni-panel" v-for="(item, index) in list" :key="item.id">
<view class="uni-panel-h" :class="item.open ? 'uni-panel-h-on' : ''" @click="triggerCollapse(index, item)">
<text class="uni-panel-text" :class="item.enable == false ? 'text-disabled' : ''">{{item.name}}</text>
<image :src="item.pages.length > 0 ? item.open ? arrowUpIcon : arrowDownIcon : arrowRightIcon"
class="uni-icon"></image>
</view>
<view class="uni-panel-c" v-if="item.open">
<view class="uni-navigate-item" v-for="(page,key) in item.pages" :key="key" @click="goDetailPage(page)">
<text class="uni-navigate-text"
:class="page.enable != true ? 'text-disabled' : ''">{{page.name}}</text>
<image :src="arrowRightIcon" class="uni-icon"></image>
</view>
</view>
</view>
</view>
</template>
<script lang="ts">
type Page = {
name : string,
enable ?: boolean,
url : string
}
type ListItem = {
id : string,
name : string,
open : boolean,
pages : Page[],
url ?: string,
enable ?: boolean
}
export default {
data() {
return {
list: [{
id: "page",
name: "
界面",
open: false,
pages: [
{
name: "
设置导航条",
url: "
set-navigation-bar-title"
},
//#ifdef APP-PLUS
{
name: "原生子窗体",
url: "subnvue",
},
//#endif
{
name: "页面跳转",
url: "navigator",
enable: true
},
//#ifndef MP-TOUTIAO
{
name: "设置TabBar",
url: "set-tabbar",
},
//#endif
{
name: "下拉刷新",
url: "pull-down-refresh",
},
{
name: "创建动画",
url: "animation",
},
// #ifndef QUICKAPP-WEBVIEW-UNION
{
name: "创建绘画",
url: "canvas",
},
// #endif
// #ifndef MP-LARK
{
name: "节点信息",
url: "get-node-info",
},
// #endif
{
name: "节点布局交互状态",
url: "intersection-observer",
},
{
name: "显示操作菜单",
url: "action-sheet",
enable: true
},
{
name: "显示模态弹窗",
url: "modal",
enable: true
},
{
name: "显示加载提示框",
url: "show-loading",
enable: true
},
{
name: "显示消息提示框",
url: "toast",
enable: true
},
{
name: "将页面滚动到目标位置",
url: "page-scrollTo",
enable: true
},
] as Page[],
},
{
id: "device",
name: "设备",
open: false,
pages: [
{
name: "获取设备网络状态",
<template>
<view class="uni-container">
<view class="uni-header-logo">
<image class="uni-header-image" src="/static/apiIndex.png"></image>
</view>
<view class="uni-hello-text">
<text class="hello-text">以下将演示uni-app接口能力,详细文档见:</text>
<u-link :href="'https://uniapp.dcloud.io/api/'" :text="'https://uniapp.dcloud.io/api/'"
:inWhiteList="true"></u-link>
</view>
<view class="uni-panel" v-for="(item, index) in list" :key="item.id">
<view class="uni-panel-h" :class="item.open ? 'uni-panel-h-on' : ''" @click="triggerCollapse(index, item)">
<text class="uni-panel-text" :class="item.enable == false ? 'text-disabled' : ''">{{item.name}}</text>
<image :src="item.pages.length > 0 ? item.open ? arrowUpIcon : arrowDownIcon : arrowRightIcon"
class="uni-icon"></image>
</view>
<view class="uni-panel-c" v-if="item.open">
<view class="uni-navigate-item" v-for="(page,key) in item.pages" :key="key" @click="goDetailPage(page)">
<text class="uni-navigate-text"
:class="page.enable != true ? 'text-disabled' : ''">{{page.name}}</text>
<image :src="arrowRightIcon" class="uni-icon"></image>
</view>
</view>
</view>
</view>
</template>
<script lang="ts">
type Page = {
name : string,
enable ?: boolean,
url : string
}
type ListItem = {
id : string,
name : string,
open : boolean,
pages : Page[],
url ?: string,
enable ?: boolean
}
export default {
data() {
return {
list: [{
id: "page",
name: "
页面",
open: false,
pages: [
{
name: "
页面跳转",
url: "
navigator",
enable: true
},
{
name: "设置导航条",
url: "set-navigation-bar-title"
},
{
name: "设置TabBar",
url: "set-tabbar",
},
{
name: "下拉刷新",
url: "pull-down-refresh",
},
{
name: "页面生命周期",
url: "page-lifecircle",
enable: true
},
{
name: "将页面滚动到目标位置",
url: "page-scrollTo",
enable: true
},
] as Page[],
},
{
id: "ui",
name: "界面",
open: false,
pages: [
{
name: "创建动画",
url: "animation",
},
{
name: "创建绘画",
url: "canvas",
},
{
name: "节点信息",
url: "get-node-info",
},
{
name: "节点布局交互状态",
url: "intersection-observer",
},
{
name: "显示操作菜单",
url: "action-sheet",
enable: true
},
{
name: "显示模态弹窗",
url: "modal",
enable: true
},
{
name: "显示加载提示框",
url: "show-loading",
enable: true
},
{
name: "显示消息提示框",
url: "toast",
enable: true
},
] as Page[],
},
{
id: "device",
name: "设备",
open: false,
pages: [
{
name: "获取设备网络状态",
url: "get-network-type",
enable:true
},
{
name: "获取系统信息",
enable:true
},
{
name: "获取系统信息",
url: "get-system-info",
enable:true
enable:true
},
{
name: "获取设备信息",
...
...
@@ -153,353 +153,353 @@
name: "获取APP授权设置",
url: "get-app-authorize-setting",
enable:true
},
{
name: "打电话",
url: "make-phone-call",
},
//#ifndef H5
{
name: "震动",
url: "vibrate",
},
{
name: "添加手机联系人",
url: "add-phone-contact",
},
{
name: "扫码",
url: "scan-code",
},
//#endif
//#ifndef H5 || MP-JD
{
name: "剪贴板",
url: "clipboard",
},
//#endif
// #ifndef H5 || MP-ALIPAY
{
name: "屏幕亮度",
url: "brightness",
},
// #endif
// #ifdef APP
-PLUS || MP-WEIXIN || MP-QQ || MP-JD
{
name: "蓝牙",
url: "bluetooth",
},
// #endif
// #ifdef APP
-PLUS || MP-WEIXIN || MP-QQ
{
name: "生物认证",
url: "soter",
},
// #endif
// #ifdef APP
-PLUS || MP-WEIXIN
{
name: "iBeacon",
url: "ibeacon",
},
// #endif
// #ifndef H5
{
name: "监听加速度传感器",
url: "on-accelerometer-change",
},
// #endif
// #ifndef H5 || MP-JD
{
name: "监听罗盘数据",
url: "on-compass-change",
},
// #endif
//#ifdef APP
-PLUS
{
name: "监听距离传感器",
url: "/platforms/app-plus/proximity/proximity",
},
{
name: "监听方向传感器",
url: "/platforms/app-plus/orientation/orientation",
},
//#endif
] as Page[],
},
{
id: "network",
name: "网络",
open: false,
pages: [
{
name: "发起一个请求",
},
{
name: "打电话",
url: "make-phone-call",
},
//#ifndef H5
{
name: "震动",
url: "vibrate",
},
{
name: "添加手机联系人",
url: "add-phone-contact",
},
{
name: "扫码",
url: "scan-code",
},
//#endif
//#ifndef H5 || MP-JD
{
name: "剪贴板",
url: "clipboard",
},
//#endif
// #ifndef H5 || MP-ALIPAY
{
name: "屏幕亮度",
url: "brightness",
},
// #endif
// #ifdef APP
|| MP-WEIXIN || MP-QQ || MP-JD
{
name: "蓝牙",
url: "bluetooth",
},
// #endif
// #ifdef APP
|| MP-WEIXIN || MP-QQ
{
name: "生物认证",
url: "soter",
},
// #endif
// #ifdef APP
|| MP-WEIXIN
{
name: "iBeacon",
url: "ibeacon",
},
// #endif
// #ifndef H5
{
name: "监听加速度传感器",
url: "on-accelerometer-change",
},
// #endif
// #ifndef H5 || MP-JD
{
name: "监听罗盘数据",
url: "on-compass-change",
},
// #endif
//#ifdef APP
{
name: "监听距离传感器",
url: "/platforms/app-plus/proximity/proximity",
},
{
name: "监听方向传感器",
url: "/platforms/app-plus/orientation/orientation",
},
//#endif
] as Page[],
},
{
id: "network",
name: "网络",
open: false,
pages: [
{
name: "发起一个请求",
url: "request",
enable: true
},
{
name: "上传文件",
enable: true
},
{
name: "上传文件",
url: "upload-file",
enable: true
},
{
name: "下载文件",
},
{
name: "下载文件",
url: "download-file",
enable: true
},
] as Page[],
},
{
id: "websocket",
name: "websocket",
open: false,
pages: [
// #ifndef MP-ALIPAY
{
name: "socketTask",
},
] as Page[],
},
{
id: "websocket",
name: "websocket",
open: false,
pages: [
// #ifndef MP-ALIPAY
{
name: "socketTask",
url: "websocket-socketTask",
enable: true
},
// #endif
{
name: "全局websocket",
enable: true
},
// #endif
{
name: "全局websocket",
url: "websocket-global",
enable: true
},
] as Page[],
},
{
id: "media",
name: "媒体",
open: false,
pages: [
{
name: "图片",
url: "image",
},
{
name: "图片预览",
url: "preview-image",
enable: true
},
// #ifndef MP-LARK
{
name: "音频",
url: "inner-audio",
},
// #endif
// #ifdef APP
-PLUS || MP-WEIXIN || MP-BAIDU || MP-QQ|| MP-JD
{
name: "录音",
url: "voice",
},
{
name: "背景音频",
url: "background-audio",
},
// #endif
// #ifndef MP-ALIPAY
{
name: "视频",
url: "video",
},
// #endif
// #ifndef H5
{
name: "文件",
url: "file",
},
// #endif
// #ifndef H5 || MP-ALIPAY
{
name: "保存媒体到本地",
url: "save-media",
},
// #endif
] as Page[],
},
// #ifndef MP-KUAISHOU
{
id: "location",
name: "位置",
open: false,
pages: [
{
name: "获取当前位置",
url: "get-location",
enable: true
},
{
name: "使用地图查看位置",
url: "open-location",
},
// #ifndef MP-TOUTIAO
{
name: "使用地图选择位置",
url: "choose-location",
},
// #endif
// #ifndef MP-QQ || MP-TOUTIAO || MP-LARK
{
name: "地图控制",
url: "map",
},
// #endif
// #ifdef APP
-PLUS
{
name: "地图搜索",
url: "map-search",
},
// #endif
] as Page[],
},
// #endif
{
id: "storage",
name: "数据",
open: false,
pages: [
{
name: "数据存储(key-value)",
url: "storage",
enable: true
},
// #ifdef APP
-PLUS
{
name: "SQLite",
url: "sqlite",
},
// #endif
] as Page[],
},
// #ifdef APP
-PLUS || MP-WEIXIN
{
id: "rewarded-video-ad",
url: "rewarded-video-ad",
name: "激励视频广告",
open: false,
enable: false,
pages: [] as Page[]
},
// #endif
// #ifdef APP
-PLUS
{
id: "full-screen-video-ad",
url: "full-screen-video-ad",
name: "全屏视频广告",
open: false,
enable: false,
pages: [] as Page[]
},
// #endif
// #ifndef H5 || QUICKAPP-WEBVIEW || MP-KUAISHOU || MP-LARK
{
id: "login",
name: "登录",
open: false,
pages: [
{
name: "登录",
url: "login",
},
{
name: "获取用户信息",
url: "get-user-info",
},
] as Page[],
},
// #endif
// #ifndef H5 || QUICKAPP-WEBVIEW-UNION
{
id: "share",
name: "分享",
open: false,
pages: [
{
name: "分享",
url: "share",
},
] as Page[],
},
// #endif
// #ifdef APP
-PLUS || MP-WEIXIN
{
id: "payment",
name: "支付",
open: false,
pages: [
{
name: "发起支付",
url: "request-payment",
},
] as Page[],
},
// #endif
// #ifdef APP
-PLUS
{
id: "speech",
name: "语音",
open: false,
pages: [
{
name: "语音识别",
url: "/platforms/app-plus/speech/speech",
},
] as Page[],
},
{
id: "push",
name: "推送",
open: false,
pages: [
{
name: "推送",
url: "/platforms/app-plus/push/push",
},
] as Page[],
},
//#endif
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
methods: {
triggerCollapse(index ?: number, item : ListItem) {
if (item.pages.length == 0) {
const page : Page = {
name: item.name,
enable: item.enable,
url: item.url!
}
this.goDetailPage(page);
return;
}
for (var i = 0; i < this.list.length; ++i) {
if (index == i) {
this.list[i].open = !this.list[i].open;
} else {
this.list[i].open = false;
}
}
},
goDetailPage(e : Page) {
if (e.enable != true) {
uni.showToast({
icon: 'none',
title: '暂不支持'
})
return
}
const url = e.url.indexOf('platform') > -1 ? e.url : `/pages/API/${e.url}/${e.url}`
uni.navigateTo({
url
})
}
}
}
</script>
<style>
@import '../../
../common/uni-uvue.css';
enable: true
},
] as Page[],
},
{
id: "media",
name: "媒体",
open: false,
pages: [
{
name: "图片",
url: "image",
},
{
name: "图片预览",
url: "preview-image",
enable: true
},
// #ifndef MP-LARK
{
name: "音频",
url: "inner-audio",
},
// #endif
// #ifdef APP
|| MP-WEIXIN || MP-BAIDU || MP-QQ|| MP-JD
{
name: "录音",
url: "voice",
},
{
name: "背景音频",
url: "background-audio",
},
// #endif
// #ifndef MP-ALIPAY
{
name: "视频",
url: "video",
},
// #endif
// #ifndef H5
{
name: "文件",
url: "file",
},
// #endif
// #ifndef H5 || MP-ALIPAY
{
name: "保存媒体到本地",
url: "save-media",
},
// #endif
] as Page[],
},
// #ifndef MP-KUAISHOU
{
id: "location",
name: "位置",
open: false,
pages: [
{
name: "获取当前位置",
url: "get-location",
enable: true
},
{
name: "使用地图查看位置",
url: "open-location",
},
// #ifndef MP-TOUTIAO
{
name: "使用地图选择位置",
url: "choose-location",
},
// #endif
// #ifndef MP-QQ || MP-TOUTIAO || MP-LARK
{
name: "地图控制",
url: "map",
},
// #endif
// #ifdef APP
{
name: "地图搜索",
url: "map-search",
},
// #endif
] as Page[],
},
// #endif
{
id: "storage",
name: "数据",
open: false,
pages: [
{
name: "数据存储(key-value)",
url: "storage",
enable: true
},
// #ifdef APP
{
name: "SQLite",
url: "sqlite",
},
// #endif
] as Page[],
},
// #ifdef APP
|| MP-WEIXIN
{
id: "rewarded-video-ad",
url: "rewarded-video-ad",
name: "激励视频广告",
open: false,
enable: false,
pages: [] as Page[]
},
// #endif
// #ifdef APP
{
id: "full-screen-video-ad",
url: "full-screen-video-ad",
name: "全屏视频广告",
open: false,
enable: false,
pages: [] as Page[]
},
// #endif
// #ifndef H5 || QUICKAPP-WEBVIEW || MP-KUAISHOU || MP-LARK
{
id: "login",
name: "登录",
open: false,
pages: [
{
name: "登录",
url: "login",
},
{
name: "获取用户信息",
url: "get-user-info",
},
] as Page[],
},
// #endif
// #ifndef H5 || QUICKAPP-WEBVIEW-UNION
{
id: "share",
name: "分享",
open: false,
pages: [
{
name: "分享",
url: "share",
},
] as Page[],
},
// #endif
// #ifdef APP
|| MP-WEIXIN
{
id: "payment",
name: "支付",
open: false,
pages: [
{
name: "发起支付",
url: "request-payment",
},
] as Page[],
},
// #endif
// #ifdef APP
{
id: "speech",
name: "语音",
open: false,
pages: [
{
name: "语音识别",
url: "/platforms/app-plus/speech/speech",
},
] as Page[],
},
{
id: "push",
name: "推送",
open: false,
pages: [
{
name: "推送",
url: "/platforms/app-plus/push/push",
},
] as Page[],
},
//#endif
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
methods: {
triggerCollapse(index ?: number, item : ListItem) {
if (item.pages.length == 0) {
const page : Page = {
name: item.name,
enable: item.enable,
url: item.url!
}
this.goDetailPage(page);
return;
}
for (var i = 0; i < this.list.length; ++i) {
if (index == i) {
this.list[i].open = !this.list[i].open;
} else {
this.list[i].open = false;
}
}
},
goDetailPage(e : Page) {
if (e.enable != true) {
uni.showToast({
icon: 'none',
title: '暂不支持'
})
return
}
const url = e.url.indexOf('platform') > -1 ? e.url : `/pages/API/${e.url}/${e.url}`
uni.navigateTo({
url
})
}
}
}
</script>
<style>
@import '../../
common/uni-uvue.css';
</style>
\ No newline at end of file
pages/tabBar/CSS
/CSS
.uvue
→
pages/tabBar/CSS.uvue
浏览文件 @
add636fc
<template>
A
<template>
<view class="uni-container">
<view class="uni-header-logo">
<image class="uni-header-image" src="/static/extuiIndex.png"></image>
...
...
@@ -355,5 +355,5 @@
</script>
<style>
@import '../../
../
common/uni-uvue.css';
@import '../../common/uni-uvue.css';
</style>
\ No newline at end of file
pages/tabBar/component
/component
.uvue
→
pages/tabBar/component.uvue
浏览文件 @
add636fc
<template>
<view class="uni-container">
<view class="uni-header-logo">
<image class="uni-header-image" src="/static/componentIndex.png"></image>
</view>
<view class="uni-hello-text">
<text class="hello-text">uni-app内置组件,展示样式仅供参考,文档详见:</text>
<u-link :href="'https://uniapp.dcloud.io/component/'" :text="'https://uniapp.dcloud.io/component/'"
:inWhiteList="true"></u-link>
</view>
<view class="uni-panel" v-for="(item, index) in list" :key="item.id">
<view class="uni-panel-h" :class="item.open ? 'uni-panel-h-on' : ''" @click="triggerCollapse(index, item)">
<text class="uni-panel-text" :class="item.enable == false ? 'text-disabled' : ''">{{item.name}}</text>
<image :src="item.pages.length > 0 ? item.open ? arrowUpIcon : arrowDownIcon : arrowRightIcon"
class="uni-icon"></image>
</view>
<view class="uni-panel-c" v-if="item.open">
<view class="uni-navigate-item" v-for="(page,key) in item.pages" :key="key" @click="goDetailPage(page)">
<text class="uni-navigate-text"
:class="page.enable != true ? 'text-disabled' : ''">{{page.name}}</text>
<image :src="arrowRightIcon" class="uni-icon"></image>
</view>
</view>
</view>
</view>
</template>
<script lang="ts">
type Page = {
name : string,
enable ?: boolean,
url ?: string
}
type ListItem = {
id : string,
name : string,
open : boolean,
pages : Page[],
url ?: string,
enable ?: boolean
}
export default {
data() {
return {
list: [{
id: 'view',
name: '视图容器',
open: false,
pages: [
{
name: 'view',
enable: true
},
{
name: 'scroll-view',
enable: true
},
{
name: 'swiper',
enable: true
},
// #ifndef MP-TOUTIAO || MP-LARK
{
name: 'movable-view',
enable: false
},
{
name: 'cover-view',
enable: false
},
<template>
<view class="uni-container">
<view class="uni-header-logo">
<image class="uni-header-image" src="/static/componentIndex.png"></image>
</view>
<view class="uni-hello-text">
<text class="hello-text">uni-app内置组件,展示样式仅供参考,文档详见:</text>
<u-link :href="'https://uniapp.dcloud.io/component/'" :text="'https://uniapp.dcloud.io/component/'"
:inWhiteList="true"></u-link>
</view>
<view class="uni-panel" v-for="(item, index) in list" :key="item.id">
<view class="uni-panel-h" :class="item.open ? 'uni-panel-h-on' : ''" @click="triggerCollapse(index, item)">
<text class="uni-panel-text" :class="item.enable == false ? 'text-disabled' : ''">{{item.name}}</text>
<image :src="item.pages.length > 0 ? item.open ? arrowUpIcon : arrowDownIcon : arrowRightIcon"
class="uni-icon"></image>
</view>
<view class="uni-panel-c" v-if="item.open">
<view class="uni-navigate-item" v-for="(page,key) in item.pages" :key="key" @click="goDetailPage(page)">
<text class="uni-navigate-text"
:class="page.enable != true ? 'text-disabled' : ''">{{page.name}}</text>
<image :src="arrowRightIcon" class="uni-icon"></image>
</view>
</view>
</view>
</view>
</template>
<script lang="ts">
type Page = {
name : string,
enable ?: boolean,
url ?: string
}
type ListItem = {
id : string,
name : string,
open : boolean,
pages : Page[],
url ?: string,
enable ?: boolean
}
export default {
data() {
return {
list: [{
id: 'view',
name: '视图容器',
open: false,
pages: [
{
name: 'view',
enable: true
},
{
name: 'scroll-view',
enable: true
},
{
name: 'swiper',
enable: true
},
// #ifndef MP-TOUTIAO || MP-LARK
{
name: 'movable-view',
enable: false
},
{
name: 'cover-view',
enable: false
},
// #endif
{
name:'list',
enable:true
}
] as Page[]
}, {
id: 'content',
name: '基础内容',
open: false,
pages: [
{
name: 'text',
enable: true
},
{
name: 'rich-text',
enable: false
},
{
name: 'progress',
enable: true
}
] as Page[]
}, {
id: 'form',
name: '表单组件',
open: false,
pages: [
{
name: 'button',
enable: true
},
{
name: 'checkbox',
enable: true
},
{
name: 'form',
enable: false
},
{
name: 'input',
enable: true
}, {
name: 'label',
enable: false
}, {
name: 'picker',
enable: false
}, {
name: 'picker-view',
enable: false
}, {
name: 'radio',
enable: true
}, {
name: 'slider',
enable: true
}, {
name: 'slider-100',
enable: true
},{
name: 'switch',
enable: true
}, {
name: 'textarea',
enable: true
},
// #ifdef APP-PLUS || MP-WEIXIN || H5 || MP-BAIDU
{
name: 'editor',
enable: false
},
// #endif
] as Page[]
}, {
id: 'nav',
name: '导航',
open: false,
pages: [{
name: 'navigator',
enable: false
}] as Page[]
}, {
id: 'media',
name: '媒体组件',
open: false,
pages: [{
name: 'image',
enable: true
}, {
name: 'video',
enable: false
}] as Page[]
},
// #ifndef MP-TOUTIAO || MP-KUAISHOU
{
id: 'map',
name: '地图',
open: false,
pages: [
{
name: 'map',
enable: false
}
] as Page[]
},
// #endif
// #ifndef QUICKAPP-WEBVIEW-UNION
{
id: 'canvas',
name: '画布',
open: false,
pages: [
{
name: 'canvas'
}
] as Page[]
},
// #endif
// #ifdef APP-PLUS || H5
{
id: 'web-view',
name: '网页',
open: false,
pages: [
{
name: '网络网页',
enable: true,
url: '/pages/component/web-view/web-view'
},
{
name: '本地网页',
enable: true,
url: '/pages/component/web-view-local/web-view-local'
}
] as Page[]
},
// #endif
// #ifndef H5 || MP-BAIDU || QUICKAPP-WEBVIEW || MP-LARK || MP-JD
{
id: 'ad',
url: 'ad',
name: 'AD组件',
enable: false,
open: false,
pages: [] as Page[]
}
// #endif
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
methods: {
triggerCollapse(index ?: number, item : ListItem) {
if (item.pages.length == 0) {
const page : Page = {
name: item.name,
enable: item.enable,
url: item.url
}
this.goDetailPage(page);
return;
}
for (var i = 0; i < this.list.length; ++i) {
if (index == i) {
this.list[i].open = !this.list[i].open;
} else {
this.list[i].open = false;
}
}
},
goDetailPage(e : Page) {
if (e.enable != true) {
uni.showToast({
icon: 'none',
title: '暂不支持'
})
return
}
const url = e.url != null ? e.url! : `/pages/component/${e.name}/${e.name}`
uni.navigateTo({
url
})
}
}
}
</script>
<style>
@import '../../
../common/uni-uvue.css';
}
] as Page[]
}, {
id: 'content',
name: '基础内容',
open: false,
pages: [
{
name: 'text',
enable: true
},
{
name: 'rich-text',
enable: false
},
{
name: 'progress',
enable: true
}
] as Page[]
}, {
id: 'form',
name: '表单组件',
open: false,
pages: [
{
name: 'button',
enable: true
},
{
name: 'checkbox',
enable: true
},
{
name: 'form',
enable: false
},
{
name: 'input',
enable: true
}, {
name: 'label',
enable: false
}, {
name: 'picker',
enable: false
}, {
name: 'picker-view',
enable: false
}, {
name: 'radio',
enable: true
}, {
name: 'slider',
enable: true
}, {
name: 'slider-100',
enable: true
},{
name: 'switch',
enable: true
}, {
name: 'textarea',
enable: true
},
// #ifdef APP-PLUS || MP-WEIXIN || H5 || MP-BAIDU
{
name: 'editor',
enable: false
},
// #endif
] as Page[]
}, {
id: 'nav',
name: '导航',
open: false,
pages: [{
name: 'navigator',
enable: false
}] as Page[]
}, {
id: 'media',
name: '媒体组件',
open: false,
pages: [{
name: 'image',
enable: true
}, {
name: 'video',
enable: false
}] as Page[]
},
// #ifndef MP-TOUTIAO || MP-KUAISHOU
{
id: 'map',
name: '地图',
open: false,
pages: [
{
name: 'map',
enable: false
}
] as Page[]
},
// #endif
// #ifndef QUICKAPP-WEBVIEW-UNION
{
id: 'canvas',
name: '画布',
open: false,
pages: [
{
name: 'canvas'
}
] as Page[]
},
// #endif
// #ifdef APP-PLUS || H5
{
id: 'web-view',
name: '网页',
open: false,
pages: [
{
name: '网络网页',
enable: true,
url: '/pages/component/web-view/web-view'
},
{
name: '本地网页',
enable: true,
url: '/pages/component/web-view-local/web-view-local'
}
] as Page[]
},
// #endif
// #ifndef H5 || MP-BAIDU || QUICKAPP-WEBVIEW || MP-LARK || MP-JD
{
id: 'ad',
url: 'ad',
name: 'AD组件',
enable: false,
open: false,
pages: [] as Page[]
}
// #endif
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
arrowRightIcon: '/static/icons/arrow-right.png',
}
},
methods: {
triggerCollapse(index ?: number, item : ListItem) {
if (item.pages.length == 0) {
const page : Page = {
name: item.name,
enable: item.enable,
url: item.url
}
this.goDetailPage(page);
return;
}
for (var i = 0; i < this.list.length; ++i) {
if (index == i) {
this.list[i].open = !this.list[i].open;
} else {
this.list[i].open = false;
}
}
},
goDetailPage(e : Page) {
if (e.enable != true) {
uni.showToast({
icon: 'none',
title: '暂不支持'
})
return
}
const url = e.url != null ? e.url! : `/pages/component/${e.name}/${e.name}`
uni.navigateTo({
url
})
}
}
}
</script>
<style>
@import '../../
common/uni-uvue.css';
</style>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录