Commit 8321e0f5 by liimin

Merge branch 'feature/rework' of http://192.168.3.233:8090/monorepo/venus into feature/rework

2 parents cfb377b4 67b53be1
...@@ -93,8 +93,6 @@ const setMediaRef = (id: number | string, component: any): void => { ...@@ -93,8 +93,6 @@ const setMediaRef = (id: number | string, component: any): void => {
mediaRefs.value[`media${id}`] = component; mediaRefs.value[`media${id}`] = component;
} }
}; };
type UserInfo = UTSJSONObject type UserInfo = UTSJSONObject
const channelType = computed<number>(() => { const channelType = computed<number>(() => {
......
...@@ -6,12 +6,13 @@ ...@@ -6,12 +6,13 @@
<script setup lang="uts"> <script setup lang="uts">
import { computed } from 'vue' import { computed } from 'vue'
import { merge } from '@/utils/common.uts'
/** /**
* 接待看板统一毛玻璃卡片容器:背景、描边、圆角、阴影与 flex 纵向布局。 * 接待看板统一毛玻璃卡片容器:背景、描边、圆角、阴影与 flex 纵向布局。
* - plain:仅外壳,无默认内边距与底部间距(自行控制留白) * - plain:仅外壳,无默认内边距与底部间距(自行控制留白)
* - output:24px 内边距(产值、对比条等卡片) * - output:12px 上下、16px 左右内边距(产值、对比条等卡片);默认用内联 style,避免 App-iOS 上 scoped 类 padding 不生效
* - funnel:同 output,并保留底部 10px 外边距(与列表间距一致) * - funnel:同 output,并保留底部 14px 外边距(与列表间距一致)
*/ */
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
...@@ -30,17 +31,26 @@ const props = withDefaults( ...@@ -30,17 +31,26 @@ const props = withDefaults(
const containerRootStyle = computed((): UTSJSONObject => { const containerRootStyle = computed((): UTSJSONObject => {
const s = props.rootStyle const s = props.rootStyle
if (s != null) { if (props.variant == 'output' || props.variant == 'funnel') {
return s const base = {
paddingTop: '12px',
paddingRight: '16px',
paddingBottom: '12px',
paddingLeft: '16px'
} as UTSJSONObject
if (s == null) {
return base
} }
return merge(base, s) as UTSJSONObject
}
if (s == null) {
return {} as UTSJSONObject return {} as UTSJSONObject
}
return merge(s) as UTSJSONObject
}) })
const rootClass = computed((): string => { const rootClass = computed((): string => {
let s = 'card-container' let s = 'card-container'
if (props.variant == 'output' || props.variant == 'funnel') {
s += ' card-container--padded'
}
if (props.variant == 'funnel') { if (props.variant == 'funnel') {
s += ' card-container--funnel-gap' s += ' card-container--funnel-gap'
} }
...@@ -60,10 +70,6 @@ const rootClass = computed((): string => { ...@@ -60,10 +70,6 @@ const rootClass = computed((): string => {
flex-direction: column; flex-direction: column;
} }
.card-container--padded {
padding: 12px 16px;
}
.card-container--funnel-gap { .card-container--funnel-gap {
margin-bottom: 14px; margin-bottom: 14px;
} }
......
...@@ -182,8 +182,7 @@ const contactRateMasked = computed((): string => { ...@@ -182,8 +182,7 @@ const contactRateMasked = computed((): string => {
width: var(--reception-dash-flow-rate-badge-size, 94px); width: var(--reception-dash-flow-rate-badge-size, 94px);
height: var(--reception-dash-flow-rate-badge-size, 94px); height: var(--reception-dash-flow-rate-badge-size, 94px);
border-radius: var(--reception-dash-flow-rate-badge-radius, 47px); border-radius: var(--reception-dash-flow-rate-badge-radius, 47px);
background-color: #eaf2ff; background-color:#ffffff;
background-image: linear-gradient(145deg, #eaf2ff 0%, #dbeafe 100%);
border: 1px solid #cfe0ff; border: 1px solid #cfe0ff;
box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16); box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
padding: 0 8px; padding: 0 8px;
......
<template> <template>
<card-container class="card-month-value"> <!-- 外边距写在包裹层 view 上,避免 class 仅挂在自定义组件根上时在 iOS 端与 scoped 组合导致 margin 不生效 -->
<view class="card-month-value">
<card-container>
<view class="title-box"> <view class="title-box">
<text class="title-text">本月业绩</text> <text class="title-text">本月业绩</text>
</view> </view>
...@@ -55,6 +57,7 @@ ...@@ -55,6 +57,7 @@
</view> </view>
</view> </view>
</card-container> </card-container>
</view>
</template> </template>
<script setup lang="uts"> <script setup lang="uts">
...@@ -158,6 +161,8 @@ const ringRightStyle = computed((): UTSJSONObject => { ...@@ -158,6 +161,8 @@ const ringRightStyle = computed((): UTSJSONObject => {
<style scoped lang="scss"> <style scoped lang="scss">
.card-month-value { .card-month-value {
flex-direction: column;
width: 100%;
margin-bottom: 16px; margin-bottom: 16px;
} }
......
...@@ -1160,7 +1160,7 @@ onUnmounted(() => { ...@@ -1160,7 +1160,7 @@ onUnmounted(() => {
} }
.reception-main-tabs { .reception-main-tabs {
background: linear-gradient(180deg, #f8fbff 0%, #f1f7ff 100%); background-color: #ffffff;
border-radius: 14px; border-radius: 14px;
padding: 0 10px; padding: 0 10px;
box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06); box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
......
...@@ -120,7 +120,7 @@ const reviewTabLabel = computed((): string => { ...@@ -120,7 +120,7 @@ const reviewTabLabel = computed((): string => {
padding: 0 14px; padding: 0 14px;
justify-content: space-between; justify-content: space-between;
border-radius: 10px; border-radius: 10px;
background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); background: #ffffff;
box-shadow: 0 1px 3px rgba(30, 41, 59, 0.06), inset 0 1px 0 #ffffff; box-shadow: 0 1px 3px rgba(30, 41, 59, 0.06), inset 0 1px 0 #ffffff;
box-sizing: border-box; box-sizing: border-box;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!