@robot-admin/naive-ui-components 0.3.6 → 0.4.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/dist/{C_Form-BoMQ3VH9.css.map → C_Form-DLb9FtAb.css.map} +1 -1
- package/dist/C_Form2.js +1 -1
- package/dist/C_Form2.js.map +1 -1
- package/dist/C_GlobalSearch-DoPjldFm.css.map +1 -0
- package/dist/C_GlobalSearch.cjs +5 -0
- package/dist/C_GlobalSearch.d.cts +2 -0
- package/dist/C_GlobalSearch.d.ts +2 -0
- package/dist/C_GlobalSearch.js +3 -0
- package/dist/C_GlobalSearch2.js +336 -0
- package/dist/C_GlobalSearch2.js.map +1 -0
- package/dist/{C_Markdown-Dmv8yaM4.css.map → C_Markdown-C2uiBVSW.css.map} +1 -1
- package/dist/C_Markdown2.js +1 -1
- package/dist/C_Markdown2.js.map +1 -1
- package/dist/{C_Table-BsAOkALe.css.map → C_Table-C55H4kPr.css.map} +1 -1
- package/dist/C_Table2.js +21 -4
- package/dist/C_Table2.js.map +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants2.d.ts +2 -2
- package/dist/constants3.d.ts +3 -3
- package/dist/constants4.d.ts +1 -1
- package/dist/data.d.ts +1 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/index.cjs +5 -1
- package/dist/index.d.cts +24 -23
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +24 -23
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.vue.d.ts +1 -1
- package/dist/index10.vue.d.ts +3 -3
- package/dist/index12.vue.d.ts +1 -1
- package/dist/index13.vue.d.ts +1 -1
- package/dist/index14.vue.d.ts +1 -1
- package/dist/index16.vue.d.ts +1 -1
- package/dist/index16.vue.d.ts.map +1 -1
- package/dist/index2.vue.d.ts +3 -3
- package/dist/index3.vue.d.ts +2 -2
- package/dist/index8.vue.d.ts +1 -1
- package/dist/resolver.cjs +1 -0
- package/dist/resolver.d.cts +1 -1
- package/dist/resolver.d.cts.map +1 -1
- package/dist/resolver.d.ts +1 -1
- package/dist/resolver.d.ts.map +1 -1
- package/dist/resolver.js +1 -0
- package/dist/resolver.js.map +1 -1
- package/dist/style.css +799 -181
- package/dist/useCalendarEvents.d.ts +1 -1
- package/dist/useCollapsePanel.d.ts +4 -4
- package/dist/useCropperCore.d.ts +3 -3
- package/dist/useDraggableLayout.d.ts +11 -11
- package/dist/useDynamicFormState.d.ts +6 -6
- package/dist/useDynamicFormState.d.ts.map +1 -1
- package/dist/useFullscreen.d.ts +2 -2
- package/dist/useGlobalSearch.d.ts +102 -0
- package/dist/useGlobalSearch.d.ts.map +1 -0
- package/dist/useInfiniteScroll.d.ts +3 -3
- package/dist/useModalEdit.d.ts +4 -4
- package/dist/useModalEdit.d.ts.map +1 -1
- package/dist/useQRCode.d.ts +3 -3
- package/dist/useQRCode.d.ts.map +1 -1
- package/dist/useSearchState.d.ts +1 -1
- package/dist/useSearchState.d.ts.map +1 -1
- package/dist/useSignatureHistory.d.ts +2 -2
- package/dist/useSplitResize.d.ts +6 -6
- package/dist/useSplitResize.d.ts.map +1 -1
- package/dist/useTimeSelection.d.ts +1 -1
- package/dist/useTreeOperations.d.ts +3 -3
- package/package.json +6 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"C_GlobalSearch-DoPjldFm.css","names":[],"sources":["../src/components/C_GlobalSearch/index.vue?vue&type=style&index=0&scoped=4b182fa8&lang.scss"],"sourcesContent":["/* unplugin-vue-components disabled */[data-v-4b182fa8] .robot-highlight {\n background: linear-gradient(135deg, rgba(255, 193, 7, 0.25), rgba(255, 193, 7, 0.35));\n color: inherit;\n border-radius: 3px;\n padding: 1px 2px;\n font-weight: 600;\n box-shadow: 0 0 0 1px rgba(255, 193, 7, 0.2);\n}\n.dialog-dark[data-v-4b182fa8] .robot-highlight {\n background: linear-gradient(135deg, rgba(255, 193, 7, 0.3), rgba(255, 193, 7, 0.45));\n box-shadow: 0 0 0 1px rgba(255, 193, 7, 0.3);\n}\n.robot-search-trigger[data-v-4b182fa8] {\n display: inline-flex;\n align-items: center;\n gap: 12px;\n padding: 4px 14px;\n background: linear-gradient(145deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));\n backdrop-filter: blur(20px);\n border: 1px solid rgba(99, 102, 241, 0.2);\n border-radius: 14px;\n font-size: 13px;\n color: #4f46e5;\n cursor: pointer;\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n user-select: none;\n min-width: 160px;\n position: relative;\n overflow: hidden;\n}\n.robot-search-trigger[data-v-4b182fa8]::before {\n content: \"\";\n position: absolute;\n top: 0;\n left: -100%;\n width: 100%;\n height: 100%;\n background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), transparent);\n transition: left 0.5s ease;\n}\n.robot-search-trigger .robot-trigger-icon[data-v-4b182fa8] {\n font-size: 16px;\n opacity: 0.9;\n flex-shrink: 0;\n transition: all 0.3s ease;\n}\n.robot-search-trigger .robot-trigger-text[data-v-4b182fa8] {\n flex: 1;\n font-weight: 500;\n letter-spacing: 0.01em;\n}\n.robot-search-trigger .robot-trigger-shortcut[data-v-4b182fa8] {\n font-size: 11px;\n opacity: 0.9;\n font-family: ui-monospace, \"SF Mono\", Monaco, \"Cascadia Code\", \"Roboto Mono\", Consolas, \"Courier New\", monospace;\n background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.12));\n padding: 2px 6px;\n border-radius: 4px;\n border: 1px solid rgba(99, 102, 241, 0.25);\n margin-left: auto;\n color: #3730a3;\n transition: all 0.3s ease;\n}\n.robot-search-trigger[data-v-4b182fa8]:hover {\n background: linear-gradient(145deg, rgba(99, 102, 241, 0.18), rgba(139, 92, 246, 0.12));\n border-color: rgba(99, 102, 241, 0.3);\n color: #3730a3;\n transform: translateY(-1px);\n}\n.robot-search-trigger[data-v-4b182fa8]:hover::before {\n left: 100%;\n}\n.robot-search-trigger:hover .robot-trigger-icon[data-v-4b182fa8] {\n opacity: 1;\n transform: scale(1.05);\n}\n.robot-search-trigger:hover .robot-trigger-shortcut[data-v-4b182fa8] {\n opacity: 1;\n background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(139, 92, 246, 0.18));\n border-color: rgba(99, 102, 241, 0.35);\n color: #312e81;\n transform: scale(1.05);\n}\n.robot-search-trigger[data-v-4b182fa8]:active {\n transform: translateY(0) scale(0.98);\n transition: all 0.1s ease;\n}\n.robot-search-trigger.trigger-dark[data-v-4b182fa8] {\n background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));\n border-color: rgba(255, 255, 255, 0.12);\n color: #d1d5db;\n}\n.robot-search-trigger.trigger-dark[data-v-4b182fa8]::before {\n background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);\n}\n.robot-search-trigger.trigger-dark .robot-trigger-shortcut[data-v-4b182fa8] {\n background: rgba(255, 255, 255, 0.1);\n border-color: rgba(255, 255, 255, 0.15);\n color: #b4b8c0;\n}\n.robot-search-trigger.trigger-dark[data-v-4b182fa8]:hover {\n background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));\n border-color: rgba(255, 255, 255, 0.18);\n color: #e5e7eb;\n}\n.robot-search-trigger.trigger-dark:hover .robot-trigger-shortcut[data-v-4b182fa8] {\n background: rgba(255, 255, 255, 0.15);\n border-color: rgba(255, 255, 255, 0.25);\n color: #d1d5db;\n}\n.robot-dialog-overlay[data-v-4b182fa8] {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));\n backdrop-filter: blur(12px);\n z-index: 9999;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n padding: 80px 16px 16px;\n overflow-y: auto;\n}\n.robot-dialog-container[data-v-4b182fa8] {\n width: 100%;\n max-width: 580px;\n background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));\n backdrop-filter: blur(24px);\n border-radius: 16px;\n border: 1px solid rgba(255, 255, 255, 0.4);\n box-shadow: 0 24px 32px -8px rgba(0, 0, 0, 0.12), 0 16px 24px -8px rgba(0, 0, 0, 0.08), 0 8px 16px -4px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(255, 255, 255, 0.1);\n overflow: hidden;\n margin: 0 auto;\n position: relative;\n}\n.robot-dialog-container[data-v-4b182fa8]::before {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 1px;\n background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);\n}\n.robot-dialog-container.dialog-dark[data-v-4b182fa8] {\n background: linear-gradient(145deg, rgba(24, 24, 27, 0.98), rgba(18, 18, 20, 0.95));\n backdrop-filter: blur(32px);\n border-color: rgba(255, 255, 255, 0.12);\n box-shadow: 0 24px 32px -8px rgba(0, 0, 0, 0.4), 0 16px 24px -8px rgba(0, 0, 0, 0.3), 0 8px 16px -4px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.05);\n}\n.robot-dialog-container.dialog-dark[data-v-4b182fa8]::before {\n background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);\n}\n.robot-search-header[data-v-4b182fa8] {\n display: flex;\n align-items: center;\n padding: 20px 24px;\n gap: 14px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.06);\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2));\n}\n.robot-search-header .robot-search-icon[data-v-4b182fa8] {\n color: #6b7280;\n font-size: 20px;\n flex-shrink: 0;\n opacity: 0.8;\n}\n.robot-search-header .robot-search-input[data-v-4b182fa8] {\n flex: 1;\n border: none;\n outline: none;\n background: transparent;\n font-size: 16px;\n color: #1f2937;\n line-height: 1.6;\n font-weight: 400;\n}\n.robot-search-header .robot-search-input[data-v-4b182fa8]::placeholder {\n color: #9ca3af;\n font-weight: 400;\n}\n.robot-search-header .robot-close-btn[data-v-4b182fa8] {\n padding: 8px;\n border: none;\n background: rgba(0, 0, 0, 0.04);\n border-radius: 8px;\n color: #6b7280;\n cursor: pointer;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n justify-content: center;\n backdrop-filter: blur(8px);\n}\n.robot-search-header .robot-close-btn[data-v-4b182fa8]:hover {\n background: rgba(0, 0, 0, 0.08);\n color: #374151;\n transform: scale(1.05);\n}\n.robot-search-header .robot-close-btn[data-v-4b182fa8]:active {\n transform: scale(0.95);\n}\n.dialog-dark .robot-search-header[data-v-4b182fa8] {\n border-bottom-color: rgba(255, 255, 255, 0.08);\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));\n}\n.dialog-dark .robot-search-header .robot-search-icon[data-v-4b182fa8],\n.dialog-dark .robot-search-header .robot-close-btn[data-v-4b182fa8] {\n color: #9ca3af;\n}\n.dialog-dark .robot-search-header .robot-close-btn[data-v-4b182fa8] {\n background: rgba(255, 255, 255, 0.06);\n}\n.dialog-dark .robot-search-header .robot-close-btn[data-v-4b182fa8]:hover {\n color: #d1d5db;\n background: rgba(255, 255, 255, 0.12);\n}\n.dialog-dark .robot-search-header .robot-search-input[data-v-4b182fa8] {\n color: #f9fafb;\n}\n.dialog-dark .robot-search-header .robot-search-input[data-v-4b182fa8]::placeholder {\n color: #6b7280;\n}\n.robot-search-content[data-v-4b182fa8] {\n max-height: 420px;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n.robot-search-content[data-v-4b182fa8]::-webkit-scrollbar {\n width: 6px;\n}\n.robot-search-content[data-v-4b182fa8]::-webkit-scrollbar-track {\n background: transparent;\n}\n.robot-search-content[data-v-4b182fa8]::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.1);\n border-radius: 3px;\n}\n.robot-search-content[data-v-4b182fa8]::-webkit-scrollbar-thumb:hover {\n background: rgba(0, 0, 0, 0.15);\n}\n.dialog-dark .robot-search-content[data-v-4b182fa8]::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.1);\n}\n.dialog-dark .robot-search-content[data-v-4b182fa8]::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.15);\n}\n.robot-empty-state[data-v-4b182fa8] {\n padding: 40px 24px;\n text-align: center;\n}\n.robot-empty-state .robot-empty-icon[data-v-4b182fa8] {\n font-size: 36px;\n color: #d1d5db;\n margin-bottom: 16px;\n opacity: 0.8;\n}\n.robot-empty-state p[data-v-4b182fa8] {\n margin: 0;\n font-size: 15px;\n color: #6b7280;\n font-weight: 400;\n line-height: 1.5;\n}\n.dialog-dark .robot-empty-state .robot-empty-icon[data-v-4b182fa8] {\n color: #6b7280;\n}\n.dialog-dark .robot-empty-state p[data-v-4b182fa8] {\n color: #9ca3af;\n}\n.robot-search-results[data-v-4b182fa8] {\n padding: 12px 0 8px;\n}\n.robot-result-group[data-v-4b182fa8]:not(:last-child) {\n margin-bottom: 12px;\n}\n.robot-group-title[data-v-4b182fa8] {\n padding: 16px 24px 10px;\n font-size: 12px;\n font-weight: 700;\n color: #6b7280;\n text-transform: uppercase;\n letter-spacing: 0.08em;\n margin: 0;\n display: flex;\n align-items: center;\n gap: 8px;\n background: linear-gradient(90deg, rgba(0, 0, 0, 0.02), transparent);\n}\n.robot-group-title .robot-group-icon[data-v-4b182fa8] {\n font-size: 14px;\n opacity: 0.8;\n}\n.robot-group-title .robot-group-count[data-v-4b182fa8] {\n margin-left: auto;\n background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.05));\n color: #6366f1;\n padding: 2px 8px;\n border-radius: 12px;\n font-size: 10px;\n font-weight: 600;\n border: 1px solid rgba(99, 102, 241, 0.15);\n box-shadow: 0 1px 2px rgba(99, 102, 241, 0.1);\n}\n.robot-group-title .robot-clear-history[data-v-4b182fa8] {\n padding: 4px;\n margin-left: 8px;\n background: rgba(239, 68, 68, 0.1);\n border: 1px solid rgba(239, 68, 68, 0.2);\n border-radius: 6px;\n color: #ef4444;\n cursor: pointer;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n width: 24px;\n height: 24px;\n}\n.robot-group-title .robot-clear-history div[data-v-4b182fa8] {\n width: 12px;\n height: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.robot-group-title .robot-clear-history[data-v-4b182fa8]:hover {\n background: rgba(239, 68, 68, 0.15);\n border-color: rgba(239, 68, 68, 0.3);\n color: #dc2626;\n transform: scale(1.05);\n}\n.robot-group-title .robot-clear-history[data-v-4b182fa8]:active {\n transform: scale(0.95);\n}\n.dialog-dark .robot-group-title[data-v-4b182fa8] {\n color: #9ca3af;\n background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent);\n}\n.dialog-dark .robot-group-title .robot-group-count[data-v-4b182fa8] {\n background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.08));\n color: #a5b4fc;\n border-color: rgba(99, 102, 241, 0.2);\n}\n.robot-group-items[data-v-4b182fa8] {\n padding: 0 12px;\n}\n.robot-result-item[data-v-4b182fa8] {\n display: flex;\n align-items: center;\n gap: 14px;\n padding: 12px 14px;\n border-radius: 10px;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n position: relative;\n margin: 2px 0;\n}\n.robot-result-item[data-v-4b182fa8]::before {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: linear-gradient(135deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.01));\n border-radius: 10px;\n opacity: 0;\n transition: opacity 0.2s ease;\n}\n.robot-result-item[data-v-4b182fa8]:hover, .robot-result-item.robot-result-item-selected[data-v-4b182fa8] {\n background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(99, 102, 241, 0.03));\n transform: translateX(2px);\n box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05);\n border: 1px solid rgba(99, 102, 241, 0.1);\n}\n.robot-result-item[data-v-4b182fa8]:hover::before, .robot-result-item.robot-result-item-selected[data-v-4b182fa8]::before {\n opacity: 1;\n}\n.robot-result-item:hover .robot-item-icon[data-v-4b182fa8], .robot-result-item.robot-result-item-selected .robot-item-icon[data-v-4b182fa8] {\n transform: scale(1.05);\n color: #6366f1;\n}\n.robot-result-item:hover .robot-item-label[data-v-4b182fa8], .robot-result-item.robot-result-item-selected .robot-item-label[data-v-4b182fa8] {\n color: #4f46e5;\n}\n.robot-result-item:hover.robot-history-item .robot-history-delete[data-v-4b182fa8], .robot-result-item.robot-result-item-selected.robot-history-item .robot-history-delete[data-v-4b182fa8] {\n opacity: 1;\n transform: scale(1);\n}\n.robot-result-item .robot-item-icon[data-v-4b182fa8] {\n font-size: 18px;\n color: #6b7280;\n flex-shrink: 0;\n width: 22px;\n height: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease;\n border-radius: 6px;\n background: rgba(0, 0, 0, 0.02);\n}\n.robot-result-item .robot-item-icon.robot-default-icon[data-v-4b182fa8] {\n opacity: 0.6;\n background: rgba(0, 0, 0, 0.04);\n}\n.robot-result-item .robot-item-content[data-v-4b182fa8] {\n flex: 1;\n min-width: 0;\n}\n.robot-result-item .robot-item-content .robot-item-label[data-v-4b182fa8] {\n font-size: 14px;\n font-weight: 600;\n color: #1f2937;\n line-height: 1.4;\n transition: color 0.2s ease;\n margin-bottom: 1px;\n}\n.robot-result-item .robot-item-content .robot-item-desc[data-v-4b182fa8] {\n font-size: 12px;\n color: #6b7280;\n line-height: 1.3;\n opacity: 0.8;\n font-weight: 400;\n}\n.robot-result-item .robot-item-badge[data-v-4b182fa8] {\n font-size: 10px;\n background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(99, 102, 241, 0.08));\n color: #6366f1;\n padding: 3px 8px;\n border-radius: 12px;\n font-weight: 600;\n min-width: 22px;\n text-align: center;\n border: 1px solid rgba(99, 102, 241, 0.15);\n box-shadow: 0 1px 2px rgba(99, 102, 241, 0.1);\n transition: all 0.2s ease;\n}\n.robot-result-item .robot-history-delete[data-v-4b182fa8] {\n padding: 4px;\n background: rgba(239, 68, 68, 0.08);\n border: 1px solid rgba(239, 68, 68, 0.15);\n border-radius: 6px;\n color: #ef4444;\n cursor: pointer;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n opacity: 0;\n transform: scale(0.8);\n flex-shrink: 0;\n width: 24px;\n height: 24px;\n}\n.robot-result-item .robot-history-delete[data-v-4b182fa8]:hover {\n background: rgba(239, 68, 68, 0.15);\n border-color: rgba(239, 68, 68, 0.25);\n color: #dc2626;\n transform: scale(1.05);\n}\n.robot-result-item .robot-history-delete[data-v-4b182fa8]:active {\n transform: scale(0.9);\n}\n.dialog-dark .robot-result-item[data-v-4b182fa8]:hover, .dialog-dark .robot-result-item.robot-result-item-selected[data-v-4b182fa8] {\n background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(99, 102, 241, 0.06));\n border-color: rgba(99, 102, 241, 0.15);\n box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n.dialog-dark .robot-result-item:hover .robot-item-icon[data-v-4b182fa8], .dialog-dark .robot-result-item.robot-result-item-selected .robot-item-icon[data-v-4b182fa8] {\n color: #a5b4fc;\n background: rgba(255, 255, 255, 0.08);\n}\n.dialog-dark .robot-result-item:hover .robot-item-label[data-v-4b182fa8], .dialog-dark .robot-result-item.robot-result-item-selected .robot-item-label[data-v-4b182fa8] {\n color: #c7d2fe;\n}\n.dialog-dark .robot-result-item .robot-item-icon[data-v-4b182fa8] {\n color: #9ca3af;\n background: rgba(255, 255, 255, 0.04);\n}\n.dialog-dark .robot-result-item .robot-item-icon.robot-default-icon[data-v-4b182fa8] {\n background: rgba(255, 255, 255, 0.06);\n}\n.dialog-dark .robot-result-item .robot-item-content .robot-item-label[data-v-4b182fa8] {\n color: #f9fafb;\n}\n.dialog-dark .robot-result-item .robot-item-content .robot-item-desc[data-v-4b182fa8] {\n color: #9ca3af;\n}\n.dialog-dark .robot-result-item .robot-item-badge[data-v-4b182fa8] {\n background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.12));\n color: #a5b4fc;\n border-color: rgba(99, 102, 241, 0.25);\n}\n.robot-search-footer[data-v-4b182fa8] {\n padding: 16px 24px;\n border-top: 1px solid rgba(0, 0, 0, 0.06);\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.01));\n display: flex;\n justify-content: space-between;\n align-items: center;\n backdrop-filter: blur(8px);\n}\n.robot-search-footer .robot-footer-info[data-v-4b182fa8] {\n font-size: 11px;\n color: #9ca3af;\n font-weight: 500;\n}\n.dialog-dark .robot-search-footer[data-v-4b182fa8] {\n border-top-color: rgba(255, 255, 255, 0.08);\n background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));\n}\n.dialog-dark .robot-search-footer .robot-footer-info[data-v-4b182fa8] {\n color: #6b7280;\n}\n.robot-footer-actions[data-v-4b182fa8] {\n display: flex;\n gap: 18px;\n}\n.robot-footer-actions .robot-action-item[data-v-4b182fa8] {\n display: flex;\n align-items: center;\n gap: 7px;\n font-size: 12px;\n color: #6b7280;\n font-weight: 500;\n}\n.robot-footer-actions .robot-action-item kbd[data-v-4b182fa8] {\n padding: 3px 8px;\n background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));\n border: 1px solid rgba(0, 0, 0, 0.12);\n border-radius: 5px;\n font-family: ui-monospace, \"SF Mono\", Monaco, \"Cascadia Code\", \"Roboto Mono\", Consolas, \"Courier New\", monospace;\n font-size: 10px;\n line-height: 1;\n color: #4b5563;\n min-width: 22px;\n text-align: center;\n font-weight: 600;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);\n}\n.dialog-dark .robot-footer-actions .robot-action-item kbd[data-v-4b182fa8] {\n background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));\n border-color: rgba(255, 255, 255, 0.18);\n color: #d1d5db;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);\n}\n.robot-footer-actions .robot-action-item span[data-v-4b182fa8] {\n font-size: 11px;\n font-weight: 500;\n}\n.dialog-dark .robot-footer-actions .robot-action-item[data-v-4b182fa8] {\n color: #9ca3af;\n}\n.robot-dialog-enter-active[data-v-4b182fa8],\n.robot-dialog-leave-active[data-v-4b182fa8] {\n transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n}\n.robot-dialog-enter-from[data-v-4b182fa8],\n.robot-dialog-leave-to[data-v-4b182fa8] {\n opacity: 0;\n}\n.robot-dialog-enter-from .robot-dialog-container[data-v-4b182fa8],\n.robot-dialog-leave-to .robot-dialog-container[data-v-4b182fa8] {\n transform: scale(0.92) translateY(-40px);\n opacity: 0;\n}\n.robot-dialog-enter-to[data-v-4b182fa8] {\n opacity: 1;\n}\n.robot-dialog-enter-to .robot-dialog-container[data-v-4b182fa8] {\n transform: scale(1) translateY(0);\n opacity: 1;\n}\n@media (max-width: 640px) {\n.robot-dialog-overlay[data-v-4b182fa8] {\n padding: 60px 12px 12px;\n}\n.robot-dialog-container[data-v-4b182fa8] {\n border-radius: 12px;\n}\n.robot-search-header[data-v-4b182fa8] {\n padding: 16px 18px;\n}\n.robot-group-title[data-v-4b182fa8] {\n padding: 14px 18px 8px;\n}\n.robot-group-items[data-v-4b182fa8] {\n padding: 0 6px;\n}\n.robot-result-item[data-v-4b182fa8] {\n padding: 10px 12px;\n gap: 12px;\n}\n.robot-search-footer[data-v-4b182fa8] {\n padding: 14px 18px;\n flex-direction: column;\n gap: 8px;\n align-items: stretch;\n}\n.robot-search-footer .robot-footer-actions[data-v-4b182fa8] {\n justify-content: center;\n gap: 14px;\n}\n.robot-search-footer .robot-footer-info[data-v-4b182fa8] {\n text-align: center;\n order: -1;\n}\n}"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_C_GlobalSearch = require('./C_GlobalSearch.js');
|
|
3
|
+
|
|
4
|
+
exports.C_GlobalSearch = require_C_GlobalSearch.C_GlobalSearch_default;
|
|
5
|
+
exports.useGlobalSearch = require_C_GlobalSearch.useGlobalSearch;
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import { t as export_helper_default } from "./export-helper.js";
|
|
2
|
+
import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, isRef, nextTick, normalizeClass, onMounted, onUnmounted, openBlock, ref, renderList, resolveDynamicComponent, toDisplayString, unref, vModelText, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/C_GlobalSearch/composables/useGlobalSearch.ts
|
|
5
|
+
/**
|
|
6
|
+
* 全局搜索逻辑 — 管理菜单搜索、历史记录、键盘导航
|
|
7
|
+
*
|
|
8
|
+
* 已解耦:不依赖任何项目级 store / router,
|
|
9
|
+
* 所有外部数据通过 options 注入。
|
|
10
|
+
*/
|
|
11
|
+
function useGlobalSearch(options) {
|
|
12
|
+
const { menuItems: getMenuItems, isDark: getIsDark, onSelect, storageKey = "robot-search-history", maxHistory = 10, maxDisplayHistory = 5 } = options;
|
|
13
|
+
const showDialog = ref(false);
|
|
14
|
+
const searchValue = ref("");
|
|
15
|
+
const selectedIndex = ref(0);
|
|
16
|
+
const searchInputRef = ref();
|
|
17
|
+
const searchHistory = ref([]);
|
|
18
|
+
const isDark = computed(() => getIsDark?.() ?? false);
|
|
19
|
+
const filteredMenuItems = computed(() => {
|
|
20
|
+
if (!searchValue.value.trim()) return [];
|
|
21
|
+
const query = searchValue.value.toLowerCase();
|
|
22
|
+
return getMenuItems().filter((item) => item.label.toLowerCase().includes(query) || formatMenuPath(item.key).toLowerCase().includes(query));
|
|
23
|
+
});
|
|
24
|
+
const displayHistory = computed(() => searchHistory.value.slice(0, maxDisplayHistory));
|
|
25
|
+
const hasResults = computed(() => filteredMenuItems.value.length > 0);
|
|
26
|
+
const hasContent = computed(() => hasResults.value || displayHistory.value.length > 0);
|
|
27
|
+
const getItemClasses = (index, isHistory) => [
|
|
28
|
+
"robot-result-item",
|
|
29
|
+
isHistory && "robot-history-item",
|
|
30
|
+
{ "robot-result-item-selected": selectedIndex.value === index }
|
|
31
|
+
];
|
|
32
|
+
const highlightMatch = (text, search) => {
|
|
33
|
+
if (!search) return text;
|
|
34
|
+
const regex = new RegExp(`(${search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`, "gi");
|
|
35
|
+
return text.replace(regex, "<mark class=\"robot-highlight\">$1</mark>");
|
|
36
|
+
};
|
|
37
|
+
const formatMenuPath = (key) => key.replace(/^\//, "").replace(/\//g, " > ") || "首页";
|
|
38
|
+
const addToHistory = (menuItem) => {
|
|
39
|
+
if (!menuItem.label.trim()) return;
|
|
40
|
+
const query = menuItem.label;
|
|
41
|
+
const filtered = searchHistory.value.filter((item) => !(item.query === query && item.menuItem?.key === menuItem.key));
|
|
42
|
+
searchHistory.value = [{
|
|
43
|
+
query,
|
|
44
|
+
menuItem,
|
|
45
|
+
timestamp: Date.now()
|
|
46
|
+
}, ...filtered].slice(0, maxHistory);
|
|
47
|
+
localStorage.setItem(storageKey, JSON.stringify(searchHistory.value));
|
|
48
|
+
};
|
|
49
|
+
const loadHistory = () => {
|
|
50
|
+
try {
|
|
51
|
+
const saved = localStorage.getItem(storageKey);
|
|
52
|
+
if (saved) searchHistory.value = JSON.parse(saved).map((item) => typeof item === "string" ? {
|
|
53
|
+
query: item,
|
|
54
|
+
menuItem: null,
|
|
55
|
+
timestamp: 0
|
|
56
|
+
} : item);
|
|
57
|
+
} catch (error) {
|
|
58
|
+
console.error("加载搜索历史失败:", error);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const clearHistory = () => {
|
|
62
|
+
searchHistory.value = [];
|
|
63
|
+
localStorage.removeItem(storageKey);
|
|
64
|
+
};
|
|
65
|
+
const removeHistoryItem = (index) => {
|
|
66
|
+
searchHistory.value.splice(index, 1);
|
|
67
|
+
localStorage.setItem(storageKey, JSON.stringify(searchHistory.value));
|
|
68
|
+
if (selectedIndex.value >= searchHistory.value.length) selectedIndex.value = Math.max(0, searchHistory.value.length - 1);
|
|
69
|
+
};
|
|
70
|
+
const openDialog = async () => {
|
|
71
|
+
showDialog.value = true;
|
|
72
|
+
searchValue.value = "";
|
|
73
|
+
selectedIndex.value = 0;
|
|
74
|
+
await nextTick();
|
|
75
|
+
searchInputRef.value?.focus();
|
|
76
|
+
};
|
|
77
|
+
const closeDialog = () => {
|
|
78
|
+
showDialog.value = false;
|
|
79
|
+
searchValue.value = "";
|
|
80
|
+
selectedIndex.value = 0;
|
|
81
|
+
};
|
|
82
|
+
const selectHistoryItem = (historyItem) => {
|
|
83
|
+
if (historyItem.menuItem) {
|
|
84
|
+
const hasChildren = !!historyItem.menuItem.children?.length;
|
|
85
|
+
onSelect?.(historyItem.menuItem.key, hasChildren);
|
|
86
|
+
closeDialog();
|
|
87
|
+
} else {
|
|
88
|
+
searchValue.value = historyItem.query;
|
|
89
|
+
selectedIndex.value = 0;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
const selectItem = (item) => {
|
|
93
|
+
addToHistory(item);
|
|
94
|
+
const hasChildren = !!item.children?.length;
|
|
95
|
+
onSelect?.(item.key, hasChildren);
|
|
96
|
+
closeDialog();
|
|
97
|
+
};
|
|
98
|
+
const handleEnter = () => {
|
|
99
|
+
const isHistoryMode = !searchValue.value.trim() && displayHistory.value.length > 0;
|
|
100
|
+
const isSearchMode = searchValue.value.trim() && filteredMenuItems.value.length > 0;
|
|
101
|
+
if (isHistoryMode) {
|
|
102
|
+
const historyItem = displayHistory.value[selectedIndex.value];
|
|
103
|
+
if (historyItem) selectHistoryItem(historyItem);
|
|
104
|
+
} else if (isSearchMode) {
|
|
105
|
+
const item = filteredMenuItems.value[selectedIndex.value];
|
|
106
|
+
if (item) selectItem(item);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const focusNext = () => {
|
|
110
|
+
const maxIndex = !searchValue.value.trim() ? displayHistory.value.length - 1 : filteredMenuItems.value.length - 1;
|
|
111
|
+
selectedIndex.value = Math.min(selectedIndex.value + 1, maxIndex);
|
|
112
|
+
};
|
|
113
|
+
const focusPrev = () => {
|
|
114
|
+
selectedIndex.value = Math.max(selectedIndex.value - 1, 0);
|
|
115
|
+
};
|
|
116
|
+
watch(searchValue, () => {
|
|
117
|
+
selectedIndex.value = 0;
|
|
118
|
+
});
|
|
119
|
+
onMounted(() => {
|
|
120
|
+
loadHistory();
|
|
121
|
+
const handleKeydown = (e) => {
|
|
122
|
+
if ((e.ctrlKey || e.metaKey) && e.key === "k") {
|
|
123
|
+
e.preventDefault();
|
|
124
|
+
openDialog();
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
document.addEventListener("keydown", handleKeydown);
|
|
128
|
+
onUnmounted(() => document.removeEventListener("keydown", handleKeydown));
|
|
129
|
+
});
|
|
130
|
+
return {
|
|
131
|
+
showDialog,
|
|
132
|
+
searchValue,
|
|
133
|
+
selectedIndex,
|
|
134
|
+
searchInputRef,
|
|
135
|
+
isDark,
|
|
136
|
+
filteredMenuItems,
|
|
137
|
+
displayHistory,
|
|
138
|
+
hasResults,
|
|
139
|
+
hasContent,
|
|
140
|
+
getItemClasses,
|
|
141
|
+
highlightMatch,
|
|
142
|
+
formatMenuPath,
|
|
143
|
+
clearHistory,
|
|
144
|
+
removeHistoryItem,
|
|
145
|
+
openDialog,
|
|
146
|
+
closeDialog,
|
|
147
|
+
selectHistoryItem,
|
|
148
|
+
selectItem,
|
|
149
|
+
handleEnter,
|
|
150
|
+
focusNext,
|
|
151
|
+
focusPrev
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/components/C_GlobalSearch/index.vue?vue&type=script&setup=true&lang.ts
|
|
157
|
+
const _hoisted_1 = { class: "robot-search-palette" };
|
|
158
|
+
const _hoisted_2 = { class: "robot-search-header" };
|
|
159
|
+
const _hoisted_3 = ["placeholder"];
|
|
160
|
+
const _hoisted_4 = { class: "robot-search-content" };
|
|
161
|
+
const _hoisted_5 = {
|
|
162
|
+
key: 0,
|
|
163
|
+
class: "robot-empty-state"
|
|
164
|
+
};
|
|
165
|
+
const _hoisted_6 = { class: "robot-search-results" };
|
|
166
|
+
const _hoisted_7 = { class: "robot-result-group" };
|
|
167
|
+
const _hoisted_8 = { class: "robot-group-title" };
|
|
168
|
+
const _hoisted_9 = { class: "robot-group-count" };
|
|
169
|
+
const _hoisted_10 = { class: "robot-group-items" };
|
|
170
|
+
const _hoisted_11 = ["onClick", "onMouseenter"];
|
|
171
|
+
const _hoisted_12 = {
|
|
172
|
+
key: 1,
|
|
173
|
+
class: "robot-item-icon robot-default-icon"
|
|
174
|
+
};
|
|
175
|
+
const _hoisted_13 = { class: "robot-item-content" };
|
|
176
|
+
const _hoisted_14 = { class: "robot-item-label" };
|
|
177
|
+
const _hoisted_15 = { class: "robot-item-desc" };
|
|
178
|
+
const _hoisted_16 = ["onClick"];
|
|
179
|
+
const _hoisted_17 = { class: "robot-search-results" };
|
|
180
|
+
const _hoisted_18 = {
|
|
181
|
+
key: 0,
|
|
182
|
+
class: "robot-empty-state"
|
|
183
|
+
};
|
|
184
|
+
const _hoisted_19 = { class: "robot-result-group" };
|
|
185
|
+
const _hoisted_20 = { class: "robot-group-title" };
|
|
186
|
+
const _hoisted_21 = { class: "robot-group-count" };
|
|
187
|
+
const _hoisted_22 = { class: "robot-group-items" };
|
|
188
|
+
const _hoisted_23 = ["onClick", "onMouseenter"];
|
|
189
|
+
const _hoisted_24 = {
|
|
190
|
+
key: 1,
|
|
191
|
+
class: "robot-item-icon robot-default-icon"
|
|
192
|
+
};
|
|
193
|
+
const _hoisted_25 = { class: "robot-item-content" };
|
|
194
|
+
const _hoisted_26 = ["innerHTML"];
|
|
195
|
+
const _hoisted_27 = { class: "robot-item-desc" };
|
|
196
|
+
const _hoisted_28 = {
|
|
197
|
+
key: 2,
|
|
198
|
+
class: "robot-item-badge"
|
|
199
|
+
};
|
|
200
|
+
const _hoisted_29 = { class: "robot-search-footer" };
|
|
201
|
+
const _hoisted_30 = {
|
|
202
|
+
key: 0,
|
|
203
|
+
class: "robot-footer-info"
|
|
204
|
+
};
|
|
205
|
+
const _hoisted_31 = { key: 0 };
|
|
206
|
+
const _hoisted_32 = { key: 1 };
|
|
207
|
+
var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
208
|
+
name: "C_GlobalSearch",
|
|
209
|
+
__name: "index",
|
|
210
|
+
props: {
|
|
211
|
+
options: {},
|
|
212
|
+
placeholder: { default: "搜索导航菜单..." },
|
|
213
|
+
emptyText: { default: "输入关键词搜索菜单" },
|
|
214
|
+
resultGroupTitle: { default: "菜单导航" }
|
|
215
|
+
},
|
|
216
|
+
setup(__props, { expose: __expose }) {
|
|
217
|
+
const { showDialog, searchValue, selectedIndex, searchInputRef, isDark, filteredMenuItems, displayHistory, hasResults, hasContent, getItemClasses, highlightMatch, formatMenuPath, clearHistory, removeHistoryItem, openDialog, closeDialog, selectHistoryItem, selectItem, handleEnter, focusNext, focusPrev } = useGlobalSearch(__props.options);
|
|
218
|
+
__expose({
|
|
219
|
+
openDialog,
|
|
220
|
+
closeDialog
|
|
221
|
+
});
|
|
222
|
+
return (_ctx, _cache) => {
|
|
223
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
224
|
+
createCommentVNode(" 搜索触发按钮 "),
|
|
225
|
+
createElementVNode("div", {
|
|
226
|
+
class: normalizeClass(["robot-search-trigger", { "trigger-dark": unref(isDark) }]),
|
|
227
|
+
onClick: _cache[0] || (_cache[0] = (...args) => unref(openDialog) && unref(openDialog)(...args))
|
|
228
|
+
}, _cache[11] || (_cache[11] = [
|
|
229
|
+
createElementVNode("div", { class: "i-mdi:search robot-trigger-icon" }, null, -1),
|
|
230
|
+
createElementVNode("span", { class: "robot-trigger-text" }, "搜索", -1),
|
|
231
|
+
createElementVNode("span", { class: "robot-trigger-shortcut" }, "Ctrl K", -1)
|
|
232
|
+
]), 2),
|
|
233
|
+
createCommentVNode(" 搜索对话框 "),
|
|
234
|
+
(openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, { name: "robot-dialog" }, {
|
|
235
|
+
default: withCtx(() => [unref(showDialog) ? (openBlock(), createElementBlock("div", {
|
|
236
|
+
key: 0,
|
|
237
|
+
class: "robot-dialog-overlay",
|
|
238
|
+
onClick: _cache[9] || (_cache[9] = (...args) => unref(closeDialog) && unref(closeDialog)(...args)),
|
|
239
|
+
onKeydown: _cache[10] || (_cache[10] = withKeys((...args) => unref(closeDialog) && unref(closeDialog)(...args), ["esc"]))
|
|
240
|
+
}, [createElementVNode("div", {
|
|
241
|
+
class: normalizeClass(["robot-dialog-container", { "dialog-dark": unref(isDark) }]),
|
|
242
|
+
onClick: _cache[8] || (_cache[8] = withModifiers(() => {}, ["stop"]))
|
|
243
|
+
}, [
|
|
244
|
+
createCommentVNode(" 搜索头部 "),
|
|
245
|
+
createElementVNode("div", _hoisted_2, [
|
|
246
|
+
_cache[13] || (_cache[13] = createElementVNode("div", { class: "i-mdi:magnify robot-search-icon" }, null, -1)),
|
|
247
|
+
withDirectives(createElementVNode("input", {
|
|
248
|
+
ref_key: "searchInputRef",
|
|
249
|
+
ref: searchInputRef,
|
|
250
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(searchValue) ? searchValue.value = $event : null),
|
|
251
|
+
type: "text",
|
|
252
|
+
placeholder: _ctx.placeholder,
|
|
253
|
+
class: "robot-search-input",
|
|
254
|
+
onKeydown: [
|
|
255
|
+
_cache[2] || (_cache[2] = withKeys((...args) => unref(closeDialog) && unref(closeDialog)(...args), ["esc"])),
|
|
256
|
+
_cache[3] || (_cache[3] = withKeys((...args) => unref(handleEnter) && unref(handleEnter)(...args), ["enter"])),
|
|
257
|
+
_cache[4] || (_cache[4] = withKeys((...args) => unref(focusNext) && unref(focusNext)(...args), ["arrow-down"])),
|
|
258
|
+
_cache[5] || (_cache[5] = withKeys((...args) => unref(focusPrev) && unref(focusPrev)(...args), ["arrow-up"]))
|
|
259
|
+
]
|
|
260
|
+
}, null, 40, _hoisted_3), [[vModelText, unref(searchValue)]]),
|
|
261
|
+
createElementVNode("button", {
|
|
262
|
+
class: "robot-close-btn",
|
|
263
|
+
onClick: _cache[6] || (_cache[6] = (...args) => unref(closeDialog) && unref(closeDialog)(...args))
|
|
264
|
+
}, _cache[12] || (_cache[12] = [createElementVNode("div", { class: "i-mdi:close" }, null, -1)]))
|
|
265
|
+
]),
|
|
266
|
+
createCommentVNode(" 搜索内容 "),
|
|
267
|
+
createElementVNode("div", _hoisted_4, [createCommentVNode(" 空状态 "), !unref(hasContent) ? (openBlock(), createElementBlock("div", _hoisted_5, [_cache[14] || (_cache[14] = createElementVNode("div", { class: "i-mdi:magnify robot-empty-icon" }, null, -1)), createElementVNode("p", null, toDisplayString(_ctx.emptyText), 1)])) : !unref(searchValue).trim() && unref(displayHistory).length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 搜索历史 "), createElementVNode("div", _hoisted_6, [createElementVNode("div", _hoisted_7, [createElementVNode("div", _hoisted_8, [
|
|
268
|
+
_cache[16] || (_cache[16] = createElementVNode("div", { class: "i-mdi:clock-time-four-outline robot-group-icon" }, null, -1)),
|
|
269
|
+
_cache[17] || (_cache[17] = createTextVNode(" 最近搜索 ", -1)),
|
|
270
|
+
createElementVNode("span", _hoisted_9, toDisplayString(unref(displayHistory).length), 1),
|
|
271
|
+
createElementVNode("button", {
|
|
272
|
+
class: "robot-clear-history",
|
|
273
|
+
onClick: _cache[7] || (_cache[7] = (...args) => unref(clearHistory) && unref(clearHistory)(...args)),
|
|
274
|
+
title: "清空历史"
|
|
275
|
+
}, _cache[15] || (_cache[15] = [createElementVNode("div", { class: "i-mdi:delete-outline" }, null, -1)]))
|
|
276
|
+
]), createElementVNode("div", _hoisted_10, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(displayHistory), (historyItem, index) => {
|
|
277
|
+
return openBlock(), createElementBlock("div", {
|
|
278
|
+
key: `history-${index}`,
|
|
279
|
+
class: normalizeClass(unref(getItemClasses)(index, true)),
|
|
280
|
+
onClick: ($event) => unref(selectHistoryItem)(historyItem),
|
|
281
|
+
onMouseenter: ($event) => selectedIndex.value = index
|
|
282
|
+
}, [
|
|
283
|
+
historyItem.menuItem?.icon ? (openBlock(), createBlock(resolveDynamicComponent(historyItem.menuItem.icon), {
|
|
284
|
+
key: 0,
|
|
285
|
+
class: "robot-item-icon"
|
|
286
|
+
})) : (openBlock(), createElementBlock("div", _hoisted_12, _cache[18] || (_cache[18] = [createElementVNode("div", { class: "i-mdi:file-document-outline" }, null, -1)]))),
|
|
287
|
+
createElementVNode("div", _hoisted_13, [createElementVNode("div", _hoisted_14, toDisplayString(historyItem.query), 1), createElementVNode("div", _hoisted_15, toDisplayString(unref(formatMenuPath)(historyItem.menuItem?.key || "")), 1)]),
|
|
288
|
+
createElementVNode("button", {
|
|
289
|
+
class: "robot-history-delete",
|
|
290
|
+
onClick: withModifiers(($event) => unref(removeHistoryItem)(index), ["stop"]),
|
|
291
|
+
title: "删除此记录"
|
|
292
|
+
}, _cache[19] || (_cache[19] = [createElementVNode("div", { class: "i-mdi:close" }, null, -1)]), 8, _hoisted_16)
|
|
293
|
+
], 42, _hoisted_11);
|
|
294
|
+
}), 128))])])])], 64)) : unref(searchValue).trim() ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" 搜索结果 "), createElementVNode("div", _hoisted_17, [createCommentVNode(" 无结果状态 "), !unref(hasResults) ? (openBlock(), createElementBlock("div", _hoisted_18, [_cache[20] || (_cache[20] = createElementVNode("div", { class: "i-mdi:magnify robot-empty-icon" }, null, -1)), createElementVNode("p", null, "未找到 \"" + toDisplayString(unref(searchValue)) + "\" 相关内容", 1)])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 搜索结果列表 "), createElementVNode("div", _hoisted_19, [createElementVNode("div", _hoisted_20, [
|
|
295
|
+
_cache[21] || (_cache[21] = createElementVNode("div", { class: "i-mdi:menu robot-group-icon" }, null, -1)),
|
|
296
|
+
createTextVNode(" " + toDisplayString(_ctx.resultGroupTitle) + " ", 1),
|
|
297
|
+
createElementVNode("span", _hoisted_21, toDisplayString(unref(filteredMenuItems).length), 1)
|
|
298
|
+
]), createElementVNode("div", _hoisted_22, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(filteredMenuItems), (item, index) => {
|
|
299
|
+
return openBlock(), createElementBlock("div", {
|
|
300
|
+
key: item.key,
|
|
301
|
+
class: normalizeClass(unref(getItemClasses)(index, false)),
|
|
302
|
+
onClick: ($event) => unref(selectItem)(item),
|
|
303
|
+
onMouseenter: ($event) => selectedIndex.value = index
|
|
304
|
+
}, [
|
|
305
|
+
item.icon ? (openBlock(), createBlock(resolveDynamicComponent(item.icon), {
|
|
306
|
+
key: 0,
|
|
307
|
+
class: "robot-item-icon"
|
|
308
|
+
})) : (openBlock(), createElementBlock("div", _hoisted_24, _cache[22] || (_cache[22] = [createElementVNode("div", { class: "i-mdi:file-document-outline" }, null, -1)]))),
|
|
309
|
+
createElementVNode("div", _hoisted_25, [createElementVNode("div", {
|
|
310
|
+
class: "robot-item-label",
|
|
311
|
+
innerHTML: unref(highlightMatch)(item.label, unref(searchValue))
|
|
312
|
+
}, null, 8, _hoisted_26), createElementVNode("div", _hoisted_27, toDisplayString(unref(formatMenuPath)(item.key)), 1)]),
|
|
313
|
+
item.children?.length ? (openBlock(), createElementBlock("div", _hoisted_28, toDisplayString(item.children.length), 1)) : createCommentVNode("v-if", true)
|
|
314
|
+
], 42, _hoisted_23);
|
|
315
|
+
}), 128))])])], 2112))])], 64)) : createCommentVNode("v-if", true)]),
|
|
316
|
+
createCommentVNode(" 搜索底部 "),
|
|
317
|
+
createElementVNode("div", _hoisted_29, [_cache[23] || (_cache[23] = createElementVNode("div", { class: "robot-footer-actions" }, [
|
|
318
|
+
createElementVNode("div", { class: "robot-action-item" }, [createElementVNode("kbd", null, "↵"), createElementVNode("span", null, "选择")]),
|
|
319
|
+
createElementVNode("div", { class: "robot-action-item" }, [createElementVNode("kbd", null, "↑↓"), createElementVNode("span", null, "导航")]),
|
|
320
|
+
createElementVNode("div", { class: "robot-action-item" }, [createElementVNode("kbd", null, "esc"), createElementVNode("span", null, "关闭")])
|
|
321
|
+
], -1)), unref(hasContent) ? (openBlock(), createElementBlock("div", _hoisted_30, [unref(searchValue).trim() && unref(hasResults) ? (openBlock(), createElementBlock("span", _hoisted_31, " 共 " + toDisplayString(unref(filteredMenuItems).length) + " 项结果 ", 1)) : !unref(searchValue).trim() && unref(displayHistory).length > 0 ? (openBlock(), createElementBlock("span", _hoisted_32, toDisplayString(unref(displayHistory).length) + " 条历史记录 ", 1)) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true)])
|
|
322
|
+
], 2)], 32)) : createCommentVNode("v-if", true)]),
|
|
323
|
+
_: 1
|
|
324
|
+
})]))
|
|
325
|
+
]);
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
//#endregion
|
|
331
|
+
//#region src/components/C_GlobalSearch/index.vue
|
|
332
|
+
var C_GlobalSearch_default = /* @__PURE__ */ export_helper_default(index_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-4b182fa8"]]);
|
|
333
|
+
|
|
334
|
+
//#endregion
|
|
335
|
+
export { useGlobalSearch as n, C_GlobalSearch_default as t };
|
|
336
|
+
//# sourceMappingURL=C_GlobalSearch2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"C_GlobalSearch2.js","names":["placeholder","emptyText","resultGroupTitle"],"sources":["../src/components/C_GlobalSearch/composables/useGlobalSearch.ts","../src/components/C_GlobalSearch/index.vue","../src/components/C_GlobalSearch/index.vue","../src/components/C_GlobalSearch/index.vue"],"sourcesContent":["import { ref, computed, watch, onMounted, onUnmounted, nextTick } from 'vue'\nimport type { SearchMenuItem, HistoryItem, GlobalSearchOptions } from '../types'\n\n/**\n * 全局搜索逻辑 — 管理菜单搜索、历史记录、键盘导航\n *\n * 已解耦:不依赖任何项目级 store / router,\n * 所有外部数据通过 options 注入。\n */\nexport function useGlobalSearch(options: GlobalSearchOptions) {\n const {\n menuItems: getMenuItems,\n isDark: getIsDark,\n onSelect,\n storageKey = 'robot-search-history',\n maxHistory = 10,\n maxDisplayHistory = 5,\n } = options\n\n // ==================== 响应式状态 ====================\n const showDialog = ref(false)\n const searchValue = ref('')\n const selectedIndex = ref(0)\n const searchInputRef = ref<HTMLInputElement>()\n const searchHistory = ref<HistoryItem[]>([])\n\n // ==================== 计算属性 ====================\n const isDark = computed(() => getIsDark?.() ?? false)\n\n const filteredMenuItems = computed(() => {\n if (!searchValue.value.trim()) return []\n const query = searchValue.value.toLowerCase()\n const items = getMenuItems()\n return items.filter(\n item =>\n item.label.toLowerCase().includes(query) ||\n formatMenuPath(item.key).toLowerCase().includes(query)\n )\n })\n\n const displayHistory = computed(() =>\n searchHistory.value.slice(0, maxDisplayHistory)\n )\n const hasResults = computed(() => filteredMenuItems.value.length > 0)\n const hasContent = computed(\n () => hasResults.value || displayHistory.value.length > 0\n )\n\n // ==================== 工具函数 ====================\n const getItemClasses = (index: number, isHistory: boolean) => [\n 'robot-result-item',\n isHistory && 'robot-history-item',\n { 'robot-result-item-selected': selectedIndex.value === index },\n ]\n\n const highlightMatch = (text: string, search: string): string => {\n if (!search) return text\n const regex = new RegExp(\n `(${search.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')})`,\n 'gi'\n )\n return text.replace(regex, '<mark class=\"robot-highlight\">$1</mark>')\n }\n\n const formatMenuPath = (key: string): string =>\n key.replace(/^\\//, '').replace(/\\//g, ' > ') || '首页'\n\n // ==================== 搜索历史管理 ====================\n const addToHistory = (menuItem: SearchMenuItem) => {\n if (!menuItem.label.trim()) return\n const query = menuItem.label\n const filtered = searchHistory.value.filter(\n (item: HistoryItem) =>\n !(item.query === query && item.menuItem?.key === menuItem.key)\n )\n searchHistory.value = [\n { query, menuItem, timestamp: Date.now() },\n ...filtered,\n ].slice(0, maxHistory)\n localStorage.setItem(storageKey, JSON.stringify(searchHistory.value))\n }\n\n const loadHistory = () => {\n try {\n const saved = localStorage.getItem(storageKey)\n if (saved) {\n const parsed = JSON.parse(saved)\n searchHistory.value = parsed.map((item: any) =>\n typeof item === 'string'\n ? { query: item, menuItem: null, timestamp: 0 }\n : item\n )\n }\n } catch (error) {\n console.error('加载搜索历史失败:', error)\n }\n }\n\n const clearHistory = () => {\n searchHistory.value = []\n localStorage.removeItem(storageKey)\n }\n\n const removeHistoryItem = (index: number) => {\n searchHistory.value.splice(index, 1)\n localStorage.setItem(storageKey, JSON.stringify(searchHistory.value))\n if (selectedIndex.value >= searchHistory.value.length) {\n selectedIndex.value = Math.max(0, searchHistory.value.length - 1)\n }\n }\n\n // ==================== 对话框控制 ====================\n const openDialog = async () => {\n showDialog.value = true\n searchValue.value = ''\n selectedIndex.value = 0\n await nextTick()\n searchInputRef.value?.focus()\n }\n\n const closeDialog = () => {\n showDialog.value = false\n searchValue.value = ''\n selectedIndex.value = 0\n }\n\n // ==================== 选择项目 ====================\n const selectHistoryItem = (historyItem: HistoryItem) => {\n if (historyItem.menuItem) {\n const hasChildren = !!historyItem.menuItem.children?.length\n onSelect?.(historyItem.menuItem.key, hasChildren)\n closeDialog()\n } else {\n searchValue.value = historyItem.query\n selectedIndex.value = 0\n }\n }\n\n const selectItem = (item: SearchMenuItem) => {\n addToHistory(item)\n const hasChildren = !!item.children?.length\n onSelect?.(item.key, hasChildren)\n closeDialog()\n }\n\n // ==================== 键盘导航 ====================\n const handleEnter = () => {\n const isHistoryMode =\n !searchValue.value.trim() && displayHistory.value.length > 0\n const isSearchMode =\n searchValue.value.trim() && filteredMenuItems.value.length > 0\n\n if (isHistoryMode) {\n const historyItem = displayHistory.value[selectedIndex.value]\n if (historyItem) selectHistoryItem(historyItem)\n } else if (isSearchMode) {\n const item = filteredMenuItems.value[selectedIndex.value]\n if (item) selectItem(item)\n }\n }\n\n const focusNext = () => {\n const maxIndex = !searchValue.value.trim()\n ? displayHistory.value.length - 1\n : filteredMenuItems.value.length - 1\n selectedIndex.value = Math.min(selectedIndex.value + 1, maxIndex)\n }\n\n const focusPrev = () => {\n selectedIndex.value = Math.max(selectedIndex.value - 1, 0)\n }\n\n // ==================== 监听器和生命周期 ====================\n watch(searchValue, () => {\n selectedIndex.value = 0\n })\n\n onMounted(() => {\n loadHistory()\n const handleKeydown = (e: KeyboardEvent) => {\n if ((e.ctrlKey || e.metaKey) && e.key === 'k') {\n e.preventDefault()\n openDialog()\n }\n }\n document.addEventListener('keydown', handleKeydown)\n onUnmounted(() => document.removeEventListener('keydown', handleKeydown))\n })\n\n return {\n showDialog,\n searchValue,\n selectedIndex,\n searchInputRef,\n isDark,\n filteredMenuItems,\n displayHistory,\n hasResults,\n hasContent,\n getItemClasses,\n highlightMatch,\n formatMenuPath,\n clearHistory,\n removeHistoryItem,\n openDialog,\n closeDialog,\n selectHistoryItem,\n selectItem,\n handleEnter,\n focusNext,\n focusPrev,\n }\n}\n","/* unplugin-vue-components disabled */<!--\n * @Description: 全局搜索组件 - 命令面板式搜索\n * @Migration: naive-ui-components 组件库迁移版本\n * Copyright (c) 2025 by CHENY, All Rights Reserved.\n-->\n<template>\n <div class=\"robot-search-palette\">\n <!-- 搜索触发按钮 -->\n <div\n class=\"robot-search-trigger\"\n :class=\"{ 'trigger-dark': isDark }\"\n @click=\"openDialog\"\n >\n <div class=\"i-mdi:search robot-trigger-icon\" />\n <span class=\"robot-trigger-text\">搜索</span>\n <span class=\"robot-trigger-shortcut\">Ctrl K</span>\n </div>\n\n <!-- 搜索对话框 -->\n <Teleport to=\"body\">\n <Transition name=\"robot-dialog\">\n <div\n v-if=\"showDialog\"\n class=\"robot-dialog-overlay\"\n @click=\"closeDialog\"\n @keydown.esc=\"closeDialog\"\n >\n <div\n class=\"robot-dialog-container\"\n :class=\"{ 'dialog-dark': isDark }\"\n @click.stop\n >\n <!-- 搜索头部 -->\n <div class=\"robot-search-header\">\n <div class=\"i-mdi:magnify robot-search-icon\" />\n <input\n ref=\"searchInputRef\"\n v-model=\"searchValue\"\n type=\"text\"\n :placeholder=\"placeholder\"\n class=\"robot-search-input\"\n @keydown.esc=\"closeDialog\"\n @keydown.enter=\"handleEnter\"\n @keydown.arrow-down=\"focusNext\"\n @keydown.arrow-up=\"focusPrev\"\n />\n <button\n class=\"robot-close-btn\"\n @click=\"closeDialog\"\n >\n <div class=\"i-mdi:close\" />\n </button>\n </div>\n\n <!-- 搜索内容 -->\n <div class=\"robot-search-content\">\n <!-- 空状态 -->\n <div\n v-if=\"!hasContent\"\n class=\"robot-empty-state\"\n >\n <div class=\"i-mdi:magnify robot-empty-icon\" />\n <p>{{ emptyText }}</p>\n </div>\n\n <!-- 搜索历史 -->\n <template\n v-else-if=\"!searchValue.trim() && displayHistory.length > 0\"\n >\n <div class=\"robot-search-results\">\n <div class=\"robot-result-group\">\n <div class=\"robot-group-title\">\n <div\n class=\"i-mdi:clock-time-four-outline robot-group-icon\"\n />\n 最近搜索\n <span class=\"robot-group-count\">{{\n displayHistory.length\n }}</span>\n <button\n class=\"robot-clear-history\"\n @click=\"clearHistory\"\n title=\"清空历史\"\n >\n <div class=\"i-mdi:delete-outline\" />\n </button>\n </div>\n <div class=\"robot-group-items\">\n <div\n v-for=\"(historyItem, index) in displayHistory\"\n :key=\"`history-${index}`\"\n :class=\"getItemClasses(index, true)\"\n @click=\"selectHistoryItem(historyItem)\"\n @mouseenter=\"selectedIndex = index\"\n >\n <component\n v-if=\"historyItem.menuItem?.icon\"\n :is=\"historyItem.menuItem.icon\"\n class=\"robot-item-icon\"\n />\n <div\n v-else\n class=\"robot-item-icon robot-default-icon\"\n >\n <div class=\"i-mdi:file-document-outline\" />\n </div>\n <div class=\"robot-item-content\">\n <div class=\"robot-item-label\">\n {{ historyItem.query }}\n </div>\n <div class=\"robot-item-desc\">\n {{\n formatMenuPath(historyItem.menuItem?.key || '')\n }}\n </div>\n </div>\n <button\n class=\"robot-history-delete\"\n @click.stop=\"removeHistoryItem(index)\"\n title=\"删除此记录\"\n >\n <div class=\"i-mdi:close\" />\n </button>\n </div>\n </div>\n </div>\n </div>\n </template>\n\n <!-- 搜索结果 -->\n <template v-else-if=\"searchValue.trim()\">\n <div class=\"robot-search-results\">\n <!-- 无结果状态 -->\n <div\n v-if=\"!hasResults\"\n class=\"robot-empty-state\"\n >\n <div class=\"i-mdi:magnify robot-empty-icon\" />\n <p>未找到 \"{{ searchValue }}\" 相关内容</p>\n </div>\n\n <!-- 搜索结果列表 -->\n <div\n v-else\n class=\"robot-result-group\"\n >\n <div class=\"robot-group-title\">\n <div class=\"i-mdi:menu robot-group-icon\" />\n {{ resultGroupTitle }}\n <span class=\"robot-group-count\">{{\n filteredMenuItems.length\n }}</span>\n </div>\n <div class=\"robot-group-items\">\n <div\n v-for=\"(item, index) in filteredMenuItems\"\n :key=\"item.key\"\n :class=\"getItemClasses(index, false)\"\n @click=\"selectItem(item)\"\n @mouseenter=\"selectedIndex = index\"\n >\n <component\n v-if=\"item.icon\"\n :is=\"item.icon\"\n class=\"robot-item-icon\"\n />\n <div\n v-else\n class=\"robot-item-icon robot-default-icon\"\n >\n <div class=\"i-mdi:file-document-outline\" />\n </div>\n <div class=\"robot-item-content\">\n <div\n class=\"robot-item-label\"\n v-html=\"highlightMatch(item.label, searchValue)\"\n ></div>\n <div class=\"robot-item-desc\">\n {{ formatMenuPath(item.key) }}\n </div>\n </div>\n <div\n v-if=\"item.children?.length\"\n class=\"robot-item-badge\"\n >\n {{ item.children.length }}\n </div>\n </div>\n </div>\n </div>\n </div>\n </template>\n </div>\n\n <!-- 搜索底部 -->\n <div class=\"robot-search-footer\">\n <div class=\"robot-footer-actions\">\n <div class=\"robot-action-item\">\n <kbd>↵</kbd><span>选择</span>\n </div>\n <div class=\"robot-action-item\">\n <kbd>↑↓</kbd><span>导航</span>\n </div>\n <div class=\"robot-action-item\">\n <kbd>esc</kbd><span>关闭</span>\n </div>\n </div>\n <div\n v-if=\"hasContent\"\n class=\"robot-footer-info\"\n >\n <span v-if=\"searchValue.trim() && hasResults\">\n 共 {{ filteredMenuItems.length }} 项结果\n </span>\n <span\n v-else-if=\"!searchValue.trim() && displayHistory.length > 0\"\n >\n {{ displayHistory.length }} 条历史记录\n </span>\n </div>\n </div>\n </div>\n </div>\n </Transition>\n </Teleport>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { useGlobalSearch } from './composables/useGlobalSearch'\n import type { GlobalSearchOptions } from './types'\n\n defineOptions({ name: 'C_GlobalSearch' })\n\n interface Props {\n /** useGlobalSearch 配置(必须传入 menuItems + onSelect) */\n options: GlobalSearchOptions\n /** 搜索框 placeholder */\n placeholder?: string\n /** 无内容提示文字 */\n emptyText?: string\n /** 结果分组标题 */\n resultGroupTitle?: string\n }\n\n const props = withDefaults(defineProps<Props>(), {\n placeholder: '搜索导航菜单...',\n emptyText: '输入关键词搜索菜单',\n resultGroupTitle: '菜单导航',\n })\n\n const {\n showDialog,\n searchValue,\n selectedIndex,\n searchInputRef,\n isDark,\n filteredMenuItems,\n displayHistory,\n hasResults,\n hasContent,\n getItemClasses,\n highlightMatch,\n formatMenuPath,\n clearHistory,\n removeHistoryItem,\n openDialog,\n closeDialog,\n selectHistoryItem,\n selectItem,\n handleEnter,\n focusNext,\n focusPrev,\n } = useGlobalSearch(props.options)\n\n defineExpose({ openDialog, closeDialog })\n</script>\n\n<style lang=\"scss\" scoped>\n @use './index.scss';\n</style>\n","/* unplugin-vue-components disabled */<!--\n * @Description: 全局搜索组件 - 命令面板式搜索\n * @Migration: naive-ui-components 组件库迁移版本\n * Copyright (c) 2025 by CHENY, All Rights Reserved.\n-->\n<template>\n <div class=\"robot-search-palette\">\n <!-- 搜索触发按钮 -->\n <div\n class=\"robot-search-trigger\"\n :class=\"{ 'trigger-dark': isDark }\"\n @click=\"openDialog\"\n >\n <div class=\"i-mdi:search robot-trigger-icon\" />\n <span class=\"robot-trigger-text\">搜索</span>\n <span class=\"robot-trigger-shortcut\">Ctrl K</span>\n </div>\n\n <!-- 搜索对话框 -->\n <Teleport to=\"body\">\n <Transition name=\"robot-dialog\">\n <div\n v-if=\"showDialog\"\n class=\"robot-dialog-overlay\"\n @click=\"closeDialog\"\n @keydown.esc=\"closeDialog\"\n >\n <div\n class=\"robot-dialog-container\"\n :class=\"{ 'dialog-dark': isDark }\"\n @click.stop\n >\n <!-- 搜索头部 -->\n <div class=\"robot-search-header\">\n <div class=\"i-mdi:magnify robot-search-icon\" />\n <input\n ref=\"searchInputRef\"\n v-model=\"searchValue\"\n type=\"text\"\n :placeholder=\"placeholder\"\n class=\"robot-search-input\"\n @keydown.esc=\"closeDialog\"\n @keydown.enter=\"handleEnter\"\n @keydown.arrow-down=\"focusNext\"\n @keydown.arrow-up=\"focusPrev\"\n />\n <button\n class=\"robot-close-btn\"\n @click=\"closeDialog\"\n >\n <div class=\"i-mdi:close\" />\n </button>\n </div>\n\n <!-- 搜索内容 -->\n <div class=\"robot-search-content\">\n <!-- 空状态 -->\n <div\n v-if=\"!hasContent\"\n class=\"robot-empty-state\"\n >\n <div class=\"i-mdi:magnify robot-empty-icon\" />\n <p>{{ emptyText }}</p>\n </div>\n\n <!-- 搜索历史 -->\n <template\n v-else-if=\"!searchValue.trim() && displayHistory.length > 0\"\n >\n <div class=\"robot-search-results\">\n <div class=\"robot-result-group\">\n <div class=\"robot-group-title\">\n <div\n class=\"i-mdi:clock-time-four-outline robot-group-icon\"\n />\n 最近搜索\n <span class=\"robot-group-count\">{{\n displayHistory.length\n }}</span>\n <button\n class=\"robot-clear-history\"\n @click=\"clearHistory\"\n title=\"清空历史\"\n >\n <div class=\"i-mdi:delete-outline\" />\n </button>\n </div>\n <div class=\"robot-group-items\">\n <div\n v-for=\"(historyItem, index) in displayHistory\"\n :key=\"`history-${index}`\"\n :class=\"getItemClasses(index, true)\"\n @click=\"selectHistoryItem(historyItem)\"\n @mouseenter=\"selectedIndex = index\"\n >\n <component\n v-if=\"historyItem.menuItem?.icon\"\n :is=\"historyItem.menuItem.icon\"\n class=\"robot-item-icon\"\n />\n <div\n v-else\n class=\"robot-item-icon robot-default-icon\"\n >\n <div class=\"i-mdi:file-document-outline\" />\n </div>\n <div class=\"robot-item-content\">\n <div class=\"robot-item-label\">\n {{ historyItem.query }}\n </div>\n <div class=\"robot-item-desc\">\n {{\n formatMenuPath(historyItem.menuItem?.key || '')\n }}\n </div>\n </div>\n <button\n class=\"robot-history-delete\"\n @click.stop=\"removeHistoryItem(index)\"\n title=\"删除此记录\"\n >\n <div class=\"i-mdi:close\" />\n </button>\n </div>\n </div>\n </div>\n </div>\n </template>\n\n <!-- 搜索结果 -->\n <template v-else-if=\"searchValue.trim()\">\n <div class=\"robot-search-results\">\n <!-- 无结果状态 -->\n <div\n v-if=\"!hasResults\"\n class=\"robot-empty-state\"\n >\n <div class=\"i-mdi:magnify robot-empty-icon\" />\n <p>未找到 \"{{ searchValue }}\" 相关内容</p>\n </div>\n\n <!-- 搜索结果列表 -->\n <div\n v-else\n class=\"robot-result-group\"\n >\n <div class=\"robot-group-title\">\n <div class=\"i-mdi:menu robot-group-icon\" />\n {{ resultGroupTitle }}\n <span class=\"robot-group-count\">{{\n filteredMenuItems.length\n }}</span>\n </div>\n <div class=\"robot-group-items\">\n <div\n v-for=\"(item, index) in filteredMenuItems\"\n :key=\"item.key\"\n :class=\"getItemClasses(index, false)\"\n @click=\"selectItem(item)\"\n @mouseenter=\"selectedIndex = index\"\n >\n <component\n v-if=\"item.icon\"\n :is=\"item.icon\"\n class=\"robot-item-icon\"\n />\n <div\n v-else\n class=\"robot-item-icon robot-default-icon\"\n >\n <div class=\"i-mdi:file-document-outline\" />\n </div>\n <div class=\"robot-item-content\">\n <div\n class=\"robot-item-label\"\n v-html=\"highlightMatch(item.label, searchValue)\"\n ></div>\n <div class=\"robot-item-desc\">\n {{ formatMenuPath(item.key) }}\n </div>\n </div>\n <div\n v-if=\"item.children?.length\"\n class=\"robot-item-badge\"\n >\n {{ item.children.length }}\n </div>\n </div>\n </div>\n </div>\n </div>\n </template>\n </div>\n\n <!-- 搜索底部 -->\n <div class=\"robot-search-footer\">\n <div class=\"robot-footer-actions\">\n <div class=\"robot-action-item\">\n <kbd>↵</kbd><span>选择</span>\n </div>\n <div class=\"robot-action-item\">\n <kbd>↑↓</kbd><span>导航</span>\n </div>\n <div class=\"robot-action-item\">\n <kbd>esc</kbd><span>关闭</span>\n </div>\n </div>\n <div\n v-if=\"hasContent\"\n class=\"robot-footer-info\"\n >\n <span v-if=\"searchValue.trim() && hasResults\">\n 共 {{ filteredMenuItems.length }} 项结果\n </span>\n <span\n v-else-if=\"!searchValue.trim() && displayHistory.length > 0\"\n >\n {{ displayHistory.length }} 条历史记录\n </span>\n </div>\n </div>\n </div>\n </div>\n </Transition>\n </Teleport>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { useGlobalSearch } from './composables/useGlobalSearch'\n import type { GlobalSearchOptions } from './types'\n\n defineOptions({ name: 'C_GlobalSearch' })\n\n interface Props {\n /** useGlobalSearch 配置(必须传入 menuItems + onSelect) */\n options: GlobalSearchOptions\n /** 搜索框 placeholder */\n placeholder?: string\n /** 无内容提示文字 */\n emptyText?: string\n /** 结果分组标题 */\n resultGroupTitle?: string\n }\n\n const props = withDefaults(defineProps<Props>(), {\n placeholder: '搜索导航菜单...',\n emptyText: '输入关键词搜索菜单',\n resultGroupTitle: '菜单导航',\n })\n\n const {\n showDialog,\n searchValue,\n selectedIndex,\n searchInputRef,\n isDark,\n filteredMenuItems,\n displayHistory,\n hasResults,\n hasContent,\n getItemClasses,\n highlightMatch,\n formatMenuPath,\n clearHistory,\n removeHistoryItem,\n openDialog,\n closeDialog,\n selectHistoryItem,\n selectItem,\n handleEnter,\n focusNext,\n focusPrev,\n } = useGlobalSearch(props.options)\n\n defineExpose({ openDialog, closeDialog })\n</script>\n\n<style lang=\"scss\" scoped>\n @use './index.scss';\n</style>\n","<!--\n * @Description: 全局搜索组件 - 命令面板式搜索\n * @Migration: naive-ui-components 组件库迁移版本\n * Copyright (c) 2025 by CHENY, All Rights Reserved.\n-->\n<template>\n <div class=\"robot-search-palette\">\n <!-- 搜索触发按钮 -->\n <div\n class=\"robot-search-trigger\"\n :class=\"{ 'trigger-dark': isDark }\"\n @click=\"openDialog\"\n >\n <div class=\"i-mdi:search robot-trigger-icon\" />\n <span class=\"robot-trigger-text\">搜索</span>\n <span class=\"robot-trigger-shortcut\">Ctrl K</span>\n </div>\n\n <!-- 搜索对话框 -->\n <Teleport to=\"body\">\n <Transition name=\"robot-dialog\">\n <div\n v-if=\"showDialog\"\n class=\"robot-dialog-overlay\"\n @click=\"closeDialog\"\n @keydown.esc=\"closeDialog\"\n >\n <div\n class=\"robot-dialog-container\"\n :class=\"{ 'dialog-dark': isDark }\"\n @click.stop\n >\n <!-- 搜索头部 -->\n <div class=\"robot-search-header\">\n <div class=\"i-mdi:magnify robot-search-icon\" />\n <input\n ref=\"searchInputRef\"\n v-model=\"searchValue\"\n type=\"text\"\n :placeholder=\"placeholder\"\n class=\"robot-search-input\"\n @keydown.esc=\"closeDialog\"\n @keydown.enter=\"handleEnter\"\n @keydown.arrow-down=\"focusNext\"\n @keydown.arrow-up=\"focusPrev\"\n />\n <button\n class=\"robot-close-btn\"\n @click=\"closeDialog\"\n >\n <div class=\"i-mdi:close\" />\n </button>\n </div>\n\n <!-- 搜索内容 -->\n <div class=\"robot-search-content\">\n <!-- 空状态 -->\n <div\n v-if=\"!hasContent\"\n class=\"robot-empty-state\"\n >\n <div class=\"i-mdi:magnify robot-empty-icon\" />\n <p>{{ emptyText }}</p>\n </div>\n\n <!-- 搜索历史 -->\n <template\n v-else-if=\"!searchValue.trim() && displayHistory.length > 0\"\n >\n <div class=\"robot-search-results\">\n <div class=\"robot-result-group\">\n <div class=\"robot-group-title\">\n <div\n class=\"i-mdi:clock-time-four-outline robot-group-icon\"\n />\n 最近搜索\n <span class=\"robot-group-count\">{{\n displayHistory.length\n }}</span>\n <button\n class=\"robot-clear-history\"\n @click=\"clearHistory\"\n title=\"清空历史\"\n >\n <div class=\"i-mdi:delete-outline\" />\n </button>\n </div>\n <div class=\"robot-group-items\">\n <div\n v-for=\"(historyItem, index) in displayHistory\"\n :key=\"`history-${index}`\"\n :class=\"getItemClasses(index, true)\"\n @click=\"selectHistoryItem(historyItem)\"\n @mouseenter=\"selectedIndex = index\"\n >\n <component\n v-if=\"historyItem.menuItem?.icon\"\n :is=\"historyItem.menuItem.icon\"\n class=\"robot-item-icon\"\n />\n <div\n v-else\n class=\"robot-item-icon robot-default-icon\"\n >\n <div class=\"i-mdi:file-document-outline\" />\n </div>\n <div class=\"robot-item-content\">\n <div class=\"robot-item-label\">\n {{ historyItem.query }}\n </div>\n <div class=\"robot-item-desc\">\n {{\n formatMenuPath(historyItem.menuItem?.key || '')\n }}\n </div>\n </div>\n <button\n class=\"robot-history-delete\"\n @click.stop=\"removeHistoryItem(index)\"\n title=\"删除此记录\"\n >\n <div class=\"i-mdi:close\" />\n </button>\n </div>\n </div>\n </div>\n </div>\n </template>\n\n <!-- 搜索结果 -->\n <template v-else-if=\"searchValue.trim()\">\n <div class=\"robot-search-results\">\n <!-- 无结果状态 -->\n <div\n v-if=\"!hasResults\"\n class=\"robot-empty-state\"\n >\n <div class=\"i-mdi:magnify robot-empty-icon\" />\n <p>未找到 \"{{ searchValue }}\" 相关内容</p>\n </div>\n\n <!-- 搜索结果列表 -->\n <div\n v-else\n class=\"robot-result-group\"\n >\n <div class=\"robot-group-title\">\n <div class=\"i-mdi:menu robot-group-icon\" />\n {{ resultGroupTitle }}\n <span class=\"robot-group-count\">{{\n filteredMenuItems.length\n }}</span>\n </div>\n <div class=\"robot-group-items\">\n <div\n v-for=\"(item, index) in filteredMenuItems\"\n :key=\"item.key\"\n :class=\"getItemClasses(index, false)\"\n @click=\"selectItem(item)\"\n @mouseenter=\"selectedIndex = index\"\n >\n <component\n v-if=\"item.icon\"\n :is=\"item.icon\"\n class=\"robot-item-icon\"\n />\n <div\n v-else\n class=\"robot-item-icon robot-default-icon\"\n >\n <div class=\"i-mdi:file-document-outline\" />\n </div>\n <div class=\"robot-item-content\">\n <div\n class=\"robot-item-label\"\n v-html=\"highlightMatch(item.label, searchValue)\"\n ></div>\n <div class=\"robot-item-desc\">\n {{ formatMenuPath(item.key) }}\n </div>\n </div>\n <div\n v-if=\"item.children?.length\"\n class=\"robot-item-badge\"\n >\n {{ item.children.length }}\n </div>\n </div>\n </div>\n </div>\n </div>\n </template>\n </div>\n\n <!-- 搜索底部 -->\n <div class=\"robot-search-footer\">\n <div class=\"robot-footer-actions\">\n <div class=\"robot-action-item\">\n <kbd>↵</kbd><span>选择</span>\n </div>\n <div class=\"robot-action-item\">\n <kbd>↑↓</kbd><span>导航</span>\n </div>\n <div class=\"robot-action-item\">\n <kbd>esc</kbd><span>关闭</span>\n </div>\n </div>\n <div\n v-if=\"hasContent\"\n class=\"robot-footer-info\"\n >\n <span v-if=\"searchValue.trim() && hasResults\">\n 共 {{ filteredMenuItems.length }} 项结果\n </span>\n <span\n v-else-if=\"!searchValue.trim() && displayHistory.length > 0\"\n >\n {{ displayHistory.length }} 条历史记录\n </span>\n </div>\n </div>\n </div>\n </div>\n </Transition>\n </Teleport>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { useGlobalSearch } from './composables/useGlobalSearch'\n import type { GlobalSearchOptions } from './types'\n\n defineOptions({ name: 'C_GlobalSearch' })\n\n interface Props {\n /** useGlobalSearch 配置(必须传入 menuItems + onSelect) */\n options: GlobalSearchOptions\n /** 搜索框 placeholder */\n placeholder?: string\n /** 无内容提示文字 */\n emptyText?: string\n /** 结果分组标题 */\n resultGroupTitle?: string\n }\n\n const props = withDefaults(defineProps<Props>(), {\n placeholder: '搜索导航菜单...',\n emptyText: '输入关键词搜索菜单',\n resultGroupTitle: '菜单导航',\n })\n\n const {\n showDialog,\n searchValue,\n selectedIndex,\n searchInputRef,\n isDark,\n filteredMenuItems,\n displayHistory,\n hasResults,\n hasContent,\n getItemClasses,\n highlightMatch,\n formatMenuPath,\n clearHistory,\n removeHistoryItem,\n openDialog,\n closeDialog,\n selectHistoryItem,\n selectItem,\n handleEnter,\n focusNext,\n focusPrev,\n } = useGlobalSearch(props.options)\n\n defineExpose({ openDialog, closeDialog })\n</script>\n\n<style lang=\"scss\" scoped>\n @use './index.scss';\n</style>\n"],"mappings":";;;;;;;;;;AASA,SAAgB,gBAAgB,SAA8B;CAC5D,MAAM,EACJ,WAAW,cACX,QAAQ,WACR,UACA,aAAa,wBACb,aAAa,IACb,oBAAoB,MAClB;CAGJ,MAAM,aAAa,IAAI,MAAM;CAC7B,MAAM,cA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AAT,KAAE;OAEvB,mBAEM,OAAA,EAFD,OAAM,qBAAmB,EAAA,CAC5B,mBAAc,OAAA,MAAT,MAAG,EAAM,mBAAe,QAAA,MAAT,KAAE;eAIlB,MAAA,WAAU,iBADlB,mBAYM,OAZN,aAYM,CARQ,MAAA,YAAW,CAAC,MAAI,IAAM,MAAA,WAAU,iBAA5C,mBAEO,QAAA,aAFuC,QAC1C,gBAAG,MAAA,kBAAiB,CAAC,OAAM,GAAG,SAClC,EAAA,KAEc,MAAA,YAAW,CAAC,MAAI,IAAM,MAAA,eAAc,CAAC,SAAM,kBADzD,mBAIO,QAAA,aAAA,gBADF,MAAA,eAAc,CAAC,OAAM,GAAG,WAC7B,EAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"C_Markdown-
|
|
1
|
+
{"version":3,"file":"C_Markdown-C2uiBVSW.css","names":[],"sources":["../src/components/C_Markdown/index.vue?vue&type=style&index=0&scoped=545f0ea7&lang.scss"],"sourcesContent":["/* unplugin-vue-components disabled *//* C_Markdown 组件样式文件 */\n.c-markdown-wrapper[data-v-545f0ea7] {\n position: relative;\n}\n.c-markdown-wrapper[data-v-545f0ea7] .v-md-editor {\n border-radius: 6px;\n border: 1px solid var(--c-border);\n background-color: var(--c-bg-card);\n /* 禁用状态样式 */\n}\n.c-markdown-wrapper[data-v-545f0ea7] .v-md-editor:hover {\n border-color: var(--c-primary);\n}\n.c-markdown-wrapper[data-v-545f0ea7] .v-md-editor:focus-within {\n border-color: var(--c-primary);\n box-shadow: 0 0 0 2px var(--c-primary-opacity, rgba(24, 160, 88, 0.2));\n}\n.c-markdown-wrapper[data-v-545f0ea7] .v-md-editor.disabled {\n background-color: var(--c-bg-disabled, #fafafc);\n cursor: not-allowed;\n}\n.c-markdown-wrapper[data-v-545f0ea7] .v-md-editor.disabled .v-md-editor__editor {\n cursor: not-allowed;\n}\n.c-markdown-wrapper[data-v-545f0ea7] .v-md-editor .v-md-editor__toolbar {\n background-color: var(--c-bg-card);\n border-bottom: 1px solid var(--c-border);\n}\n.c-markdown-wrapper[data-v-545f0ea7] .v-md-editor .v-md-editor__editor-wrapper {\n background-color: var(--c-bg-card);\n}\n.c-markdown-wrapper[data-v-545f0ea7] .v-md-editor .v-md-editor__editor {\n background-color: var(--c-bg-card);\n color: var(--c-text-1);\n}\n.c-markdown-wrapper[data-v-545f0ea7] .v-md-editor .v-md-editor__editor textarea {\n color: var(--c-text-1);\n caret-color: var(--c-text-1);\n}\n.c-markdown-wrapper[data-v-545f0ea7] .v-md-editor .v-md-editor__preview-wrapper {\n background-color: var(--c-bg-card);\n}\n.c-markdown-wrapper[data-v-545f0ea7] .v-md-editor .v-md-editor__preview {\n background-color: var(--c-bg-card);\n color: var(--c-text-1);\n}\n.c-markdown-wrapper[data-v-545f0ea7] .v-md-editor .v-md-editor__toc-nav-wrapper {\n background-color: var(--c-bg-card);\n border-left: 1px solid var(--c-border);\n}\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__toolbar-item {\n color: #ffffff;\n}\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__toolbar-item:hover {\n background-color: rgba(255, 255, 255, 0.08);\n}\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__toolbar-item.is-active {\n background-color: rgba(255, 255, 255, 0.12);\n}\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__toolbar-item svg {\n fill: #ffffff;\n opacity: 0.9;\n}\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__toolbar-item:hover svg {\n opacity: 1;\n}\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__toolbar-right .v-md-editor__toolbar-item {\n background-color: transparent;\n}\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__toolbar-right .v-md-editor__toolbar-item svg {\n fill: #ffffff;\n}\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__toolbar-right .v-md-editor__toolbar-item:hover {\n background-color: rgba(255, 255, 255, 0.08);\n}\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__toolbar-divider {\n background-color: var(--c-border);\n}\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__editor::-webkit-scrollbar,\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__preview::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__editor::-webkit-scrollbar-track,\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__preview::-webkit-scrollbar-track {\n background-color: rgba(255, 255, 255, 0.05);\n}\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__editor::-webkit-scrollbar-thumb,\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__preview::-webkit-scrollbar-thumb {\n background-color: rgba(255, 255, 255, 0.2);\n border-radius: 4px;\n}\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__editor::-webkit-scrollbar-thumb:hover,\n.c-markdown-wrapper.is-dark[data-v-545f0ea7] .v-md-editor .v-md-editor__preview::-webkit-scrollbar-thumb:hover {\n background-color: rgba(255, 255, 255, 0.3);\n}\n.c-markdown-wrapper .word-count[data-v-545f0ea7] {\n position: absolute;\n bottom: 8px;\n right: 12px;\n font-size: 12px;\n color: var(--c-text-4);\n background: var(--c-bg-card);\n padding: 2px 6px;\n border-radius: 4px;\n z-index: 10;\n}\n.c-markdown-wrapper .word-count.exceed[data-v-545f0ea7] {\n color: var(--c-error);\n}"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
package/dist/C_Markdown2.js
CHANGED
|
@@ -179,7 +179,7 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
179
179
|
|
|
180
180
|
//#endregion
|
|
181
181
|
//#region src/components/C_Markdown/index.vue
|
|
182
|
-
var C_Markdown_default = /* @__PURE__ */ export_helper_default(index_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
182
|
+
var C_Markdown_default = /* @__PURE__ */ export_helper_default(index_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-545f0ea7"]]);
|
|
183
183
|
|
|
184
184
|
//#endregion
|
|
185
185
|
export { C_Markdown_default as t };
|