Spaces:
Running
Running
File size: 19,753 Bytes
d0dd276 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 |
<script setup>
import { ref, onMounted, onUnmounted, computed } from 'vue'
import StatusSection from '../components/dashboard/StatusSection.vue'
import ConfigSection from '../components/dashboard/ConfigSection.vue'
import LogSection from '../components/dashboard/LogSection.vue'
import { useDashboardStore } from '../stores/dashboard'
const dashboardStore = useDashboardStore()
const refreshInterval = ref(null)
const isPageLoaded = ref(false)
const animationStep = ref(0)
const animationCompleted = ref(false)
// 计算属性:夜间模式状态
const isDarkMode = computed(() => dashboardStore.isDarkMode)
const config = computed(() => dashboardStore.config)
// 密码验证对话框状态
const showPasswordDialog = ref(false)
const password = ref('')
const passwordError = ref('')
// 页面加载时获取数据并启动自动刷新
onMounted(() => {
fetchDashboardData()
startAutoRefresh()
// 添加开屏动画效果
setTimeout(() => {
isPageLoaded.value = true
// 逐步触发动画
const animateStep = () => {
if (animationStep.value < 10) {
animationStep.value++
setTimeout(animateStep, 100)
} else {
// 动画完成后标记
animationCompleted.value = true
}
}
setTimeout(animateStep, 50)
}, 50)
})
// 组件卸载时停止自动刷新
onUnmounted(() => {
stopAutoRefresh()
})
// 开始自动刷新
function startAutoRefresh() {
if (!refreshInterval.value) {
refreshInterval.value = setInterval(fetchDashboardData, 1000) // 1秒刷新一次
console.log('自动刷新已启动')
}
}
// 停止自动刷新
function stopAutoRefresh() {
if (refreshInterval.value) {
clearInterval(refreshInterval.value)
refreshInterval.value = null
console.log('自动刷新已停止')
}
}
// 获取仪表盘数据
async function fetchDashboardData() {
await dashboardStore.fetchDashboardData()
}
// 手动刷新
function handleRefresh() {
fetchDashboardData()
}
// 切换夜间模式
function toggleDarkMode() {
dashboardStore.toggleDarkMode()
}
// 打开密码验证对话框
function openPasswordDialog() {
showPasswordDialog.value = true
password.value = ''
passwordError.value = ''
}
// 关闭密码验证对话框
function closePasswordDialog() {
showPasswordDialog.value = false
password.value = ''
passwordError.value = ''
}
// 验证密码并切换Vertex
async function verifyAndToggleVertex() {
if (!password.value) {
passwordError.value = '请输入密码'
return
}
try {
// 调用API更新配置
await dashboardStore.updateConfig('enableVertex', !config.value.enableVertex, password.value)
// 更新本地状态
dashboardStore.config.enableVertex = !config.value.enableVertex
// 关闭对话框
closePasswordDialog()
} catch (error) {
passwordError.value = error.message || '密码错误'
}
}
</script>
<template>
<div class="dashboard" :class="{ 'page-loaded': isPageLoaded }">
<div class="header-container" :class="{ 'animate-in': animationStep >= 1 || animationCompleted }">
<div class="title-container">
<h1><span>🤖 Gemini API 代理服务</span></h1>
</div>
<div class="toggle-container">
<button class="vertex-button" :class="{ 'active': config.enableVertex }" @click="openPasswordDialog">
{{ config.enableVertex ? 'Vertex 开' : 'Vertex 关' }}
</button>
<button class="theme-button" :class="{ 'active': isDarkMode }" @click="toggleDarkMode">
{{ isDarkMode ? '🌙 夜间' : '☀️ 日间' }}
</button>
</div>
</div>
<!-- 运行状态和环境配置并排显示 -->
<div class="sections-row">
<!-- 运行状态部分 -->
<StatusSection class="section-animate status-section" :class="{ 'animate-in': animationStep >= 2 || animationCompleted }" />
<!-- 环境配置部分 -->
<ConfigSection class="section-animate config-section" :class="{ 'animate-in': animationStep >= 3 || animationCompleted }" />
</div>
<!-- 系统日志部分 -->
<LogSection class="section-animate" :class="{ 'animate-in': animationStep >= 4 || animationCompleted }" />
<button class="refresh-button" :class="{ 'animate-in': animationStep >= 5 || animationCompleted }" @click="handleRefresh">刷新数据</button>
<!-- 密码验证对话框 -->
<div class="password-dialog" v-if="showPasswordDialog">
<div class="password-dialog-content">
<h3>验证密码</h3>
<p>请输入密码以{{ config.enableVertex ? '禁用' : '启用' }} Vertex AI</p>
<div class="password-input-container">
<input
type="password"
v-model="password"
class="password-input"
placeholder="请输入密码"
@keyup.enter="verifyAndToggleVertex"
>
<div class="password-error" v-if="passwordError">{{ passwordError }}</div>
</div>
<div class="password-actions">
<button class="cancel-btn" @click="closePasswordDialog">取消</button>
<button class="confirm-btn" @click="verifyAndToggleVertex">确认</button>
</div>
</div>
</div>
</div>
</template>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
line-height: 1.6;
background-color: var(--color-background);
color: var(--color-text);
margin: 0;
padding: 0;
transition: background-color 0.3s, color 0.3s;
}
.dashboard {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
opacity: 0;
transform: translateY(20px);
transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.dashboard.page-loaded {
opacity: 1;
transform: translateY(0);
}
.header-container {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
opacity: 0;
transform: translateY(20px) scale(0.95);
transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
background: var(--gradient-primary);
padding: 20px;
border-radius: var(--radius-xl);
box-shadow: var(--shadow-lg);
position: relative;
overflow: hidden;
}
.header-container::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 70%);
z-index: 0;
}
.header-container::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.1), transparent 70%);
z-index: 0;
}
.header-container.animate-in {
opacity: 1;
transform: translateY(0) scale(1);
}
.title-container {
display: flex;
align-items: center;
gap: 15px;
flex-wrap: wrap;
position: relative;
z-index: 1;
}
.toggle-container {
display: flex;
align-items: center;
gap: 15px;
position: relative;
z-index: 1;
}
.vertex-button, .theme-button {
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(255, 255, 255, 0.15);
padding: 8px 16px;
border-radius: var(--radius-full);
border: 1px solid rgba(255, 255, 255, 0.2);
transition: all 0.3s ease;
box-shadow: var(--shadow-md);
cursor: pointer;
font-size: 0.9rem;
color: white;
font-weight: 500;
min-width: 90px;
backdrop-filter: blur(5px);
}
.vertex-button.active, .theme-button.active {
background-color: rgba(255, 255, 255, 0.25);
border-color: rgba(255, 255, 255, 0.3);
color: white;
}
.vertex-button:hover, .theme-button:hover {
background-color: rgba(255, 255, 255, 0.3);
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
}
h1 {
color: white;
margin: 0;
font-size: 1.8rem;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
/* 按钮样式替代滑块 */
.vertex-toggle, .theme-toggle, .switch, .slider {
display: none;
}
/* 并排显示部分 */
.sections-row {
display: flex;
flex-direction: column;
gap: 20px;
margin-bottom: 20px;
}
.status-section, .config-section {
width: 100%;
}
/* 移动端优化 - 减小整体边距 */
@media (max-width: 768px) {
.dashboard {
padding: 10px 8px;
}
.header-container {
flex-direction: row;
align-items: center;
margin-bottom: 15px;
padding: 15px;
}
.title-container {
width: auto;
justify-content: flex-start;
margin-bottom: 0;
flex: 1;
}
h1 {
font-size: 1.4rem;
text-align: left;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
h1::before {
content: '🤖Gemini代理';
}
h1 span {
display: none;
}
.toggle-container {
width: auto;
justify-content: flex-end;
flex-direction: row;
gap: 8px;
margin-top: 0;
align-self: center;
}
.vertex-button, .theme-button {
padding: 6px 12px;
font-size: 0.8rem;
min-width: 80px;
}
/* 移动端下保持垂直布局 */
.sections-row {
flex-direction: column;
gap: 15px;
}
}
@media (max-width: 480px) {
.dashboard {
padding: 6px 4px;
}
.header-container {
flex-direction: row;
align-items: center;
margin-bottom: 15px;
padding: 12px;
}
.title-container {
width: auto;
justify-content: flex-start;
margin-bottom: 0;
flex: 1;
}
h1 {
font-size: 1.1rem;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.toggle-container {
width: auto;
justify-content: flex-end;
flex-direction: row;
gap: 4px;
margin-top: 0;
align-self: center;
}
.vertex-button, .theme-button {
padding: 4px 8px;
font-size: 0.65rem;
min-width: 70px;
}
/* 移动端下保持垂直布局 */
.sections-row {
flex-direction: column;
gap: 10px;
}
}
.refresh-button {
display: block;
margin: 20px auto;
padding: 12px 24px;
background: var(--gradient-secondary);
color: white;
border: none;
border-radius: var(--radius-lg);
font-size: 16px;
cursor: pointer;
transition: all 0.3s ease;
opacity: 0;
transform: translateY(20px) scale(0.95);
box-shadow: var(--shadow-md);
position: relative;
overflow: hidden;
}
.refresh-button::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
transform: translateX(-100%);
transition: transform 0.6s ease;
}
.refresh-button:hover::before {
transform: translateX(100%);
}
.refresh-button.animate-in {
opacity: 1;
transform: translateY(0) scale(1);
}
.refresh-button:hover {
transform: translateY(-3px);
box-shadow: var(--shadow-lg);
}
/* 全局响应式样式 - 保持三栏布局但优化显示 */
@media (max-width: 768px) {
/* 覆盖所有组件中的卡片样式 */
:deep(.info-box) {
padding: 15px 10px;
margin-bottom: 15px;
border-radius: var(--radius-lg);
background-color: var(--card-background);
border: 1px solid var(--card-border);
box-shadow: var(--shadow-md);
position: relative;
overflow: hidden;
}
:deep(.info-box)::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 4px;
height: 100%;
background: var(--gradient-primary);
}
:deep(.section-title) {
font-size: 1.1rem;
margin-bottom: 15px;
padding-bottom: 8px;
color: var(--color-heading);
border-bottom: 1px solid var(--color-border);
position: relative;
}
:deep(.section-title)::after {
content: '';
position: absolute;
bottom: -1px;
left: 0;
width: 50px;
height: 2px;
background: var(--gradient-primary);
}
:deep(.stats-grid) {
gap: 10px;
margin-top: 15px;
margin-bottom: 20px;
}
.refresh-button {
margin: 20px auto;
padding: 10px 20px;
font-size: 14px;
}
}
/* 小屏幕手机适配 */
@media (max-width: 480px) {
:deep(.info-box) {
padding: 12px 8px;
margin-bottom: 10px;
border-radius: var(--radius-md);
}
:deep(.section-title) {
font-size: 1rem;
margin-bottom: 10px;
padding-bottom: 6px;
}
:deep(.stats-grid) {
gap: 8px;
margin-top: 10px;
margin-bottom: 15px;
}
.refresh-button {
margin: 15px auto;
padding: 8px 16px;
font-size: 13px;
}
}
/* 开屏动画效果 */
.section-animate {
opacity: 0;
transform: translateY(20px) scale(0.95);
transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.section-animate.animate-in {
opacity: 1;
transform: translateY(0) scale(1);
}
/* 子元素动画 */
:deep(.stats-grid) {
opacity: 0;
transform: translateY(10px) scale(0.98);
transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.animate-in :deep(.stats-grid) {
opacity: 1;
transform: translateY(0) scale(1);
transition-delay: 0.1s;
}
/* 卡片动画 */
:deep(.stat-card) {
opacity: 0;
transform: scale(0.9) translateY(10px);
transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s, background-color 0.3s;
position: relative;
overflow: hidden;
}
:deep(.stat-card)::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 4px;
background: var(--gradient-secondary);
opacity: 0;
transition: opacity 0.3s ease;
}
:deep(.stat-card:hover)::before {
opacity: 1;
}
.animate-in :deep(.stat-card) {
opacity: 1;
transform: scale(1) translateY(0);
}
.animate-in :deep(.stat-card:nth-child(1)) {
transition-delay: 0.15s;
}
.animate-in :deep(.stat-card:nth-child(2)) {
transition-delay: 0.2s;
}
.animate-in :deep(.stat-card:nth-child(3)) {
transition-delay: 0.25s;
}
.animate-in :deep(.stat-card:nth-child(4)) {
transition-delay: 0.3s;
}
.animate-in :deep(.stat-card:nth-child(5)) {
transition-delay: 0.35s;
}
.animate-in :deep(.stat-card:nth-child(6)) {
transition-delay: 0.4s;
}
.animate-in :deep(.stat-card:nth-child(7)) {
transition-delay: 0.45s;
}
.animate-in :deep(.stat-card:nth-child(8)) {
transition-delay: 0.5s;
}
/* 日志条目动画 */
:deep(.log-entry) {
opacity: 0;
transform: translateX(-10px) scale(0.98);
transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
position: relative;
overflow: hidden;
}
:deep(.log-entry)::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
transform: translateX(-100%);
transition: transform 0.6s ease;
}
:deep(.log-entry:hover)::after {
transform: translateX(100%);
}
.animate-in :deep(.log-entry) {
opacity: 1;
transform: translateX(0) scale(1);
}
.animate-in :deep(.log-entry:nth-child(1)) {
transition-delay: 0.15s;
}
.animate-in :deep(.log-entry:nth-child(2)) {
transition-delay: 0.2s;
}
.animate-in :deep(.log-entry:nth-child(3)) {
transition-delay: 0.25s;
}
.animate-in :deep(.log-entry:nth-child(4)) {
transition-delay: 0.3s;
}
.animate-in :deep(.log-entry:nth-child(5)) {
transition-delay: 0.35s;
}
.animate-in :deep(.log-entry:nth-child(n+6)) {
transition-delay: 0.4s;
}
/* 添加飞入动画效果 */
@keyframes flyIn {
0% {
opacity: 0;
transform: translateY(30px) scale(0.9);
}
50% {
opacity: 0.5;
transform: translateY(15px) scale(0.95);
}
100% {
opacity: 1;
transform: translateY(0) scale(1);
}
}
@keyframes flyInFromLeft {
0% {
opacity: 0;
transform: translateX(-20px) scale(0.9);
}
50% {
opacity: 0.5;
transform: translateX(-10px) scale(0.95);
}
100% {
opacity: 1;
transform: translateX(0) scale(1);
}
}
@keyframes flyInFromRight {
0% {
opacity: 0;
transform: translateX(20px) scale(0.9);
}
50% {
opacity: 0.5;
transform: translateX(10px) scale(0.95);
}
100% {
opacity: 1;
transform: translateX(0) scale(1);
}
}
/* 应用飞入动画 */
.header-container.animate-in {
animation: flyIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.section-animate.animate-in {
animation: flyIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.animate-in :deep(.stat-card:nth-child(odd)) {
animation: flyInFromLeft 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.animate-in :deep(.stat-card:nth-child(even)) {
animation: flyInFromRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.animate-in :deep(.log-entry) {
animation: flyInFromLeft 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.refresh-button.animate-in {
animation: flyIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
/* 密码验证对话框样式 */
.password-dialog {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
align-items: flex-start;
justify-content: center;
z-index: 1000;
padding-top: 100px;
backdrop-filter: blur(5px);
}
.password-dialog-content {
background-color: var(--card-background);
border-radius: var(--radius-xl);
padding: 25px;
width: 90%;
max-width: 400px;
box-shadow: var(--shadow-xl);
position: relative;
overflow: hidden;
}
.password-dialog-content::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 5px;
background: var(--gradient-primary);
}
.password-dialog-content h3 {
margin-top: 0;
margin-bottom: 10px;
color: var(--color-heading);
font-size: 1.3rem;
}
.password-dialog-content p {
margin-bottom: 15px;
color: var(--color-text);
font-size: 14px;
}
.password-input-container {
margin-bottom: 20px;
position: relative;
}
.password-input {
width: 100%;
padding: 12px 16px;
border: 1px solid var(--color-border);
border-radius: var(--radius-md);
background-color: var(--color-background);
color: var(--color-text);
font-size: 14px;
transition: all 0.3s ease;
}
.password-input:focus {
outline: none;
border-color: var(--button-primary);
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}
.password-error {
color: #ef4444;
font-size: 12px;
margin-top: 8px;
padding-left: 5px;
}
.password-actions {
display: flex;
justify-content: flex-end;
gap: 10px;
}
.cancel-btn, .confirm-btn {
padding: 10px 18px;
border-radius: var(--radius-md);
font-size: 14px;
cursor: pointer;
transition: all 0.2s;
}
.cancel-btn {
background-color: var(--button-secondary);
border: 1px solid var(--color-border);
color: var(--button-secondary-text);
}
.confirm-btn {
background: var(--gradient-primary);
border: none;
color: white;
box-shadow: var(--shadow-sm);
}
.cancel-btn:hover {
background-color: var(--button-secondary-hover);
transform: translateY(-2px);
}
.confirm-btn:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
/* 移动端优化 */
@media (max-width: 768px) {
.password-dialog {
padding-top: 80px;
}
.password-dialog-content {
padding: 20px;
}
}
@media (max-width: 480px) {
.password-dialog {
padding-top: 60px;
}
.password-dialog-content {
padding: 15px;
}
.password-dialog-content h3 {
font-size: 1.1rem;
}
.password-dialog-content p {
font-size: 12px;
}
.password-input {
font-size: 12px;
padding: 10px 14px;
}
.cancel-btn, .confirm-btn {
padding: 8px 14px;
font-size: 12px;
}
}
</style> |