This commit is contained in:
@jyuhsin
2025-11-22 15:57:31 +08:00
parent e865951a7c
commit 34dc3b118c
13 changed files with 517 additions and 485 deletions
@@ -1,39 +1,35 @@
const entry = {
template: /*language=HTML*/ `
<div class="entry-wrapper">
<!-- 标签页导航 -->
<div class="tabs">
<div class="tab-item" :class="{ active: activeCategory === 'serv' }"
@click="setActiveCategory('serv')">
<i class="fa fa-star"></i> 推荐服务
</div>
<div class="tab-item" :class="{ active: activeCategory === 'app' }"
@click="setActiveCategory('app')">
<i class="fa fa-fire"></i> 推荐应用
</div>
<div class="tab-item" :class="{ active: activeCategory === 'fav' }"
@click="setActiveCategory('fav')">
<i class="fa fa-heart"></i> 我的收藏
</div>
</div>
<!-- 应用块区域 -->
<div class="apps-container">
<div class="app-grid">
<div v-if="currentServices && currentServices.length > 0" class="app-item" v-for="(item, index) in currentServices" :key="index"
@click="openService(item)">
<div class="app-icon">
<img :src="item.picIcon" alt="" />
</div>
<div class="app-name">{{ item.name }}</div>
</div>
<div v-if="currentServices.length === 0" class="no-entry-placeholder">
<div class="icon">📅</div>
<p>暂无数据</p>
<div class="entry-wrapper">
<!-- 标签页导航 -->
<div class="tabs">
<div class="tab-item" :class="{ active: activeCategory === 'serv' }"
@click="setActiveCategory('serv')">
<i class="fa fa-star"></i> 推荐服务
</div>
<div class="tab-item" :class="{ active: activeCategory === 'app' }"
@click="setActiveCategory('app')">
<i class="fa fa-fire"></i> 推荐应用
</div>
<div class="tab-item" :class="{ active: activeCategory === 'fav' }"
@click="setActiveCategory('fav')">
<i class="fa fa-heart"></i> 我的收藏
</div>
</div>
<!-- 应用块区域 -->
<div class="apps-container">
<div class="app-grid">
<div class="app-item" v-for="(item, index) in currentServices" :key="index"
@click="openService(item)">
<div class="app-icon">
<img :src="item.picIcon" alt="" />
</div>
<div class="app-name">{{ item.name }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
`,
data() {
return {
@@ -129,7 +125,6 @@ const entry = {
margin-top: 5px;
display: flex;
gap: 20px;
margin-bottom: 20px;
border-bottom: 2px solid #e8e8e8;
padding-bottom: 10px;
}
@@ -173,12 +168,12 @@ const entry = {
justify-items: center; /* 子项内容居中(图标和文字) */
justify-content: start; /* 整体网格靠左对齐,避免居中 */
gap: 12px;
padding: 12px;
gap: 4px;
padding: 12px 4px;
background: #fff;
overflow-x: hidden;
height: calc(350px - 74px);
max-height: calc(350px - 74px);
overflow-y: auto;
}
@@ -187,11 +182,11 @@ const entry = {
display: flex;
flex-direction: column;
align-items: center;
padding: 12px;
border-radius: 8px;
background: #fff;
width: 100%;
max-width: 100%;
padding: 6px;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
@@ -248,32 +243,5 @@ const entry = {
gap: 12px;
}
}
.no-entry-placeholder {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40px 20px;
color: #94a3b8;
text-align: center;
}
.no-entry-placeholder .icon {
font-size: 48px;
margin-bottom: 12px;
opacity: 0.6;
}
.no-entry-placeholder p {
margin: 4px 0 0;
font-size: 16px;
font-weight: 500;
}
.no-entry-placeholder .subtext {
font-size: 13px;
opacity: 0.8;
}
`
};
@@ -1,6 +1,9 @@
const stats = {
template: /*language=HTML*/ `
<div class="stats-section">
<div class="stats-family">
<img src="/assets/platform/img/home/family.png"/>
</div>
<div class="stats-grid">
<!-- 待办 -->
<div
@@ -110,22 +113,22 @@ const stats = {
style: /*language=CSS*/ `
/* 右侧统计区域 */
.stats-section {
position: absolute;
bottom: 24px;
right: 24px;
/*background: white;*/
color: #333;
padding: 20px;
border-radius: 12px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
z-index: 10;
width: 680px;
width: 80%;
display: flex;
justify-content: space-between;
align-items: center;
margin: -130px auto 0;
/*border: 1px solid #e8e8e8;*/
}
.stats-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-columns: repeat(2, 1fr);
gap: 16px;
}
@@ -140,13 +143,15 @@ const stats = {
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 2px 6px rgba(0,0,0,0.08);
width: 200px;
height: 90px;
}
.stat-icon {
font-size: 20px;
width: 36px;
height: 36px;
font-size: 30px;
width: 50px;
height: 50px;
background: #e6f7ff;
color: #1890ff;
border-radius: 50%;
@@ -178,6 +183,7 @@ const stats = {
.stat-content {
display: flex;
flex-direction: column;
margin-left: 10px;
}
.stat-label {
@@ -192,5 +198,14 @@ const stats = {
font-weight: bold;
margin-top: 2px;
}
.stats-family {
width: 68%;
}
.stats-family img {
height: 190px !important;
border-radius: 30px;
}
`
};