@robot-admin/naive-ui-components 0.16.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/README.md +12 -9
- package/README_EN.md +12 -9
- package/dist/C_ActionBar.css +56 -48
- package/dist/C_ActionBar2.cjs +1 -1
- package/dist/C_ActionBar2.js +1 -1
- package/dist/C_AntV2.cjs +1 -1
- package/dist/C_AntV2.js +3 -3
- package/dist/C_Barcode.css +6 -6
- package/dist/C_Barcode2.cjs +1 -1
- package/dist/C_Barcode2.js +1 -1
- package/dist/C_Chat.css +269 -185
- package/dist/C_Chat2.cjs +1 -1
- package/dist/C_Chat2.js +1 -1
- package/dist/C_Code.css +26 -26
- package/dist/C_Code2.cjs +1 -1
- package/dist/C_Code2.js +1 -1
- package/dist/C_Draggable2.cjs +1 -1
- package/dist/C_Draggable2.js +1 -1
- package/dist/C_FilePreview.css +96 -57
- package/dist/C_FilePreview2.cjs +1 -1
- package/dist/C_FilePreview2.js +1 -1
- package/dist/C_Form.base.css +295 -277
- package/dist/C_Form.css +295 -277
- package/dist/C_Form.d.cts +2 -1
- package/dist/C_Form.d.ts +2 -1
- package/dist/C_FormModal.css +10 -10
- package/dist/C_FormModal2.cjs +1 -1
- package/dist/C_FormModal2.js +1 -1
- package/dist/C_FormSearch.css +67 -68
- package/dist/C_FormSearch.d.cts +2 -1
- package/dist/C_FormSearch.d.ts +2 -1
- package/dist/C_FormSearch2.cjs +1 -1
- package/dist/C_FormSearch2.js +1 -1
- package/dist/C_FullCalendar2.cjs +1 -1
- package/dist/C_FullCalendar2.js +1 -1
- package/dist/C_GlobalSearch.css +140 -118
- package/dist/C_GlobalSearch2.cjs +1 -1
- package/dist/C_GlobalSearch2.js +1 -1
- package/dist/C_ImageCropper.css +12 -10
- package/dist/C_ImageCropper2.cjs +1 -1
- package/dist/C_ImageCropper2.js +1 -1
- package/dist/C_Login.css +79 -79
- package/dist/C_Login2.cjs +1 -1
- package/dist/C_Login2.js +1 -1
- package/dist/C_Map.css +10 -10
- package/dist/C_Map2.cjs +1 -1
- package/dist/C_Map2.js +1 -1
- package/dist/C_OrgChart.css +28 -4
- package/dist/C_OrgChart2.cjs +1 -1
- package/dist/C_OrgChart2.js +1 -1
- package/dist/C_QRCode2.cjs +1 -1
- package/dist/C_QRCode2.js +1 -1
- package/dist/C_Signature.css +15 -15
- package/dist/C_Signature2.cjs +1 -1
- package/dist/C_Signature2.js +1 -1
- package/dist/C_SplitPane.cjs +1 -1
- package/dist/C_SplitPane.css +251 -109
- package/dist/C_SplitPane.js +1 -1
- package/dist/C_SplitPane2.cjs +1 -1
- package/dist/C_SplitPane2.js +1 -1
- package/dist/C_Table.base.css +491 -563
- package/dist/C_Table.cjs +1 -1
- package/dist/C_Table.css +491 -563
- package/dist/C_Table.d.cts +3 -2
- package/dist/C_Table.d.ts +4 -2
- package/dist/C_Table.js +1 -1
- package/dist/C_TagsView2.cjs +1 -1
- package/dist/C_TagsView2.js +1 -1
- package/dist/C_Transfer.css +93 -84
- package/dist/C_Transfer2.cjs +1 -1
- package/dist/C_Transfer2.js +1 -1
- package/dist/C_Tree.css +72 -125
- package/dist/C_Tree.d.cts +3 -2
- package/dist/C_Tree.d.ts +15 -2
- package/dist/C_Tree2.cjs +1 -1
- package/dist/C_Tree2.js +1 -1
- package/dist/C_Upload.css +5 -5
- package/dist/C_Upload2.cjs +1 -1
- package/dist/C_Upload2.js +1 -1
- package/dist/C_VideoPlayer2.cjs +4 -3
- package/dist/C_VideoPlayer2.js +4 -3
- package/dist/C_VtableGantt.css +29 -28
- package/dist/C_VtableGantt2.cjs +1 -1
- package/dist/C_VtableGantt2.js +1 -1
- package/dist/C_WaterFall.css +29 -29
- package/dist/C_WaterFall2.cjs +1 -1
- package/dist/C_WaterFall2.js +1 -1
- package/dist/C_WorkFlow2.cjs +1 -1
- package/dist/C_WorkFlow2.js +1 -1
- package/dist/Card.cjs +1 -1
- package/dist/Card.js +1 -1
- package/dist/Custom.cjs +1 -1
- package/dist/Custom.js +1 -1
- package/dist/Dynamic.cjs +1 -1
- package/dist/Dynamic.js +1 -1
- package/dist/Steps.cjs +1 -1
- package/dist/Steps.js +1 -1
- package/dist/Tabs.cjs +1 -1
- package/dist/Tabs.js +1 -1
- package/dist/constants.d.cts +2 -2
- package/dist/constants.d.ts +2 -2
- package/dist/constants2.d.cts +2 -2
- package/dist/constants2.d.ts +2 -2
- package/dist/constants3.d.cts +2 -2
- package/dist/constants3.d.ts +2 -2
- package/dist/constants4.d.cts +4 -4
- package/dist/constants4.d.ts +4 -4
- package/dist/constants5.d.cts +3 -7
- package/dist/constants5.d.ts +3 -7
- package/dist/data.d.cts +10 -10
- package/dist/data.d.ts +10 -10
- package/dist/density.cjs +1 -0
- package/dist/density.d.cts +15 -0
- package/dist/density.d.ts +15 -0
- package/dist/density.js +1 -0
- package/dist/helpers.cjs +1 -1
- package/dist/helpers.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +1 -1
- package/dist/index.vue.d.cts +5 -5
- package/dist/index.vue.d.ts +5 -5
- package/dist/index10.vue.d.cts +5 -5
- package/dist/index10.vue.d.ts +3 -3
- package/dist/index11.vue.d.cts +3 -3
- package/dist/index11.vue.d.ts +5 -5
- package/dist/index12.vue.d.cts +5 -5
- package/dist/index13.vue.d.ts +5 -5
- package/dist/index14.vue.d.cts +5 -5
- package/dist/index14.vue.d.ts +9 -9
- package/dist/index15.vue.d.cts +9 -9
- package/dist/index15.vue.d.ts +3 -3
- package/dist/index16.vue.d.cts +3 -3
- package/dist/index17.vue.d.ts +1 -1
- package/dist/index18.vue.d.cts +1 -1
- package/dist/index18.vue.d.ts +7 -7
- package/dist/index19.vue.d.cts +7 -7
- package/dist/index19.vue.d.ts +5 -5
- package/dist/index2.vue.d.cts +2 -2
- package/dist/index2.vue.d.ts +2 -2
- package/dist/index20.vue.d.cts +6 -2
- package/dist/index20.vue.d.ts +6 -2
- package/dist/index21.vue.d.cts +2 -2
- package/dist/index21.vue.d.ts +2 -2
- package/dist/index22.vue.d.cts +2 -2
- package/dist/index22.vue.d.ts +2 -2
- package/dist/index23.vue.d.cts +2 -2
- package/dist/index23.vue.d.ts +2 -2
- package/dist/index25.vue.d.cts +5 -5
- package/dist/index25.vue.d.ts +5 -5
- package/dist/index27.vue.d.cts +2 -2
- package/dist/index27.vue.d.ts +2 -2
- package/dist/index28.vue.d.cts +7 -3
- package/dist/index28.vue.d.ts +7 -3
- package/dist/index3.vue.d.cts +3 -3
- package/dist/index3.vue.d.ts +3 -3
- package/dist/index4.vue.d.cts +5 -5
- package/dist/index5.vue.d.ts +2 -2
- package/dist/index6.vue.d.cts +2 -2
- package/dist/index6.vue.d.ts +7 -4
- package/dist/index7.vue.d.cts +7 -4
- package/dist/index7.vue.d.ts +2 -2
- package/dist/index8.vue.d.cts +2 -2
- package/dist/index8.vue.d.ts +4 -6
- package/dist/index9.vue.d.cts +4 -6
- package/dist/index9.vue.d.ts +5 -5
- package/dist/mapUtils.d.cts +4 -4
- package/dist/mapUtils.d.ts +4 -4
- package/dist/presets.d.cts +4 -1
- package/dist/presets.d.ts +4 -1
- package/dist/style.css +1763 -1566
- package/dist/useCalendarEvents.d.cts +10 -9
- package/dist/useCalendarEvents.d.ts +10 -9
- package/dist/useCollapsePanel.d.cts +3 -3
- package/dist/useCollapsePanel.d.ts +3 -3
- package/dist/useCropperCore.d.cts +9 -9
- package/dist/useCropperCore.d.ts +9 -9
- package/dist/useDraggableLayout.d.cts +15 -13
- package/dist/useDraggableLayout.d.ts +15 -13
- package/dist/useDynamicFormState.d.cts +5 -2
- package/dist/useDynamicFormState.d.ts +5 -2
- package/dist/useEdgeInteraction.d.cts +3 -3
- package/dist/useEdgeInteraction.d.ts +3 -3
- package/dist/useFullscreen.d.cts +4 -0
- package/dist/useFullscreen.d.ts +4 -0
- package/dist/useGlobalSearch.d.cts +9 -4
- package/dist/useGlobalSearch.d.ts +9 -4
- package/dist/useInfiniteScroll.d.cts +4 -1
- package/dist/useInfiniteScroll.d.ts +4 -1
- package/dist/useQRCode.d.cts +3 -3
- package/dist/useQRCode.d.ts +3 -3
- package/dist/useSearchState.d.cts +8 -6
- package/dist/useSearchState.d.ts +8 -6
- package/dist/useSignatureHistory.d.cts +7 -7
- package/dist/useSignatureHistory.d.ts +7 -7
- package/dist/useSplitResize.d.cts +50 -61
- package/dist/useSplitResize.d.ts +50 -61
- package/dist/useTableQuery.cjs +3 -3
- package/dist/useTableQuery.d.cts +237 -13
- package/dist/useTableQuery.d.ts +237 -13
- package/dist/useTableQuery.js +3 -3
- package/dist/useTimeSelection.d.cts +2 -2
- package/dist/useTimeSelection.d.ts +2 -2
- package/dist/useWorkflowValidation.d.cts +3 -3
- package/dist/useWorkflowValidation.d.ts +3 -3
- package/dist/verification.d.cts +5 -5
- package/dist/verification.d.ts +5 -5
- package/docs/component-review-20261019.md +55 -0
- package/docs/guides/form-density.en.md +42 -0
- package/docs/guides/form-density.md +59 -0
- package/docs/guides/runtime-performance.md +38 -0
- package/docs/guides/split-pane.en.md +103 -0
- package/docs/guides/split-pane.md +126 -0
- package/docs/guides/table-density.md +87 -0
- package/docs/guides/transfer.md +11 -0
- package/docs/guides/tree.md +157 -0
- package/docs/guides/usage.en.md +2 -0
- package/docs/guides/usage.md +2 -0
- package/docs/runtime-review-20261019.md +41 -0
- package/docs/wl-ui-produce-coverage.md +62 -0
- package/package.json +4 -2
- package/dist/useTreeOperations.d.cts +0 -185
- package/dist/useTreeOperations.d.ts +0 -185
package/dist/C_Login.css
CHANGED
|
@@ -348,7 +348,7 @@ to {
|
|
|
348
348
|
* }
|
|
349
349
|
*/
|
|
350
350
|
/* ===== CSS 变量默认值(暗色玻璃风格) ===== */
|
|
351
|
-
.c-login-panel[data-v-
|
|
351
|
+
.c-login-panel[data-v-00fdce30] {
|
|
352
352
|
/* 面板 */
|
|
353
353
|
--cl-panel-bg: rgba(255, 255, 255, 0.1);
|
|
354
354
|
--cl-panel-border: rgba(255, 255, 255, 0.18);
|
|
@@ -397,7 +397,7 @@ to {
|
|
|
397
397
|
}
|
|
398
398
|
|
|
399
399
|
/* ===== 面板容器 ===== */
|
|
400
|
-
.c-login-panel[data-v-
|
|
400
|
+
.c-login-panel[data-v-00fdce30] {
|
|
401
401
|
width: var(--cl-panel-width);
|
|
402
402
|
background: var(--cl-panel-bg);
|
|
403
403
|
border: 1px solid var(--cl-panel-border);
|
|
@@ -410,7 +410,7 @@ to {
|
|
|
410
410
|
transition: box-shadow 0.3s ease;
|
|
411
411
|
/* 顶部光泽线 */
|
|
412
412
|
}
|
|
413
|
-
.c-login-panel[data-v-
|
|
413
|
+
.c-login-panel[data-v-00fdce30]::before {
|
|
414
414
|
content: "";
|
|
415
415
|
position: absolute;
|
|
416
416
|
top: 0;
|
|
@@ -420,10 +420,10 @@ to {
|
|
|
420
420
|
background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0) 100%);
|
|
421
421
|
pointer-events: none;
|
|
422
422
|
}
|
|
423
|
-
.c-login-panel[data-v-
|
|
423
|
+
.c-login-panel[data-v-00fdce30] {
|
|
424
424
|
/* 玻璃内衬 */
|
|
425
425
|
}
|
|
426
|
-
.c-login-panel[data-v-
|
|
426
|
+
.c-login-panel[data-v-00fdce30]::after {
|
|
427
427
|
content: "";
|
|
428
428
|
position: absolute;
|
|
429
429
|
inset: 0;
|
|
@@ -432,19 +432,19 @@ to {
|
|
|
432
432
|
border-radius: inherit;
|
|
433
433
|
z-index: 0;
|
|
434
434
|
}
|
|
435
|
-
.c-login-panel[data-v-
|
|
435
|
+
.c-login-panel[data-v-00fdce30] > * {
|
|
436
436
|
position: relative;
|
|
437
437
|
z-index: 1;
|
|
438
438
|
}
|
|
439
439
|
|
|
440
440
|
/* ===== Header ===== */
|
|
441
|
-
.c-login__header[data-v-
|
|
441
|
+
.c-login__header[data-v-00fdce30] {
|
|
442
442
|
text-align: center;
|
|
443
443
|
margin-bottom: 10px;
|
|
444
444
|
}
|
|
445
445
|
|
|
446
446
|
/* ===== 返回按钮(登录/注册下方块级按钮) ===== */
|
|
447
|
-
.c-login__back-btn[data-v-
|
|
447
|
+
.c-login__back-btn[data-v-00fdce30] {
|
|
448
448
|
margin-top: 10px;
|
|
449
449
|
height: var(--cl-btn-height) !important;
|
|
450
450
|
border-radius: var(--cl-btn-radius) !important;
|
|
@@ -456,41 +456,41 @@ to {
|
|
|
456
456
|
letter-spacing: 2px;
|
|
457
457
|
transition: all 0.25s ease !important;
|
|
458
458
|
}
|
|
459
|
-
.c-login__back-btn[data-v-
|
|
459
|
+
.c-login__back-btn[data-v-00fdce30]:hover {
|
|
460
460
|
background: rgba(255, 255, 255, 0.06) !important;
|
|
461
461
|
border-color: var(--cl-input-underline-hover) !important;
|
|
462
462
|
color: var(--cl-text-primary) !important;
|
|
463
463
|
}
|
|
464
|
-
.c-login__logo[data-v-
|
|
464
|
+
.c-login__logo[data-v-00fdce30] {
|
|
465
465
|
display: flex;
|
|
466
466
|
justify-content: center;
|
|
467
467
|
margin-bottom: 4px;
|
|
468
468
|
}
|
|
469
|
-
.c-login__logo .c-login__logo-icon[data-v-
|
|
469
|
+
.c-login__logo .c-login__logo-icon[data-v-00fdce30] {
|
|
470
470
|
color: var(--cl-text-primary);
|
|
471
471
|
filter: drop-shadow(0 2px 8px rgba(24, 89, 233, 0.4));
|
|
472
472
|
}
|
|
473
|
-
.c-login__title[data-v-
|
|
473
|
+
.c-login__title[data-v-00fdce30] {
|
|
474
474
|
margin: 0 0 2px;
|
|
475
475
|
font-size: 20px;
|
|
476
476
|
font-weight: 600;
|
|
477
477
|
color: var(--cl-text-primary);
|
|
478
478
|
letter-spacing: 0.5px;
|
|
479
479
|
}
|
|
480
|
-
.c-login__subtitle[data-v-
|
|
480
|
+
.c-login__subtitle[data-v-00fdce30] {
|
|
481
481
|
margin: 0;
|
|
482
482
|
font-size: 13px;
|
|
483
483
|
color: var(--cl-text-secondary);
|
|
484
484
|
}
|
|
485
485
|
|
|
486
486
|
/* ===== 登录方式切换(底部) ===== */
|
|
487
|
-
.c-login__mode-switch[data-v-
|
|
487
|
+
.c-login__mode-switch[data-v-00fdce30] {
|
|
488
488
|
margin-top: 14px;
|
|
489
489
|
display: grid;
|
|
490
490
|
grid-template-columns: 1fr 1fr;
|
|
491
491
|
gap: 10px;
|
|
492
492
|
}
|
|
493
|
-
.c-login__mode-btn[data-v-
|
|
493
|
+
.c-login__mode-btn[data-v-00fdce30] {
|
|
494
494
|
--n-border: none !important;
|
|
495
495
|
--n-border-hover: none !important;
|
|
496
496
|
--n-border-pressed: none !important;
|
|
@@ -503,51 +503,51 @@ to {
|
|
|
503
503
|
color: var(--cl-text-secondary) !important;
|
|
504
504
|
transition: all 0.2s ease !important;
|
|
505
505
|
}
|
|
506
|
-
.c-login__mode-btn[data-v-
|
|
506
|
+
.c-login__mode-btn[data-v-00fdce30]:hover {
|
|
507
507
|
background: rgba(255, 255, 255, 0.1) !important;
|
|
508
508
|
color: var(--cl-text-primary) !important;
|
|
509
509
|
}
|
|
510
|
-
.c-login__mode-btn.is-active[data-v-
|
|
510
|
+
.c-login__mode-btn.is-active[data-v-00fdce30] {
|
|
511
511
|
background: color-mix(in srgb, var(--cl-tab-bar) 22%, transparent) !important;
|
|
512
512
|
color: var(--cl-tab-active) !important;
|
|
513
513
|
}
|
|
514
514
|
|
|
515
515
|
/* ===== 表单 ===== */
|
|
516
|
-
.c-login__form[data-v-
|
|
516
|
+
.c-login__form[data-v-00fdce30] {
|
|
517
517
|
margin-top: 6px;
|
|
518
518
|
}
|
|
519
|
-
.c-login__form-item[data-v-
|
|
519
|
+
.c-login__form-item[data-v-00fdce30] {
|
|
520
520
|
margin-bottom: 6px !important;
|
|
521
521
|
/* 彻底干掉 NaiveUI FormItem 内置间距 CSS 变量 */
|
|
522
522
|
}
|
|
523
|
-
.c-login__form-item[data-v-
|
|
523
|
+
.c-login__form-item[data-v-00fdce30] .n-form-item {
|
|
524
524
|
--n-feedback-padding: 2px 0 0 0 !important;
|
|
525
525
|
--n-feedback-height: 0 !important;
|
|
526
526
|
--n-blank-height: 0 !important;
|
|
527
527
|
--n-label-height: 0 !important;
|
|
528
528
|
}
|
|
529
|
-
.c-login__form-item[data-v-
|
|
529
|
+
.c-login__form-item[data-v-00fdce30] .n-form-item-label {
|
|
530
530
|
display: none;
|
|
531
531
|
}
|
|
532
|
-
.c-login__form-item[data-v-
|
|
532
|
+
.c-login__form-item[data-v-00fdce30] {
|
|
533
533
|
/* 校验信息减少占用 */
|
|
534
534
|
}
|
|
535
|
-
.c-login__form-item[data-v-
|
|
535
|
+
.c-login__form-item[data-v-00fdce30] .n-form-item-feedback-wrapper {
|
|
536
536
|
min-height: 0 !important;
|
|
537
537
|
padding-top: 0 !important;
|
|
538
538
|
line-height: 1.4;
|
|
539
539
|
}
|
|
540
|
-
.c-login__form-item[data-v-
|
|
540
|
+
.c-login__form-item[data-v-00fdce30] .n-form-item-feedback {
|
|
541
541
|
font-size: 11px !important;
|
|
542
542
|
line-height: 1.4;
|
|
543
543
|
}
|
|
544
|
-
.c-login__form-item[data-v-
|
|
544
|
+
.c-login__form-item[data-v-00fdce30] .n-form-item-blank {
|
|
545
545
|
min-height: 0 !important;
|
|
546
546
|
}
|
|
547
|
-
.c-login__form-item[data-v-
|
|
547
|
+
.c-login__form-item[data-v-00fdce30] {
|
|
548
548
|
/* 底线风格输入框 */
|
|
549
549
|
}
|
|
550
|
-
.c-login__form-item[data-v-
|
|
550
|
+
.c-login__form-item[data-v-00fdce30] .n-input {
|
|
551
551
|
--n-border: none !important;
|
|
552
552
|
--n-border-hover: none !important;
|
|
553
553
|
--n-border-focus: none !important;
|
|
@@ -563,58 +563,58 @@ to {
|
|
|
563
563
|
padding: 5px 2px !important;
|
|
564
564
|
transition: border-color 0.25s ease;
|
|
565
565
|
}
|
|
566
|
-
.c-login__form-item[data-v-
|
|
566
|
+
.c-login__form-item[data-v-00fdce30] .n-input:hover {
|
|
567
567
|
border-bottom-color: var(--cl-input-underline-hover) !important;
|
|
568
568
|
}
|
|
569
|
-
.c-login__form-item[data-v-
|
|
569
|
+
.c-login__form-item[data-v-00fdce30] .n-input:focus-within {
|
|
570
570
|
border-bottom-color: var(--cl-input-underline-focus) !important;
|
|
571
571
|
}
|
|
572
|
-
.c-login__form-item[data-v-
|
|
572
|
+
.c-login__form-item[data-v-00fdce30] .n-input .n-input__input-el {
|
|
573
573
|
color: var(--cl-input-text) !important;
|
|
574
574
|
}
|
|
575
|
-
.c-login__form-item[data-v-
|
|
575
|
+
.c-login__form-item[data-v-00fdce30] .n-input .n-input__input-el::placeholder {
|
|
576
576
|
color: var(--cl-input-placeholder) !important;
|
|
577
577
|
}
|
|
578
|
-
.c-login__form-item[data-v-
|
|
579
|
-
.c-login__form-item[data-v-
|
|
578
|
+
.c-login__form-item[data-v-00fdce30] .n-input .n-input__prefix,
|
|
579
|
+
.c-login__form-item[data-v-00fdce30] .n-input .n-input__suffix {
|
|
580
580
|
color: var(--cl-input-icon) !important;
|
|
581
581
|
}
|
|
582
582
|
|
|
583
583
|
/* ===== 辅助行:记住我 + 忘记密码 ===== */
|
|
584
|
-
.c-login__aux-row[data-v-
|
|
584
|
+
.c-login__aux-row[data-v-00fdce30] {
|
|
585
585
|
display: flex;
|
|
586
586
|
justify-content: space-between;
|
|
587
587
|
align-items: center;
|
|
588
588
|
margin-top: 8px;
|
|
589
589
|
margin-bottom: 14px;
|
|
590
590
|
}
|
|
591
|
-
.c-login__remember[data-v-
|
|
591
|
+
.c-login__remember[data-v-00fdce30] .n-checkbox__label {
|
|
592
592
|
color: var(--cl-text-secondary) !important;
|
|
593
593
|
font-size: 13px;
|
|
594
594
|
}
|
|
595
|
-
.c-login__remember[data-v-
|
|
595
|
+
.c-login__remember[data-v-00fdce30] .n-checkbox-box {
|
|
596
596
|
--n-border: 1px solid var(--cl-input-underline) !important;
|
|
597
597
|
}
|
|
598
|
-
.c-login__forgot[data-v-
|
|
598
|
+
.c-login__forgot[data-v-00fdce30] {
|
|
599
599
|
font-size: 13px;
|
|
600
600
|
color: var(--cl-link-color);
|
|
601
601
|
cursor: pointer;
|
|
602
602
|
transition: color 0.2s ease;
|
|
603
603
|
}
|
|
604
|
-
.c-login__forgot[data-v-
|
|
604
|
+
.c-login__forgot[data-v-00fdce30]:hover {
|
|
605
605
|
color: var(--cl-link-hover);
|
|
606
606
|
}
|
|
607
607
|
|
|
608
608
|
/* ===== 验证码行 ===== */
|
|
609
|
-
.c-login__code-row[data-v-
|
|
609
|
+
.c-login__code-row[data-v-00fdce30] {
|
|
610
610
|
display: flex;
|
|
611
611
|
gap: 10px;
|
|
612
612
|
width: 100%;
|
|
613
613
|
}
|
|
614
|
-
.c-login__code-input[data-v-
|
|
614
|
+
.c-login__code-input[data-v-00fdce30] {
|
|
615
615
|
flex: 1;
|
|
616
616
|
}
|
|
617
|
-
.c-login__send-code-btn[data-v-
|
|
617
|
+
.c-login__send-code-btn[data-v-00fdce30] {
|
|
618
618
|
flex-shrink: 0;
|
|
619
619
|
white-space: nowrap;
|
|
620
620
|
background: rgba(255, 255, 255, 0.08) !important;
|
|
@@ -624,13 +624,13 @@ to {
|
|
|
624
624
|
font-size: 13px;
|
|
625
625
|
transition: all 0.25s ease;
|
|
626
626
|
}
|
|
627
|
-
.c-login__send-code-btn[data-v-
|
|
627
|
+
.c-login__send-code-btn[data-v-00fdce30]:not(:disabled):hover {
|
|
628
628
|
background: rgba(255, 255, 255, 0.16) !important;
|
|
629
629
|
color: var(--cl-text-primary) !important;
|
|
630
630
|
}
|
|
631
631
|
|
|
632
632
|
/* ===== 登录按钮 ===== */
|
|
633
|
-
.c-login__submit-btn[data-v-
|
|
633
|
+
.c-login__submit-btn[data-v-00fdce30] {
|
|
634
634
|
height: var(--cl-btn-height) !important;
|
|
635
635
|
background: var(--cl-btn-bg) !important;
|
|
636
636
|
border: none !important;
|
|
@@ -645,7 +645,7 @@ to {
|
|
|
645
645
|
margin-top: 14px;
|
|
646
646
|
/* 光泽扫过动画 */
|
|
647
647
|
}
|
|
648
|
-
.c-login__submit-btn[data-v-
|
|
648
|
+
.c-login__submit-btn[data-v-00fdce30]::before {
|
|
649
649
|
content: "";
|
|
650
650
|
position: absolute;
|
|
651
651
|
top: 0;
|
|
@@ -656,34 +656,34 @@ to {
|
|
|
656
656
|
transform: skewX(-25deg);
|
|
657
657
|
transition: left 0.6s ease;
|
|
658
658
|
}
|
|
659
|
-
.c-login__submit-btn[data-v-
|
|
659
|
+
.c-login__submit-btn[data-v-00fdce30]:not(:disabled):hover {
|
|
660
660
|
background: var(--cl-btn-bg-hover) !important;
|
|
661
661
|
transform: translateY(-1px);
|
|
662
662
|
box-shadow: var(--cl-btn-shadow-hover) !important;
|
|
663
663
|
}
|
|
664
|
-
.c-login__submit-btn[data-v-
|
|
664
|
+
.c-login__submit-btn[data-v-00fdce30]:not(:disabled):hover::before {
|
|
665
665
|
left: 150%;
|
|
666
666
|
}
|
|
667
|
-
.c-login__submit-btn[data-v-
|
|
667
|
+
.c-login__submit-btn[data-v-00fdce30]:active {
|
|
668
668
|
transform: translateY(0) !important;
|
|
669
669
|
}
|
|
670
670
|
|
|
671
671
|
/* ===== 人机验证 ===== */
|
|
672
|
-
.c-login__captcha-wrap[data-v-
|
|
672
|
+
.c-login__captcha-wrap[data-v-00fdce30] {
|
|
673
673
|
margin-top: 10px;
|
|
674
674
|
display: flex;
|
|
675
675
|
justify-content: center;
|
|
676
676
|
}
|
|
677
677
|
|
|
678
678
|
/* ===== 扫码登录面板 ===== */
|
|
679
|
-
.c-login__qr-panel[data-v-
|
|
679
|
+
.c-login__qr-panel[data-v-00fdce30] {
|
|
680
680
|
display: flex;
|
|
681
681
|
flex-direction: column;
|
|
682
682
|
align-items: center;
|
|
683
683
|
padding: 8px 0 4px;
|
|
684
684
|
gap: 14px;
|
|
685
685
|
}
|
|
686
|
-
.c-login__qr-frame[data-v-
|
|
686
|
+
.c-login__qr-frame[data-v-00fdce30] {
|
|
687
687
|
position: relative;
|
|
688
688
|
width: 164px;
|
|
689
689
|
height: 164px;
|
|
@@ -692,7 +692,7 @@ to {
|
|
|
692
692
|
background: rgba(0, 0, 0, 0.35);
|
|
693
693
|
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 28px rgba(0, 0, 0, 0.4);
|
|
694
694
|
}
|
|
695
|
-
.c-login__qr-frame .c-login__qr-placeholder[data-v-
|
|
695
|
+
.c-login__qr-frame .c-login__qr-placeholder[data-v-00fdce30] {
|
|
696
696
|
display: flex;
|
|
697
697
|
align-items: center;
|
|
698
698
|
justify-content: center;
|
|
@@ -702,10 +702,10 @@ to {
|
|
|
702
702
|
font-size: 13px;
|
|
703
703
|
text-align: center;
|
|
704
704
|
}
|
|
705
|
-
.c-login__qr-frame[data-v-
|
|
705
|
+
.c-login__qr-frame[data-v-00fdce30] {
|
|
706
706
|
/* 扫描动画线 */
|
|
707
707
|
}
|
|
708
|
-
@keyframes qr-scan-
|
|
708
|
+
@keyframes qr-scan-00fdce30 {
|
|
709
709
|
0% {
|
|
710
710
|
transform: translateY(0);
|
|
711
711
|
opacity: 1;
|
|
@@ -721,12 +721,12 @@ to {
|
|
|
721
721
|
}
|
|
722
722
|
|
|
723
723
|
/* C_QRCode 居中在 frame 内 */
|
|
724
|
-
.c-login__qr-frame[data-v-
|
|
724
|
+
.c-login__qr-frame[data-v-00fdce30] {
|
|
725
725
|
display: flex;
|
|
726
726
|
align-items: center;
|
|
727
727
|
justify-content: center;
|
|
728
728
|
}
|
|
729
|
-
.c-login__qr-scan-line[data-v-
|
|
729
|
+
.c-login__qr-scan-line[data-v-00fdce30] {
|
|
730
730
|
position: absolute;
|
|
731
731
|
top: 10px;
|
|
732
732
|
left: 10px;
|
|
@@ -735,12 +735,12 @@ to {
|
|
|
735
735
|
background: linear-gradient(90deg, transparent 0%, rgba(24, 89, 233, 0.7) 30%, rgb(100, 160, 255) 50%, rgba(24, 89, 233, 0.7) 70%, transparent 100%);
|
|
736
736
|
border-radius: 1px;
|
|
737
737
|
box-shadow: 0 0 6px rgba(24, 89, 233, 0.8);
|
|
738
|
-
animation: qr-scan-
|
|
738
|
+
animation: qr-scan-00fdce30 2.4s ease-in-out infinite;
|
|
739
739
|
pointer-events: none;
|
|
740
740
|
}
|
|
741
741
|
|
|
742
742
|
/* 四角刻度装饰 */
|
|
743
|
-
.c-login__qr-corner[data-v-
|
|
743
|
+
.c-login__qr-corner[data-v-00fdce30] {
|
|
744
744
|
position: absolute;
|
|
745
745
|
width: 14px;
|
|
746
746
|
height: 14px;
|
|
@@ -748,31 +748,31 @@ to {
|
|
|
748
748
|
border-style: solid;
|
|
749
749
|
pointer-events: none;
|
|
750
750
|
}
|
|
751
|
-
.c-login__qr-corner--tl[data-v-
|
|
751
|
+
.c-login__qr-corner--tl[data-v-00fdce30] {
|
|
752
752
|
top: 6px;
|
|
753
753
|
left: 6px;
|
|
754
754
|
border-width: 2px 0 0 2px;
|
|
755
755
|
border-radius: 3px 0 0 0;
|
|
756
756
|
}
|
|
757
|
-
.c-login__qr-corner--tr[data-v-
|
|
757
|
+
.c-login__qr-corner--tr[data-v-00fdce30] {
|
|
758
758
|
top: 6px;
|
|
759
759
|
right: 6px;
|
|
760
760
|
border-width: 2px 2px 0 0;
|
|
761
761
|
border-radius: 0 3px 0 0;
|
|
762
762
|
}
|
|
763
|
-
.c-login__qr-corner--bl[data-v-
|
|
763
|
+
.c-login__qr-corner--bl[data-v-00fdce30] {
|
|
764
764
|
bottom: 6px;
|
|
765
765
|
left: 6px;
|
|
766
766
|
border-width: 0 0 2px 2px;
|
|
767
767
|
border-radius: 0 0 0 3px;
|
|
768
768
|
}
|
|
769
|
-
.c-login__qr-corner--br[data-v-
|
|
769
|
+
.c-login__qr-corner--br[data-v-00fdce30] {
|
|
770
770
|
bottom: 6px;
|
|
771
771
|
right: 6px;
|
|
772
772
|
border-width: 0 2px 2px 0;
|
|
773
773
|
border-radius: 0 0 3px 0;
|
|
774
774
|
}
|
|
775
|
-
.c-login__qr-hint[data-v-
|
|
775
|
+
.c-login__qr-hint[data-v-00fdce30] {
|
|
776
776
|
margin: 0;
|
|
777
777
|
display: flex;
|
|
778
778
|
align-items: center;
|
|
@@ -781,22 +781,22 @@ to {
|
|
|
781
781
|
color: var(--cl-text-hint);
|
|
782
782
|
letter-spacing: 0.3px;
|
|
783
783
|
}
|
|
784
|
-
.c-login__qr-refresh[data-v-
|
|
784
|
+
.c-login__qr-refresh[data-v-00fdce30] {
|
|
785
785
|
color: var(--cl-text-secondary) !important;
|
|
786
786
|
font-size: 11px !important;
|
|
787
787
|
}
|
|
788
|
-
.c-login__qr-refresh[data-v-
|
|
788
|
+
.c-login__qr-refresh[data-v-00fdce30]:hover {
|
|
789
789
|
color: var(--cl-tab-bar) !important;
|
|
790
790
|
}
|
|
791
791
|
|
|
792
792
|
/* ===== 分割线 ===== */
|
|
793
|
-
.c-login__divider[data-v-
|
|
793
|
+
.c-login__divider[data-v-00fdce30] {
|
|
794
794
|
margin: 12px 10px 10px !important;
|
|
795
795
|
}
|
|
796
|
-
.c-login__divider[data-v-
|
|
796
|
+
.c-login__divider[data-v-00fdce30] .n-divider__line {
|
|
797
797
|
background: var(--cl-divider-color) !important;
|
|
798
798
|
}
|
|
799
|
-
.c-login__divider[data-v-
|
|
799
|
+
.c-login__divider[data-v-00fdce30] .n-divider__title {
|
|
800
800
|
color: var(--cl-text-hint) !important;
|
|
801
801
|
font-size: 12px;
|
|
802
802
|
white-space: nowrap;
|
|
@@ -804,13 +804,13 @@ to {
|
|
|
804
804
|
}
|
|
805
805
|
|
|
806
806
|
/* ===== 社交登录 ===== */
|
|
807
|
-
.c-login__social-row[data-v-
|
|
807
|
+
.c-login__social-row[data-v-00fdce30] {
|
|
808
808
|
display: flex;
|
|
809
809
|
justify-content: center;
|
|
810
810
|
gap: 14px;
|
|
811
811
|
margin-bottom: 6px;
|
|
812
812
|
}
|
|
813
|
-
.c-login__social-btn[data-v-
|
|
813
|
+
.c-login__social-btn[data-v-00fdce30] {
|
|
814
814
|
width: var(--cl-social-size) !important;
|
|
815
815
|
height: var(--cl-social-size) !important;
|
|
816
816
|
background: var(--cl-social-btn-bg) !important;
|
|
@@ -818,38 +818,38 @@ to {
|
|
|
818
818
|
color: var(--cl-text-secondary) !important;
|
|
819
819
|
transition: all 0.25s ease !important;
|
|
820
820
|
}
|
|
821
|
-
.c-login__social-btn[data-v-
|
|
821
|
+
.c-login__social-btn[data-v-00fdce30]:hover {
|
|
822
822
|
background: var(--cl-social-btn-hover-bg) !important;
|
|
823
823
|
color: var(--cl-text-primary) !important;
|
|
824
824
|
transform: translateY(-2px);
|
|
825
825
|
}
|
|
826
826
|
|
|
827
827
|
/* ===== 注册 ===== */
|
|
828
|
-
.c-login__register-row[data-v-
|
|
828
|
+
.c-login__register-row[data-v-00fdce30] {
|
|
829
829
|
text-align: center;
|
|
830
830
|
margin-top: 14px;
|
|
831
831
|
font-size: 13px;
|
|
832
832
|
}
|
|
833
|
-
.c-login__register-hint[data-v-
|
|
833
|
+
.c-login__register-hint[data-v-00fdce30] {
|
|
834
834
|
color: var(--cl-text-hint);
|
|
835
835
|
}
|
|
836
|
-
.c-login__register-link[data-v-
|
|
836
|
+
.c-login__register-link[data-v-00fdce30] {
|
|
837
837
|
color: var(--cl-tab-bar);
|
|
838
838
|
cursor: pointer;
|
|
839
839
|
margin-left: 4px;
|
|
840
840
|
transition: opacity 0.2s ease;
|
|
841
841
|
}
|
|
842
|
-
.c-login__register-link[data-v-
|
|
842
|
+
.c-login__register-link[data-v-00fdce30]:hover {
|
|
843
843
|
opacity: 0.8;
|
|
844
844
|
}
|
|
845
845
|
|
|
846
846
|
/* ===== 输入图标 ===== */
|
|
847
|
-
.c-login__input-icon[data-v-
|
|
847
|
+
.c-login__input-icon[data-v-00fdce30] {
|
|
848
848
|
color: var(--cl-input-icon);
|
|
849
849
|
}
|
|
850
850
|
|
|
851
851
|
/* ===== 亮色主题预设(父级加 .c-login--light 类可切换) ===== */
|
|
852
|
-
.c-login--light .c-login-panel[data-v-
|
|
852
|
+
.c-login--light .c-login-panel[data-v-00fdce30] {
|
|
853
853
|
--cl-panel-bg: rgba(255, 255, 255, 0.96);
|
|
854
854
|
--cl-panel-border: rgba(0, 0, 0, 0.08);
|
|
855
855
|
--cl-panel-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
|
|
@@ -872,6 +872,6 @@ to {
|
|
|
872
872
|
}
|
|
873
873
|
|
|
874
874
|
/* layer: default */
|
|
875
|
-
.visible[data-v-
|
|
876
|
-
.block[data-v-
|
|
877
|
-
.blur[data-v-
|
|
875
|
+
.visible[data-v-00fdce30]{visibility:visible;}
|
|
876
|
+
.block[data-v-00fdce30]{display:block;}
|
|
877
|
+
.blur[data-v-00fdce30]{--un-blur:blur(8px);filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}
|
package/dist/C_Login2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk.cjs`);const e=require(`./C_Icon2.cjs`),t=require(`./export-helper.cjs`),n=require(`./C_Captcha2.cjs`),r=require(`./storage.cjs`),i=require(`./C_QRCode2.cjs`);let a=require(`vue`),o=require(`naive-ui`);const s=[{key:`github`,label:`GitHub`,icon:`mdi:github`},{key:`wechat`,label:`微信`,icon:`mdi:wechat`},{key:`qq`,label:`QQ`,icon:`mdi:qqchat`}],c={passwordLogin:!0,captchaLogin:!0,qrcodeLogin:!0,socialLogin:!0,register:!0,captchaVerify:!0,rememberMe:!0,forgotPassword:!0},ee={class:`c-login-panel`},l={class:`c-login__header`},te={key:0,class:`c-login__logo`},ne={class:`c-login__title`},re={key:0,class:`c-login__subtitle`},u={key:1,class:`c-login__subtitle c-login__subtitle--register`},d={key:0,class:`c-login__aux-row`},f={class:`c-login__code-row`},p={key:0,class:`c-login__captcha-wrap`},ie={key:3,class:`c-login__qr-panel`},ae={class:`c-login__qr-frame`},oe={key:1,class:`c-login__qr-placeholder`},m={key:2,class:`c-login__qr-scan-line`},h={class:`c-login__qr-hint`},g={class:`c-login__code-row`},_={key:7,class:`c-login__mode-switch`},v={class:`c-login__social-row`},y={key:9,class:`c-login__register-row`},b=(0,a.defineComponent)({__name:`index`,props:{title:{default:`欢迎回来`},subtitle:{},logoIcon:{},features:{},socialProviders:{},qrcodeUrl:{},storageKey:{default:`c_login_remember`},loading:{type:Boolean,default:!1},submitDisabled:{type:Boolean},defaultUsername:{default:``},defaultPassword:{default:``},captchaVerifier:{},captchaProvider:{default:`puzzle-captcha`},captchaChallengeUrl:{},requireCaptchaServerVerification:{type:Boolean,default:!1},captchaVerificationTimeout:{default:1e4}},emits:[`submit`,`captcha-submit`,`send-code`,`social-login`,`forgot-password`,`qrcode-refresh`,`register-submit`,`register-send-code`,`captcha-visible-change`,`username-change`],setup(t,{expose:b,emit:x}){let S=(e,t)=>{let n=globalThis.$t;return n?.(e,t,`robot_admin`)??t},C=(e,t,n)=>[{required:!0,message:`${e}不能为空`,trigger:`blur`},{validator:(e,n)=>!n||typeof n==`string`&&t.test(n),message:n,trigger:`blur`}],w=/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,T=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d@$!%*?&]{6,20}$/,E=t,D=x,O=(0,a.computed)(()=>({...E,features:{...c,...E.features},socialProviders:E.socialProviders??s})),k=(0,a.computed)(()=>O.value.features),A=(0,a.computed)(()=>O.value.socialProviders),j=(0,a.ref)(`password`),M=(0,a.ref)(null),N=(0,a.reactive)({username:E.defaultUsername??``,password:E.defaultPassword??``}),se={username:[{required:!0,message:S(`cl_username_rule`,`请输入用户名`),trigger:`blur`}],password:[{required:!0,message:S(`cl_password_rule`,`请输入密码`),trigger:`blur`}]};(0,a.watch)(()=>N.username,e=>D(`username-change`,e),{immediate:!0,flush:`sync`});let P=(0,a.ref)(!1);(0,a.watch)([P,()=>N.username],([e])=>{e?r.i(E.storageKey,{username:N.username}):r.r(E.storageKey)}),(0,a.onMounted)(()=>{let e=r.t(E.storageKey);typeof e?.username==`string`&&(N.username=e.username,P.value=!0)});let F=async()=>{if(!(E.loading||E.submitDisabled||k.value.captchaVerify&&!H.value)){try{await M.value?.validate()}catch{return}E.loading||E.submitDisabled||k.value.captchaVerify&&!H.value||D(`submit`,{...N,...H.value?{captchaToken:U.value,captchaTimestamp:W.value,captchaType:G.value,captchaVerifiedBy:K.value}:{}})}},I=(0,a.ref)(null),L=(0,a.reactive)({account:``,code:``}),R=(0,a.ref)(0),z=null,B={account:C(`手机号`,w,`手机号格式错误`),code:[{required:!0,message:S(`cl_code_rule`,`请输入验证码`),trigger:`blur`}]},V=(0,a.ref)(),H=(0,a.ref)(!1),U=(0,a.ref)(``),W=(0,a.ref)(0),G=(0,a.ref)(`puzzle-captcha`),K=(0,a.ref)(),ce=e=>{H.value=!0,U.value=e.token,W.value=e.timestamp,G.value=e.type,K.value=e.verifiedBy},le=()=>{H.value=!1},ue=e=>{H.value=e,e||(U.value=``,W.value=0,G.value=`puzzle-captcha`,K.value=void 0)},de=()=>{H.value=!1,U.value=``,W.value=0,G.value=`puzzle-captcha`,K.value=void 0,V.value?.reset()},q=async()=>{if(!(E.loading||E.submitDisabled)){try{await I.value?.validate()}catch{return}k.value.captchaVerify&&!H.value||D(`captcha-submit`,{...L})}},fe=()=>{let e=L.account.trim();R.value>0||!w.test(e)||(D(`send-code`,e),z&&=(clearInterval(z),null),R.value=60,z=setInterval(()=>{R.value--,R.value<=0&&(clearInterval(z),z=null)},1e3))},J=(0,a.computed)(()=>E.qrcodeUrl?.trim()??``),pe=()=>{D(`qrcode-refresh`)},Y=(0,a.ref)(null),X=(0,a.reactive)({phone:``,code:``,password:``,confirmPassword:``}),Z=(0,a.ref)(0),Q=null,me={phone:C(`手机号`,w,`手机号格式错误`),code:[{required:!0,message:S(`cl_code_rule`,`请输入验证码`),trigger:`blur`}],password:C(`密码`,T,`密码必须包含大小写字母和数字,长度6-20位`),confirmPassword:[{required:!0,message:S(`cl_confirm_pw_rule`,`请再次输入密码`),trigger:`blur`},{validator:(e,t)=>t===X.password?!0:Error(S(`cl_pw_mismatch`,`两次密码输入不一致`)),trigger:`blur`}]},he=()=>{let e=X.phone.trim();Z.value>0||!w.test(e)||(D(`register-send-code`,e),Q&&=(clearInterval(Q),null),Z.value=60,Q=setInterval(()=>{Z.value--,Z.value<=0&&(clearInterval(Q),Q=null)},1e3))},$=async()=>{try{await Y.value?.validate()}catch{return}D(`register-submit`,{...X})};return(0,a.onUnmounted)(()=>{z&&=(clearInterval(z),null),Q&&=(clearInterval(Q),null)}),b({resetCaptcha:de}),(t,r)=>{let s=o.NInput,c=o.NFormItem,b=o.NCheckbox,x=o.NText,C=o.NForm,w=o.NButton,T=o.NDivider,z=o.NTooltip;return(0,a.openBlock)(),(0,a.createElementBlock)(`div`,ee,[(0,a.createCommentVNode)(` ===== Logo / 标题区 ===== `),(0,a.createElementVNode)(`div`,l,[(0,a.renderSlot)(t.$slots,`logo`,{},()=>[O.value.logoIcon?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,te,[(0,a.createVNode)(e.t,{name:O.value.logoIcon,size:36,class:`c-login__logo-icon`},null,8,[`name`])])):(0,a.createCommentVNode)(`v-if`,!0)],!0),(0,a.createElementVNode)(`h2`,ne,(0,a.toDisplayString)(O.value.title),1),O.value.subtitle&&j.value!==`register`?((0,a.openBlock)(),(0,a.createElementBlock)(`p`,re,(0,a.toDisplayString)(O.value.subtitle),1)):(0,a.createCommentVNode)(`v-if`,!0),(0,a.createCommentVNode)(` 注册视图的副标题 `),j.value===`register`?((0,a.openBlock)(),(0,a.createElementBlock)(`p`,u,(0,a.toDisplayString)(S(`cl_register`,`注册账号`)),1)):(0,a.createCommentVNode)(`v-if`,!0)]),(0,a.createCommentVNode)(` ===== 密码登录表单(默认视图) ===== `),(0,a.withDirectives)((0,a.createVNode)(C,{ref_key:`passwordFormRef`,ref:M,model:N,rules:se,class:`c-login__form`},{default:(0,a.withCtx)(()=>[(0,a.createVNode)(c,{path:`username`,class:`c-login__form-item`},{default:(0,a.withCtx)(()=>[(0,a.createVNode)(s,{value:N.username,"onUpdate:value":r[0]||=e=>N.username=e,disabled:E.loading,placeholder:S(`cl_username_ph`,`请输入用户名`),clearable:``},{prefix:(0,a.withCtx)(()=>[(0,a.createVNode)(e.t,{name:`mdi:account-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`disabled`,`placeholder`])]),_:1}),(0,a.createVNode)(c,{path:`password`,class:`c-login__form-item`},{default:(0,a.withCtx)(()=>[(0,a.createVNode)(s,{value:N.password,"onUpdate:value":r[1]||=e=>N.password=e,disabled:E.loading,type:`password`,"show-password-on":`click`,placeholder:S(`cl_password_ph`,`请输入密码`),clearable:``,onKeyup:(0,a.withKeys)(F,[`enter`])},{prefix:(0,a.withCtx)(()=>[(0,a.createVNode)(e.t,{name:`mdi:lock-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`disabled`,`placeholder`])]),_:1}),(0,a.createCommentVNode)(` 宿主扩展字段只获得账号与忙碌状态,不暴露密码。 `),(0,a.renderSlot)(t.$slots,`password-fields`,{username:N.username,loading:E.loading},void 0,!0),(0,a.createCommentVNode)(` 记住我 + 忘记密码 `),k.value.rememberMe||k.value.forgotPassword?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,d,[k.value.rememberMe?((0,a.openBlock)(),(0,a.createBlock)(b,{key:0,checked:P.value,"onUpdate:checked":r[2]||=e=>P.value=e,class:`c-login__remember`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(S(`cl_remember`,`记住我`)),1)]),_:1},8,[`checked`])):(0,a.createCommentVNode)(`v-if`,!0),k.value.forgotPassword?((0,a.openBlock)(),(0,a.createBlock)(x,{key:1,class:`c-login__forgot`,onClick:r[3]||=e=>D(`forgot-password`)},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(S(`cl_forgot`,`忘记密码?`)),1)]),_:1})):(0,a.createCommentVNode)(`v-if`,!0)])):(0,a.createCommentVNode)(`v-if`,!0)]),_:3},8,[`model`]),[[a.vShow,j.value===`password`]]),(0,a.createCommentVNode)(` ===== 验证码登录表单 ===== `),(0,a.withDirectives)((0,a.createVNode)(C,{ref_key:`captchaFormRef`,ref:I,model:L,rules:B,class:`c-login__form`},{default:(0,a.withCtx)(()=>[(0,a.createVNode)(c,{path:`account`,class:`c-login__form-item`},{default:(0,a.withCtx)(()=>[(0,a.createVNode)(s,{value:L.account,"onUpdate:value":r[4]||=e=>L.account=e,placeholder:S(`cl_phone_ph`,`请输入手机号`),clearable:``,maxlength:`11`},{prefix:(0,a.withCtx)(()=>[(0,a.createVNode)(e.t,{name:`mdi:cellphone`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),(0,a.createVNode)(c,{path:`code`,class:`c-login__form-item`},{default:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`div`,f,[(0,a.createVNode)(s,{value:L.code,"onUpdate:value":r[5]||=e=>L.code=e,placeholder:S(`cl_code_ph`,`请输入验证码`),clearable:``,class:`c-login__code-input`,onKeyup:(0,a.withKeys)(q,[`enter`])},{prefix:(0,a.withCtx)(()=>[(0,a.createVNode)(e.t,{name:`mdi:shield-key-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`]),(0,a.createVNode)(w,{disabled:R.value>0||!L.account,class:`c-login__send-code-btn`,onClick:fe},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(R.value>0?`${R.value}s ${S(`cl_resend`,`后重发`)}`:S(`cl_get_code`,`获取验证码`)),1)]),_:1},8,[`disabled`])])]),_:1})]),_:1},8,[`model`]),[[a.vShow,j.value===`captcha`]]),(0,a.createCommentVNode)(` ===== 人机验证拼图(仅密码登录模式) ===== `),k.value.captchaVerify&&j.value===`password`?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,p,[(0,a.createVNode)(n.t,{ref_key:`captchaRef`,ref:V,theme:`dark`,provider:E.captchaProvider,"challenge-url":E.captchaChallengeUrl,verifier:E.captchaVerifier,"require-server-verification":E.requireCaptchaServerVerification,"verification-timeout":E.captchaVerificationTimeout,onSuccess:ce,onFail:le,onChange:ue,onVisibleChange:r[6]||=e=>D(`captcha-visible-change`,e)},null,8,[`provider`,`challenge-url`,`verifier`,`require-server-verification`,`verification-timeout`])])):(0,a.createCommentVNode)(`v-if`,!0),(0,a.createCommentVNode)(` ===== 登录按钮(密码和验证码模式) ===== `),j.value===`password`||j.value===`captcha`?((0,a.openBlock)(),(0,a.createBlock)(w,{key:1,type:`primary`,block:``,loading:E.loading,disabled:E.loading||E.submitDisabled||j.value===`password`&&k.value.captchaVerify&&!H.value,class:`c-login__submit-btn`,onClick:r[7]||=e=>j.value===`password`?F():q()},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(j.value===`password`&&k.value.captchaVerify&&!H.value?S(`cl_verify_first`,`请先完成人机验证`):S(`cl_login_btn`,`登 录`)),1)]),_:1},8,[`loading`,`disabled`])):(0,a.createCommentVNode)(`v-if`,!0),(0,a.createCommentVNode)(` ===== 返回按钮(验证码子视图) ===== `),j.value===`captcha`?((0,a.openBlock)(),(0,a.createBlock)(w,{key:2,block:``,class:`c-login__back-btn`,onClick:r[8]||=e=>j.value=`password`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(S(`cl_back`,`返回`)),1)]),_:1})):(0,a.createCommentVNode)(`v-if`,!0),(0,a.createCommentVNode)(` ===== 扫码登录面板 ===== `),j.value===`qrcode`?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,ie,[(0,a.createElementVNode)(`div`,ae,[J.value?((0,a.openBlock)(),(0,a.createBlock)(i.t,{key:0,value:J.value,size:148,margin:1,"show-border":!1,color:`#ffffff`,"bg-color":`#000000`,"error-correction-level":`M`},null,8,[`value`])):((0,a.openBlock)(),(0,a.createElementBlock)(`div`,oe,(0,a.toDisplayString)(S(`cl_qr_missing`,`请配置二维码地址`)),1)),J.value?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,m)):(0,a.createCommentVNode)(`v-if`,!0),r[18]||=(0,a.createElementVNode)(`div`,{class:`c-login__qr-corner c-login__qr-corner--tl`},null,-1),r[19]||=(0,a.createElementVNode)(`div`,{class:`c-login__qr-corner c-login__qr-corner--tr`},null,-1),r[20]||=(0,a.createElementVNode)(`div`,{class:`c-login__qr-corner c-login__qr-corner--bl`},null,-1),r[21]||=(0,a.createElementVNode)(`div`,{class:`c-login__qr-corner c-login__qr-corner--br`},null,-1)]),(0,a.createElementVNode)(`p`,h,[(0,a.createVNode)(e.t,{name:`mdi:cellphone-check`,size:13}),(0,a.createTextVNode)(` `+(0,a.toDisplayString)(S(`cl_qr_hint`,`打开手机扫码后点击「确认」即可登录`)),1)]),(0,a.createVNode)(w,{text:``,size:`tiny`,class:`c-login__qr-refresh`,onClick:pe},{icon:(0,a.withCtx)(()=>[(0,a.createVNode)(e.t,{name:`mdi:refresh`,size:12})]),default:(0,a.withCtx)(()=>[(0,a.createTextVNode)(` `+(0,a.toDisplayString)(S(`cl_qr_refresh`,`二维码已失效?点击刷新`)),1)]),_:1})])):(0,a.createCommentVNode)(`v-if`,!0),(0,a.createCommentVNode)(` ===== 返回按钮(扫码子视图,在二维码下方) ===== `),j.value===`qrcode`?((0,a.openBlock)(),(0,a.createBlock)(w,{key:4,block:``,class:`c-login__back-btn`,onClick:r[9]||=e=>j.value=`password`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(S(`cl_back`,`返回`)),1)]),_:1})):(0,a.createCommentVNode)(`v-if`,!0),(0,a.createCommentVNode)(` ===== 注册表单 ===== `),(0,a.withDirectives)((0,a.createVNode)(C,{ref_key:`registerFormRef`,ref:Y,model:X,rules:me,class:`c-login__form`},{default:(0,a.withCtx)(()=>[(0,a.createVNode)(c,{path:`phone`,class:`c-login__form-item`},{default:(0,a.withCtx)(()=>[(0,a.createVNode)(s,{value:X.phone,"onUpdate:value":r[10]||=e=>X.phone=e,placeholder:S(`cl_phone_ph`,`请输入手机号`),clearable:``,maxlength:`11`},{prefix:(0,a.withCtx)(()=>[(0,a.createVNode)(e.t,{name:`mdi:cellphone`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),(0,a.createVNode)(c,{path:`code`,class:`c-login__form-item`},{default:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`div`,g,[(0,a.createVNode)(s,{value:X.code,"onUpdate:value":r[11]||=e=>X.code=e,placeholder:S(`cl_code_ph`,`请输入验证码`),clearable:``,class:`c-login__code-input`},{prefix:(0,a.withCtx)(()=>[(0,a.createVNode)(e.t,{name:`mdi:shield-key-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`]),(0,a.createVNode)(w,{disabled:Z.value>0||!X.phone,class:`c-login__send-code-btn`,onClick:he},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(Z.value>0?`${Z.value}s ${S(`cl_resend`,`后重发`)}`:S(`cl_get_code`,`获取验证码`)),1)]),_:1},8,[`disabled`])])]),_:1}),(0,a.createVNode)(c,{path:`password`,class:`c-login__form-item`},{default:(0,a.withCtx)(()=>[(0,a.createVNode)(s,{value:X.password,"onUpdate:value":r[12]||=e=>X.password=e,type:`password`,"show-password-on":`click`,placeholder:S(`cl_password_ph`,`请输入密码`)},{prefix:(0,a.withCtx)(()=>[(0,a.createVNode)(e.t,{name:`mdi:lock-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),(0,a.createVNode)(c,{path:`confirmPassword`,class:`c-login__form-item`},{default:(0,a.withCtx)(()=>[(0,a.createVNode)(s,{value:X.confirmPassword,"onUpdate:value":r[13]||=e=>X.confirmPassword=e,type:`password`,"show-password-on":`click`,placeholder:S(`cl_confirm_pw_ph`,`请再次输入密码`),onKeyup:(0,a.withKeys)($,[`enter`])},{prefix:(0,a.withCtx)(()=>[(0,a.createVNode)(e.t,{name:`mdi:lock-check-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1})]),_:1},8,[`model`]),[[a.vShow,j.value===`register`]]),(0,a.createCommentVNode)(` ===== 注册确认按钮 ===== `),j.value===`register`?((0,a.openBlock)(),(0,a.createBlock)(w,{key:5,type:`primary`,block:``,loading:E.loading,class:`c-login__submit-btn`,onClick:$},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(S(`cl_confirm`,`确认`)),1)]),_:1},8,[`loading`])):(0,a.createCommentVNode)(`v-if`,!0),(0,a.createCommentVNode)(` ===== 注册视图返回按钮 ===== `),j.value===`register`?((0,a.openBlock)(),(0,a.createBlock)(w,{key:6,block:``,class:`c-login__back-btn`,onClick:r[14]||=e=>j.value=`password`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(S(`cl_back`,`返回`)),1)]),_:1})):(0,a.createCommentVNode)(`v-if`,!0),(0,a.createCommentVNode)(` ===== 登录方式切换(仅密码登录默认视图显示) ===== `),j.value===`password`&&(k.value.captchaLogin||k.value.qrcodeLogin)?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,_,[k.value.captchaLogin?((0,a.openBlock)(),(0,a.createBlock)(w,{key:0,class:`c-login__mode-btn`,size:`small`,onClick:r[15]||=e=>j.value=`captcha`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(S(`cl_captcha_login`,`验证码登录`)),1)]),_:1})):(0,a.createCommentVNode)(`v-if`,!0),k.value.qrcodeLogin?((0,a.openBlock)(),(0,a.createBlock)(w,{key:1,class:`c-login__mode-btn`,size:`small`,onClick:r[16]||=e=>j.value=`qrcode`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(S(`cl_qr_login`,`扫码登录`)),1)]),_:1})):(0,a.createCommentVNode)(`v-if`,!0)])):(0,a.createCommentVNode)(`v-if`,!0),(0,a.createCommentVNode)(` ===== 其他登录方式(仅密码登录默认视图显示) ===== `),j.value===`password`&&k.value.socialLogin&&A.value.length?((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:8},[(0,a.createVNode)(T,{class:`c-login__divider`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(S(`cl_social_login`,`其他账号登录`)),1)]),_:1}),(0,a.createElementVNode)(`div`,v,[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(A.value,t=>((0,a.openBlock)(),(0,a.createBlock)(z,{key:t.key,trigger:`hover`,placement:`top`},{trigger:(0,a.withCtx)(()=>[(0,a.createVNode)(w,{circle:``,class:`c-login__social-btn`,onClick:e=>D(`social-login`,t.key)},{icon:(0,a.withCtx)(()=>[(0,a.createVNode)(e.t,{name:t.icon,size:16},null,8,[`name`])]),_:2},1032,[`onClick`])]),default:(0,a.withCtx)(()=>[(0,a.createTextVNode)(` `+(0,a.toDisplayString)(t.label),1)]),_:2},1024))),128))])],64)):(0,a.createCommentVNode)(`v-if`,!0),(0,a.createCommentVNode)(` ===== 注册入口(仅密码登录默认视图显示) ===== `),j.value===`password`&&k.value.register?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,y,[(0,a.createVNode)(x,{class:`c-login__register-hint`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(S(`cl_no_account`,`还没有账号?`)),1)]),_:1}),(0,a.createVNode)(x,{class:`c-login__register-link`,onClick:r[17]||=e=>j.value=`register`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(S(`cl_register`,`注册账号`)),1)]),_:1})])):(0,a.createCommentVNode)(`v-if`,!0)])}}});var x=t.t(b,[[`__scopeId`,`data-v-f9c3ae4b`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return x}});
|
|
1
|
+
require(`./chunk.cjs`);const e=require(`./C_Icon2.cjs`),t=require(`./export-helper.cjs`),n=require(`./C_Captcha2.cjs`),r=require(`./useActionTask.cjs`),i=require(`./storage.cjs`),a=require(`./C_QRCode2.cjs`);let o=require(`vue`),s=require(`naive-ui`);const c=[{key:`github`,label:`GitHub`,icon:`mdi:github`},{key:`wechat`,label:`微信`,icon:`mdi:wechat`},{key:`qq`,label:`QQ`,icon:`mdi:qqchat`}],l={passwordLogin:!0,captchaLogin:!0,qrcodeLogin:!0,socialLogin:!0,register:!0,captchaVerify:!0,rememberMe:!0,forgotPassword:!0},ee={class:`c-login-panel`},te={class:`c-login__header`},ne={key:0,class:`c-login__logo`},re={class:`c-login__title`},ie={key:0,class:`c-login__subtitle`},ae={key:1,class:`c-login__subtitle c-login__subtitle--register`},oe={key:0,class:`c-login__aux-row`},se={class:`c-login__code-row`},u={key:0,class:`c-login__captcha-wrap`},d={key:3,class:`c-login__qr-panel`},ce={class:`c-login__qr-frame`},le={key:1,class:`c-login__qr-placeholder`},f={key:2,class:`c-login__qr-scan-line`},p={class:`c-login__qr-hint`},ue={class:`c-login__code-row`},m={key:7,class:`c-login__mode-switch`},de={class:`c-login__social-row`},fe={key:9,class:`c-login__register-row`},h=(0,o.defineComponent)({__name:`index`,props:{title:{default:`欢迎回来`},subtitle:{},logoIcon:{},features:{},socialProviders:{},qrcodeUrl:{},storageKey:{default:`c_login_remember`},loading:{type:Boolean,default:!1},submitDisabled:{type:Boolean},defaultUsername:{default:``},defaultPassword:{default:``},captchaVerifier:{},captchaProvider:{default:`puzzle-captcha`},captchaChallengeUrl:{},requireCaptchaServerVerification:{type:Boolean,default:!1},captchaVerificationTimeout:{default:1e4}},emits:[`submit`,`captcha-submit`,`send-code`,`social-login`,`forgot-password`,`qrcode-refresh`,`register-submit`,`register-send-code`,`captcha-visible-change`,`username-change`],setup(t,{expose:h,emit:g}){let _=(e,t)=>{let n=globalThis.$t;return n?.(e,t,`robot_admin`)??t},v=(e,t,n)=>[{required:!0,message:`${e}不能为空`,trigger:`blur`},{validator:(e,n)=>!n||typeof n==`string`&&t.test(n),message:n,trigger:`blur`}],y=/^(?:(?:\+|00)86)?1[3-9]\d{9}$/,b=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d@$!%*?&]{6,20}$/,x=t,S=g,C=(0,o.computed)(()=>({...x,features:{...l,...x.features},socialProviders:x.socialProviders??c})),w=(0,o.computed)(()=>C.value.features),T=(0,o.computed)(()=>C.value.socialProviders),E=(0,o.ref)(`password`),D=r.t(),O=(0,o.computed)(()=>D.isRunning(E.value)),k=!1,A=0;(0,o.watch)(E,()=>A++,{flush:`sync`});let j=e=>!k&&E.value===e&&!x.loading&&!x.submitDisabled&&(e===`register`||!w.value.captchaVerify||H.value);async function M(e,t,n,r){await D.run(e,async()=>{let i=t.value;if(!i)return;let a=A,o={...n};try{await i.validate()}catch{return}!j(e)||a!==A||i!==t.value||!Object.keys(o).every(e=>o[e]===n[e])||r(o)},()=>j(e))}let N=(0,o.ref)(null),P=(0,o.reactive)({username:x.defaultUsername??``,password:x.defaultPassword??``}),pe={username:[{required:!0,message:_(`cl_username_rule`,`请输入用户名`),trigger:`blur`}],password:[{required:!0,message:_(`cl_password_rule`,`请输入密码`),trigger:`blur`}]};(0,o.watch)(()=>P.username,e=>S(`username-change`,e),{immediate:!0,flush:`sync`});let F=(0,o.ref)(!1);(0,o.watch)([F,()=>P.username],([e])=>{e?i.i(x.storageKey,{username:P.username}):i.r(x.storageKey)}),(0,o.onMounted)(()=>{let e=i.t(x.storageKey);typeof e?.username==`string`&&(P.username=e.username,F.value=!0)});let I=()=>M(`password`,N,P,e=>{S(`submit`,{...e,...H.value?{captchaToken:U.value,captchaTimestamp:W.value,captchaType:G.value,captchaVerifiedBy:K.value}:{}})}),L=(0,o.ref)(null),R=(0,o.reactive)({account:``,code:``}),z=(0,o.ref)(0),B=null,me={account:v(`手机号`,y,`手机号格式错误`),code:[{required:!0,message:_(`cl_code_rule`,`请输入验证码`),trigger:`blur`}]},V=(0,o.ref)(),H=(0,o.ref)(!1),U=(0,o.ref)(``),W=(0,o.ref)(0),G=(0,o.ref)(`puzzle-captcha`),K=(0,o.ref)(),he=e=>{H.value=!0,U.value=e.token,W.value=e.timestamp,G.value=e.type,K.value=e.verifiedBy},ge=()=>{H.value=!1},_e=e=>{H.value=e,e||(U.value=``,W.value=0,G.value=`puzzle-captcha`,K.value=void 0)},ve=()=>{H.value=!1,U.value=``,W.value=0,G.value=`puzzle-captcha`,K.value=void 0,V.value?.reset()},q=()=>M(`captcha`,L,R,e=>S(`captcha-submit`,e)),ye=()=>{let e=R.account.trim();z.value>0||!y.test(e)||(S(`send-code`,e),B&&=(clearInterval(B),null),z.value=60,B=setInterval(()=>{z.value--,z.value<=0&&(clearInterval(B),B=null)},1e3))},J=(0,o.computed)(()=>x.qrcodeUrl?.trim()??``),be=()=>{S(`qrcode-refresh`)},Y=(0,o.ref)(null),X=(0,o.reactive)({phone:``,code:``,password:``,confirmPassword:``}),Z=(0,o.ref)(0),Q=null,xe={phone:v(`手机号`,y,`手机号格式错误`),code:[{required:!0,message:_(`cl_code_rule`,`请输入验证码`),trigger:`blur`}],password:v(`密码`,b,`密码必须包含大小写字母和数字,长度6-20位`),confirmPassword:[{required:!0,message:_(`cl_confirm_pw_rule`,`请再次输入密码`),trigger:`blur`},{validator:(e,t)=>t===X.password?!0:Error(_(`cl_pw_mismatch`,`两次密码输入不一致`)),trigger:`blur`}]},Se=()=>{let e=X.phone.trim();Z.value>0||!y.test(e)||(S(`register-send-code`,e),Q&&=(clearInterval(Q),null),Z.value=60,Q=setInterval(()=>{Z.value--,Z.value<=0&&(clearInterval(Q),Q=null)},1e3))},$=()=>M(`register`,Y,X,e=>S(`register-submit`,e));return(0,o.onUnmounted)(()=>{k=!0,B&&=(clearInterval(B),null),Q&&=(clearInterval(Q),null)}),h({resetCaptcha:ve}),(t,r)=>{let i=s.NInput,c=s.NFormItem,l=s.NCheckbox,h=s.NText,g=s.NForm,v=s.NButton,y=s.NDivider,b=s.NTooltip;return(0,o.openBlock)(),(0,o.createElementBlock)(`div`,ee,[(0,o.createCommentVNode)(` ===== Logo / 标题区 ===== `),(0,o.createElementVNode)(`div`,te,[(0,o.renderSlot)(t.$slots,`logo`,{},()=>[C.value.logoIcon?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,ne,[(0,o.createVNode)(e.t,{name:C.value.logoIcon,size:36,class:`c-login__logo-icon`},null,8,[`name`])])):(0,o.createCommentVNode)(`v-if`,!0)],!0),(0,o.createElementVNode)(`h2`,re,(0,o.toDisplayString)(C.value.title),1),C.value.subtitle&&E.value!==`register`?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,ie,(0,o.toDisplayString)(C.value.subtitle),1)):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` 注册视图的副标题 `),E.value===`register`?((0,o.openBlock)(),(0,o.createElementBlock)(`p`,ae,(0,o.toDisplayString)(_(`cl_register`,`注册账号`)),1)):(0,o.createCommentVNode)(`v-if`,!0)]),(0,o.createCommentVNode)(` ===== 密码登录表单(默认视图) ===== `),(0,o.withDirectives)((0,o.createVNode)(g,{ref_key:`passwordFormRef`,ref:N,model:P,rules:pe,class:`c-login__form`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(c,{path:`username`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:P.username,"onUpdate:value":r[0]||=e=>P.username=e,disabled:x.loading,placeholder:_(`cl_username_ph`,`请输入用户名`),clearable:``},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:account-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`disabled`,`placeholder`])]),_:1}),(0,o.createVNode)(c,{path:`password`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:P.password,"onUpdate:value":r[1]||=e=>P.password=e,disabled:x.loading,type:`password`,"show-password-on":`click`,placeholder:_(`cl_password_ph`,`请输入密码`),clearable:``,onKeyup:(0,o.withKeys)(I,[`enter`])},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:lock-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`disabled`,`placeholder`])]),_:1}),(0,o.createCommentVNode)(` 宿主扩展字段只获得账号与忙碌状态,不暴露密码。 `),(0,o.renderSlot)(t.$slots,`password-fields`,{username:P.username,loading:x.loading||O.value},void 0,!0),(0,o.createCommentVNode)(` 记住我 + 忘记密码 `),w.value.rememberMe||w.value.forgotPassword?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,oe,[w.value.rememberMe?((0,o.openBlock)(),(0,o.createBlock)(l,{key:0,checked:F.value,"onUpdate:checked":r[2]||=e=>F.value=e,class:`c-login__remember`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_remember`,`记住我`)),1)]),_:1},8,[`checked`])):(0,o.createCommentVNode)(`v-if`,!0),w.value.forgotPassword?((0,o.openBlock)(),(0,o.createBlock)(h,{key:1,class:`c-login__forgot`,onClick:r[3]||=e=>S(`forgot-password`)},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_forgot`,`忘记密码?`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0)])):(0,o.createCommentVNode)(`v-if`,!0)]),_:3},8,[`model`]),[[o.vShow,E.value===`password`]]),(0,o.createCommentVNode)(` ===== 验证码登录表单 ===== `),(0,o.withDirectives)((0,o.createVNode)(g,{ref_key:`captchaFormRef`,ref:L,model:R,rules:me,class:`c-login__form`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(c,{path:`account`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:R.account,"onUpdate:value":r[4]||=e=>R.account=e,placeholder:_(`cl_phone_ph`,`请输入手机号`),clearable:``,maxlength:`11`},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:cellphone`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),(0,o.createVNode)(c,{path:`code`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)(`div`,se,[(0,o.createVNode)(i,{value:R.code,"onUpdate:value":r[5]||=e=>R.code=e,placeholder:_(`cl_code_ph`,`请输入验证码`),clearable:``,class:`c-login__code-input`,onKeyup:(0,o.withKeys)(q,[`enter`])},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:shield-key-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`]),(0,o.createVNode)(v,{disabled:z.value>0||!R.account,class:`c-login__send-code-btn`,onClick:ye},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(z.value>0?`${z.value}s ${_(`cl_resend`,`后重发`)}`:_(`cl_get_code`,`获取验证码`)),1)]),_:1},8,[`disabled`])])]),_:1})]),_:1},8,[`model`]),[[o.vShow,E.value===`captcha`]]),(0,o.createCommentVNode)(` ===== 人机验证拼图(仅密码登录模式) ===== `),w.value.captchaVerify&&E.value===`password`?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,u,[(0,o.createVNode)(n.t,{ref_key:`captchaRef`,ref:V,theme:`dark`,provider:x.captchaProvider,"challenge-url":x.captchaChallengeUrl,verifier:x.captchaVerifier,"require-server-verification":x.requireCaptchaServerVerification,"verification-timeout":x.captchaVerificationTimeout,onSuccess:he,onFail:ge,onChange:_e,onVisibleChange:r[6]||=e=>S(`captcha-visible-change`,e)},null,8,[`provider`,`challenge-url`,`verifier`,`require-server-verification`,`verification-timeout`])])):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 登录按钮(密码和验证码模式) ===== `),E.value===`password`||E.value===`captcha`?((0,o.openBlock)(),(0,o.createBlock)(v,{key:1,type:`primary`,block:``,loading:x.loading||O.value,disabled:x.loading||O.value||x.submitDisabled||E.value===`password`&&w.value.captchaVerify&&!H.value,class:`c-login__submit-btn`,onClick:r[7]||=e=>E.value===`password`?I():q()},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(E.value===`password`&&w.value.captchaVerify&&!H.value?_(`cl_verify_first`,`请先完成人机验证`):_(`cl_login_btn`,`登 录`)),1)]),_:1},8,[`loading`,`disabled`])):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 返回按钮(验证码子视图) ===== `),E.value===`captcha`?((0,o.openBlock)(),(0,o.createBlock)(v,{key:2,block:``,class:`c-login__back-btn`,onClick:r[8]||=e=>E.value=`password`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_back`,`返回`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 扫码登录面板 ===== `),E.value===`qrcode`?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,d,[(0,o.createElementVNode)(`div`,ce,[J.value?((0,o.openBlock)(),(0,o.createBlock)(a.t,{key:0,value:J.value,size:148,margin:1,"show-border":!1,color:`#ffffff`,"bg-color":`#000000`,"error-correction-level":`M`},null,8,[`value`])):((0,o.openBlock)(),(0,o.createElementBlock)(`div`,le,(0,o.toDisplayString)(_(`cl_qr_missing`,`请配置二维码地址`)),1)),J.value?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,f)):(0,o.createCommentVNode)(`v-if`,!0),r[18]||=(0,o.createElementVNode)(`div`,{class:`c-login__qr-corner c-login__qr-corner--tl`},null,-1),r[19]||=(0,o.createElementVNode)(`div`,{class:`c-login__qr-corner c-login__qr-corner--tr`},null,-1),r[20]||=(0,o.createElementVNode)(`div`,{class:`c-login__qr-corner c-login__qr-corner--bl`},null,-1),r[21]||=(0,o.createElementVNode)(`div`,{class:`c-login__qr-corner c-login__qr-corner--br`},null,-1)]),(0,o.createElementVNode)(`p`,p,[(0,o.createVNode)(e.t,{name:`mdi:cellphone-check`,size:13}),(0,o.createTextVNode)(` `+(0,o.toDisplayString)(_(`cl_qr_hint`,`打开手机扫码后点击「确认」即可登录`)),1)]),(0,o.createVNode)(v,{text:``,size:`tiny`,class:`c-login__qr-refresh`,onClick:be},{icon:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:refresh`,size:12})]),default:(0,o.withCtx)(()=>[(0,o.createTextVNode)(` `+(0,o.toDisplayString)(_(`cl_qr_refresh`,`二维码已失效?点击刷新`)),1)]),_:1})])):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 返回按钮(扫码子视图,在二维码下方) ===== `),E.value===`qrcode`?((0,o.openBlock)(),(0,o.createBlock)(v,{key:4,block:``,class:`c-login__back-btn`,onClick:r[9]||=e=>E.value=`password`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_back`,`返回`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 注册表单 ===== `),(0,o.withDirectives)((0,o.createVNode)(g,{ref_key:`registerFormRef`,ref:Y,model:X,rules:xe,class:`c-login__form`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(c,{path:`phone`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:X.phone,"onUpdate:value":r[10]||=e=>X.phone=e,placeholder:_(`cl_phone_ph`,`请输入手机号`),clearable:``,maxlength:`11`},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:cellphone`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),(0,o.createVNode)(c,{path:`code`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)(`div`,ue,[(0,o.createVNode)(i,{value:X.code,"onUpdate:value":r[11]||=e=>X.code=e,placeholder:_(`cl_code_ph`,`请输入验证码`),clearable:``,class:`c-login__code-input`},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:shield-key-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`]),(0,o.createVNode)(v,{disabled:Z.value>0||!X.phone,class:`c-login__send-code-btn`,onClick:Se},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(Z.value>0?`${Z.value}s ${_(`cl_resend`,`后重发`)}`:_(`cl_get_code`,`获取验证码`)),1)]),_:1},8,[`disabled`])])]),_:1}),(0,o.createVNode)(c,{path:`password`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:X.password,"onUpdate:value":r[12]||=e=>X.password=e,type:`password`,"show-password-on":`click`,placeholder:_(`cl_password_ph`,`请输入密码`)},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:lock-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1}),(0,o.createVNode)(c,{path:`confirmPassword`,class:`c-login__form-item`},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(i,{value:X.confirmPassword,"onUpdate:value":r[13]||=e=>X.confirmPassword=e,type:`password`,"show-password-on":`click`,placeholder:_(`cl_confirm_pw_ph`,`请再次输入密码`),onKeyup:(0,o.withKeys)($,[`enter`])},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:`mdi:lock-check-outline`,size:16,class:`c-login__input-icon`})]),_:1},8,[`value`,`placeholder`])]),_:1})]),_:1},8,[`model`]),[[o.vShow,E.value===`register`]]),(0,o.createCommentVNode)(` ===== 注册确认按钮 ===== `),E.value===`register`?((0,o.openBlock)(),(0,o.createBlock)(v,{key:5,type:`primary`,block:``,loading:x.loading||O.value,disabled:x.loading||x.submitDisabled||O.value,class:`c-login__submit-btn`,onClick:$},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_confirm`,`确认`)),1)]),_:1},8,[`loading`,`disabled`])):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 注册视图返回按钮 ===== `),E.value===`register`?((0,o.openBlock)(),(0,o.createBlock)(v,{key:6,block:``,class:`c-login__back-btn`,onClick:r[14]||=e=>E.value=`password`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_back`,`返回`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 登录方式切换(仅密码登录默认视图显示) ===== `),E.value===`password`&&(w.value.captchaLogin||w.value.qrcodeLogin)?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,m,[w.value.captchaLogin?((0,o.openBlock)(),(0,o.createBlock)(v,{key:0,class:`c-login__mode-btn`,size:`small`,onClick:r[15]||=e=>E.value=`captcha`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_captcha_login`,`验证码登录`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0),w.value.qrcodeLogin?((0,o.openBlock)(),(0,o.createBlock)(v,{key:1,class:`c-login__mode-btn`,size:`small`,onClick:r[16]||=e=>E.value=`qrcode`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_qr_login`,`扫码登录`)),1)]),_:1})):(0,o.createCommentVNode)(`v-if`,!0)])):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 其他登录方式(仅密码登录默认视图显示) ===== `),E.value===`password`&&w.value.socialLogin&&T.value.length?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:8},[(0,o.createVNode)(y,{class:`c-login__divider`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_social_login`,`其他账号登录`)),1)]),_:1}),(0,o.createElementVNode)(`div`,de,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(T.value,t=>((0,o.openBlock)(),(0,o.createBlock)(b,{key:t.key,trigger:`hover`,placement:`top`},{trigger:(0,o.withCtx)(()=>[(0,o.createVNode)(v,{circle:``,class:`c-login__social-btn`,onClick:e=>S(`social-login`,t.key)},{icon:(0,o.withCtx)(()=>[(0,o.createVNode)(e.t,{name:t.icon,size:16},null,8,[`name`])]),_:2},1032,[`onClick`])]),default:(0,o.withCtx)(()=>[(0,o.createTextVNode)(` `+(0,o.toDisplayString)(t.label),1)]),_:2},1024))),128))])],64)):(0,o.createCommentVNode)(`v-if`,!0),(0,o.createCommentVNode)(` ===== 注册入口(仅密码登录默认视图显示) ===== `),E.value===`password`&&w.value.register?((0,o.openBlock)(),(0,o.createElementBlock)(`div`,fe,[(0,o.createVNode)(h,{class:`c-login__register-hint`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_no_account`,`还没有账号?`)),1)]),_:1}),(0,o.createVNode)(h,{class:`c-login__register-link`,onClick:r[17]||=e=>E.value=`register`},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(_(`cl_register`,`注册账号`)),1)]),_:1})])):(0,o.createCommentVNode)(`v-if`,!0)])}}});var g=t.t(h,[[`__scopeId`,`data-v-00fdce30`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return g}});
|