-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dfd8ea7
commit a1799b2
Showing
8 changed files
with
1,463 additions
and
1,107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<template> | ||
<hovershow-button icon="../static/progress.svg" :hideIcon="true"> | ||
<div class="hovershow-selector" style="padding-right:0.5em"> | ||
<input style="width:auto;font-size: 1.25em;padding-right:0.5em" v-if="current" type="number" min="1" :max="total" step="1" v-model="current" @change="changeFontSize()"> | ||
<span v-else>…</span> | ||
<span>{{"/ "+(total||"…")}}</span> | ||
</div> | ||
</hovershow-button> | ||
</template> | ||
<style> | ||
</style> | ||
<script> | ||
import hoverShowButton from '../HoverShowButton.vue' | ||
import hoverShow from '../../mixins/hovershow.vue' | ||
import { setTimeout } from 'timers'; | ||
export default { | ||
data() { | ||
return { | ||
total: undefined, | ||
current: undefined, | ||
bookLoaded: false | ||
} | ||
}, | ||
mixins: [hoverShow], | ||
components: { | ||
"hovershow-button": hoverShowButton | ||
}, | ||
methods: { | ||
changeFontSize() { | ||
this.$bus.emit("changePage",this.current) | ||
} | ||
}, | ||
mounted() { | ||
//应该改成异步获取事件来修改值,暂时先循环检查 | ||
// this.changeFontSize() | ||
this.$bus.on("currentProgress", ({ total, current }) => { | ||
this.bookLoaded = true | ||
if (total && current) { | ||
this.total = total | ||
this.current = current | ||
} | ||
else { | ||
console.log("进度读取错误") | ||
this.total = undefined | ||
this.current = undefined | ||
} | ||
}) | ||
} | ||
} | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.