AccountCardDesktop.vue 24 KB

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