Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
b7acaf7a
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
5995
Star
90
Fork
162
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
18
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
18
Issue
18
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
b7acaf7a
编写于
9月 04, 2023
作者:
W
wanganxp
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整tabbar顺序,修复复杂长列表加载第二页重复的bug
上级
7485f26c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
80 addition
and
85 deletion
+80
-85
pages/API/exit/exit.uvue
pages/API/exit/exit.uvue
+0
-5
pages/tabBar/API.uvue
pages/tabBar/API.uvue
+78
-78
pages/template/long-list/long-list-page.uvue
pages/template/long-list/long-list-page.uvue
+2
-2
未找到文件。
pages/API/exit/exit.uvue
浏览文件 @
b7acaf7a
...
...
@@ -6,11 +6,6 @@
<script>
export default {
data() {
return {
}
},
methods: {
exitAppClick:function(){
uni.exit({
...
...
pages/tabBar/API.uvue
浏览文件 @
b7acaf7a
...
...
@@ -36,8 +36,9 @@
<script lang="uts">
type Page = {
name : string
enable ?: boolean
url : string
enable ?: boolean
api ?: Array<string>
}
type ListItem = {
id : string
...
...
@@ -52,8 +53,8 @@
return {
list: [
{
id: '
bas
e',
name: '
基础
',
id: '
globl
e',
name: '
全局
',
open: false,
pages: [
{
...
...
@@ -63,31 +64,40 @@
{
name: 'getCurrentPages',
url: 'get-current-pages',
},
}
] as Page[],
},
{
id: 'base',
name: '基础',
open: false,
pages: [
{
name: '事件总线event-bus',
url: 'event-bus',
name: '事件总线event-bus',
url: 'event-bus',
api:["$on","$once","$off","$emit"]
},
{
name: '获取启动参数',
url: 'get-launch-options-sync',
},
{
name: '退出应用',
url: 'exit',
},
] as Page[],
},
{
id: 'page',
name: '页面',
name: '页面
和路由
',
open: false,
pages: [
{
name: '页面跳转',
url: 'navigator',
},
/* {
name: '页面栈管理',
url: 'getCurrentPages',
enable: false,
url: 'navigator',
api:["navigator","reLaunch","navigateBack","redirectTo","switchTab"]
},
/*
{
name: '设置导航条标题',
url: 'set-navigation-bar-title',
...
...
@@ -99,18 +109,53 @@
},
{
name: '设置TabBar',
url: 'set-tabbar',
url: 'set-tabbar',
api:["showTabBar","hideTabBar","showTabBarRedDot","hideTabBarRedDot","setTabBarBadge","removeTabBarBadge","setTabBarStyle","setTabBarItem"]
},
{
name: '页面下拉刷新',
url: 'pull-down-refresh',
url: 'pull-down-refresh',
api:["stopPullDownRefresh"]
},
{
name: '将页面滚动到指定位置',
url: 'page-scroll-to',
},
] as Page[],
},
},
{
id: 'network',
name: '网络',
open: false,
pages: [
{
name: '发起一个请求',
url: 'request',
},
{
name: '上传文件',
url: 'upload-file',
},
{
name: '下载文件',
url: 'download-file',
},
{
name: '获取设备网络状态',
url: 'get-network-type',
},
{
name: 'socketTask',
url: 'websocket-socketTask',
api:[""] //它不是uni.的api
},
{
name: '全局websocket',
url: 'websocket-global',
api:["connectSocket","onSocketOpen","onSocketError","sendSocketMessage","onSocketMessage","closeSocket","onSocketClose"]
},
] as Page[],
},
{
id: 'ui',
name: '界面',
...
...
@@ -133,7 +178,8 @@
}, */
{
name: '节点信息',
url: 'nodes-info',
url: 'nodes-info',
api:["createSelectorQuery"]
},
{
name: '显示操作菜单',
...
...
@@ -141,7 +187,8 @@
},
{
name: '显示模态弹窗',
url: 'modal',
url: 'modal',
api:["showModal"]
},
{
name: '显示加载提示框',
...
...
@@ -149,7 +196,8 @@
},
{
name: '显示消息提示框',
url: 'toast',
url: 'toast',
api:["showToast"]
},
{
name: '动态加载字体',
...
...
@@ -162,10 +210,6 @@
name: '设备',
open: false,
pages: [
{
name: '获取设备网络状态',
url: 'get-network-type',
},
{
name: '获取系统信息',
url: 'get-system-info',
...
...
@@ -175,20 +219,20 @@
url: 'get-device-info',
},
{
name: '获取
APP基础
信息',
url: 'get-
app-base
-info',
name: '获取
窗口
信息',
url: 'get-
window
-info',
},
{
name: '获取
系统设置
',
url: 'get-
system-setting
',
name: '获取
APP基础信息
',
url: 'get-
app-base-info
',
},
{
name: '获取APP授权设置',
url: 'get-app-authorize-setting',
},
{
name: '获取
窗口信息
',
url: 'get-
window-info
',
name: '获取
系统设置
',
url: 'get-
system-setting
',
},
{
name: '电量',
...
...
@@ -248,40 +292,6 @@
}, */
] as Page[],
},
{
id: 'network',
name: '网络',
open: false,
pages: [
{
name: '发起一个请求',
url: 'request',
},
{
name: '上传文件',
url: 'upload-file',
},
{
name: '下载文件',
url: 'download-file',
},
] as Page[],
},
{
id: 'websocket',
name: 'websocket',
open: false,
pages: [
{
name: 'socketTask',
url: 'websocket-socketTask',
},
{
name: '全局websocket',
url: 'websocket-global',
},
] as Page[],
},
{
id: 'media',
name: '媒体',
...
...
@@ -289,7 +299,8 @@
pages: [
{
name: '图片选择和预览',
url: 'preview-image',
url: 'preview-image',
api: ["previewImage","closePreviewImage","chooseImage"]
},
{
name: "保存图片到相册",
...
...
@@ -355,12 +366,13 @@
},
{
id: 'storage',
name: '存储',
name: '
数据
存储',
open: false,
pages: [
{
name: 'storage(key-value存储)',
url: 'storage',
url: 'storage',
api:["uni.getStorageInfo","uni.getStorageInfoSync","uni.getStorage","uni.getStorageSync","uni.setStorage","uni.setStorageSync","uni.removeStorage","uni.removeStorageSync","uni.clearStorage","uni.clearStorageSync"]
},
] as Page[],
},
...
...
@@ -439,18 +451,6 @@
},
] as Page[],
}, */
{
id: 'exit',
name: '退出',
open: false,
pages: [
{
name: 'exit退出',
url: 'exit',
enable: true
},
] as Page[],
},
] as ListItem[],
arrowUpIcon: '/static/icons/arrow-up.png',
arrowDownIcon: '/static/icons/arrow-down.png',
...
...
pages/template/long-list/long-list-page.uvue
浏览文件 @
b7acaf7a
...
...
@@ -69,7 +69,7 @@
dataList: [] as ListItem[],
isEnded: false,
loadingError: '',
$currentPage:
0
$currentPage:
1
}
},
computed: {
...
...
@@ -133,7 +133,7 @@
})
},
// score 0 ~ 50
convertToStarUnicode(score :
N
umber) : string {
convertToStarUnicode(score :
n
umber) : string {
const fill_code = '\ue879'
const half_code = '\ue87a'
const null_code = '\ue87b'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录