Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
f7a95d7d
Unverified
提交
f7a95d7d
authored
1月 04, 2022
作者:
fit2cloud-chenyw
提交者:
GitHub
1月 04, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1586 from dataease/pr@dev@fix_mobile_dir_scroll
fix: 移动端目录上下滑动不顺畅
上级
832c2447
8152b53b
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
83 行增加
和
103 行删除
+83
-103
.gitignore
mobile/.gitignore
+17
-0
index.vue
mobile/src/pages/tabBar/dir/index.vue
+66
-103
panel1.png
mobile/src/static/panelimg/panel1.png
+0
-0
panel2.png
mobile/src/static/panelimg/panel2.png
+0
-0
没有找到文件。
mobile/.gitignore
0 → 100644
浏览文件 @
f7a95d7d
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
tests/**/coverage/
# Editor directories and files
.hbuilderx
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
mobile/src/pages/tabBar/dir/index.vue
浏览文件 @
f7a95d7d
<
template
>
<view
class=
"page dataease-main"
>
<view
class=
"page"
>
<swiper
indicator-dots=
"true"
>
<swiper-item
v-for=
"(img, key) in imgUrls"
:key=
"key"
><image
:src=
"img"
/></swiper-item>
</swiper>
<view
class=
" "
>
<view
class=
"uni-title"
>
<uni-list
>
<uni-list-item
v-for=
"(node, index) in nodes"
:key=
"index"
:title=
"node.text"
:showArrow=
"node.type === 'folder'"
:thumb=
"node.type === 'folder' ? '../../../static/folder.png' : '../../../static/yibiaobans.png'"
thumb-size=
"base"
clickable
@
click=
"clickHandler(node)"
rightText=
""
/>
</uni-list>
<swiper
class=
"swiper-box"
style=
"flex: 1;"
:duration=
"300"
>
<swiper-item
class=
"swiper-item"
>
<uni-list
>
<uni-list-item
v-for=
"(node, index) in nodes"
:key=
"index"
:title=
"node.text"
:showArrow=
"node.type === 'folder'"
:thumb=
"node.type === 'folder' ? '../../../static/folder.png' : '../../../static/yibiaobans.png'"
thumb-size=
"base"
clickable
@
click=
"clickHandler(node)"
rightText=
""
/>
</uni-list>
</swiper-item>
</swiper>
</view>
</view>
<!--
<view
style=
"height: 1000rpx;"
></view>
-->
</view>
</
template
>
...
...
@@ -28,18 +33,17 @@ export default {
return
{
showSwiper
:
false
,
imgUrls
:
[
'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b4b60b10-5168-11eb-bd01-97bc1429a9ff.jpg'
,
'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b1dcfa70-5168-11eb-bd01-97bc1429a9ff.jpg'
],
nodes
:
[]
'../../../static/panelimg/panel2.png'
,
'../../../static/panelimg/panel1.png'
],
nodes
:
[]
};
},
onLoad
()
{
setTimeout
(()
=>
{
this
.
loadData
(
'panel_list'
);
},
350
)
},
onLoad
()
{
setTimeout
(()
=>
{
this
.
loadData
(
'panel_list'
);
},
350
)
},
/**
* 当 searchInput 配置 disabled 为 true 时触发
*/
...
...
@@ -48,54 +52,40 @@ export default {
url
:
'./search'
});
},
onPullDownRefresh
()
{
this
.
loadData
(
'panel_list'
);
},
/**
* 点击导航栏 buttons 时触发
*/
/* onNavigationBarButtonTap() {
uni.showModal({
title: '提示',
content: '用户点击了功能按钮,这里仅做展示。',
success: res => {
if (res.confirm) {
console.log('用户点击了确定');
}
}
});
} */
methods
:
{
loadData
(
pid
)
{
pid
=
pid
||
'panel_list'
const
param
=
{
pid
:
pid
}
requestDir
(
param
).
then
(
res
=>
{
this
.
nodes
=
res
.
data
uni
.
stopPullDownRefresh
();
}).
catch
(
e
=>
{
uni
.
stopPullDownRefresh
();
})
},
clickHandler
(
node
)
{
const
param
=
{
id
:
node
.
id
,
title
:
node
.
text
,
index
:
4
}
if
(
node
.
type
===
'panel'
)
{
uni
.
navigateTo
({
url
:
'../home/detail?detailDate='
+
encodeURIComponent
(
JSON
.
stringify
(
param
))
});
return
}
uni
.
navigateTo
({
url
:
'./folder?detailDate='
+
encodeURIComponent
(
JSON
.
stringify
(
param
))
});
}
}
onPullDownRefresh
()
{
this
.
loadData
(
'panel_list'
);
},
methods
:
{
loadData
(
pid
)
{
pid
=
pid
||
'panel_list'
const
param
=
{
pid
:
pid
}
requestDir
(
param
).
then
(
res
=>
{
this
.
nodes
=
res
.
data
uni
.
stopPullDownRefresh
();
}).
catch
(
e
=>
{
uni
.
stopPullDownRefresh
();
})
},
clickHandler
(
node
)
{
const
param
=
{
id
:
node
.
id
,
title
:
node
.
text
,
index
:
4
}
if
(
node
.
type
===
'panel'
)
{
uni
.
navigateTo
({
url
:
'../home/detail?detailDate='
+
encodeURIComponent
(
JSON
.
stringify
(
param
))
});
return
}
uni
.
navigateTo
({
url
:
'./folder?detailDate='
+
encodeURIComponent
(
JSON
.
stringify
(
param
))
});
}
}
};
</
script
>
...
...
@@ -110,31 +100,4 @@ swiper,
.page-section-title
{
margin-top
:
50
rpx
;
}
.dataease-main
{
position
:
fixed
;
left
:
var
(
--window-left
);
right
:
var
(
--window-right
);
top
:
40px
;
padding
:
5px
;
height
:
calc
(
100vh
-
90px
);
}
.swiper-box
{
flex
:
1
;
background-color
:
#ffffff
;
height
:
calc
(
100vh
-
100px
);
}
.swiper-item
{
flex
:
1
;
flex-direction
:
row
;
}
.uni-list
{
overflow-y
:
scroll
;
height
:
calc
(
100vh
-
100px
);
}
</
style
>
mobile/src/static/panelimg/panel1.png
0 → 100644
浏览文件 @
f7a95d7d
275.5 KB
mobile/src/static/panelimg/panel2.png
0 → 100644
浏览文件 @
f7a95d7d
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论