AccountCardDesktop.vue 23 KB

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