|
|
@@ -1,21 +1,20 @@
|
|
|
<template>
|
|
|
<div class="pdf-controller">
|
|
|
- <!-- <icon :class="pageMarked ? 'active' : ''" @click="handleMarkButtonClicked"-->
|
|
|
- <!-- :unicode="pageMarked ? iconMap['mark'] : iconMap['mark_border']" title="收藏本页"/>-->
|
|
|
- <!-- <icon></icon>-->
|
|
|
- <a :href="src">
|
|
|
- <icon-button title="上一页">cloud_download</icon-button>
|
|
|
- </a>
|
|
|
- <div class="spacer"></div>
|
|
|
- <icon-button @click="handlePrevious" title="上一页">navigate_before</icon-button>
|
|
|
- <!-- <icon-button @click="handleScreenShot" title="将本页截图"></icon-button>-->
|
|
|
- <label class="to-page-action">
|
|
|
- {{currentPage}} / {{totalPages}}
|
|
|
- <c-input placeholder="to" ref="input" type="number" v-model="toPage" @input="handleToPage"/>
|
|
|
- </label>
|
|
|
- <icon-button @click="handleNext" title="下一页">navigate_next</icon-button>
|
|
|
- <div class="spacer"></div>
|
|
|
- <icon-button :theme="showDiscussion ? 'blue' : null" @click="handleDiscussionShowState" title="讨论区">chat_bubble
|
|
|
+ <div class="actions" :class="hide ? 'hide-actions' : ''">
|
|
|
+ <a :href="src">
|
|
|
+ <icon-button title="上一页">cloud_download</icon-button>
|
|
|
+ </a>
|
|
|
+ <icon-button @click="handlePrevious" title="上一页">navigate_before</icon-button>
|
|
|
+ <label class="to-page-action">
|
|
|
+ {{currentPage}} / {{totalPages}}
|
|
|
+ <c-input placeholder="to" ref="input" type="number" v-model="toPage" @input="handleToPage"/>
|
|
|
+ </label>
|
|
|
+ <icon-button @click="handleNext" title="下一页">navigate_next</icon-button>
|
|
|
+ <icon-button :theme="showDiscussion ? 'blue' : null" @click="handleDiscussionShowState" title="讨论区">chat_bubble
|
|
|
+ </icon-button>
|
|
|
+ </div>
|
|
|
+ <icon-button theme="blue" @click="hide = !hide" title="讨论区" class="show-button" :class="hide ? 'show-button-hide' : 'show-button-show'">
|
|
|
+ expand_less
|
|
|
</icon-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -32,7 +31,8 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
pageMarked: false,
|
|
|
- toPage: ''
|
|
|
+ toPage: '',
|
|
|
+ hide: false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -79,34 +79,82 @@ export default {
|
|
|
@import '~@/style/theme.scss';
|
|
|
|
|
|
.pdf-controller {
|
|
|
- padding: 0 8px;
|
|
|
- max-width: 600px;
|
|
|
- margin: 8px auto;
|
|
|
- box-sizing: border-box;
|
|
|
+ position: fixed;
|
|
|
+ right: 12px;
|
|
|
+ top: 12px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- width: 100%;
|
|
|
+ justify-content: center;
|
|
|
+
|
|
|
+ transition: .2s ease-out;
|
|
|
}
|
|
|
|
|
|
-.spacer {
|
|
|
- max-width: 24px;
|
|
|
- flex: 1;
|
|
|
+.actions {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+
|
|
|
+ padding: 4px 12px;
|
|
|
+ margin-right: 12px;
|
|
|
+
|
|
|
+ border-radius: 12px;
|
|
|
+ background-color: #daeafa66;
|
|
|
+ backdrop-filter: saturate(150%) blur(20px);
|
|
|
+
|
|
|
+ transition: .2s ease-out;
|
|
|
+
|
|
|
+ .icon-button {
|
|
|
+ margin: 0 4px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.hide-actions {
|
|
|
+ transform: translateY(-80px);
|
|
|
}
|
|
|
|
|
|
.to-page-action {
|
|
|
color: #7a8a9a;
|
|
|
+ padding: 0 6px;
|
|
|
+ font-size: 14px;
|
|
|
|
|
|
.c-input {
|
|
|
- max-width: 54px;
|
|
|
+ max-width: 40px;
|
|
|
height: 30px;
|
|
|
- margin-left: 12px;
|
|
|
+ font-size: 14px;
|
|
|
+ padding-left: 8px;
|
|
|
+ background-color: white;
|
|
|
+ margin-left: 6px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-@media (max-width: 480px) {
|
|
|
- .spacer {
|
|
|
- max-width: 12px;
|
|
|
+.show-button {
|
|
|
+ transition: .2s ease-out;
|
|
|
+}
|
|
|
+
|
|
|
+.show-button-hide {
|
|
|
+ transform: scale(-1);
|
|
|
+}
|
|
|
+
|
|
|
+.show-button-show {
|
|
|
+ transform: scale(1);
|
|
|
+}
|
|
|
+
|
|
|
+@media (max-width: 500px) {
|
|
|
+ .show-button {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .hide-actions {
|
|
|
+ transform: translateY(0);
|
|
|
+ }
|
|
|
+
|
|
|
+ .actions {
|
|
|
+ padding: 4px 6px;
|
|
|
+ margin-right: 0;
|
|
|
+
|
|
|
+ .icon-button {
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|