diff --git a/src/main/resources/views/platform/zhghh5/sys/home/home.js b/src/main/resources/views/platform/zhghh5/sys/home/home.js index d5715047..a8b6a79a 100644 --- a/src/main/resources/views/platform/zhghh5/sys/home/home.js +++ b/src/main/resources/views/platform/zhghh5/sys/home/home.js @@ -37,7 +37,7 @@ const home = {
+ :key="item.id">
@@ -51,12 +51,12 @@ const home = {
+ class="feature-card" + :class="[item.className, { 'feature-card--primary': index === 0 }]" + :style="{ backgroundImage: 'url(' + item.asset + ')' }" + v-for="(item, index) in featuredEntries" + :key="item.name" + @click="featureClick(item)">
{{ item.name }}
{{ item.desc }}
@@ -89,7 +89,6 @@ const home = {
-
-
+
暂无工会动态
-
@@ -230,8 +228,8 @@ const home = { 已结束 - - 进行中 @@ -239,7 +237,7 @@ const home = { 即将开始 - +
@@ -575,12 +573,14 @@ const home = { }) }, selectSpreadSection(index) { - // 切换栏目时复位列表滚动位置;固定视口避免不同数据量引发页面跳动。 + // 切换栏目后回到横向卡片列表开头,等待新栏目列表渲染完成。 // 新闻样式锚定 home-page 根节点作用域,动态行无需等待 styleMixin 异步补属性。 const section = this.spreadSections[index] || {} this.$set(this, "spreadActiveIndex", index) this.$set(this, "spreadDynamics", section.value || []) - if (this.$refs.spreadViewport) this.$refs.spreadViewport.scrollTop = 0 + this.$nextTick(() => { + if (this.$refs.spreadViewport) this.$refs.spreadViewport.scrollLeft = 0 + }) this.loadSpreadImages() }, loadSpreadImages() { @@ -1570,7 +1570,10 @@ const home = { .home-page/deep/ .union-news-list { margin-top: 7px; padding-bottom: 3px; - display: block; + display: flex; + gap: 10px; + overflow-x: auto; + overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; } @@ -1580,16 +1583,16 @@ const home = { } .home-page/deep/ .union-news-item--skeleton { - height: 96px; - min-height: 96px; + height: 100px; + min-height: 100px; } .home-page/deep/ .union-news-skeleton__cover { - width: 80px; - height: 48px; - margin-right: 10px; + width: 104px; + height: 78px; + margin-right: 12px; flex-shrink: 0; - border-radius: 4px; + border-radius: 6px; } .home-page/deep/ .union-news-skeleton__content { @@ -1608,15 +1611,15 @@ const home = { .home-page/deep/ .union-news-skeleton__meta span:last-child { width: 28px; } .home-page/deep/ .union-news-item { - width: 100%; - min-width: 0; - height: 96px; - padding: 12px 0; + width: calc(100% - 32px); + min-width: calc(100% - 32px); + min-height: 100px; + padding: 10px; flex-shrink: 0; display: flex; align-items: center; - border: 0; - border-radius: 0; + border: 1px solid #edf1f6; + border-radius: 9px; background-color: #fff; box-sizing: border-box; } @@ -1630,22 +1633,14 @@ const home = { } .home-page/deep/ .union-news-item__cover { - width: 80px; - height: 60px; - margin-right: 10px; + width: 104px; + height: 78px; + margin-right: 12px; flex-shrink: 0; - border-radius: 4px; + border-radius: 6px; object-fit: cover; } - .home-page/deep/ .union-news-viewport { - height: 288px; - overflow-y: auto; - overflow-x: hidden; - overscroll-behavior: contain; - overflow-anchor: none; - } - .home-page/deep/ .union-news-item__placeholder { display: flex; align-items: center; @@ -1655,17 +1650,6 @@ const home = { font-size: 26px; } - .home-page/deep/ .union-news-empty { - height: 100%; - box-sizing: border-box; - justify-content: center; - } - - .home-page/deep/ .union-news-empty__image { - max-height: 200px; - object-fit: contain; - } - .home-page/deep/ .union-news-item__content { min-width: 0; flex: 1;