Commit b44c1ba7 by Lin

功能(接待中心):新增品牌选择下拉功能

- 新增品牌选择箭头图标
- 更新接待中心组件,增加可点击标签展示已选品牌
- 实现品牌下拉选择器,支持用户从多品牌中选取
- 优化标签与箭头图标的视觉样式,提升辨识度
1 parent fa18f4df
......@@ -11,8 +11,9 @@
<view class="header-title-box">
<text class="header-title">业绩看板</text>
</view>
<view class="tag-box">
<text class="tag-text">问界 ⌄</text>
<view class="tag-box" @click="show = true">
<text class="tag-text">{{ selectedBrand }} </text>
<image class="tag-arrow-icon" src="/static/images/reception/icon-select-arrow.png" mode="aspectFit" />
</view>
</view>
<!-- 下:进度条区域 -->
......@@ -232,10 +233,13 @@
</view>
</view>
</scroll-view>
<un-picker :show="show" :columns="columns" @close="onClose" @cancel="onClose" @confirm="onConfirm" />
</template>
<script setup lang="uts">
// 接待中心看板
import { ref } from 'vue'
import type { UnPickerColumn, UnPickerColumnItem, UnPickerConfirmEvent } from '@/uni_modules/uview-unix'
// 产值卡片 tabs:0=本月交付转化率,1=本月交付客单价
const outputTabIndex = ref(1);
......@@ -246,6 +250,30 @@ const rightTabIndex = ref(1);
// 筛选 tabs:0=已提交,1=未提交
const filterTabIndex = ref(0);
const show = ref(false)
// 选中的品牌,默认问界
const selectedBrand = ref('问界')
// 对象字面量需显式断言为 UnPickerColumnItem,否则 UTS 会推断为 UTSJSONObject
const columns = ref<UnPickerColumn[]>([
[
{ text: '问界', value: 1 } as UnPickerColumnItem,
{ text: '奥迪', value: 2 } as UnPickerColumnItem,
{ text: '奔驰', value: 3 } as UnPickerColumnItem
] as UnPickerColumn
])
// 确认:将选中值填充到 tag,并关闭弹窗
const onConfirm = (e: UnPickerConfirmEvent): void => {
const items = e.value
if (items != null && items.length > 0) {
selectedBrand.value = items[0].text
}
show.value = false
}
// 取消:仅关闭弹窗,不更新选中值
const onClose = (): void => {
show.value = false
}
function switchFilterTab(index: number): void {
filterTabIndex.value = index
}
......@@ -408,7 +436,13 @@ function switchOutputTab(index: number): void {
.tag-text {
font-size: 12px;
color: #64748B;
color: #333333;
}
.tag-arrow-icon {
width: 18px;
height: 18px;
margin-left: 4px;
}
/* Progress */
......
import { DemoPageConfig } from "../../types/index.uts";
import { DemoPageConfig, ResponsiveImage } from "../../types/index.uts";
export const demoConfig : DemoPageConfig = {
paddingLeft: "100rpx",
......@@ -7,6 +7,6 @@ export const demoConfig : DemoPageConfig = {
heroImageSrc: {
x1: "/static/images/landscape/1024/study-hero.png",
x2: "/static/images/landscape/1024/study-hero@2x.png"
},
} as ResponsiveImage,
titleFontSize: "80rpx"
};
import { DemoPageConfig } from "../../types/index.uts";
import { DemoPageConfig, ResponsiveImage } from "../../types/index.uts";
export const demoConfig : DemoPageConfig = {
paddingLeft: "150rpx",
......@@ -7,6 +7,6 @@ export const demoConfig : DemoPageConfig = {
heroImageSrc: {
x1: "/static/images/landscape/1920/study-hero.png",
x2: "/static/images/landscape/1920/study-hero@2x.png"
},
} as ResponsiveImage,
titleFontSize: "48rpx"
};
import { DemoPageConfig } from "../../types/index.uts";
import { DemoPageConfig, ResponsiveImage } from "../../types/index.uts";
export const demoConfig : DemoPageConfig = {
paddingLeft: "32rpx",
......@@ -7,6 +7,6 @@ export const demoConfig : DemoPageConfig = {
heroImageSrc: {
x1: "/static/images/common/study-hero.png",
x2: "/static/images/common/study-hero@2x.png"
},
} as ResponsiveImage,
titleFontSize: "32rpx"
};
import { DemoPageConfig } from "../../types/index.uts";
import { DemoPageConfig, ResponsiveImage } from "../../types/index.uts";
export const demoConfig : DemoPageConfig = {
paddingLeft: "24rpx",
......@@ -7,6 +7,6 @@ export const demoConfig : DemoPageConfig = {
heroImageSrc: {
x1: "/static/images/portrait/common/study-hero.png",
x2: "/static/images/portrait/common/study-hero@2x.png"
},
} as ResponsiveImage,
titleFontSize: "30rpx"
};
......@@ -5,7 +5,7 @@
:swiper-custom="true"
@start="handleStart">
<template #swiperCustom>
<view v-if="logic.loadComplete.value" class="content-wrap">
<view v-if="!logic.loadComplete.value" class="content-wrap">
<scroll-view class="pkg-scroll"
direction="vertical"
:show-scrollbar="true">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!