Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
exhibition_page
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
龙菲
exhibition_page
Commits
5e0dca93
提交
5e0dca93
authored
11月 08, 2022
作者:
龙菲
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完善展览详情页的tabbar滚动联动交互效果
上级
722faeb9
全部展开
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
39 行增加
和
9 行删除
+39
-9
index.vue
src/components/SlideImage/index.vue
+0
-1
index.vue
src/components/SlideImageGroup/index.vue
+3
-3
index.js
src/utils/index.js
+36
-5
BlueStyle.vue
src/views/display/components/BlueStyle.vue
+0
-0
没有找到文件。
src/components/SlideImage/index.vue
浏览文件 @
5e0dca93
...
@@ -101,7 +101,6 @@ export default {
...
@@ -101,7 +101,6 @@ export default {
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
const
swiperTop
=
this
.
$refs
.
swiperTop
.
swiper
;
const
swiperTop
=
this
.
$refs
.
swiperTop
.
swiper
;
const
swiperThumbs
=
this
.
$refs
.
swiperThumbs
.
swiper
;
const
swiperThumbs
=
this
.
$refs
.
swiperThumbs
.
swiper
;
console
.
log
(
this
.
$refs
);
swiperTop
.
controller
.
control
=
swiperThumbs
;
swiperTop
.
controller
.
control
=
swiperThumbs
;
swiperThumbs
.
controller
.
control
=
swiperTop
;
swiperThumbs
.
controller
.
control
=
swiperTop
;
});
});
...
...
src/components/SlideImageGroup/index.vue
浏览文件 @
5e0dca93
...
@@ -137,7 +137,7 @@ $themeColor: #2069c4;
...
@@ -137,7 +137,7 @@ $themeColor: #2069c4;
height
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
padding-bottom
:
6
0px
;
padding-bottom
:
1
0px
;
.img-container
{
.img-container
{
width
:
100%
;
width
:
100%
;
// height: 100%;
// height: 100%;
...
@@ -165,8 +165,8 @@ $themeColor: #2069c4;
...
@@ -165,8 +165,8 @@ $themeColor: #2069c4;
}
}
.enlarge
{
.enlarge
{
position
:
absolute
;
position
:
absolute
;
bottom
:
80
px
;
bottom
:
19
px
;
right
:
0
px
;
right
:
-7
px
;
display
:
flex
;
display
:
flex
;
z-index
:
9
;
z-index
:
9
;
display
:
flex
;
display
:
flex
;
...
...
src/utils/index.js
浏览文件 @
5e0dca93
...
@@ -42,7 +42,7 @@ export function getFullUrl(url) {
...
@@ -42,7 +42,7 @@ export function getFullUrl(url) {
* @param href 预览地址
* @param href 预览地址
* @param previewName 预览文件用户看到的名称
* @param previewName 预览文件用户看到的名称
*/
*/
export
function
previewFile
(
href
,
previewName
)
{
export
function
previewFile
(
href
,
previewName
)
{
let
a
=
document
.
createElement
(
"a"
);
let
a
=
document
.
createElement
(
"a"
);
a
.
href
=
href
;
a
.
href
=
href
;
a
.
target
=
'_blank'
a
.
target
=
'_blank'
...
@@ -58,10 +58,10 @@ export function getFullUrl(url) {
...
@@ -58,10 +58,10 @@ export function getFullUrl(url) {
* 增加千位分割符
* 增加千位分割符
* @param num
* @param num
*/
*/
export
function
addSeparator
(
num
){
export
function
addSeparator
(
num
)
{
var
res
=
num
.
toString
().
replace
(
/
\d
+/
,
function
(
n
)
{
// 先提取整数部分
var
res
=
num
.
toString
().
replace
(
/
\d
+/
,
function
(
n
)
{
// 先提取整数部分
return
n
.
replace
(
/
(\d)(?=(\d{3})
+$
)
/g
,
function
(
$1
)
{
return
n
.
replace
(
/
(\d)(?=(\d{3})
+$
)
/g
,
function
(
$1
)
{
return
$1
+
","
;
return
$1
+
","
;
});
});
})
})
return
res
;
return
res
;
...
@@ -83,3 +83,34 @@ export function formatNum(num) {
...
@@ -83,3 +83,34 @@ export function formatNum(num) {
return
(
num
/
10000
).
toFixed
(
1
)
+
'w'
;
return
(
num
/
10000
).
toFixed
(
1
)
+
'w'
;
}
}
}
}
// 监听某元素是否在可视区,使用getBoundingClientRect
export
const
isElementInViewport
=
function
(
el
)
{
// rect.top 元素距离视窗的位置
//window.innerHeight || document.documentElement.clientHeight 文档的高度,前为BOM对象方式获取,后为DOM对象方式获取
if
(
el
)
{
const
viewWidth
=
window
.
innerWidth
||
document
.
documentElement
.
clientWidth
;
const
viewHeight
=
window
.
innerHeight
||
document
.
documentElement
.
clientHeight
;
const
{
top
,
right
,
bottom
,
left
}
=
el
.
getBoundingClientRect
();
return
(
top
>=
0
&&
left
>=
0
&&
right
<=
viewWidth
&&
bottom
<=
viewHeight
);
}
};
// 监听某元素是否在可视区,使用getBoundingClientRect
export
const
isElementInViewport2
=
function
(
content
)
{
let
scrollTop
=
window
.
pageYOffset
||
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
;
let
clientHeight
=
document
.
documentElement
.
clientHeight
||
window
.
innerHeight
;
if
(
content
)
{
return
(
content
.
offsetTop
+
content
.
offsetHeight
>
scrollTop
&&
content
.
offsetTop
<
scrollTop
+
clientHeight
)
}
};
src/views/display/components/BlueStyle.vue
浏览文件 @
5e0dca93
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论