新增窗口大小设置

This commit is contained in:
lyswhut
2019-10-22 01:25:03 +08:00
parent c97bc5edfc
commit 31e8b466cf
13 changed files with 118 additions and 18 deletions
+2 -2
View File
@@ -68,8 +68,8 @@ export default {
}
.logo {
box-sizing: border-box;
padding: 20px;
height: 100px;
padding: 12% 13%;
// height: 120px;
color: @color-theme-font;
flex: none;
}
+9 -6
View File
@@ -88,8 +88,6 @@ export default {
msDownX: 0,
msDownVolume: 0,
},
handleVolumeMsMoveFn: null,
handleVolumeMsUpFn: null,
}
},
computed: {
@@ -125,12 +123,14 @@ export default {
this.setVolume(volume)
}, 300)
document.addEventListener('mousemove', this.handleVolumeMsMoveFn = this.handleVolumeMsMove.bind(this))
document.addEventListener('mouseup', this.handleVolumeMsUpFn = this.handleVolumeMsUp.bind(this))
document.addEventListener('mousemove', this.handleVolumeMsMove)
document.addEventListener('mouseup', this.handleVolumeMsUp)
window.addEventListener('resize', this.handleResize)
},
beforeDestroy() {
document.removeEventListener('mousemove', this.handleVolumeMsMoveFn)
document.removeEventListener('mouseup', this.handleVolumeMsUpFn)
document.removeEventListener('mousemove', this.handleVolumeMsMove)
document.removeEventListener('mouseup', this.handleVolumeMsUp)
window.removeEventListener('resize', this.handleResize)
},
watch: {
changePlay(n) {
@@ -489,6 +489,9 @@ export default {
handleCopy(text) {
clipboardWriteText(text)
},
handleResize() {
this.setProgessWidth()
},
},
}
</script>
+9 -1
View File
@@ -5,7 +5,7 @@
div(:class="$style.icon")
svg(version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 451.847 451.847' space='preserve')
use(xlink:href='#icon-down')
div.scroll(:class="$style.list" @click.stop ref="dom_list")
div.scroll(:class="$style.list" :style="{ width: listStyle }" @click.stop ref="dom_list")
div(:class="$style.tag" @click="handleClick(null)") 默认
dl(v-for="type in list")
dt(:class="$style.type") {{type.name}}
@@ -14,6 +14,7 @@
<script>
import { isChildren } from '../../utils'
import { mapGetters } from 'vuex'
export default {
props: {
list: {
@@ -26,6 +27,13 @@ export default {
type: Object,
},
},
computed: {
...mapGetters(['setting', 'windowSizeList']),
listStyle() {
let info = this.windowSizeList.find(i => i.id === this.setting.windowSizeId) || this.windowSizeList[0]
return info.tabList
},
},
data() {
return {
show: false,