refactor:屏幕宽度兼容

This commit is contained in:
fanxb 2021-03-13 17:16:12 +08:00
parent 1be1b94c71
commit 4c407c5b60
4 changed files with 15 additions and 5 deletions

View File

@ -283,7 +283,7 @@ public class BookmarkServiceImpl implements BookmarkService {
}
try {
URL urlObj = new URL(url);
byte[] data = HttpUtil.download(urlIconAddress + "/icon?url=" + urlObj.getHost() + "&size=15..32..120");
byte[] data = HttpUtil.download(urlIconAddress + "/icon?url=" + urlObj.getHost() + "&size=8..16..32");
String base64 = new String(Base64.getEncoder().encode(data));
if (StrUtil.isEmpty(base64)) {
return "data:image/png;base64," + base64;

View File

@ -15,13 +15,23 @@ export default {};
.main {
position: relative;
margin: 0 auto;
padding: 0.08rem;
margin-top: @topHeight;
min-height: calc(~"100vh" - @sum);
width: 90%;
font-size: 0.14rem;
background-color: white;
}
@media screen and (max-width: 500px) {
.main {
width: 96%;
}
}
@media screen and (min-width: 500px) {
.main {
width: 90%;
}
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<div class="main" v-if="userInfo">
<a class="ico" href="/"><img src="/static/img/bookmarkLogo.png" /></a>
<a class="ico" href="/"><img src="/static/img/bookmarkLogo.png" style="height:100%" /></a>
<a-dropdown>
<div class="user">
<img :src="userInfo.icon" class="userIcon" />

View File

@ -41,7 +41,7 @@
<a-dropdown :trigger="['contextmenu']" slot="nodeTitle" slot-scope="rec">
<div class="titleContext">
<a-icon type="folder" v-if="!rec.dataRef.isLeaf" />
<img v-else-if="rec.dataRef.icon.length>0" :src="rec.dataRef.icon" style="width:1.2em" />
<img v-else-if="rec.dataRef.icon.length>0" :src="rec.dataRef.icon" style="width:16px" />
<a-icon type="book" v-else />
<span @click.prevent style="display:inline-block;min-width:50%;padding-left:0.4em">
{{rec.dataRef.name}}