Commit 31df9f88 by liimin

refactor(components): 重构车品牌选择组件使用新弹窗组件

- 替换 MessageBox 组件为 un-popup 组件
- 优化车品牌选择界面 UI 样式和交互体验
- 添加返回按钮和关闭按钮功能
- 重构员工选择组件数据加载逻辑
- 移除 HomeFrame 中已废弃的属性和方法
- 更新样式变量配置适配新的界面布局
- 优化账号列表组件骨架屏和触摸反馈效果
1 parent 26cb64d0
......@@ -17,11 +17,12 @@
:show-scrollbar="false"
:bounces="false"
:scroll-with-animation="false"
:enable-back-to-top="false"
scroll-y>
<view v-if="employeeList.length === 0" style="padding: 40px 20px; text-align: center;">
<view v-show="employeeList.length === 0" style="padding: 40px 20px; text-align: center;">
<text style="color: #999; font-size: 14px;">暂无销售人员数据</text>
</view>
<view class="view-content">
<view v-show="employeeList.length > 0" class="view-content">
<template v-for="(item, index) in employeeList" :key="index">
<view class="select-item"
:class="[{ 'is-active': (salesUuid as string) == (item as UTSJSONObject).uuid }]"
......@@ -90,12 +91,9 @@ const windowHeight = computed<number>(() => {
const employeeList = ref<Array<any>>([]);
watch(updateView, () => {
console.log("updateView triggered, reading from storage");
const list = storage.get("employeeList") as UTSArray<Any>;
console.log("storage employeeList:", list, "length:", list != null ? (list as Array<any>).length : 0);
employeeList.value = list != null ? (list as Array<any>) : [];
console.log("employeeList.value updated, length:", employeeList.value.length);
}, { immediate: true, deep: true });
}, { immediate: true });
function close(): void {
visible.value = false;
......@@ -119,23 +117,25 @@ function handleHide(): void {
}
function open(): void {
// 先显示弹窗
visible.value = true;
// 如果已有数据,直接返回
if (employeeList.value.length > 0) {
return;
}
const userInfo: null | UserInfo = storage.get("userInfo") as null | UTSJSONObject;
if (userInfo == null) return;
const shopMerchantId = userInfo.shopMerchantId;
// 获取销售人员列表
// 异步获取销售人员列表,不阻塞弹窗显示
getEmployeeListApi({ merchantId: shopMerchantId }).then((res: any) => {
console.log("getEmployeeListApi response:", res);
const list = res as Array<any>;
console.log("list length:", list != null ? list.length : 0);
dispatch("setEmployeeList", list);
const listToStore = list != null ? list : [];
console.log("Saving to storage, length:", listToStore.length);
storage.set("employeeList", listToStore, 0);
console.log("Triggering updateView");
updateView.value = Date.now();
console.log("updateView triggered with:", updateView.value);
});
}
......
......@@ -20,7 +20,6 @@
:autoplay="modules.length > 1"
:circular="modules.length > 1"
:indicator="false"
:height="swiperHeight"
@change="(e: any) => onSwiperChangeFromEvent(e)"
@click="(idx: any) => onSlideTapFromEvent(idx)"
></un-swiper>
......
<template>
<view class="home-frame-container scene-shell-root hf-embed-in-tab-slot"
:class="[adapterClass]">
>
<!-- 主导航 Tabbar 由 SceneShell 横/竖壳承担;此处仅内容区 -->
<view class="home-content hf-content-without-tabbar">
<view class="right-side">
......@@ -32,7 +32,6 @@
:eyebrow="resolvedIntroEyebrow"
:empty-title="resolvedIntroEmptyTitle"
:empty-text="resolvedIntroEmptyText"
:swiper-height="resolvedIntroSwiperHeight"
@swiper-change="onIntroSwiperChange"
@slide-tap="onIntroSlideTap" />
<view v-else class="swiper-placeholder">
......@@ -65,7 +64,7 @@
</template>
<script setup lang="uts">
import { computed, defineExpose, onMounted, ref } from "vue";
import { computed, defineExpose, ref } from "vue";
import type { UnSwiperItem } from "@/uni_modules/uview-unix";
......@@ -159,29 +158,29 @@ const resolvedIntroEmptyText = computed((): string => {
return t != null && t !== "" ? (t as string) : "敬请期待";
});
const resolvedIntroSwiperHeight = computed((): number => {
const h = props.introSwiperHeight;
if (h != null) {
return h as number;
}
// 轮播图高度 = module-box 高度 - 标题栏高度(48px) - 头部高度(40px)
// 从 CSS 变量中获取 module-box-height
const isLandscape = !layoutService.isMode("portrait");
const resolution = layoutService.getResolutionBucket();
// const resolvedIntroSwiperHeight = computed((): number => {
// const h = props.introSwiperHeight;
// if (h != null) {
// return h as number;
// }
// // 轮播图高度 = module-box 高度 - 标题栏高度(48px) - 头部高度(40px)
// // 从 CSS 变量中获取 module-box-height
// const isLandscape = !layoutService.isMode("portrait");
// const resolution = layoutService.getResolutionBucket();
// 根据不同分辨率返回对应的高度
if (isLandscape) {
if (resolution == "1174x768") return 266; // 360 - 54 - 40
if (resolution == "1024x768") return 348; // 440 - 52 - 40
if (resolution == "816x393") return 116; // 200 - 44 - 40
return 352; // 默认横屏 440 - 48 - 40
} else {
if (resolution == "768x1174") return 556; // 650 - 54 - 40
if (resolution == "414x896") return 366; // 450 - 44 - 40
if (resolution == "393x816") return 318; // 400 - 42 - 40
return 332; // 默认竖屏 420 - 48 - 40
}
});
// // 根据不同分辨率返回对应的高度
// if (isLandscape) {
// if (resolution == "1174x768") return 266; // 360 - 54 - 40
// if (resolution == "1024x768") return 348; // 440 - 52 - 40
// if (resolution == "816x393") return 116; // 200 - 44 - 40
// return 352; // 默认横屏 440 - 48 - 40
// } else {
// if (resolution == "768x1174") return 556; // 650 - 54 - 40
// if (resolution == "414x896") return 366; // 450 - 44 - 40
// if (resolution == "393x816") return 318; // 400 - 42 - 40
// return 332; // 默认竖屏 420 - 48 - 40
// }
// });
function onIntroSwiperChange(index: number): void {
emit("introSwiperChange", index);
......@@ -191,33 +190,33 @@ function onIntroSlideTap(index: number): void {
emit("introSlideTap", index);
}
useResolutionConfig();
// useResolutionConfig();
const adapterClass = computed((): string => {
const cls = cssClassRef.value;
console.log('[HomeFrame] adapterClass:', cls);
return cls != null ? (cls as string) : "";
});
// const adapterClass = computed((): string => {
// const cls = cssClassRef.value;
// console.log('[HomeFrame] adapterClass:', cls);
// return cls != null ? (cls as string) : "";
// });
const modeClass = computed((): string => {
const modeRef = layoutService.getCurrentMode();
const m = modeRef.value;
return m == "portrait" ? "mode-portrait" : "mode-landscape";
});
// const modeClass = computed((): string => {
// const modeRef = layoutService.getCurrentMode();
// const m = modeRef.value;
// return m == "portrait" ? "mode-portrait" : "mode-landscape";
// });
const resolutionClass = computed((): string => {
const bucket = layoutService.getResolutionBucket();
return `res-${bucket}`;
});
// const resolutionClass = computed((): string => {
// const bucket = layoutService.getResolutionBucket();
// return `res-${bucket}`;
// });
// 动态样式 - 根据分辨率返回不同的样式(使用 CSS 变量)
const dynamicModuleBoxStyle = computed((): any => {
return {};
});
// // 动态样式 - 根据分辨率返回不同的样式(使用 CSS 变量)
// const dynamicModuleBoxStyle = computed((): any => {
// return {};
// });
const dynamicToolBoxStyle = computed((): any => {
return {};
});
// const dynamicToolBoxStyle = computed((): any => {
// return {};
// });
const userInfo = ref<UTSJSONObject>({});
const sceneType = ref<number>(1);
......@@ -235,8 +234,7 @@ function onStartClick(): void {
emit("start");
}
onMounted((): void => {
onLoad((options) => {
requestRecordPermission();
});
defineExpose({
......
......@@ -433,33 +433,14 @@
background: linear-gradient(to right, #eeeeee, rgba(216, 216, 216, 0));
}
// ===== HomeFrame Tabbar(横屏左侧 / 竖屏底部)=====
.home-tabbar {
display: flex;
flex-direction: column;
position: relative;
// width: 120px;
flex-shrink: 0;
background-image: linear-gradient(to bottom, #e8f0fe, #e8ecf5);
.home-tabbar-bg-img {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 0;
pointer-events: none;
}
.hf-landscape-column,
// ===== HomeFrame Tabbar( .hf-landscape-column,
.user-box,
.landscape-tabbar-wrap,
.home-tabbar-footer {
position: relative;
z-index: 1;
}
}
.home-tabbar-landscape {
min-height: 0;
......@@ -581,6 +562,28 @@
/* 横屏:footer 为侧栏第三段,由父级 flex 贴底;竖屏若复用此类名再按需加 margin */
.home-tabbar-footer {
flex-shrink: 0;
text-align: center;
}
// 横屏:中间区域放 un-tabbar(组件根节点通过 custom-style 纵向排列)
.landscape-tabbar-wrap {
flex: 1;
min-height: 0;
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.landscape-un-tabbar {
width: 100%;
flex: 1;
min-height: 0;
}
.home-tabbar-footer {
margin-top: auto;
padding-bottom: 40px;
}
......
......@@ -77,9 +77,8 @@ export default {
'--common-title-height': '54px',
'--entrance-icon-size': '64px',
'--entrance-item-gap': 'var(--l-spacing-3xl)',
'--tabbar-height': '640px',
'--tabbar-icon-size': '34px',
'--tabbar-width': '140px',
'--tabbar-height': '70px',
'--tabbar-icon-size': '46px',
},
// 小屏 Pad 横屏 (816x393) - 产品介绍占 65%
......@@ -96,7 +95,7 @@ export default {
// iPhone 14 Pro 竖屏 (393x816) - 产品介绍占 60%
// 可用高度 = 816 - 44(状态栏) - 42(标题) - 60(TabBar) ≈ 670px
'portrait-393x816': {
'--module-box-height': '300px',
'--module-box-height': '288px',
'--tool-box-min-height': '200px',
'--common-title-height': '42px',
'--tabbar-height': '70px',
......@@ -106,13 +105,13 @@ export default {
// 大屏平板竖屏 (768x1174) - 产品介绍占 65%
// 可用高度 = 1174 - 44(状态栏) - 54(标题) - 70(TabBar) ≈ 1006px
'portrait-768x1174': {
'--module-box-height': '550px',
'--tool-box-min-height': '380px',
'--module-box-height': '500px',
'--tool-box-min-height': '200px',
'--common-title-height': '54px',
'--entrance-icon-size': '64px',
'--entrance-item-gap': 'var(--l-spacing-3xl)',
'--tabbar-height': '70px',
'--tabbar-icon-size': '34px',
'--tabbar-height': '100px',
'--tabbar-icon-size': '36px',
},
}
}
<template>
<!-- 保持单根节点,确保父组件 v-show 生效 -->
<view>
<view v-if="!flag" class="skeleton-wrap">
<un-skeleton :animate="true"
avatar
:loading="true"
rows="6"
title>
</un-skeleton>
</view>
<view v-else class="box">
<view class="fade-in-up">
<SingleColumnSkeleton v-if="!flag" :count="4" />
<view v-else class="list-container">
<template v-if="loginUserInfoList.length > 0">
<view v-for="(item, index) in loginUserInfoList"
:key="index"
class="items"
:class="[item.active ? 'active' : '']"
:class="[item.active ? 'active' : '', pressedIndex === index ? 'pressed' : '']"
@touchstart="handleTouchStart(index)"
@touchend="handleTouchEnd"
@click="chooseAccount(item)">
<view class="right">
<view class="midle" :class="[getMidleClass(item)]">
......@@ -25,7 +20,6 @@
<text class="name">{{ item.merchantName }}</text>
<text class="shop_no">商户号:{{ item.merchantId }}</text>
</view>
</view>
</template>
<template v-else>
......@@ -39,6 +33,7 @@
import { defineExpose, onMounted, ref } from "vue";
import { apiGetListSelectAccount, apiGetSceneMerchantRefStoreList, apiSelectAccountLogin } from "@/api/user-api.uts";
import SingleColumnSkeleton from "./Skeleton/SingleColumnSkeleton.uvue";
import { storage } from "@/utils/storage.uts";
type AccountItem = {
......@@ -57,6 +52,7 @@ const loginUserInfoList = ref<AccountItem[]>([]);
const copyLoginUserInfoList = ref<AccountItem[]>([]);
const selectedUuid = ref<string>("");
const flag = ref<boolean>(false);
const pressedIndex = ref<number>(-1);
function getRoleText(item: AccountItem): string {
if (item.isSuper == true) return "超管";
......@@ -74,6 +70,14 @@ function getMidleClass(item: AccountItem): string {
return "midle_5";
}
function handleTouchStart(index: number): void {
pressedIndex.value = index;
}
function handleTouchEnd(): void {
pressedIndex.value = -1;
}
function get4SStoreList(loginUserObj: UTSJSONObject): void {
console.log("get4SStoreList:", loginUserObj);
......@@ -150,18 +154,12 @@ function get4SStoreList(loginUserObj: UTSJSONObject): void {
function selectAccountLogin(id: string, merchantName: string, userInfo: AccountItem | null): void {
console.log(`选择账号${merchantName}登录!`);
uni.showLoading({
title: "加载中",
mask: false
});
const params: UTSJSONObject = {
id
};
apiSelectAccountLogin(params).then((res: UTSJSONObject): void => {
uni.hideLoading();
console.log("selectAccountLogin 返回数据:", res);
const code = res.code as null | string;
......@@ -189,7 +187,6 @@ function selectAccountLogin(id: string, merchantName: string, userInfo: AccountI
});
}
}).catch((error: any | null): void => {
uni.hideLoading();
console.error("selectAccountLogin 失败:", error);
uni.showToast({
title: "网络异常,请稍后重试",
......@@ -236,6 +233,7 @@ function chooseAccount(item: AccountItem): void {
}
i++;
}
console.log("选择账号:", list);
loginUserInfoList.value = list;
selectedUuid.value = item.uuid;
choiceAccountLogin();
......@@ -278,16 +276,9 @@ function getListSelectAccount(autoLogin: boolean): void {
console.log("进入选择账号页面!autoLogin:", autoLogin);
flag.value = false;
uni.showLoading({
title: "加载中",
mask: false
});
const params: UTSJSONObject = {};
apiGetListSelectAccount(params).then((res: UTSJSONObject): void => {
uni.hideLoading();
console.log("getListSelectAccount 返回数据:", res);
const code = res.code as null | string;
......@@ -336,7 +327,7 @@ function getListSelectAccount(autoLogin: boolean): void {
i++;
}
console.log("解析后的账号列表,数量:", accountList.length);
console.log("解析后的账号列表,数量:", accountList.length,accountList);
loginUserInfoList.value = accountList;
copyLoginUserInfoList.value = accountList;
flag.value = true;
......@@ -360,7 +351,6 @@ function getListSelectAccount(autoLogin: boolean): void {
flag.value = true;
}
}).catch((error: any | null): void => {
uni.hideLoading();
flag.value = true;
console.error("getListSelectAccount 失败:", error);
uni.showToast({
......@@ -382,122 +372,156 @@ onMounted(() => {
</script>
<style scoped lang="scss">
.skeleton-wrap {
padding: 24px;
.list-container {
display: flex;
flex-direction: column;
width: 100%;
}
.box {
.items {
min-height: 92px;
background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
border-radius: 16px;
padding: 18px;
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
padding: 0 24px;
justify-content: space-between;
box-sizing: border-box;
border: 1px solid rgba(226, 232, 240, 0.6);
box-shadow:
0 2px 8px rgba(15, 23, 42, 0.04),
0 8px 24px rgba(15, 23, 42, 0.06);
transition: all 0.1s ease-out;
width: 100%;
margin-bottom: 16px;
position: relative;
overflow: hidden;
// 微妙的光泽效果
&::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(
90deg,
transparent 0%,
rgba(255, 255, 255, 0.3) 50%,
transparent 100%
);
transition: left 0.6s ease;
}
&:last-child {
margin-bottom: 0;
}
&:active,
&.pressed {
transform: scale(0.96);
box-shadow:
0 1px 2px rgba(15, 23, 42, 0.08),
0 2px 6px rgba(15, 23, 42, 0.1);
border-color: rgba(22, 119, 255, 0.4);
background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
}
.left {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
.name {
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 16px;
color: #1e293b;
letter-spacing: 0.3px;
line-height: 1.4;
}
.shop_no {
font-weight: 400;
font-size: 13px;
margin-top: 6px;
color: #94a3b8;
letter-spacing: 0.2px;
}
}
.items {
width: 48%;
margin-bottom: 24px;
height: 80px;
background: #ffffff;
border-radius: 8px;
padding: 16px;
.right {
flex-shrink: 0;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
border: 2px solid transparent;
margin-right: 16px;
.left {
flex: 1;
.midle {
width: 52px;
height: 52px;
border-radius: 26px;
display: flex;
flex-direction: column;
flex-direction: row;
align-items: center;
justify-content: center;
.name {
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 16px;
color: #181a1f;
}
.shop_no {
font-weight: 400;
font-size: 14px;
margin-top: 6px;
color: #999ea8;
}
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
transition: all 0.3s ease;
}
.right {
flex-shrink: 0;
display: flex;
flex-direction: row;
align-items: center;
margin-right: 14px;
.midle {
width: 48px;
height: 48px;
border-radius: 4px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.midle-text {
font-size: 14px;
font-weight: 700;
text-align: center;
}
.midle_1 {
background-color: #f247241a;
.midle-text {
color: #f24724;
}
}
.midle_2 {
background-color: #ff9d0a1a;
.midle-text {
color: #ff9d0a;
}
}
.midle_3 {
background-color: #347bff1a;
.midle-text {
color: #347bff;
}
}
.midle_4 {
background-color: #35c3761a;
.midle-text {
color: #35c376;
}
}
.midle_5 {
background-color: #35c3761a;
.midle-text {
color: #35c376;
}
}
.midle-text {
font-size: 14px;
font-weight: 700;
text-align: center;
letter-spacing: 0.5px;
}
.midle_1 {
background: linear-gradient(135deg, rgba(242, 71, 36, 0.12) 0%, rgba(242, 71, 36, 0.06) 100%);
.midle-text { color: #f24724; }
}
.midle_2 {
background: linear-gradient(135deg, rgba(255, 157, 10, 0.12) 0%, rgba(255, 157, 10, 0.06) 100%);
.midle-text { color: #ff9d0a; }
}
.midle_3 {
background: linear-gradient(135deg, rgba(52, 123, 255, 0.12) 0%, rgba(52, 123, 255, 0.06) 100%);
.midle-text { color: #347bff; }
}
.midle_4 {
background: linear-gradient(135deg, rgba(53, 195, 118, 0.12) 0%, rgba(53, 195, 118, 0.06) 100%);
.midle-text { color: #35c376; }
}
.midle_5 {
background: linear-gradient(135deg, rgba(53, 195, 118, 0.12) 0%, rgba(53, 195, 118, 0.06) 100%);
.midle-text { color: #35c376; }
}
}
}
.active {
background: linear-gradient(135deg, rgba(22, 119, 255, 0.06) 0%, rgba(22, 119, 255, 0.02) 100%);
border-color: rgba(22, 119, 255, 0.3);
box-shadow:
0 4px 16px rgba(22, 119, 255, 0.12),
0 12px 32px rgba(22, 119, 255, 0.16);
.left .name {
color: #1677FF;
font-weight: 700;
}
.active {
border: 2px solid #347bff;
.right .midle {
box-shadow: 0 4px 12px rgba(22, 119, 255, 0.2);
transform: scale(1.05);
}
}
</style>
......@@ -6,7 +6,9 @@
<view v-for="(item, index) in loginUserInfoList"
:key="index"
class="items"
:class="[item.active ? 'active' : '', (index + 1) % 2 === 0 ? 'item-even' : '']"
:class="[item.active ? 'active' : '', (index + 1) % 2 === 0 ? 'item-even' : '', pressedIndex === index ? 'pressed' : '']"
@touchstart="handleTouchStart(index)"
@touchend="handleTouchEnd"
@click="chooseMerchantItem(item)">
<view class="left">
<view class="store-badge">
......@@ -43,8 +45,17 @@ const loginUserInfoList = ref<MerchantItem[]>([]);
const copyLoginUserInfoList = ref<MerchantItem[]>([]);
const flag = ref<boolean>(false);
const selectMerchantId = ref<string>("");
const pressedIndex = ref<number>(-1);
let userInfo: null | UTSJSONObject = null;
function handleTouchStart(index: number): void {
pressedIndex.value = index;
}
function handleTouchEnd(): void {
pressedIndex.value = -1;
}
function jumpPage(item: MerchantItem, openSceneArr: number[]): void {
const shopMerchantName = item.merchantName;
const shopMerchantId = item.merchantId;
......@@ -306,7 +317,7 @@ defineExpose({
box-shadow:
0 2px 8px rgba(15, 23, 42, 0.04),
0 6px 18px rgba(15, 23, 42, 0.05);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
transition: all 0.1s ease-out;
position: relative;
overflow: hidden;
......@@ -320,12 +331,14 @@ defineExpose({
margin-right: 0;
}
&:active {
transform: translateY(-1px) scale(0.99);
&:active,
&.pressed {
transform: scale(0.95);
box-shadow:
0 3px 10px rgba(15, 23, 42, 0.06),
0 8px 24px rgba(15, 23, 42, 0.08);
border-color: rgba(22, 119, 255, 0.2);
0 1px 2px rgba(15, 23, 42, 0.08),
0 2px 6px rgba(15, 23, 42, 0.1);
border-color: rgba(22, 119, 255, 0.4);
background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
}
}
......@@ -389,7 +402,6 @@ defineExpose({
box-shadow:
0 3px 12px rgba(22, 119, 255, 0.1),
0 8px 24px rgba(22, 119, 255, 0.12);
transform: translateY(-1px) scale(0.99);
}
.items.active .name {
......
......@@ -6,7 +6,9 @@
<view v-for="(item, index) in sceneList"
:key="index"
class="items"
:class="[item.actived ? 'active' : '']"
:class="[item.actived ? 'active' : '', pressedIndex === index ? 'pressed' : '']"
@touchstart="handleTouchStart(index)"
@touchend="handleTouchEnd"
@click="selectScene(item, index)">
<view class="left">
<view class="scene-icon" :class="[`scene-type-${item.sceneType}`]">
......@@ -45,6 +47,7 @@ const sceneList = ref<SceneItem[]>([
]);
const loading = ref<boolean>(true);
const pressedIndex = ref<number>(-1);
let userInfo: null | UTSJSONObject = null;
let jumpTimer: number = 0;
......@@ -62,6 +65,14 @@ function getSceneIconText(sceneType: number): string {
}
}
function handleTouchStart(index: number): void {
pressedIndex.value = index;
}
function handleTouchEnd(): void {
pressedIndex.value = -1;
}
function jump(info: UTSJSONObject, data: any | null): void {
const now = Date.now();
if (now - jumpTimer < 3000) {
......@@ -223,7 +234,7 @@ defineExpose({
box-shadow:
0 2px 8px rgba(15, 23, 42, 0.04),
0 8px 24px rgba(15, 23, 42, 0.06);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
transition: all 0.1s ease-out;
width: 100%;
margin-bottom: 16px;
position: relative;
......@@ -233,12 +244,14 @@ defineExpose({
margin-bottom: 0;
}
&:active {
transform: translateY(-2px);
&:active,
&.pressed {
transform: scale(0.96);
box-shadow:
0 4px 12px rgba(15, 23, 42, 0.08),
0 12px 32px rgba(15, 23, 42, 0.1);
border-color: rgba(22, 119, 255, 0.2);
0 1px 2px rgba(15, 23, 42, 0.08),
0 2px 6px rgba(15, 23, 42, 0.1);
border-color: rgba(22, 119, 255, 0.4);
background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
}
.left {
......@@ -316,7 +329,6 @@ defineExpose({
box-shadow:
0 4px 16px rgba(22, 119, 255, 0.12),
0 12px 32px rgba(22, 119, 255, 0.16);
transform: translateY(-2px);
.right .name {
color: #1677FF;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!