AccountCardDesktop.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682
  1. <template>
  2. <view class="account-card">
  3. <!-- 折叠/展开按钮 -->
  4. <button class="collapse-btn" @click="toggleExpand">
  5. <cwg-icon name="chevron-right" :size="20" color="#6c8595"
  6. :class="['chevron-icon', { expanded: isExpanded }]" />
  7. </button>
  8. <!-- 标签区域 -->
  9. <view class="labels-container">
  10. <view class="labels">
  11. <template v-for="(label, index) in account.labels" :key="index">
  12. <view v-if="label" class="label-badge">
  13. {{ label }}
  14. </view>
  15. </template>
  16. </view>
  17. <view class="account-number"># {{ account.accountNumber }}</view>
  18. <view class="account-nickname">{{ nickName }}</view>
  19. </view>
  20. <!-- 主要内容区域(余额和操作按钮) -->
  21. <view class="main-content">
  22. <!-- 余额 -->
  23. <view class="balance">
  24. <text class="balance-number">{{ balanceInteger }}</text>
  25. <text class="balance-decimal">{{ balanceDecimal }} {{ account.currency }}</text>
  26. </view>
  27. <!-- 移动端圆形按钮组(≤1100px显示) -->
  28. <view class="mobile-buttons">
  29. <!-- 交易 -->
  30. <template v-for="(item, index) in circleButtons" :key="index">
  31. <view class="circle-btn" :class="{ 'is-disabled': item.disabled }" @click="handleAction1(item)"
  32. v-if="!item.needDemo">
  33. <view class="circle-icon" :class="{ 'primary': item.primary }">
  34. <cwg-icon :name="item.icon" :size="16" :color="item.color" />
  35. </view>
  36. <text class="circle-label" v-t="item.label" />
  37. </view>
  38. </template>
  39. <!-- 更多(三点) -->
  40. <cwg-dropdown @open="onOpen" @close="onClose" :menu-list="customMenuList"
  41. @menuClick="handleCustomClick">
  42. <view class="circle-btn">
  43. <view class="circle-icon">
  44. <cwg-icon name="crm-ellipsis-vertical" :size="16" color="#2e3a47" />
  45. </view>
  46. <text class="circle-label" v-t="'Latest.More'" />
  47. </view>
  48. </cwg-dropdown>
  49. </view>
  50. <!-- 桌面端按钮组(>1100px显示) -->
  51. <view class="desktop-buttons">
  52. <template v-for="(item, index) in actionButtons" :key="index">
  53. <view class="action-btn" :class="{ 'primary': item.primary, 'is-disabled': item.disabled }"
  54. @click="handleAction1(item)" v-if="!item.needDemo">
  55. <span class="btn-icon">
  56. <cwg-icon :name="item.icon" :size="16" :color="item.color" />
  57. </span>
  58. <text v-t="item.label" />
  59. </view>
  60. </template>
  61. <cwg-dropdown @open="onOpen" @close="onClose" :menu-list="customMenuList"
  62. @menuClick="handleCustomClick">
  63. <view class="action-btn icon-only">
  64. <cwg-icon name="crm-ellipsis-vertical" :size="16" color="#2e3a47" />
  65. </view>
  66. </cwg-dropdown>
  67. </view>
  68. </view>
  69. <view ref="infoBottomRef" class="info-bottom" :style="{
  70. height: isExpanded ? infoBottomHeight + 'px' : '0px',
  71. transition: 'height 281ms cubic-bezier(0.4, 0, 0.2, 1)'
  72. }">
  73. <!-- 底部信息区域(折叠时隐藏) -->
  74. <view class="info-section">
  75. <view class="info-column">
  76. <cwg-label-line-value :label="t('Label.Leverage')" :value="account.actualLeverage" />
  77. <cwg-label-line-value :label="t('Documentary.console.item5')" :value="account.floatingPL" />
  78. <cwg-label-line-value :label="t('Label.Balance')" :value="account.balanceWithSymbol" />
  79. </view>
  80. <view class="info-column">
  81. <cwg-label-line-value :label="t('Label.Equity')" :value="account.equityWithSymbol" />
  82. <cwg-label-line-value :label="t('Label.Credit')" :value="account.creditWithSymbol" />
  83. <cwg-label-line-value :label="t('Documentary.console.item3')" :value="account.platform" />
  84. </view>
  85. </view>
  86. <!-- 额外操作行(服务器、登录、更改密码,折叠时隐藏) -->
  87. <view class="extra-actions">
  88. <!-- 登录复制行 -->
  89. <view class="copy-row">
  90. <span class="label">{{ account.platform }} 登陆</span>
  91. <span class="value">{{ account.login }}</span>
  92. <view class="copy-btn" @click="copy(account.login)">
  93. <cwg-icon name="copy" :size="16" color="#2e3a47" />
  94. </view>
  95. </view>
  96. <!-- 更改交易密码按钮 -->
  97. <view class="change-password-btn" @click="handleAction('changePassword1')" v-if="!isDemo">
  98. <span class="btn-icon">
  99. <cwg-icon name="crm-xg" :size="16" color="#2e3a47" />
  100. </span>
  101. 更改交易密码
  102. </view>
  103. </view>
  104. </view>
  105. <!-- 通知区域(预留) -->
  106. <view class="notificators"></view>
  107. <TerminalDialog v-model:visible="terminalDialogVisible" />
  108. <TerminalChangePasswordDialog v-model:visible="terminalChangePasswordDialogVisible" :pwdType="pwdType"
  109. :account="account" />
  110. <TerminalInfoDialog v-model:visible="terminalInfoDialogVisible" :accountNumber="accountInfo.login"
  111. :form="accountInfo" :fieldList="fieldList" />
  112. </view>
  113. </template>
  114. <script setup lang="ts">
  115. import { ref, computed, onMounted, nextTick, onBeforeUnmount } from 'vue';
  116. import useRouter from "@/hooks/useRouter";
  117. const router = useRouter();
  118. import { useI18n } from 'vue-i18n';
  119. const { t } = useI18n();
  120. import TerminalDialog from './TerminalDialog.vue'
  121. import TerminalChangePasswordDialog from './TerminalChangePasswordDialog.vue'
  122. import TerminalInfoDialog from './TerminalInfoDialog.vue'
  123. const props = defineProps<{
  124. account: Account;
  125. }>();
  126. const accountInfo = ref(props.account)
  127. // 定义账户数据类型
  128. export interface Account {
  129. labels: string[]; // 标签数组,如 ['真实', 'MT4', 'Standard']
  130. accountNumber: string; // 账号,如 '85319215'
  131. nickName: string; // 昵称,如 '标准账户'
  132. balance: number; // 余额数字
  133. currency: string; // 货币,如 'USD'
  134. actualLeverage: string; // 实际杠杆,如 '1:2000'
  135. maxLeverage: string; // 调整杠杆,如 '1:2000'
  136. floatingPL: string; // 浮动盈亏,如 '0.00 USD'
  137. creditWithSymbol: string; // 可用保证金,如 '0.00 USD'
  138. equityWithSymbol: string; // 净值,如 '0.00 USD'
  139. platform: string; // 平台,如 'MT4'
  140. server: string; // 服务器,如 'Exness-Real28'
  141. login: string; // 登录名,如 '85319215'
  142. balanceWithSymbol: string; // 余额,如 '85319215'
  143. }
  144. const isDemo = computed(() => accountInfo.value.listType == 'demo')
  145. const closeFunctionOpen = (code) => {
  146. console.log(code, 121212);
  147. const closeFunctions = accountInfo.value.closeFunctions || ""
  148. if (closeFunctions == null || closeFunctions === "") {
  149. return true;
  150. }
  151. return String(closeFunctions).indexOf(String(code)) === -1;
  152. }
  153. // 圆形按钮数据
  154. const circleButtons = ref([
  155. { key: 'trade', label: 'Shop.Index.Transaction', icon: 'crm-trade', action: 'trade', needDemo: false, primary: true, disabled: false, color: '#fff' },
  156. { key: 'deposit', label: 'Home.page_customer.item2', icon: 'crm-deposit', action: 'deposit', needDemo: isDemo.value, disabled: !closeFunctionOpen('1'), color: '#2e3a47' },
  157. { key: 'withdraw', label: 'Home.page_customer.item3', icon: 'crm-withdraw', action: 'withdraw', needDemo: isDemo.value, disabled: !closeFunctionOpen('2'), color: '#2e3a47' },
  158. { key: 'transfer', label: 'Custom.Index.Transfer', icon: 'crm-transfer', action: 'transfer', needDemo: isDemo.value, disabled: !(closeFunctionOpen('5') && closeFunctionOpen('6') && closeFunctionOpen('3')), color: '#2e3a47' }
  159. ])
  160. // 普通按钮数据
  161. const actionButtons = computed(() => [
  162. { key: 'trade', label: 'Shop.Index.Transaction', icon: 'crm-trade', color: '#fff', primary: true, action: 'trade', needDemo: false, disabled: false },
  163. { key: 'deposit', label: 'Home.page_customer.item2', icon: 'crm-deposit', color: '#2e3a47', primary: false, action: 'deposit', needDemo: isDemo.value, disabled: !closeFunctionOpen('1') },
  164. { key: 'withdraw', label: 'Home.page_customer.item3', icon: 'crm-withdraw', color: '#2e3a47', primary: false, action: 'withdraw', needDemo: isDemo.value, disabled: !closeFunctionOpen('2') },
  165. { key: 'transfer', label: 'Custom.Index.Transfer', icon: 'crm-transfer', color: '#2e3a47', primary: false, action: 'transfer', needDemo: isDemo.value, disabled: !(closeFunctionOpen('5') && closeFunctionOpen('6') && closeFunctionOpen('3')) }
  166. ])
  167. const fieldList = ref([
  168. { label: 'Custom.PaymentHistory.AccountType', key: 'nickname', copyable: false },
  169. { label: 'Label.Leverage', key: 'actualLeverage', copyable: false },
  170. { label: 'Documentary.console.item5', key: 'floatingPL', copyable: false },
  171. { label: 'Label.Balance', key: 'balanceWithSymbol', copyable: false },
  172. { label: 'Label.Equity', key: 'equityWithSymbol', copyable: false },
  173. { label: 'Label.Credit', key: 'creditWithSymbol', copyable: false },
  174. { label: 'Documentary.console.item3', key: 'platform', copyable: false },
  175. { label: 'Documentary.console.item4', key: 'login', copyable: true }
  176. ])
  177. const nickName = ref(accountInfo.value.nickName)
  178. const infoBottomRef = ref(null);
  179. const infoBottomHeight = ref(0);
  180. // 测量高度
  181. const updateSubmenuHeight = () => {
  182. const el = infoBottomRef.value.$el;
  183. if (el) {
  184. // 获取内容实际高度(可能需要暂时移除过渡影响)
  185. const height = el.scrollHeight || el.offsetHeight;
  186. if (height > 0) {
  187. infoBottomHeight.value = height;
  188. }
  189. }
  190. };
  191. // 折叠状态
  192. const isExpanded = ref(false);
  193. // 切换折叠
  194. const toggleExpand = () => {
  195. isExpanded.value = !isExpanded.value;
  196. if (isExpanded.value) {
  197. nextTick(() => {
  198. updateSubmenuHeight();
  199. });
  200. }
  201. };
  202. const terminalDialogVisible = ref(false)
  203. const terminalChangePasswordDialogVisible = ref(false)
  204. const terminalInfoDialogVisible = ref(false)
  205. const pwdType = ref(1)
  206. const handleAction1 = (item) => {
  207. if (item.disabled) {
  208. uni.showToast({
  209. title: t('news_add_field.Des.item1'),
  210. icon: 'none'
  211. })
  212. return
  213. }
  214. handleAction(item.action, item)
  215. }
  216. // 处理按钮操作
  217. const handleAction = (type: string) => {
  218. switch (type) {
  219. case 'trade':
  220. terminalDialogVisible.value = true
  221. break;
  222. case 'changePassword1':
  223. pwdType.value = 1
  224. terminalChangePasswordDialogVisible.value = true
  225. break;
  226. case 'changePassword2':
  227. pwdType.value = 2
  228. terminalChangePasswordDialogVisible.value = true
  229. break;
  230. case 'info':
  231. console.log(type);
  232. terminalInfoDialogVisible.value = true
  233. break;
  234. case 'deposit':
  235. toDeposit()
  236. break;
  237. case 'withdraw':
  238. toWithdraw()
  239. break;
  240. case 'transfer':
  241. toTransfer()
  242. break;
  243. case 'position':
  244. toPosition()
  245. break;
  246. case 'history':
  247. toHistory()
  248. break;
  249. case 'payment-history':
  250. toPaymentHistory()
  251. break;
  252. default:
  253. break;
  254. }
  255. };
  256. const customMenuList = computed(() => !isDemo.value ? [
  257. { label: t('Ib.Report.Tit1'), type: 'history' },
  258. { label: t('Ib.Report.Tit4'), type: 'position' },
  259. { label: t('Home.page_customer.item4'), type: 'payment-history' },
  260. { label: t('Documentary.TundManagement.item29'), type: 'info' },
  261. { label: t('vu.item3'), type: 'changePassword1' },
  262. { label: t('vu.item4'), type: 'changePassword2' }
  263. ] : [
  264. { label: t('Ib.Report.Tit1'), type: 'history' },
  265. { label: t('Ib.Report.Tit4'), type: 'position' },
  266. { label: t('Documentary.TundManagement.item29'), type: 'info' }
  267. ])
  268. const handleCustomClick = (item, index) => {
  269. handleAction(item.value.type)
  270. }
  271. // 复制文本
  272. const copy = (text: string) => {
  273. uni.setClipboardData({ data: text });
  274. };
  275. // 按钮对应的操作方法
  276. const toHistory = () => {
  277. router.push(`/pages/customer/trade-history?login=${accountInfo.value.login}`)
  278. }
  279. // 按钮对应的操作方法
  280. const toPosition = () => {
  281. router.push(`/pages/customer/trade-position?login=${accountInfo.value.login}`)
  282. }
  283. // 按钮对应的操作方法
  284. const toPaymentHistory = () => {
  285. router.push(`/pages/customer/payment-history?login=${accountInfo.value.login}`)
  286. }
  287. // 按钮对应的操作方法
  288. const toDeposit = () => {
  289. router.push(`/pages/customer/deposit?login=${accountInfo.value.login}&type=${accountInfo.value.type}&balance=${accountInfo.value.balance}&currency=${accountInfo.value.currency}`)
  290. }
  291. const toWithdraw = () => {
  292. router.push(`/pages/customer/withdrawal?login=${accountInfo.value.login}&type=${accountInfo.value.type}&balance=${accountInfo.value.balance}&currency=${accountInfo.value.currency}`)
  293. }
  294. const toTransfer = () => {
  295. router.push(`/pages/customer/transfer?login=${accountInfo.value.login}&type=${accountInfo.value.type}&balance=${accountInfo.value.balance}&currency=${accountInfo.value.currency}`)
  296. }
  297. // 格式化余额,拆分为整数和小数部分
  298. const balanceInteger = computed(() => {
  299. return Math.floor(accountInfo.value.balance).toString();
  300. });
  301. const balanceDecimal = computed(() => {
  302. const parts = accountInfo.value.balance.toFixed(2).split('.');
  303. return parts[1] ? '.' + parts[1] : '.00';
  304. });
  305. // 在组件挂载后初始化高度
  306. onMounted(() => {
  307. nextTick(() => {
  308. updateSubmenuHeight();
  309. });
  310. window.addEventListener('resize', handleResize);
  311. isExpanded.value = accountInfo.value.isExpanded;
  312. });
  313. // 监听窗口 resize
  314. const handleResize = () => {
  315. if (isExpanded.value) {
  316. updateSubmenuHeight();
  317. }
  318. };
  319. onBeforeUnmount(() => {
  320. window.removeEventListener('resize', handleResize);
  321. });
  322. </script>
  323. <style scoped lang="scss">
  324. @import '@/uni.scss';
  325. .account-card {
  326. border-radius: px2rpx(16);
  327. padding: px2rpx(16);
  328. margin-bottom: px2rpx(16);
  329. position: relative;
  330. border: 1px solid rgba(108, 133, 149, 0.12);
  331. color: #2e3a47;
  332. .collapse-btn {
  333. position: absolute;
  334. top: px2rpx(12);
  335. right: px2rpx(12);
  336. background: transparent;
  337. border: none;
  338. padding: 0;
  339. cursor: pointer;
  340. color: #6c8595;
  341. width: px2rpx(32);
  342. height: px2rpx(32);
  343. display: flex;
  344. align-items: center;
  345. justify-content: center;
  346. .chevron-icon {
  347. transform: rotate(90deg);
  348. transition: transform 0.3s;
  349. &.expanded {
  350. transform: rotate(270deg);
  351. }
  352. }
  353. }
  354. .labels-container {
  355. display: flex;
  356. align-items: center;
  357. flex-wrap: wrap;
  358. gap: px2rpx(8);
  359. margin-bottom: px2rpx(16);
  360. padding-right: px2rpx(40); // 为折叠按钮留出空间
  361. .labels {
  362. display: flex;
  363. gap: px2rpx(8);
  364. }
  365. .label-badge {
  366. background-color: rgba(108, 133, 149, 0.08);
  367. border-radius: px2rpx(4);
  368. padding: px2rpx(4) px2rpx(8);
  369. font-size: px2rpx(12);
  370. color: #6c8595;
  371. font-weight: 500;
  372. }
  373. .account-number {
  374. font-size: px2rpx(18);
  375. font-weight: 600;
  376. line-height: 1.3;
  377. }
  378. .account-nickname {
  379. font-size: px2rpx(14);
  380. color: #6c8595;
  381. }
  382. }
  383. .main-content {
  384. .balance {
  385. margin-bottom: px2rpx(16);
  386. .balance-number {
  387. font-size: px2rpx(32);
  388. font-weight: 700;
  389. }
  390. .balance-decimal {
  391. font-size: px2rpx(16);
  392. color: #6c8595;
  393. margin-left: px2rpx(4);
  394. }
  395. }
  396. // 移动端按钮组(默认显示)
  397. .mobile-buttons {
  398. display: flex;
  399. justify-content: center;
  400. gap: px2rpx(0);
  401. margin-bottom: px2rpx(16);
  402. flex-wrap: wrap;
  403. .circle-btn {
  404. display: flex;
  405. flex-direction: column;
  406. align-items: center;
  407. cursor: pointer;
  408. width: px2rpx(64);
  409. .circle-icon {
  410. width: px2rpx(48);
  411. height: px2rpx(48);
  412. border-radius: 50%;
  413. background-color: #f5f7f9;
  414. display: flex;
  415. align-items: center;
  416. justify-content: center;
  417. color: #2e3a47;
  418. transition: background-color 0.2s;
  419. &.primary {
  420. background-color: var(--color-navy-700);
  421. color: #fff;
  422. }
  423. &:hover {
  424. background-color: #e9ecef;
  425. }
  426. svg {
  427. width: px2rpx(24);
  428. height: px2rpx(24);
  429. }
  430. }
  431. .circle-label {
  432. font-size: px2rpx(12);
  433. margin-top: px2rpx(4);
  434. color: #6c8595;
  435. }
  436. }
  437. }
  438. // 桌面端按钮组(默认隐藏,屏幕>1100px时显示)
  439. .desktop-buttons {
  440. display: none;
  441. .action-btn {
  442. background: transparent;
  443. border: 1px solid rgba(108, 133, 149, 0);
  444. border-radius: px2rpx(8);
  445. padding: px2rpx(8) px2rpx(20);
  446. font-size: px2rpx(14);
  447. color: #2e3a47;
  448. display: inline-flex;
  449. align-items: center;
  450. justify-content: center;
  451. gap: px2rpx(8);
  452. cursor: pointer;
  453. transition: all 0.2s;
  454. height: px2rpx(40);
  455. box-sizing: border-box;
  456. background-color: rgba(108, 133, 149, 0.08);
  457. &.primary {
  458. background-color: var(--color-navy-700);
  459. color: #fff;
  460. &:hover {
  461. background-color: var(--color-navy-600);
  462. }
  463. }
  464. &:hover {
  465. border: 1px solid rgba(108, 133, 149, 0.2);
  466. }
  467. .btn-icon {
  468. display: flex;
  469. align-items: center;
  470. svg {
  471. width: px2rpx(18);
  472. height: px2rpx(18);
  473. }
  474. }
  475. &.icon-only {
  476. padding: px2rpx(8);
  477. }
  478. }
  479. }
  480. .is-disabled {
  481. cursor: not-allowed;
  482. opacity: 0.5;
  483. }
  484. }
  485. .info-section {
  486. display: flex;
  487. gap: px2rpx(24);
  488. padding: px2rpx(16) 0;
  489. border-top: 1px solid rgba(108, 133, 149, 0.12);
  490. border-bottom: 1px solid rgba(108, 133, 149, 0.12);
  491. margin: px2rpx(16) 0;
  492. .info-column {
  493. flex: 1;
  494. display: flex;
  495. flex-direction: column;
  496. gap: px2rpx(12);
  497. }
  498. .info-item {
  499. display: flex;
  500. justify-content: space-between;
  501. align-items: flex-end;
  502. font-size: px2rpx(14);
  503. .label {
  504. color: #6c8595;
  505. }
  506. .line {
  507. flex: 1;
  508. height: 1px;
  509. border-top: 1px dashed rgba(108, 133, 149, 0.5);
  510. margin-bottom: px2rpx(1);
  511. }
  512. .value {
  513. font-weight: 500;
  514. color: #2e3a47;
  515. }
  516. }
  517. }
  518. @media screen and (max-width: 768px) {
  519. .info-section {
  520. flex-direction: column;
  521. gap: px2rpx(12);
  522. }
  523. }
  524. .extra-actions {
  525. display: flex;
  526. align-items: center;
  527. gap: px2rpx(8);
  528. margin-bottom: px2rpx(12);
  529. .copy-row {
  530. display: flex;
  531. align-items: center;
  532. gap: px2rpx(8);
  533. font-size: px2rpx(14);
  534. .label {
  535. color: #6c8595;
  536. min-width: px2rpx(70);
  537. }
  538. .value {
  539. flex: 1;
  540. color: #2e3a47;
  541. font-family: monospace;
  542. }
  543. .copy-btn {
  544. background: transparent;
  545. border: 1px solid rgba(108, 133, 149, 0);
  546. padding: 0;
  547. cursor: pointer;
  548. color: #6c8595;
  549. width: px2rpx(32);
  550. height: px2rpx(32);
  551. display: flex;
  552. align-items: center;
  553. justify-content: center;
  554. box-sizing: border-box;
  555. svg {
  556. width: px2rpx(20);
  557. height: px2rpx(20);
  558. }
  559. &:hover {
  560. background-color: rgba(108, 133, 149, 0.05);
  561. border: 1px solid rgba(108, 133, 149, 0.2);
  562. }
  563. }
  564. }
  565. .change-password-btn {
  566. background: transparent;
  567. box-sizing: border-box;
  568. border: 1px solid rgba(108, 133, 149, 0);
  569. border-radius: px2rpx(8);
  570. padding: px2rpx(8) px2rpx(16);
  571. font-size: px2rpx(14);
  572. color: #2e3a47;
  573. display: inline-flex;
  574. gap: px2rpx(8);
  575. cursor: pointer;
  576. margin: 0;
  577. // transition: all 0.2s;
  578. .btn-icon svg {
  579. width: px2rpx(16);
  580. height: px2rpx(16);
  581. }
  582. &:hover {
  583. background-color: rgba(108, 133, 149, 0.05);
  584. border: 1px solid rgba(108, 133, 149, 0.2);
  585. }
  586. }
  587. }
  588. .info-bottom {
  589. overflow: hidden;
  590. }
  591. .notificators {
  592. // 预留通知区域
  593. }
  594. }
  595. // 响应式:屏幕宽度 > 1100px 时,隐藏移动端按钮,显示桌面端按钮
  596. @media screen and (min-width: 1100px) {
  597. .account-card {
  598. .main-content {
  599. .mobile-buttons {
  600. display: none;
  601. }
  602. .desktop-buttons {
  603. display: flex;
  604. gap: px2rpx(8);
  605. justify-content: flex-end;
  606. }
  607. }
  608. }
  609. }
  610. </style>