feat ui设计稿
This commit is contained in:
@@ -64,15 +64,19 @@ const emit = defineEmits<{
|
||||
&__inner {
|
||||
.flex(row, space-between, center);
|
||||
height: 72px;
|
||||
// 覆盖 .container 内缩:左 = 容器16 + 卡左内边距49 + 序号列46 = 111(对齐内容列),右 = 16 + 40
|
||||
gap: @spacing-base;
|
||||
padding-left: 111px;
|
||||
padding-right: 56px;
|
||||
}
|
||||
|
||||
&__tip {
|
||||
.flex(row, flex-start, center);
|
||||
gap: @spacing-sm;
|
||||
min-width: 0;
|
||||
font-size: @font-size-base;
|
||||
color: @text-color;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: @demand-heading;
|
||||
}
|
||||
|
||||
&__info {
|
||||
@@ -80,28 +84,32 @@ const emit = defineEmits<{
|
||||
flex-shrink: 0;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 1px solid @primary-color;
|
||||
border: 1px solid @demand-accent;
|
||||
border-radius: 50%;
|
||||
font-size: 11px;
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
color: @primary-color;
|
||||
color: @demand-accent;
|
||||
}
|
||||
|
||||
&__actions {
|
||||
.flex(row, flex-end, center);
|
||||
gap: @spacing-base;
|
||||
// 设计稿按钮 232×63 设计px ≈ 179×48,间距 47 设计px ≈ 36px
|
||||
gap: 36px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
// 设计稿三个按钮均为实底蓝 #075CFF + 白字
|
||||
&__btn {
|
||||
height: 36px;
|
||||
padding: 0 @spacing-lg;
|
||||
width: 179px;
|
||||
height: 48px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: @radius-round;
|
||||
border-radius: @radius-base;
|
||||
background: @demand-secondary-bg;
|
||||
font-size: @font-size-base;
|
||||
color: @heading-color;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: @white;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s, opacity 0.2s;
|
||||
|
||||
@@ -115,13 +123,13 @@ const emit = defineEmits<{
|
||||
}
|
||||
|
||||
&--primary {
|
||||
// 设计稿按钮宽度(247px @1400 版面)由 min-width 兜住,短文案也不塌
|
||||
min-width: 240px;
|
||||
background: @primary-color;
|
||||
// 设计稿三个按钮等宽(232 设计px ≈ 179px),主按钮不额外加宽
|
||||
min-width: 179px;
|
||||
background: @demand-secondary-bg;
|
||||
color: @white;
|
||||
|
||||
&:hover:not(:disabled) {
|
||||
background: @primary-hover;
|
||||
background: darken(@demand-secondary-bg, 6%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,41 +208,41 @@ function onDownload(file: DemandAttachment): void {
|
||||
<style lang="less" scoped>
|
||||
.demand-attach {
|
||||
.flex(column, flex-start, stretch);
|
||||
gap: @spacing-sm;
|
||||
gap: 11px;
|
||||
|
||||
&__head {
|
||||
.flex(row, flex-start, center);
|
||||
gap: @spacing-sm;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
&__label {
|
||||
font-size: @font-size-base;
|
||||
font-weight: 600;
|
||||
color: @heading-color;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: @demand-heading;
|
||||
}
|
||||
|
||||
&__hint {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
font-size: @font-size-sm;
|
||||
color: @text-color-secondary;
|
||||
color: @demand-line;
|
||||
}
|
||||
|
||||
&__pick {
|
||||
flex-shrink: 0;
|
||||
height: 28px;
|
||||
padding: 0 @spacing-base;
|
||||
border: 1px solid @border-color-dark;
|
||||
border: 1px solid @demand-line;
|
||||
border-radius: @radius-sm;
|
||||
background: @white;
|
||||
font-size: @font-size-sm;
|
||||
color: @text-color;
|
||||
color: @demand-line;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.2s, color 0.2s;
|
||||
|
||||
&:hover:not(:disabled) {
|
||||
border-color: @primary-color;
|
||||
color: @primary-color;
|
||||
border-color: @demand-accent;
|
||||
color: @demand-accent;
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
@@ -257,18 +257,21 @@ function onDownload(file: DemandAttachment): void {
|
||||
|
||||
&__list {
|
||||
.flex(column, flex-start, stretch);
|
||||
gap: @spacing-sm;
|
||||
// 设计稿:两条 90 设计px 灰条,间距 20 设计px ≈ 15px
|
||||
gap: 15px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
// 设计稿附件条:实底 #EDEDED、无描边、90 设计px ≈ 69px 高
|
||||
&__item {
|
||||
.flex(row, flex-start, center);
|
||||
gap: @spacing-sm;
|
||||
padding: @spacing-sm @spacing-base;
|
||||
gap: @spacing-base;
|
||||
min-height: 69px;
|
||||
padding: @spacing-base;
|
||||
border-radius: @radius-sm;
|
||||
background: @bg-color-light;
|
||||
background: @demand-upload-bg;
|
||||
}
|
||||
|
||||
&__badge {
|
||||
@@ -290,8 +293,8 @@ function onDownload(file: DemandAttachment): void {
|
||||
}
|
||||
|
||||
&__name {
|
||||
font-size: @font-size-base;
|
||||
color: @heading-color;
|
||||
font-size: 15px;
|
||||
color: @demand-ink;
|
||||
.ellipsis();
|
||||
}
|
||||
|
||||
|
||||
@@ -57,19 +57,19 @@ const emit = defineEmits<{ 'update:modelValue': [value: string] }>()
|
||||
}
|
||||
|
||||
&__grid {
|
||||
// auto-fill(不是 auto-fit):条目不足 5 个时保留空轨道,卡片尺寸与设计稿一致(约 251px),
|
||||
// auto-fill(不是 auto-fit):条目不足 5 个时保留空轨道,卡片尺寸与设计稿一致(303 设计px ≈ 233px),
|
||||
// 不会被拉伸变形;满 5 个时正好落在设计稿的 5 列上。
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
||||
gap: @spacing-base;
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
&__card {
|
||||
position: relative;
|
||||
.flex(column, flex-start, stretch);
|
||||
gap: @spacing-xs;
|
||||
padding: @spacing-base;
|
||||
border: 1px solid @border-color;
|
||||
gap: 2px;
|
||||
padding: 12px 12px 8px;
|
||||
border: 1px solid @demand-line;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
text-align: left;
|
||||
@@ -80,53 +80,61 @@ const emit = defineEmits<{ 'update:modelValue': [value: string] }>()
|
||||
border-color: @demand-accent;
|
||||
}
|
||||
|
||||
// 选中:整卡蓝底(设计稿实取 #024FFF),文字反白
|
||||
&.is-active {
|
||||
border-color: @demand-accent;
|
||||
border-color: @demand-selected-bg;
|
||||
background: @demand-selected-bg;
|
||||
}
|
||||
}
|
||||
|
||||
/** 右上角选中标记:未选为空心圈,选中为实心蓝点 */
|
||||
/** 右上角选中标记(设计稿 30 设计px ≈ 23px):未选空心圈,选中为白环 + 蓝缝 + 白点 */
|
||||
&__check {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
right: 12px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 1px solid @border-color-dark;
|
||||
top: 22px;
|
||||
right: 19px;
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
border: 1px solid @demand-radio-idle;
|
||||
border-radius: 50%;
|
||||
background: @white;
|
||||
transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
&__card.is-active &__check {
|
||||
border-color: @demand-accent;
|
||||
background: @demand-accent;
|
||||
border-color: @white;
|
||||
background: @white;
|
||||
box-shadow: inset 0 0 0 3px @demand-selected-bg;
|
||||
}
|
||||
|
||||
&__icon {
|
||||
margin-bottom: @spacing-xs;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
/** 后端 Logo:与内联 SVG 同尺寸,保证两种来源视觉一致 */
|
||||
&__logo {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-bottom: @spacing-xs;
|
||||
margin-bottom: 25px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
&__name {
|
||||
font-size: @font-size-lg;
|
||||
font-weight: 600;
|
||||
color: @heading-color;
|
||||
font-size: @font-size-title;
|
||||
font-weight: 500;
|
||||
color: @demand-ink;
|
||||
}
|
||||
|
||||
&__desc {
|
||||
font-size: @font-size-sm;
|
||||
color: @text-color-secondary;
|
||||
line-height: 1.5;
|
||||
font-weight: 500;
|
||||
color: @demand-ink;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
// 选中卡内文字反白(设计稿:标题/描述均为白色)
|
||||
&__card.is-active &__name,
|
||||
&__card.is-active &__desc {
|
||||
color: @white;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -81,25 +81,37 @@ function onRemark(event: Event): void {
|
||||
|
||||
&__row {
|
||||
.flex(row, flex-start, stretch);
|
||||
gap: @spacing-base;
|
||||
// 设计稿:两个 503 设计px 输入框(≈387px),间距 73 设计px ≈ 56px,整行不占满
|
||||
gap: 56px;
|
||||
}
|
||||
|
||||
&__field {
|
||||
.flex(column, flex-start, stretch);
|
||||
flex: 1 1 50%;
|
||||
gap: @spacing-sm;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
// 行内两列(用户名称 / 用户手机号)定宽;补充备注整行铺满
|
||||
&__row &__field {
|
||||
flex: 0 0 387px;
|
||||
}
|
||||
|
||||
&__label {
|
||||
font-size: @font-size-base;
|
||||
font-weight: 600;
|
||||
color: @heading-color;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: @demand-heading;
|
||||
}
|
||||
|
||||
&__input {
|
||||
.text-control();
|
||||
height: 36px;
|
||||
height: 38px;
|
||||
font-size: 15px;
|
||||
border-color: @demand-line;
|
||||
color: @demand-ink;
|
||||
|
||||
&::placeholder {
|
||||
color: @demand-line;
|
||||
}
|
||||
}
|
||||
|
||||
&__area {
|
||||
@@ -109,10 +121,17 @@ function onRemark(event: Event): void {
|
||||
|
||||
&__textarea {
|
||||
.text-control();
|
||||
min-height: 132px;
|
||||
padding: @spacing-sm @spacing-base 24px;
|
||||
min-height: 208px;
|
||||
padding: 10px 14px 24px;
|
||||
font-size: 15px;
|
||||
border-color: @demand-line;
|
||||
color: @demand-ink;
|
||||
line-height: 1.7;
|
||||
resize: vertical;
|
||||
|
||||
&::placeholder {
|
||||
color: @demand-line;
|
||||
}
|
||||
}
|
||||
|
||||
&__count {
|
||||
|
||||
@@ -198,24 +198,29 @@ function onBudgetManualBlur(event: Event): void {
|
||||
|
||||
&__field {
|
||||
.flex(column, flex-start, stretch);
|
||||
gap: @spacing-sm;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
&__row {
|
||||
.flex(row, flex-start, stretch);
|
||||
gap: @spacing-base;
|
||||
// 设计稿:预算列 892 设计px + 间距 61 设计px + 周期列 652 设计px(1605 总宽)
|
||||
gap: @spacing-xxl;
|
||||
|
||||
.demand-info__field {
|
||||
flex: 1 1 50%;
|
||||
width: 50%;
|
||||
flex: 687 1 0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.demand-info__field:last-child {
|
||||
flex: 502 1 0;
|
||||
}
|
||||
}
|
||||
|
||||
&__label {
|
||||
font-size: @font-size-base;
|
||||
font-weight: 600;
|
||||
color: @heading-color;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: @demand-heading;
|
||||
}
|
||||
|
||||
&__required {
|
||||
@@ -225,7 +230,15 @@ function onBudgetManualBlur(event: Event): void {
|
||||
|
||||
&__input {
|
||||
.text-control();
|
||||
height: 36px;
|
||||
// 设计稿:49 设计px 高 ≈ 38px,20 设计px 字号 ≈ 15px,描边/占位 rgba(153,153,153)
|
||||
height: 38px;
|
||||
font-size: 15px;
|
||||
border-color: @demand-line;
|
||||
color: @demand-ink;
|
||||
|
||||
&::placeholder {
|
||||
color: @demand-line;
|
||||
}
|
||||
}
|
||||
|
||||
&__area {
|
||||
@@ -235,10 +248,18 @@ function onBudgetManualBlur(event: Event): void {
|
||||
|
||||
&__textarea {
|
||||
.text-control();
|
||||
min-height: 132px;
|
||||
padding: @spacing-sm @spacing-base 24px;
|
||||
// 设计稿:270 设计px 高 ≈ 208px,占位内缩 18/10 设计px ≈ 14/8px
|
||||
min-height: 208px;
|
||||
padding: 10px 14px 24px;
|
||||
font-size: 15px;
|
||||
border-color: @demand-line;
|
||||
color: @demand-ink;
|
||||
line-height: 1.7;
|
||||
resize: vertical;
|
||||
|
||||
&::placeholder {
|
||||
color: @demand-line;
|
||||
}
|
||||
}
|
||||
|
||||
&__count {
|
||||
@@ -251,21 +272,22 @@ function onBudgetManualBlur(event: Event): void {
|
||||
|
||||
&__budgets {
|
||||
.flex(row, flex-start, stretch);
|
||||
gap: @spacing-base;
|
||||
// 设计稿:5 个 165 设计px 胶囊、间距 17 设计px ≈ 13px
|
||||
gap: 13px;
|
||||
}
|
||||
|
||||
/** 预算控件外观:4 个胶囊按钮 + 第 5 个手填输入框共用同一套规格 */
|
||||
&__budget {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
height: 36px;
|
||||
height: 38px;
|
||||
padding: 0 @spacing-sm;
|
||||
border: 1px solid @border-color;
|
||||
border: 1px solid @demand-line;
|
||||
border-radius: @radius-sm;
|
||||
background: @white;
|
||||
font-size: @font-size-base;
|
||||
font-size: 15px;
|
||||
font-family: inherit;
|
||||
color: @text-color;
|
||||
color: @demand-line;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
@@ -279,7 +301,7 @@ function onBudgetManualBlur(event: Event): void {
|
||||
&.is-active {
|
||||
border-color: @demand-accent;
|
||||
background: @demand-selected-bg;
|
||||
color: @demand-accent;
|
||||
color: @white;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
@@ -290,7 +312,7 @@ function onBudgetManualBlur(event: Event): void {
|
||||
|
||||
&::placeholder {
|
||||
font-weight: 400;
|
||||
color: @text-color-secondary;
|
||||
color: @demand-line;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,6 +123,8 @@ onMounted(() => {
|
||||
padding-top: @spacing-lg;
|
||||
// 固定底条 72px + 呼吸间距,避免遮住 ③ 卡片
|
||||
padding-bottom: 104px;
|
||||
// 设计稿:导航下方 179 设计px(≈138px)白色通栏横幅,其下为页面底色
|
||||
background: linear-gradient(to bottom, @white 0, @white 138px, @bg-color 138px);
|
||||
|
||||
&.is-loading {
|
||||
.demand {
|
||||
@@ -133,54 +135,76 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.demand {
|
||||
// 设计稿:页头下与首块间距 ≈ 20px
|
||||
// 设计稿:标题距横幅顶 32 设计px、副标题行距 15 设计px、横幅下留白 50 设计px
|
||||
&__head {
|
||||
.flex(column, flex-start, stretch);
|
||||
gap: @spacing-xs;
|
||||
margin-bottom: @spacing-base;
|
||||
gap: 11px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
&__title {
|
||||
font-size: @font-size-xxl;
|
||||
font-weight: 600;
|
||||
color: @heading-color;
|
||||
font-weight: 700;
|
||||
line-height: 1.45;
|
||||
color: @demand-ink;
|
||||
}
|
||||
|
||||
&__subtitle {
|
||||
font-size: @font-size-base;
|
||||
color: @text-color-secondary;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
color: @demand-subtitle;
|
||||
}
|
||||
|
||||
// 设计稿三段内容位于同一张白色大卡内:三张卡无缝拼接呈现同一张卡的观感
|
||||
&__card {
|
||||
padding: @spacing-lg;
|
||||
border-radius: @radius-base;
|
||||
padding: 24px 40px 24px 49px;
|
||||
border-radius: 0;
|
||||
background: @white;
|
||||
|
||||
// 设计稿块间距 18px
|
||||
// 三卡相连,不再留块间距
|
||||
& + & {
|
||||
margin-top: 18px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:first-of-type {
|
||||
padding-top: 37px;
|
||||
border-radius: @radius-base @radius-base 0 0;
|
||||
}
|
||||
|
||||
&:last-of-type {
|
||||
padding-bottom: 40px;
|
||||
border-radius: 0 0 @radius-base @radius-base;
|
||||
}
|
||||
}
|
||||
|
||||
// 区块标题:序号落在卡左内边距列(x=134 设计px),标题文字对齐内容列(x=194)
|
||||
&__section {
|
||||
.flex(row, flex-start, center);
|
||||
gap: @spacing-sm;
|
||||
margin-bottom: @spacing-base;
|
||||
font-size: @font-size-lg;
|
||||
font-weight: 600;
|
||||
color: @heading-color;
|
||||
.flex(row, flex-start, baseline);
|
||||
gap: @spacing-xs;
|
||||
margin-bottom: 16px;
|
||||
font-size: @font-size-title;
|
||||
font-weight: 500;
|
||||
color: @demand-heading;
|
||||
}
|
||||
|
||||
/** 区块序号:实心蓝圆 + 白色数字 */
|
||||
// 内容列(卡片栅格 / 表单)与区块标题文字对齐到 x=194 设计列(60 设计px ≈ 46px)
|
||||
&__section + * {
|
||||
margin-left: 46px;
|
||||
}
|
||||
|
||||
// ① 段标题到卡片栅格的间距更大(56 设计px ≈ 43px)
|
||||
&__card:first-of-type &__section {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
/** 区块序号:设计稿 48 设计px 蓝色数字(01/02/03) */
|
||||
&__index {
|
||||
.flex(row, center, center);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 50%;
|
||||
background: @primary-color;
|
||||
font-size: @font-size-sm;
|
||||
font-weight: 600;
|
||||
color: @white;
|
||||
flex-shrink: 0;
|
||||
width: 42px;
|
||||
font-size: 37px;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
color: @demand-accent;
|
||||
}
|
||||
|
||||
&__required {
|
||||
|
||||
Reference in New Issue
Block a user