mirror of
https://github.com/blossom-editor/blossom
synced 2024-11-17 14:39:21 +08:00
perf: 优化无内容时的 placeholder
This commit is contained in:
parent
90dbc2fa34
commit
c52635661d
@ -62,6 +62,9 @@
|
||||
</bl-row>
|
||||
|
||||
<div class="web-item-container">
|
||||
<div v-if="isEmpty(data)" class="placeholder">
|
||||
无收藏网址,点击上方 <span class="iconbl bl-add-line" style="padding-right: 10px"></span>添加
|
||||
</div>
|
||||
<div v-for="(collect, index) in data" @click="closeForm">
|
||||
<bl-row just="flex-end" class="web-collect-group" :style="index == 0 ? 'marginTop:0' : ''">
|
||||
{{ collect.title }}
|
||||
@ -97,6 +100,7 @@ import { isNotBlank, isNotNull } from '@renderer/assets/utils/obj'
|
||||
import { openExtenal, openNewIconWindow } from '@renderer/assets/utils/electron'
|
||||
import { useLifecycle } from '@renderer/scripts/lifecycle'
|
||||
import { ViewStyle, useConfigStore } from '@renderer/stores/config'
|
||||
import { isEmpty } from 'lodash'
|
||||
|
||||
const configStore = useConfigStore()
|
||||
const viewStyle = ref<ViewStyle>(configStore.viewStyle)
|
||||
@ -109,6 +113,10 @@ useLifecycle(
|
||||
const data = ref<any>([])
|
||||
const getWebAll = () => {
|
||||
webAllApi().then((resp) => {
|
||||
if (isEmpty(resp.data.daily) && isEmpty(resp.data.work) && isEmpty(resp.data.other)) {
|
||||
data.value = []
|
||||
return
|
||||
}
|
||||
let webs = [
|
||||
{ title: 'Daily', webs: resp.data.daily },
|
||||
{ title: 'Work', webs: resp.data.work },
|
||||
@ -236,6 +244,12 @@ const showWebCollectCard = (card: boolean) => {
|
||||
@include box(100%, calc(100% - 31px));
|
||||
overflow-y: overlay;
|
||||
|
||||
.placeholder {
|
||||
@include font(15px, 300);
|
||||
padding: 20px 0 0 20px;
|
||||
color: var(--bl-text-color-light);
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
height: 3px;
|
||||
|
@ -6,7 +6,7 @@
|
||||
<span v-else class="iconbl bl-article-line container-operator" @click="showStarCard(true)" />
|
||||
</bl-row>
|
||||
<div class="article-stars-root">
|
||||
<div v-if="isEmpty(articles)" class="placeholder">无收藏的文章</div>
|
||||
<div v-if="isEmpty(articles)" class="placeholder">无收藏文章</div>
|
||||
<div
|
||||
v-else
|
||||
v-for="article in articles"
|
||||
@ -92,6 +92,7 @@ defineExpose({ reload })
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
@include font(15px, 300);
|
||||
padding: 20px 0 0 20px;
|
||||
color: var(--bl-text-color-light);
|
||||
}
|
||||
|
@ -94,6 +94,7 @@ const toToc = (articleId: number) => {
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
@include font(15px, 300);
|
||||
padding: 20px 0 0 20px;
|
||||
color: var(--bl-text-color-light);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
<el-button size="default" style="width: 90px; margin-left: 10px" @click="autuUpdBlossomOSDomain">点击自动配置</el-button>
|
||||
<div class="conf-tip">
|
||||
文件访问地址。需以<code style="color: var(--el-color-danger)">/pic</code>结尾。你可以点击右上角的<span
|
||||
class="iconbl bl-blog"
|
||||
class="iconbl bl-caution-line"
|
||||
style="padding: 0 3px"></span
|
||||
>图标进行快捷配置。
|
||||
</div>
|
||||
|
@ -203,6 +203,7 @@ const getTasks = () => {
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
@include font(15px, 300);
|
||||
padding: 20px 0 0 20px;
|
||||
color: var(--bl-text-color-light);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user