Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
AI_BOOK_TOOL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
AI_BOOK_TOOL
Commits
998aca24
Commit
998aca24
authored
Aug 08, 2025
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 合页逻辑处理
parent
84d21769
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
79905 additions
and
352346 deletions
+79905
-352346
defaultData.json
play/defaultData.json
+79522
-0
defaultData_1.json
play/defaultData_1.json
+0
-352128
index.css
play/index.css
+57
-9
index.html
play/index.html
+13
-9
index.js
play/index.js
+313
-200
No files found.
play/defaultData.json
0 → 100644
View file @
998aca24
This diff is collapsed.
Click to expand it.
play/defaultData_1.json
deleted
100644 → 0
View file @
84d21769
This diff is collapsed.
Click to expand it.
play/index.css
View file @
998aca24
...
...
@@ -41,6 +41,63 @@ body {
justify-content
:
center
;
}
/* 多页显示样式 */
.page-wrapper
{
position
:
relative
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
flex
:
1
;
margin
:
0
;
padding
:
0
;
}
/* 多页时的容器样式 */
.image-container.multi-page-container
{
justify-content
:
stretch
;
gap
:
0
;
}
.image-container.multi-page-container
.page-wrapper
{
flex
:
1
;
width
:
50%
;
margin
:
0
;
padding
:
0
;
}
/* 单页时的容器样式 */
.image-container
:not
(
.multi-page-container
)
{
justify-content
:
center
;
}
.image-container
:not
(
.multi-page-container
)
.page-wrapper
{
flex
:
none
;
width
:
auto
;
}
.page-image
{
max-width
:
100%
;
max-height
:
100%
;
object-fit
:
contain
;
display
:
block
;
}
/* 多页时的样式 */
.page-image.multi-page
{
width
:
100%
;
height
:
100%
;
object-fit
:
contain
;
margin
:
0
;
padding
:
0
;
}
/* 当只有一页时的样式 */
.page-image
:not
(
.multi-page
)
{
max-width
:
100%
;
max-height
:
100%
;
object-fit
:
contain
;
}
.highlight-rect
{
position
:
absolute
;
border
:
2px
dashed
#007bff
;
...
...
@@ -61,15 +118,6 @@ body {
box-shadow
:
0
0
5px
rgba
(
255
,
235
,
59
,
0.5
);
}
.image-container
{
position
:
relative
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.controls
{
position
:
absolute
;
bottom
:
20px
;
...
...
play/index.html
View file @
998aca24
...
...
@@ -47,15 +47,19 @@
</button>
<!-- 图片容器 -->
<div
class=
"image-container"
>
<div
class=
"image-container"
:class=
"{ 'multi-page-container': currentPages.length > 1 }"
>
<!-- 多页显示 -->
<div
v-for=
"(page, pageIndex) in currentPages"
:key=
"pageIndex"
class=
"page-wrapper"
>
<img
v-if=
"currentPage
"
:src=
"currentP
age.image_url"
:alt=
"'第' + (currentPageIndex
+ 1) + '页'"
v-if=
"page.image_url
"
:src=
"p
age.image_url"
:alt=
"'第' + (currentPageIndices[pageIndex]
+ 1) + '页'"
class=
"page-image"
:class=
"{ 'multi-page': currentPages.length > 1 }"
@
load=
"onImageLoad"
@
error=
"onImageError"
/>
</div>
<!-- 蓝色矩形框 -->
<div
...
...
play/index.js
View file @
998aca24
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment