新增软件界面元素大小调整

This commit is contained in:
lyswhut
2020-03-12 23:33:19 +08:00
parent 3fdff4e6eb
commit a2c84392f4
15 changed files with 112 additions and 23 deletions
+7 -2
View File
@@ -47,7 +47,7 @@ export default {
}
},
computed: {
...mapGetters(['setting', 'theme', 'version']),
...mapGetters(['setting', 'theme', 'version', 'windowSizeActive']),
...mapGetters('list', ['defaultList', 'loveList']),
...mapGetters('download', {
downloadList: 'list',
@@ -104,6 +104,9 @@ export default {
}))
}
},
'windowSizeActive.fontSize'(n) {
document.documentElement.style.fontSize = n
},
},
methods: {
...mapActions(['getVersionInfo']),
@@ -112,6 +115,8 @@ export default {
...mapMutations('download', ['updateDownloadList']),
...mapMutations(['setSetting']),
init() {
document.documentElement.style.fontSize = this.windowSizeActive.fontSize
rendererInvoke('getEnvParams').then(this.handleEnvParamsInit)
document.body.addEventListener('click', this.handleBodyClick, true)
@@ -165,7 +170,7 @@ export default {
this.$nextTick(() => {
this.showUpdateModal()
})
}, 60 * 30 * 1000)
}, 3 * 1000)
this.initData()
this.globalObj.apiSource = this.setting.apiSource
+6 -2
View File
@@ -4,6 +4,10 @@
-webkit-user-drag: none;
}
html {
font-size: 16px;
}
.nobreak {
white-space: nowrap;
}
@@ -53,11 +57,11 @@ table {
border-top: none;
}
td {
padding: 5px;
padding: 6px;
position: relative;
transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
font-size: 13px;
line-height: 1.4;
line-height: 18px;
vertical-align: middle;
}
}
+1
View File
@@ -31,6 +31,7 @@ export default {
outline: none;
transition: background-color 0.2s ease;
background-color: @color-btn-background;
font-size: 14px;
&[disabled] {
opacity: .4;
}
+3 -3
View File
@@ -79,9 +79,9 @@ export default {
background-color: transparent;
border: none;
border-radius: @form-radius;
margin-right: 5px;
margin-right: 2px;
cursor: pointer;
padding: 4px 7px;
padding: 6px 10px;
color: @color-btn;
outline: none;
transition: background-color 0.2s ease;
@@ -91,7 +91,7 @@ export default {
}
svg {
height: 1.2em;
width: 18px;
}
&:hover {
@@ -88,6 +88,8 @@ export default {
@import '../../assets/styles/layout.less';
.btns {
line-height: 1;
button {
background-color: transparent;
border: none;
@@ -104,7 +106,7 @@ export default {
}
svg {
height: 1.2em;
height: 16px;
}
&:hover {
@@ -83,6 +83,7 @@ export default {
border-top-left-radius: 4px;
color: @color-btn;
cursor: pointer;
.mixin-ellipsis-1;
&:hover {
background-color: @color-theme_2-hover;
@@ -116,6 +117,7 @@ export default {
transition: background-color @transition-theme;
background-color: @color-btn-background;
box-sizing: border-box;
.mixin-ellipsis-1;
&:hover {
background-color: @color-theme_2-hover;
+3 -7
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" :style="{ width: listStyle }" @click.stop ref="dom_list")
div.scroll(:class="$style.list" :style="{ width: windowSizeActive.tabList }" @click.stop ref="dom_list")
div(:class="$style.tag" @click="handleClick(null)") {{$t('material.tag_list.default')}}
dl(v-for="type in list")
dt(:class="$style.type") {{type.name}}
@@ -28,11 +28,7 @@ export default {
},
},
computed: {
...mapGetters(['setting', 'windowSizeList']),
listStyle() {
let info = this.windowSizeList.find(i => i.id === this.setting.windowSizeId) || this.windowSizeList[0]
return info.tabList
},
...mapGetters(['setting', 'windowSizeActive']),
},
data() {
return {
@@ -117,7 +113,7 @@ export default {
margin-left: 7px;
line-height: 0;
svg {
width: 1em;
width: .9em;
transition: transform .2s ease;
transform: rotate(0);
}
+3
View File
@@ -46,4 +46,7 @@ export default {
windowSizeList(state) {
return state.windowSizeList
},
windowSizeActive(state) {
return state.windowSizeList.find(i => i.id === state.setting.windowSizeId) || state.windowSizeList[0]
},
}
+6 -6
View File
@@ -5,7 +5,7 @@ export default {
list: [
{
id: 'kgtop500',
name: 'TOP500',
name: '酷狗TOP500',
bangid: '8888',
},
{
@@ -53,11 +53,11 @@ export default {
name: 'DJ热歌榜',
bangid: '24971',
},
{
id: 'kghyxgb',
name: '华语新歌榜',
bangid: '31308',
},
// {
// id: 'kghyxgb',
// name: '华语新歌榜',
// bangid: '31308',
// },
],
getUrl(p, id) {
return `http://www2.kugou.kugou.com/yueku/v9/rank/home/${p}-${id}.html`
-1
View File
@@ -711,7 +711,6 @@ export default {
height: 28px;
line-height: 28px;
padding: 0px 15px;
vertical-align: top;
svg {
width: 1em;
vertical-align: middle;