提交 b7acaf7a 编写于 作者: W wanganxp

调整tabbar顺序,修复复杂长列表加载第二页重复的bug

上级 7485f26c
......@@ -6,11 +6,6 @@
<script>
export default {
data() {
return {
}
},
methods: {
exitAppClick:function(){
uni.exit({
......
......@@ -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: 'base',
name: '基础',
id: 'globle',
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',
......
......@@ -69,7 +69,7 @@
dataList: [] as ListItem[],
isEnded: false,
loadingError: '',
$currentPage: 0
$currentPage: 1
}
},
computed: {
......@@ -133,7 +133,7 @@
})
},
// score 0 ~ 50
convertToStarUnicode(score : Number) : string {
convertToStarUnicode(score : number) : 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.
先完成此消息的编辑!
想要评论请 注册