feat 样式整改
This commit is contained in:
@@ -61,59 +61,92 @@ onBeforeUnmount(stopAutoplay)
|
||||
|
||||
<template>
|
||||
<section class="home-banner">
|
||||
<div class="home-banner__carousel" aria-hidden="true">
|
||||
<div
|
||||
v-for="(src, index) in slides"
|
||||
:key="`${src}-${index}`"
|
||||
class="home-banner__slide"
|
||||
:class="{ 'home-banner__slide--active': index === activeIndex }"
|
||||
>
|
||||
<img
|
||||
class="home-banner__image"
|
||||
:class="{ 'home-banner__image--inline': !hasBanners }"
|
||||
:src="src"
|
||||
alt=""
|
||||
<div class="home-banner__stage">
|
||||
<div class="home-banner__carousel" aria-hidden="true">
|
||||
<div
|
||||
v-for="(src, index) in slides"
|
||||
:key="`${src}-${index}`"
|
||||
class="home-banner__slide"
|
||||
:class="{ 'home-banner__slide--active': index === activeIndex }"
|
||||
>
|
||||
<img
|
||||
class="home-banner__image"
|
||||
:class="{ 'home-banner__image--inline': !hasBanners }"
|
||||
:src="src"
|
||||
alt=""
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="home-banner__inner">
|
||||
<h1 class="home-banner__title">虫子智造研发一体化平台</h1>
|
||||
<p class="home-banner__subtitle">一站式智能软硬件研发与量产综合服务商</p>
|
||||
<div class="home-banner__inner">
|
||||
<h1 class="home-banner__title">
|
||||
虫子智造研发一体化平台
|
||||
</h1>
|
||||
<p class="home-banner__subtitle">
|
||||
一站式智能软硬件研发与量产综合服务商
|
||||
</p>
|
||||
|
||||
<div class="home-banner__actions">
|
||||
<button class="home-banner__btn home-banner__btn--primary" type="button" @click="goDemand">
|
||||
需求提报
|
||||
</button>
|
||||
<button class="home-banner__btn home-banner__btn--ghost" type="button" @click="goCases">
|
||||
案例中心
|
||||
</button>
|
||||
<div class="home-banner__actions">
|
||||
<button
|
||||
class="home-banner__btn home-banner__btn--primary"
|
||||
type="button"
|
||||
@click="goDemand"
|
||||
>
|
||||
需求提报
|
||||
</button>
|
||||
<button
|
||||
class="home-banner__btn home-banner__btn--ghost"
|
||||
type="button"
|
||||
@click="goCases"
|
||||
>
|
||||
案例中心
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="slides.length > 1" class="home-banner__dots" role="tablist" aria-label="头图轮播">
|
||||
<button
|
||||
v-for="(_, index) in slides"
|
||||
:key="index"
|
||||
class="home-banner__dot"
|
||||
:class="{ 'home-banner__dot--active': index === activeIndex }"
|
||||
type="button"
|
||||
role="tab"
|
||||
:aria-selected="index === activeIndex"
|
||||
@click="goTo(index)"
|
||||
/>
|
||||
<div
|
||||
v-if="slides.length > 1"
|
||||
class="home-banner__dots"
|
||||
role="tablist"
|
||||
aria-label="头图轮播"
|
||||
>
|
||||
<button
|
||||
v-for="(_, index) in slides"
|
||||
:key="index"
|
||||
class="home-banner__dot"
|
||||
:class="{ 'home-banner__dot--active': index === activeIndex }"
|
||||
type="button"
|
||||
role="tab"
|
||||
:aria-selected="index === activeIndex"
|
||||
@click="goTo(index)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.home-banner {
|
||||
position: relative;
|
||||
height: 661px;
|
||||
overflow: hidden;
|
||||
background: @home-banner-bg;
|
||||
width: 100%;
|
||||
flex: 0 0 auto;
|
||||
padding: @spacing-lg @home-gutter 0;
|
||||
box-sizing: border-box;
|
||||
background: transparent;
|
||||
|
||||
@media (max-width: 1600px) {
|
||||
padding: @spacing-lg @spacing-lg 0;
|
||||
}
|
||||
|
||||
&__stage {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-width: @home-content;
|
||||
height: 420px;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
border-radius: @radius-base;
|
||||
background: @home-banner-bg;
|
||||
}
|
||||
|
||||
&__carousel {
|
||||
position: absolute;
|
||||
@@ -138,15 +171,14 @@ onBeforeUnmount(stopAutoplay)
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
|
||||
// 内置插图:按设计稿定位与尺寸原样显示,不铺满
|
||||
&--inline {
|
||||
position: absolute;
|
||||
top: 31px;
|
||||
right: 269px;
|
||||
top: 24px;
|
||||
right: 48px;
|
||||
left: auto;
|
||||
bottom: auto;
|
||||
width: 723px;
|
||||
height: 598px;
|
||||
width: 420px;
|
||||
height: 348px;
|
||||
margin-left: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
@@ -156,50 +188,48 @@ onBeforeUnmount(stopAutoplay)
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
max-width: @container-width;
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&__title {
|
||||
position: absolute;
|
||||
top: 184px;
|
||||
left: 150px;
|
||||
top: 96px;
|
||||
left: 64px;
|
||||
margin: 0;
|
||||
color: @banner-title-color;
|
||||
font-size: @font-size-hero-lg;
|
||||
font-size: @font-size-hero;
|
||||
font-weight: 700;
|
||||
line-height: 87px;
|
||||
line-height: 1.25;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&__subtitle {
|
||||
position: absolute;
|
||||
top: 287px;
|
||||
left: 150px;
|
||||
top: 168px;
|
||||
left: 64px;
|
||||
margin: 0;
|
||||
color: @banner-title-color;
|
||||
font-size: 24px;
|
||||
font-size: @font-size-lg;
|
||||
font-weight: 500;
|
||||
line-height: 35px;
|
||||
line-height: 1.4;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&__actions {
|
||||
position: absolute;
|
||||
top: 392px;
|
||||
left: 150px;
|
||||
top: 232px;
|
||||
left: 64px;
|
||||
.flex(row, flex-start, center);
|
||||
gap: 20px;
|
||||
gap: @spacing-base;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
&__btn {
|
||||
width: 183px;
|
||||
height: 55px;
|
||||
border-radius: 8px;
|
||||
font-size: 18px;
|
||||
width: 140px;
|
||||
height: 44px;
|
||||
border-radius: @radius-base;
|
||||
font-size: @font-size-base;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
@@ -220,7 +250,7 @@ onBeforeUnmount(stopAutoplay)
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: 8px;
|
||||
border-radius: @radius-base;
|
||||
padding: 2px;
|
||||
background: linear-gradient(135deg, @btn-gradient-from 0%, @btn-gradient-to 100%);
|
||||
-webkit-mask:
|
||||
@@ -238,16 +268,17 @@ onBeforeUnmount(stopAutoplay)
|
||||
|
||||
&__dots {
|
||||
position: absolute;
|
||||
left: 929px;
|
||||
top: 594px;
|
||||
left: 50%;
|
||||
bottom: @spacing-base;
|
||||
z-index: 1;
|
||||
.flex(row, flex-start, center);
|
||||
gap: 13px;
|
||||
.flex(row, center, center);
|
||||
gap: @spacing-sm;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
&__dot {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
@@ -255,7 +286,7 @@ onBeforeUnmount(stopAutoplay)
|
||||
cursor: pointer;
|
||||
|
||||
&--active {
|
||||
width: 44px;
|
||||
width: 28px;
|
||||
border-radius: 3px;
|
||||
background: @home-banner-dot;
|
||||
}
|
||||
|
||||
@@ -39,40 +39,42 @@ const FALLBACK_ACTIVE: BusinessType[] = ['internet']
|
||||
|
||||
<style lang="less" scoped>
|
||||
.home-business {
|
||||
padding: 44px 70px 54px;
|
||||
border: 1px solid @home-section-border;
|
||||
border-radius: @radius-lg;
|
||||
padding: @spacing-xl;
|
||||
border: none;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
|
||||
&__title {
|
||||
margin: 0 0 47px;
|
||||
font-size: @font-size-xxl;
|
||||
font-weight: 700;
|
||||
margin: 0 0 @spacing-lg;
|
||||
font-size: @font-size-xl;
|
||||
font-weight: 600;
|
||||
color: @home-ink;
|
||||
}
|
||||
|
||||
&__grid {
|
||||
display: flex;
|
||||
gap: 22px;
|
||||
gap: @spacing-base;
|
||||
}
|
||||
|
||||
&__card {
|
||||
position: relative;
|
||||
.flex(column, flex-start, flex-start);
|
||||
flex: 0 1 368px;
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
height: 206px;
|
||||
min-height: 160px;
|
||||
box-sizing: border-box;
|
||||
padding: 0 20px;
|
||||
padding: @spacing-lg;
|
||||
overflow: hidden;
|
||||
border: 1px solid @home-business-border;
|
||||
border: 1px solid @border-color;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
transition:
|
||||
transform 0.2s,
|
||||
box-shadow 0.2s;
|
||||
box-shadow 0.2s,
|
||||
border-color 0.2s;
|
||||
|
||||
&:hover {
|
||||
border-color: @primary-color;
|
||||
box-shadow: @shadow-base;
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
@@ -102,37 +104,41 @@ const FALLBACK_ACTIVE: BusinessType[] = ['internet']
|
||||
}
|
||||
|
||||
&__name {
|
||||
margin: 104px 0 0;
|
||||
font-size: @font-size-title;
|
||||
margin: @spacing-xxl 0 0;
|
||||
font-size: @font-size-lg;
|
||||
font-weight: 500;
|
||||
line-height: 41px;
|
||||
line-height: 1.4;
|
||||
color: @home-ink;
|
||||
}
|
||||
|
||||
&__desc {
|
||||
margin: 4px 0 0;
|
||||
font-size: @font-size-md;
|
||||
font-weight: 500;
|
||||
line-height: 23px;
|
||||
color: @home-ink;
|
||||
.multi-ellipsis(1);
|
||||
margin: @spacing-xs 0 0;
|
||||
font-size: @font-size-sm;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
color: @text-color-secondary;
|
||||
.multi-ellipsis(2);
|
||||
}
|
||||
|
||||
&__card--active {
|
||||
border-color: @primary-strong;
|
||||
background: @primary-strong;
|
||||
border-color: @primary-color;
|
||||
background: @filter-selected-bg;
|
||||
|
||||
.home-business__check {
|
||||
border-color: @white;
|
||||
border-color: @primary-color;
|
||||
|
||||
&::after {
|
||||
opacity: 1;
|
||||
background: @primary-color;
|
||||
}
|
||||
}
|
||||
|
||||
.home-business__name,
|
||||
.home-business__name {
|
||||
color: @primary-strong;
|
||||
}
|
||||
|
||||
.home-business__desc {
|
||||
color: @white;
|
||||
color: @text-color-secondary;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,26 +85,26 @@ const visibleCases = computed<Case[]>(() => props.cases.slice(0, 4))
|
||||
|
||||
<style lang="less" scoped>
|
||||
.home-cases {
|
||||
padding: 40px 66px 60px;
|
||||
border: 1px solid @home-section-border;
|
||||
border-radius: @radius-lg;
|
||||
padding: @spacing-xl;
|
||||
border: none;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
|
||||
&__head {
|
||||
.flex(row, flex-start);
|
||||
gap: 24px;
|
||||
margin-bottom: 47px;
|
||||
.flex(row, flex-start, center);
|
||||
gap: @spacing-lg;
|
||||
margin-bottom: @spacing-lg;
|
||||
}
|
||||
|
||||
&__title {
|
||||
font-size: @font-size-xxl;
|
||||
font-weight: 700;
|
||||
font-size: @font-size-xl;
|
||||
font-weight: 600;
|
||||
color: @home-ink;
|
||||
}
|
||||
|
||||
&__tabs {
|
||||
.flex(row, center);
|
||||
gap: 36px;
|
||||
gap: @spacing-lg;
|
||||
}
|
||||
|
||||
&__tab {
|
||||
@@ -146,19 +146,20 @@ const visibleCases = computed<Case[]>(() => props.cases.slice(0, 4))
|
||||
|
||||
&__card {
|
||||
overflow: hidden;
|
||||
flex: 0 1 368px;
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
height: 248px;
|
||||
min-height: 220px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid @home-case-border;
|
||||
border: 1px solid @border-color;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
box-shadow: 0 4px 10px fade(@black, 8%);
|
||||
box-shadow: none;
|
||||
cursor: pointer;
|
||||
transition: transform 0.2s, box-shadow 0.2s;
|
||||
transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 6px 14px fade(@black, 12%);
|
||||
border-color: @primary-color;
|
||||
box-shadow: @shadow-base;
|
||||
transform: translateY(-2px);
|
||||
|
||||
.home-cases__view {
|
||||
|
||||
@@ -173,15 +173,15 @@ function onMore(): void {
|
||||
position: relative;
|
||||
.flex(column, flex-start, stretch);
|
||||
flex-shrink: 0;
|
||||
flex: 0 0 529px;
|
||||
width: 529px;
|
||||
height: 245px;
|
||||
flex: 0 0 420px;
|
||||
width: 420px;
|
||||
min-height: 0;
|
||||
box-sizing: border-box;
|
||||
min-width: 0;
|
||||
gap: 0;
|
||||
padding: 18px 40px 28px;
|
||||
border: 1px solid @home-card-border;
|
||||
border-radius: @radius-lg;
|
||||
padding: @spacing-lg;
|
||||
border: none;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -190,22 +190,22 @@ function onMore(): void {
|
||||
}
|
||||
|
||||
&__title {
|
||||
font-size: @font-size-xxl;
|
||||
font-weight: 700;
|
||||
line-height: 52px;
|
||||
font-size: @font-size-xl;
|
||||
font-weight: 600;
|
||||
line-height: 1.4;
|
||||
color: @home-ink;
|
||||
}
|
||||
|
||||
&__list {
|
||||
.flex(row, flex-start, flex-start);
|
||||
gap: 30px;
|
||||
margin-top: 17px;
|
||||
gap: @spacing-base;
|
||||
margin-top: @spacing-base;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
&__item {
|
||||
.flex(column, flex-start, center);
|
||||
gap: 8px;
|
||||
gap: @spacing-sm;
|
||||
flex: none;
|
||||
transition: transform 0.2s;
|
||||
|
||||
@@ -216,14 +216,14 @@ function onMore(): void {
|
||||
|
||||
&__tile {
|
||||
display: block;
|
||||
width: 97px;
|
||||
height: 97px;
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
border-radius: @radius-base;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
&__label {
|
||||
font-size: @font-size-lg;
|
||||
font-size: @font-size-sm;
|
||||
font-weight: 500;
|
||||
color: @home-ink;
|
||||
text-align: center;
|
||||
@@ -231,15 +231,16 @@ function onMore(): void {
|
||||
|
||||
&__more {
|
||||
position: absolute;
|
||||
top: 120px;
|
||||
right: 25px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
top: 50%;
|
||||
right: @spacing-base;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: #c9cdd4;
|
||||
color: @text-color-disabled;
|
||||
cursor: pointer;
|
||||
transform: translateY(-50%);
|
||||
transition: color 0.2s;
|
||||
|
||||
&:hover {
|
||||
|
||||
@@ -30,30 +30,30 @@ const items = [
|
||||
<style lang="less" scoped>
|
||||
.home-stats {
|
||||
.flex(row, flex-end);
|
||||
gap: 30px;
|
||||
gap: @spacing-base;
|
||||
|
||||
&__item {
|
||||
.flex(column, center, center);
|
||||
gap: 0;
|
||||
width: 112px;
|
||||
height: 112px;
|
||||
min-width: 112px;
|
||||
gap: 2px;
|
||||
width: 88px;
|
||||
height: 88px;
|
||||
min-width: 88px;
|
||||
padding: 0;
|
||||
border-radius: @radius-sm;
|
||||
background: @primary-strong;
|
||||
border-radius: @radius-base;
|
||||
background: @filter-selected-bg;
|
||||
}
|
||||
|
||||
&__value {
|
||||
font-size: 48px;
|
||||
font-weight: 500;
|
||||
font-size: @font-size-title;
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
color: @white;
|
||||
color: @primary-strong;
|
||||
}
|
||||
|
||||
&__label {
|
||||
font-size: @font-size-base;
|
||||
font-size: @font-size-sm;
|
||||
font-weight: 500;
|
||||
color: @white;
|
||||
color: @text-color-secondary;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -37,24 +37,24 @@ const greeting = computed(() => {
|
||||
&__greeting {
|
||||
.flex(row, flex-start);
|
||||
gap: @spacing-sm;
|
||||
font-size: 52px;
|
||||
font-weight: 700;
|
||||
font-size: @font-size-title;
|
||||
font-weight: 600;
|
||||
color: @home-welcome;
|
||||
}
|
||||
|
||||
&__wave {
|
||||
.flex(row, center);
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: @radius-round;
|
||||
background: fade(@black, 4%);
|
||||
font-size: @font-size-xl;
|
||||
font-size: @font-size-lg;
|
||||
}
|
||||
|
||||
&__summary {
|
||||
font-size: 24px;
|
||||
font-size: @font-size-base;
|
||||
font-weight: 400;
|
||||
color: @home-welcome;
|
||||
color: @text-color-secondary;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -58,14 +58,16 @@ onMounted(load)
|
||||
|
||||
<style lang="less" scoped>
|
||||
.business-detail {
|
||||
padding-top: 32px;
|
||||
padding-bottom: @spacing-xxl;
|
||||
min-height: 100%;
|
||||
padding-top: @spacing-lg;
|
||||
padding-bottom: @spacing-page-bottom;
|
||||
background: @bg-color;
|
||||
|
||||
&__breadcrumb {
|
||||
margin-bottom: 49px;
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
line-height: 37px;
|
||||
margin-bottom: @spacing-lg;
|
||||
font-size: @font-size-base;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
color: @home-breadcrumb;
|
||||
|
||||
.link {
|
||||
@@ -74,18 +76,19 @@ onMounted(load)
|
||||
}
|
||||
|
||||
&__hero {
|
||||
.flex(column, flex-start);
|
||||
.flex(column, flex-start, flex-start);
|
||||
justify-content: center;
|
||||
margin-bottom: @spacing-base;
|
||||
padding: 129px 29px 0;
|
||||
border-radius: @radius-lg;
|
||||
padding: @spacing-xl;
|
||||
border-radius: @radius-base;
|
||||
background: @home-detail-hero-bg;
|
||||
height: 219px;
|
||||
min-height: 140px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
&__loading {
|
||||
padding: 80px 0;
|
||||
font-size: 16px;
|
||||
padding: @spacing-xxl 0;
|
||||
font-size: @font-size-base;
|
||||
color: @text-color-secondary;
|
||||
}
|
||||
|
||||
@@ -95,23 +98,23 @@ onMounted(load)
|
||||
|
||||
&__intro {
|
||||
.flex(column, flex-start);
|
||||
gap: 8px;
|
||||
gap: @spacing-sm;
|
||||
}
|
||||
|
||||
&__name {
|
||||
margin: 0;
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
line-height: 33px;
|
||||
font-size: @font-size-xl;
|
||||
font-weight: 600;
|
||||
line-height: 1.3;
|
||||
color: @home-body;
|
||||
}
|
||||
|
||||
&__slogan {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-size: @font-size-base;
|
||||
font-weight: 400;
|
||||
line-height: 18px;
|
||||
color: @home-body;
|
||||
line-height: 1.5;
|
||||
color: @text-color-secondary;
|
||||
}
|
||||
|
||||
&__cta {
|
||||
|
||||
@@ -53,25 +53,25 @@ onMounted(() => {
|
||||
<style lang="less" scoped>
|
||||
.home {
|
||||
.flex(column, flex-start);
|
||||
gap: 20px;
|
||||
gap: @spacing-lg;
|
||||
padding-top: 0;
|
||||
padding-bottom: @spacing-xxl;
|
||||
padding-bottom: @spacing-page-bottom;
|
||||
background: @bg-color;
|
||||
|
||||
&__dashboard {
|
||||
.flex(row, space-between, stretch);
|
||||
gap: 60px;
|
||||
gap: @spacing-lg;
|
||||
}
|
||||
|
||||
&__dashboard-main {
|
||||
.flex(row, space-between, center);
|
||||
flex: 0 0 1091px;
|
||||
width: 1091px;
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
box-sizing: border-box;
|
||||
gap: @spacing-lg;
|
||||
padding: 0 59px 0 105px;
|
||||
border: 1px solid @home-card-border;
|
||||
border-radius: @radius-lg;
|
||||
padding: @spacing-lg @spacing-xl;
|
||||
border: none;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user