@robot-admin/naive-ui-components 0.13.2 → 0.13.5
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 +20 -0
- package/dist/C_ActionBar.css +75 -63
- package/dist/C_ActionBar2.cjs +1 -1
- package/dist/C_ActionBar2.js +1 -1
- package/dist/C_AntV.css +249 -79
- package/dist/C_AntV2.cjs +3 -3
- package/dist/C_AntV2.js +2 -2
- package/dist/C_AudioPlayer.css +88 -76
- package/dist/C_AudioPlayer2.cjs +1 -1
- package/dist/C_AudioPlayer2.js +1 -1
- package/dist/C_AvatarGroup.css +32 -28
- package/dist/C_AvatarGroup2.cjs +1 -1
- package/dist/C_AvatarGroup2.js +1 -1
- package/dist/C_Breadcrumb.css +35 -17
- package/dist/C_Breadcrumb2.cjs +1 -1
- package/dist/C_Breadcrumb2.js +1 -1
- package/dist/C_Captcha.css +66 -53
- package/dist/C_Captcha2.cjs +1 -1
- package/dist/C_Captcha2.js +1 -1
- package/dist/C_Cascade.css +6 -2
- package/dist/C_Cascade2.cjs +1 -1
- package/dist/C_Cascade2.js +1 -1
- package/dist/C_Chat.css +40 -33
- package/dist/C_City.css +37 -32
- package/dist/C_City2.cjs +1 -1
- package/dist/C_City2.js +1 -1
- package/dist/C_Code.css +53 -40
- package/dist/C_Code2.cjs +1 -1
- package/dist/C_Code2.js +1 -1
- package/dist/C_CollapsePanel.css +68 -55
- package/dist/C_CollapsePanel2.cjs +1 -1
- package/dist/C_CollapsePanel2.js +1 -1
- package/dist/C_ContextMenu.css +68 -26
- package/dist/C_ContextMenu2.cjs +1 -1
- package/dist/C_ContextMenu2.js +1 -1
- package/dist/C_Cron.css +95 -68
- package/dist/C_Cron2.cjs +1 -1
- package/dist/C_Cron2.js +1 -1
- package/dist/C_Date.css +8 -1
- package/dist/C_Date2.cjs +1 -1
- package/dist/C_Date2.js +1 -1
- package/dist/C_Draggable.css +60 -51
- package/dist/C_Draggable2.cjs +1 -1
- package/dist/C_Draggable2.js +1 -1
- package/dist/C_Editor.css +23 -15
- package/dist/C_Editor2.cjs +1 -1
- package/dist/C_Editor2.js +1 -1
- package/dist/C_FilePreview.css +200 -90
- package/dist/C_FilePreview2.cjs +1 -1
- package/dist/C_FilePreview2.js +1 -1
- package/dist/C_Form.base.css +284 -224
- package/dist/C_Form.css +307 -239
- package/dist/C_Form2.cjs +1 -1
- package/dist/C_Form2.js +1 -1
- package/dist/C_FormModal.css +18 -8
- package/dist/C_FormModal2.cjs +1 -1
- package/dist/C_FormModal2.js +1 -1
- package/dist/C_FormSearch.css +58 -45
- package/dist/C_FormSearch2.cjs +1 -1
- package/dist/C_FormSearch2.js +1 -1
- package/dist/C_FormulaEditor.css +62 -37
- package/dist/C_FormulaEditor2.cjs +1 -1
- package/dist/C_FormulaEditor2.js +1 -1
- package/dist/C_FullCalendar.css +16 -3
- package/dist/C_FullCalendar2.cjs +1 -1
- package/dist/C_FullCalendar2.js +1 -1
- package/dist/C_GlobalSearch.css +121 -112
- package/dist/C_GlobalSearch2.cjs +1 -1
- package/dist/C_GlobalSearch2.js +1 -1
- package/dist/C_Guide.css +30 -18
- package/dist/C_Guide2.cjs +1 -1
- package/dist/C_Guide2.js +1 -1
- package/dist/C_Icon.css +24 -17
- package/dist/C_Icon2.cjs +1 -1
- package/dist/C_Icon2.js +1 -1
- package/dist/C_ImageCropper.css +39 -22
- package/dist/C_ImageCropper2.cjs +1 -1
- package/dist/C_ImageCropper2.js +1 -1
- package/dist/C_Language.css +30 -17
- package/dist/C_Language2.cjs +1 -1
- package/dist/C_Language2.js +1 -1
- package/dist/C_Login.css +162 -137
- package/dist/C_Login2.cjs +1 -1
- package/dist/C_Login2.js +1 -1
- package/dist/C_Map.css +25 -4
- package/dist/C_Map2.cjs +1 -1
- package/dist/C_Map2.js +1 -1
- package/dist/C_Markdown.css +47 -42
- package/dist/C_Markdown2.cjs +1 -1
- package/dist/C_Markdown2.js +1 -1
- package/dist/C_Menu.css +7 -1
- package/dist/C_Menu2.cjs +1 -1
- package/dist/C_Menu2.js +1 -1
- package/dist/C_NotificationCenter.css +134 -90
- package/dist/C_NotificationCenter2.cjs +1 -1
- package/dist/C_NotificationCenter2.js +1 -1
- package/dist/C_OrgChart.css +10 -0
- package/dist/C_OrgChart2.cjs +1 -1
- package/dist/C_OrgChart2.js +1 -1
- package/dist/C_QRCode.css +12 -8
- package/dist/C_QRCode2.cjs +1 -1
- package/dist/C_QRCode2.js +1 -1
- package/dist/C_Signature.css +18 -14
- package/dist/C_Signature2.cjs +1 -1
- package/dist/C_Signature2.js +1 -1
- package/dist/C_Skeleton.css +5 -0
- package/dist/C_Skeleton2.cjs +1 -1
- package/dist/C_Skeleton2.js +1 -1
- package/dist/C_SplitPane.css +61 -39
- package/dist/C_SplitPane2.cjs +1 -1
- package/dist/C_SplitPane2.js +1 -1
- package/dist/C_Steps.css +42 -38
- package/dist/C_Steps2.cjs +1 -1
- package/dist/C_Steps2.js +1 -1
- package/dist/C_Table.base.css +465 -352
- package/dist/C_Table.css +488 -367
- package/dist/C_TagsView.css +93 -55
- package/dist/C_TagsView2.cjs +1 -1
- package/dist/C_TagsView2.js +1 -1
- package/dist/C_Theme.css +24 -17
- package/dist/C_Timeline.css +47 -36
- package/dist/C_Transfer.css +86 -67
- package/dist/C_Transfer2.cjs +1 -1
- package/dist/C_Transfer2.js +1 -1
- package/dist/C_Tree.css +48 -33
- package/dist/C_Tree2.cjs +1 -1
- package/dist/C_Tree2.js +1 -1
- package/dist/C_Upload.css +104 -51
- package/dist/C_Upload2.cjs +1 -1
- package/dist/C_Upload2.js +1 -1
- package/dist/C_VideoPlayer.css +140 -69
- package/dist/C_VideoPlayer2.cjs +1 -1
- package/dist/C_VideoPlayer2.js +1 -1
- package/dist/C_VtableGantt.css +42 -19
- package/dist/C_VtableGantt2.cjs +1 -1
- package/dist/C_VtableGantt2.js +1 -1
- package/dist/C_WaterFall.css +32 -16
- package/dist/C_WaterFall2.cjs +1 -1
- package/dist/C_WaterFall2.js +1 -1
- package/dist/C_WorkFlow.css +332 -221
- package/dist/C_WorkFlow2.cjs +1 -1
- package/dist/C_WorkFlow2.js +1 -1
- package/dist/constants.d.cts +5 -5
- package/dist/constants.d.ts +5 -5
- package/dist/constants2.d.cts +5 -5
- package/dist/constants2.d.ts +5 -5
- package/dist/constants3.d.cts +3 -3
- package/dist/constants3.d.ts +3 -3
- package/dist/constants4.d.cts +6 -6
- package/dist/constants4.d.ts +6 -6
- package/dist/data.d.cts +9 -9
- package/dist/data.d.ts +9 -9
- package/dist/data2.cjs +1 -1
- package/dist/data2.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 +2 -2
- package/dist/index10.vue.d.ts +3 -3
- package/dist/index11.vue.d.cts +3 -3
- package/dist/index11.vue.d.ts +6 -6
- package/dist/index12.vue.d.cts +6 -6
- package/dist/index13.vue.d.ts +3 -3
- package/dist/index14.vue.d.cts +3 -3
- package/dist/index14.vue.d.ts +16 -14
- package/dist/index15.vue.d.cts +16 -14
- package/dist/index15.vue.d.ts +3 -3
- package/dist/index16.vue.d.cts +3 -3
- package/dist/index16.vue.d.ts +1 -1
- package/dist/index17.vue.d.cts +1 -1
- package/dist/index17.vue.d.ts +6 -6
- package/dist/index18.vue.d.cts +6 -6
- package/dist/index19.vue.d.cts +1 -1
- package/dist/index19.vue.d.ts +1 -1
- package/dist/index2.vue.d.cts +2 -2
- package/dist/index2.vue.d.ts +2 -2
- package/dist/index20.vue.d.cts +1 -1
- package/dist/index20.vue.d.ts +1 -1
- package/dist/index22.vue.d.cts +1 -1
- package/dist/index22.vue.d.ts +1 -1
- package/dist/index24.vue.d.cts +4 -4
- package/dist/index24.vue.d.ts +4 -4
- package/dist/index26.vue.d.cts +4 -4
- package/dist/index26.vue.d.ts +4 -4
- package/dist/index27.vue.d.cts +4 -4
- package/dist/index27.vue.d.ts +4 -4
- package/dist/index3.vue.d.cts +5 -5
- package/dist/index3.vue.d.ts +5 -5
- package/dist/index5.vue.d.ts +2 -2
- package/dist/index6.vue.d.cts +2 -2
- package/dist/index6.vue.d.ts +2 -2
- package/dist/index7.vue.d.cts +2 -2
- package/dist/index7.vue.d.ts +2 -2
- package/dist/index8.vue.d.cts +2 -2
- package/dist/index8.vue.d.ts +1 -1
- package/dist/index9.vue.d.cts +1 -1
- package/dist/index9.vue.d.ts +2 -2
- package/dist/mapUtils.d.cts +2 -2
- package/dist/mapUtils.d.ts +2 -2
- package/dist/presets.d.cts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/style.css +3083 -1982
- package/dist/useCalendarEvents.d.cts +1 -1
- package/dist/useCalendarEvents.d.ts +1 -1
- package/dist/useCollapsePanel.d.cts +2 -2
- package/dist/useCollapsePanel.d.ts +2 -2
- package/dist/useCropperCore.d.cts +5 -5
- package/dist/useCropperCore.d.ts +5 -5
- package/dist/useDraggableLayout.d.cts +5 -5
- package/dist/useDraggableLayout.d.ts +5 -5
- package/dist/useDynamicFormState.d.cts +2 -2
- package/dist/useDynamicFormState.d.ts +2 -2
- package/dist/useEdgeInteraction.d.cts +2 -2
- package/dist/useEdgeInteraction.d.ts +2 -2
- package/dist/useFullscreen.d.cts +2 -2
- package/dist/useFullscreen.d.ts +2 -2
- package/dist/useQRCode.d.cts +5 -5
- package/dist/useQRCode.d.ts +5 -5
- package/dist/useSearchState.d.cts +27 -27
- package/dist/useSearchState.d.ts +27 -27
- package/dist/useSignatureHistory.d.cts +6 -6
- package/dist/useSignatureHistory.d.ts +6 -6
- package/dist/useSplitResize.d.cts +8 -8
- package/dist/useSplitResize.d.ts +8 -8
- package/dist/useTableQuery.cjs +1 -1
- package/dist/useTableQuery.js +1 -1
- package/dist/useTimeSelection.d.cts +5 -5
- package/dist/useTimeSelection.d.ts +5 -5
- package/dist/useTreeOperations.d.cts +5 -5
- package/dist/useTreeOperations.d.ts +5 -5
- package/dist/useWorkflowValidation.d.cts +7 -7
- package/dist/useWorkflowValidation.d.ts +7 -7
- package/dist/verification.d.cts +3 -3
- package/dist/verification.d.ts +3 -3
- package/package.json +8 -1
package/dist/C_GlobalSearch2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk.cjs`);const e=require(`./export-helper.cjs`);let t=require(`vue`);function n(e){let{menuItems:n,isDark:r,onSelect:i,storageKey:a=`robot-search-history`,maxHistory:o=10,maxDisplayHistory:s=5}=e,c=Math.min(100,Math.max(0,Math.trunc(o))),l=Math.min(c,Math.max(0,Math.trunc(s))),u=(0,t.ref)(!1),d=(0,t.ref)(``),f=(0,t.ref)(0),p=(0,t.ref)(),m=(0,t.ref)([]),h=(0,t.computed)(()=>r?.()??!1),g=(0,t.computed)(()=>{if(!d.value.trim())return[];let e=d.value.toLowerCase();return n().filter(t=>t.label.toLowerCase().includes(e)||S(t.key).toLowerCase().includes(e))}),_=(0,t.computed)(()=>m.value.slice(0,l)),v=(0,t.computed)(()=>g.value.length>0),y=(0,t.computed)(()=>v.value||_.value.length>0),b=(e,t)=>[`robot-result-item`,t&&`robot-history-item`,{"robot-result-item-selected":f.value===e}],x=(e,t)=>{if(!t)return[{text:e,matched:!1}];let n=RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)})`,`gi`);return e.split(n).filter(Boolean).map(e=>({text:e,matched:e.toLocaleLowerCase()===t.toLocaleLowerCase()}))},S=e=>e.replace(/^\//,``).replace(/\//g,` > `)||`首页`,C=()=>{if(!(typeof localStorage>`u`))try{let e=m.value.map(e=>({query:e.query,menuKey:e.menuItem?.key??null,timestamp:e.timestamp}));localStorage.setItem(a,JSON.stringify(e))}catch{}},w=e=>{if(!e.label.trim())return;let t=e.label,n=m.value.filter(n=>!(n.query===t&&n.menuItem?.key===e.key));m.value=[{query:t,menuItem:e,timestamp:Date.now()},...n].slice(0,c),C()},T=()=>{if(!(typeof localStorage>`u`))try{let e=localStorage.getItem(a);if(e){let t=JSON.parse(e);if(!Array.isArray(t))return;let r=new Map(n().map(e=>[e.key,e]));m.value=t.flatMap(e=>{if(typeof e==`string`)return[{query:e.slice(0,200),menuItem:null,timestamp:0}];if(!e||typeof e!=`object`)return[];let t=e,n=typeof t.query==`string`?t.query:``;if(!n.trim())return[];let i=t.menuItem&&typeof t.menuItem==`object`?t.menuItem:null,a=typeof t.menuKey==`string`?t.menuKey:typeof i?.key==`string`?i.key:``;return[{query:n.slice(0,200),menuItem:r.get(a)??null,timestamp:typeof t.timestamp==`number`&&Number.isFinite(t.timestamp)?t.timestamp:0}]}).slice(0,c)}}catch{m.value=[]}},E=()=>{if(m.value=[],!(typeof localStorage>`u`))try{localStorage.removeItem(a)}catch{}},D=e=>{m.value.splice(e,1),C(),f.value>=m.value.length&&(f.value=Math.max(0,m.value.length-1))},O=async()=>{u.value=!0,d.value=``,f.value=0,await(0,t.nextTick)(),p.value?.focus()},k=()=>{u.value=!1,d.value=``,f.value=0},A=e=>{if(e.menuItem){let t=!!e.menuItem.children?.length;i?.(e.menuItem.key,t),k()}else d.value=e.query,f.value=0},j=e=>{w(e);let t=!!e.children?.length;i?.(e.key,t),k()},M=()=>{let e=!d.value.trim()&&_.value.length>0,t=d.value.trim()&&g.value.length>0;if(e){let e=_.value[f.value];e&&A(e)}else if(t){let e=g.value[f.value];e&&j(e)}},N=()=>{let e=d.value.trim()?g.value.length-1:_.value.length-1;f.value=Math.min(f.value+1,e)},P=()=>{f.value=Math.max(f.value-1,0)};(0,t.watch)(d,()=>{f.value=0});let F=e=>{e.defaultPrevented||(e.ctrlKey||e.metaKey)&&e.key===`k`&&(e.preventDefault(),O())};return(0,t.onMounted)(()=>{T(),document.addEventListener(`keydown`,F)}),(0,t.onUnmounted)(()=>document.removeEventListener(`keydown`,F)),{showDialog:u,searchValue:d,selectedIndex:f,searchInputRef:p,isDark:h,filteredMenuItems:g,displayHistory:_,hasResults:v,hasContent:y,getItemClasses:b,highlightMatch:x,formatMenuPath:S,clearHistory:E,removeHistoryItem:D,openDialog:O,closeDialog:k,selectHistoryItem:A,selectItem:j,handleEnter:M,focusNext:N,focusPrev:P}}const r={class:`robot-search-palette`},i={class:`robot-search-header`},a=[`placeholder`],o={class:`robot-search-content`},s={key:0,class:`robot-empty-state`},c={class:`robot-search-results`},l={class:`robot-result-group`},u={class:`robot-group-title`},d={class:`robot-group-count`},f={class:`robot-group-items`},p=[`onClick`,`onMouseenter`],m={key:1,class:`robot-item-icon robot-default-icon`},h={class:`robot-item-content`},g={class:`robot-item-label`},_={class:`robot-item-desc`},v=[`onClick`],y={class:`robot-search-results`},b={key:0,class:`robot-empty-state`},x={class:`robot-result-group`},S={class:`robot-group-title`},C={class:`robot-group-count`},w={class:`robot-group-items`},T=[`onClick`,`onMouseenter`],E={key:1,class:`robot-item-icon robot-default-icon`},D={class:`robot-item-content`},O={class:`robot-item-label`},k={key:0,class:`robot-highlight`},A={class:`robot-item-desc`},j={key:2,class:`robot-item-badge`},M={class:`robot-search-footer`},N={key:0,class:`robot-footer-info`},P={key:0},F={key:1},I=(0,t.defineComponent)({name:`C_GlobalSearch`,__name:`index`,props:{options:{},placeholder:{default:`搜索导航菜单...`},emptyText:{default:`输入关键词搜索菜单`},resultGroupTitle:{default:`菜单导航`}},setup(e,{expose:I}){let{showDialog:L,searchValue:R,selectedIndex:z,searchInputRef:B,isDark:V,filteredMenuItems:H,displayHistory:U,hasResults:W,hasContent:G,getItemClasses:K,highlightMatch:ee,formatMenuPath:q,clearHistory:J,removeHistoryItem:te,openDialog:Y,closeDialog:X,selectHistoryItem:ne,selectItem:re,handleEnter:Z,focusNext:Q,focusPrev:$}=n(e.options);return I({openDialog:Y,closeDialog:X}),(n,I)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,r,[(0,t.createCommentVNode)(` 搜索触发按钮 `),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`robot-search-trigger`,{"trigger-dark":(0,t.unref)(V)}]),onClick:I[0]||=(...e)=>(0,t.unref)(Y)&&(0,t.unref)(Y)(...e)},[...I[11]||=[(0,t.createElementVNode)(`div`,{class:`i-mdi:search robot-trigger-icon`},null,-1),(0,t.createElementVNode)(`span`,{class:`robot-trigger-text`},`搜索`,-1),(0,t.createElementVNode)(`span`,{class:`robot-trigger-shortcut`},`Ctrl K`,-1)]],2),(0,t.createCommentVNode)(` 搜索对话框 `),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createVNode)(t.Transition,{name:`robot-dialog`},{default:(0,t.withCtx)(()=>[(0,t.unref)(L)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`robot-dialog-overlay`,onClick:I[9]||=(...e)=>(0,t.unref)(X)&&(0,t.unref)(X)(...e),onKeydown:I[10]||=(0,t.withKeys)((...e)=>(0,t.unref)(X)&&(0,t.unref)(X)(...e),[`esc`])},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`robot-dialog-container`,{"dialog-dark":(0,t.unref)(V)}]),onClick:I[8]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createCommentVNode)(` 搜索头部 `),(0,t.createElementVNode)(`div`,i,[I[13]||=(0,t.createElementVNode)(`div`,{class:`i-mdi:magnify robot-search-icon`},null,-1),(0,t.withDirectives)((0,t.createElementVNode)(`input`,{ref_key:`searchInputRef`,ref:B,"onUpdate:modelValue":I[1]||=e=>(0,t.isRef)(R)?R.value=e:null,type:`text`,placeholder:e.placeholder,class:`robot-search-input`,onKeydown:[I[2]||=(0,t.withKeys)((...e)=>(0,t.unref)(X)&&(0,t.unref)(X)(...e),[`esc`]),I[3]||=(0,t.withKeys)((...e)=>(0,t.unref)(Z)&&(0,t.unref)(Z)(...e),[`enter`]),I[4]||=(0,t.withKeys)((...e)=>(0,t.unref)(Q)&&(0,t.unref)(Q)(...e),[`arrow-down`]),I[5]||=(0,t.withKeys)((...e)=>(0,t.unref)($)&&(0,t.unref)($)(...e),[`arrow-up`])]},null,40,a),[[t.vModelText,(0,t.unref)(R)]]),(0,t.createElementVNode)(`button`,{class:`robot-close-btn`,onClick:I[6]||=(...e)=>(0,t.unref)(X)&&(0,t.unref)(X)(...e)},[...I[12]||=[(0,t.createElementVNode)(`div`,{class:`i-mdi:close`},null,-1)]])]),(0,t.createCommentVNode)(` 搜索内容 `),(0,t.createElementVNode)(`div`,o,[(0,t.createCommentVNode)(` 空状态 `),(0,t.unref)(G)?!(0,t.unref)(R).trim()&&(0,t.unref)(U).length>0?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createCommentVNode)(` 搜索历史 `),(0,t.createElementVNode)(`div`,c,[(0,t.createElementVNode)(`div`,l,[(0,t.createElementVNode)(`div`,u,[I[16]||=(0,t.createElementVNode)(`div`,{class:`i-mdi:clock-time-four-outline robot-group-icon`},null,-1),I[17]||=(0,t.createTextVNode)(` 最近搜索 `,-1),(0,t.createElementVNode)(`span`,d,(0,t.toDisplayString)((0,t.unref)(U).length),1),(0,t.createElementVNode)(`button`,{class:`robot-clear-history`,onClick:I[7]||=(...e)=>(0,t.unref)(J)&&(0,t.unref)(J)(...e),title:`清空历史`},[...I[15]||=[(0,t.createElementVNode)(`div`,{class:`i-mdi:delete-outline`},null,-1)]])]),(0,t.createElementVNode)(`div`,f,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(U),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:`history-${n}`,class:(0,t.normalizeClass)((0,t.unref)(K)(n,!0)),onClick:n=>(0,t.unref)(ne)(e),onMouseenter:e=>z.value=n},[e.menuItem?.icon?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.menuItem.icon),{key:0,class:`robot-item-icon`})):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,m,[...I[18]||=[(0,t.createElementVNode)(`div`,{class:`i-mdi:file-document-outline`},null,-1)]])),(0,t.createElementVNode)(`div`,h,[(0,t.createElementVNode)(`div`,g,(0,t.toDisplayString)(e.query),1),(0,t.createElementVNode)(`div`,_,(0,t.toDisplayString)((0,t.unref)(q)(e.menuItem?.key||``)),1)]),(0,t.createElementVNode)(`button`,{class:`robot-history-delete`,onClick:(0,t.withModifiers)(e=>(0,t.unref)(te)(n),[`stop`]),title:`删除此记录`},[...I[19]||=[(0,t.createElementVNode)(`div`,{class:`i-mdi:close`},null,-1)]],8,v)],42,p))),128))])])])],64)):(0,t.unref)(R).trim()?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:2},[(0,t.createCommentVNode)(` 搜索结果 `),(0,t.createElementVNode)(`div`,y,[(0,t.createCommentVNode)(` 无结果状态 `),(0,t.unref)(W)?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createCommentVNode)(` 搜索结果列表 `),(0,t.createElementVNode)(`div`,x,[(0,t.createElementVNode)(`div`,S,[I[21]||=(0,t.createElementVNode)(`div`,{class:`i-mdi:menu robot-group-icon`},null,-1),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(e.resultGroupTitle)+` `,1),(0,t.createElementVNode)(`span`,C,(0,t.toDisplayString)((0,t.unref)(H).length),1)]),(0,t.createElementVNode)(`div`,w,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(H),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e.key,class:(0,t.normalizeClass)((0,t.unref)(K)(n,!1)),onClick:n=>(0,t.unref)(re)(e),onMouseenter:e=>z.value=n},[e.icon?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.icon),{key:0,class:`robot-item-icon`})):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,E,[...I[22]||=[(0,t.createElementVNode)(`div`,{class:`i-mdi:file-document-outline`},null,-1)]])),(0,t.createElementVNode)(`div`,D,[(0,t.createElementVNode)(`div`,O,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(ee)(e.label,(0,t.unref)(R)),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:n},[e.matched?((0,t.openBlock)(),(0,t.createElementBlock)(`mark`,k,(0,t.toDisplayString)(e.text),1)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(e.text),1)],64))],64))),128))]),(0,t.createElementVNode)(`div`,A,(0,t.toDisplayString)((0,t.unref)(q)(e.key)),1)]),e.children?.length?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,j,(0,t.toDisplayString)(e.children.length),1)):(0,t.createCommentVNode)(`v-if`,!0)],42,T))),128))])])],2112)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,b,[I[20]||=(0,t.createElementVNode)(`div`,{class:`i-mdi:magnify robot-empty-icon`},null,-1),(0,t.createElementVNode)(`p`,null,`未找到 "`+(0,t.toDisplayString)((0,t.unref)(R))+`" 相关内容`,1)]))])],64)):(0,t.createCommentVNode)(`v-if`,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,s,[I[14]||=(0,t.createElementVNode)(`div`,{class:`i-mdi:magnify robot-empty-icon`},null,-1),(0,t.createElementVNode)(`p`,null,(0,t.toDisplayString)(e.emptyText),1)]))]),(0,t.createCommentVNode)(` 搜索底部 `),(0,t.createElementVNode)(`div`,M,[I[23]||=(0,t.createElementVNode)(`div`,{class:`robot-footer-actions`},[(0,t.createElementVNode)(`div`,{class:`robot-action-item`},[(0,t.createElementVNode)(`kbd`,null,`↵`),(0,t.createElementVNode)(`span`,null,`选择`)]),(0,t.createElementVNode)(`div`,{class:`robot-action-item`},[(0,t.createElementVNode)(`kbd`,null,`↑↓`),(0,t.createElementVNode)(`span`,null,`导航`)]),(0,t.createElementVNode)(`div`,{class:`robot-action-item`},[(0,t.createElementVNode)(`kbd`,null,`esc`),(0,t.createElementVNode)(`span`,null,`关闭`)])],-1),(0,t.unref)(G)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,N,[(0,t.unref)(R).trim()&&(0,t.unref)(W)?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,P,` 共 `+(0,t.toDisplayString)((0,t.unref)(H).length)+` 项结果 `,1)):!(0,t.unref)(R).trim()&&(0,t.unref)(U).length>0?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,F,(0,t.toDisplayString)((0,t.unref)(U).length)+` 条历史记录 `,1)):(0,t.createCommentVNode)(`v-if`,!0)])):(0,t.createCommentVNode)(`v-if`,!0)])],2)],32)):(0,t.createCommentVNode)(`v-if`,!0)]),_:1})]))]))}});var L=e.t(I,[[`__scopeId`,`data-v-85c98271`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return L}});
|
|
1
|
+
require(`./chunk.cjs`);const e=require(`./export-helper.cjs`);let t=require(`vue`);function n(e){let{menuItems:n,isDark:r,onSelect:i,storageKey:a=`robot-search-history`,maxHistory:o=10,maxDisplayHistory:s=5}=e,c=Math.min(100,Math.max(0,Math.trunc(o))),l=Math.min(c,Math.max(0,Math.trunc(s))),u=(0,t.ref)(!1),d=(0,t.ref)(``),f=(0,t.ref)(0),p=(0,t.ref)(),m=(0,t.ref)([]),h=(0,t.computed)(()=>r?.()??!1),g=(0,t.computed)(()=>{if(!d.value.trim())return[];let e=d.value.toLowerCase();return n().filter(t=>t.label.toLowerCase().includes(e)||S(t.key).toLowerCase().includes(e))}),_=(0,t.computed)(()=>m.value.slice(0,l)),v=(0,t.computed)(()=>g.value.length>0),y=(0,t.computed)(()=>v.value||_.value.length>0),b=(e,t)=>[`robot-result-item`,t&&`robot-history-item`,{"robot-result-item-selected":f.value===e}],x=(e,t)=>{if(!t)return[{text:e,matched:!1}];let n=RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)})`,`gi`);return e.split(n).filter(Boolean).map(e=>({text:e,matched:e.toLocaleLowerCase()===t.toLocaleLowerCase()}))},S=e=>e.replace(/^\//,``).replace(/\//g,` > `)||`首页`,C=()=>{if(!(typeof localStorage>`u`))try{let e=m.value.map(e=>({query:e.query,menuKey:e.menuItem?.key??null,timestamp:e.timestamp}));localStorage.setItem(a,JSON.stringify(e))}catch{}},w=e=>{if(!e.label.trim())return;let t=e.label,n=m.value.filter(n=>!(n.query===t&&n.menuItem?.key===e.key));m.value=[{query:t,menuItem:e,timestamp:Date.now()},...n].slice(0,c),C()},T=()=>{if(!(typeof localStorage>`u`))try{let e=localStorage.getItem(a);if(e){let t=JSON.parse(e);if(!Array.isArray(t))return;let r=new Map(n().map(e=>[e.key,e]));m.value=t.flatMap(e=>{if(typeof e==`string`)return[{query:e.slice(0,200),menuItem:null,timestamp:0}];if(!e||typeof e!=`object`)return[];let t=e,n=typeof t.query==`string`?t.query:``;if(!n.trim())return[];let i=t.menuItem&&typeof t.menuItem==`object`?t.menuItem:null,a=typeof t.menuKey==`string`?t.menuKey:typeof i?.key==`string`?i.key:``;return[{query:n.slice(0,200),menuItem:r.get(a)??null,timestamp:typeof t.timestamp==`number`&&Number.isFinite(t.timestamp)?t.timestamp:0}]}).slice(0,c)}}catch{m.value=[]}},E=()=>{if(m.value=[],!(typeof localStorage>`u`))try{localStorage.removeItem(a)}catch{}},D=e=>{m.value.splice(e,1),C(),f.value>=m.value.length&&(f.value=Math.max(0,m.value.length-1))},O=async()=>{u.value=!0,d.value=``,f.value=0,await(0,t.nextTick)(),p.value?.focus()},k=()=>{u.value=!1,d.value=``,f.value=0},A=e=>{if(e.menuItem){let t=!!e.menuItem.children?.length;i?.(e.menuItem.key,t),k()}else d.value=e.query,f.value=0},j=e=>{w(e);let t=!!e.children?.length;i?.(e.key,t),k()},M=()=>{let e=!d.value.trim()&&_.value.length>0,t=d.value.trim()&&g.value.length>0;if(e){let e=_.value[f.value];e&&A(e)}else if(t){let e=g.value[f.value];e&&j(e)}},N=()=>{let e=d.value.trim()?g.value.length-1:_.value.length-1;f.value=Math.min(f.value+1,e)},P=()=>{f.value=Math.max(f.value-1,0)};(0,t.watch)(d,()=>{f.value=0});let F=e=>{e.defaultPrevented||(e.ctrlKey||e.metaKey)&&e.key===`k`&&(e.preventDefault(),O())};return(0,t.onMounted)(()=>{T(),document.addEventListener(`keydown`,F)}),(0,t.onUnmounted)(()=>document.removeEventListener(`keydown`,F)),{showDialog:u,searchValue:d,selectedIndex:f,searchInputRef:p,isDark:h,filteredMenuItems:g,displayHistory:_,hasResults:v,hasContent:y,getItemClasses:b,highlightMatch:x,formatMenuPath:S,clearHistory:E,removeHistoryItem:D,openDialog:O,closeDialog:k,selectHistoryItem:A,selectItem:j,handleEnter:M,focusNext:N,focusPrev:P}}const r={class:`robot-search-palette`},i={class:`robot-search-header`},a=[`placeholder`],o={class:`robot-search-content`},s={key:0,class:`robot-empty-state`},c={class:`robot-search-results`},l={class:`robot-result-group`},u={class:`robot-group-title`},d={class:`robot-group-count`},f={class:`robot-group-items`},p=[`onClick`,`onMouseenter`],m={key:1,class:`robot-item-icon robot-default-icon`},h={class:`robot-item-content`},g={class:`robot-item-label`},_={class:`robot-item-desc`},v=[`onClick`],y={class:`robot-search-results`},b={key:0,class:`robot-empty-state`},x={class:`robot-result-group`},S={class:`robot-group-title`},C={class:`robot-group-count`},w={class:`robot-group-items`},T=[`onClick`,`onMouseenter`],E={key:1,class:`robot-item-icon robot-default-icon`},D={class:`robot-item-content`},O={class:`robot-item-label`},k={key:0,class:`robot-highlight`},A={class:`robot-item-desc`},j={key:2,class:`robot-item-badge`},M={class:`robot-search-footer`},N={key:0,class:`robot-footer-info`},P={key:0},F={key:1},I=(0,t.defineComponent)({name:`C_GlobalSearch`,__name:`index`,props:{options:{},placeholder:{default:`搜索导航菜单...`},emptyText:{default:`输入关键词搜索菜单`},resultGroupTitle:{default:`菜单导航`}},setup(e,{expose:I}){let{showDialog:L,searchValue:R,selectedIndex:z,searchInputRef:B,isDark:V,filteredMenuItems:H,displayHistory:U,hasResults:W,hasContent:G,getItemClasses:K,highlightMatch:ee,formatMenuPath:q,clearHistory:J,removeHistoryItem:te,openDialog:Y,closeDialog:X,selectHistoryItem:ne,selectItem:re,handleEnter:Z,focusNext:Q,focusPrev:$}=n(e.options);return I({openDialog:Y,closeDialog:X}),(n,I)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,r,[(0,t.createCommentVNode)(` 搜索触发按钮 `),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`robot-search-trigger`,{"trigger-dark":(0,t.unref)(V)}]),onClick:I[0]||=(...e)=>(0,t.unref)(Y)&&(0,t.unref)(Y)(...e)},[...I[11]||=[(0,t.createElementVNode)(`div`,{class:`i-mdi:search robot-trigger-icon`},null,-1),(0,t.createElementVNode)(`span`,{class:`robot-trigger-text`},`搜索`,-1),(0,t.createElementVNode)(`span`,{class:`robot-trigger-shortcut`},`Ctrl K`,-1)]],2),(0,t.createCommentVNode)(` 搜索对话框 `),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createVNode)(t.Transition,{name:`robot-dialog`},{default:(0,t.withCtx)(()=>[(0,t.unref)(L)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`robot-dialog-overlay`,onClick:I[9]||=(...e)=>(0,t.unref)(X)&&(0,t.unref)(X)(...e),onKeydown:I[10]||=(0,t.withKeys)((...e)=>(0,t.unref)(X)&&(0,t.unref)(X)(...e),[`esc`])},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`robot-dialog-container`,{"dialog-dark":(0,t.unref)(V)}]),onClick:I[8]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.createCommentVNode)(` 搜索头部 `),(0,t.createElementVNode)(`div`,i,[I[13]||=(0,t.createElementVNode)(`div`,{class:`i-mdi:magnify robot-search-icon`},null,-1),(0,t.withDirectives)((0,t.createElementVNode)(`input`,{ref_key:`searchInputRef`,ref:B,"onUpdate:modelValue":I[1]||=e=>(0,t.isRef)(R)?R.value=e:null,type:`text`,placeholder:e.placeholder,class:`robot-search-input`,onKeydown:[I[2]||=(0,t.withKeys)((...e)=>(0,t.unref)(X)&&(0,t.unref)(X)(...e),[`esc`]),I[3]||=(0,t.withKeys)((...e)=>(0,t.unref)(Z)&&(0,t.unref)(Z)(...e),[`enter`]),I[4]||=(0,t.withKeys)((...e)=>(0,t.unref)(Q)&&(0,t.unref)(Q)(...e),[`arrow-down`]),I[5]||=(0,t.withKeys)((...e)=>(0,t.unref)($)&&(0,t.unref)($)(...e),[`arrow-up`])]},null,40,a),[[t.vModelText,(0,t.unref)(R)]]),(0,t.createElementVNode)(`button`,{class:`robot-close-btn`,onClick:I[6]||=(...e)=>(0,t.unref)(X)&&(0,t.unref)(X)(...e)},[...I[12]||=[(0,t.createElementVNode)(`div`,{class:`i-mdi:close`},null,-1)]])]),(0,t.createCommentVNode)(` 搜索内容 `),(0,t.createElementVNode)(`div`,o,[(0,t.createCommentVNode)(` 空状态 `),(0,t.unref)(G)?!(0,t.unref)(R).trim()&&(0,t.unref)(U).length>0?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createCommentVNode)(` 搜索历史 `),(0,t.createElementVNode)(`div`,c,[(0,t.createElementVNode)(`div`,l,[(0,t.createElementVNode)(`div`,u,[I[16]||=(0,t.createElementVNode)(`div`,{class:`i-mdi:clock-time-four-outline robot-group-icon`},null,-1),I[17]||=(0,t.createTextVNode)(` 最近搜索 `,-1),(0,t.createElementVNode)(`span`,d,(0,t.toDisplayString)((0,t.unref)(U).length),1),(0,t.createElementVNode)(`button`,{class:`robot-clear-history`,onClick:I[7]||=(...e)=>(0,t.unref)(J)&&(0,t.unref)(J)(...e),title:`清空历史`},[...I[15]||=[(0,t.createElementVNode)(`div`,{class:`i-mdi:delete-outline`},null,-1)]])]),(0,t.createElementVNode)(`div`,f,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(U),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:`history-${n}`,class:(0,t.normalizeClass)((0,t.unref)(K)(n,!0)),onClick:n=>(0,t.unref)(ne)(e),onMouseenter:e=>z.value=n},[e.menuItem?.icon?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.menuItem.icon),{key:0,class:`robot-item-icon`})):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,m,[...I[18]||=[(0,t.createElementVNode)(`div`,{class:`i-mdi:file-document-outline`},null,-1)]])),(0,t.createElementVNode)(`div`,h,[(0,t.createElementVNode)(`div`,g,(0,t.toDisplayString)(e.query),1),(0,t.createElementVNode)(`div`,_,(0,t.toDisplayString)((0,t.unref)(q)(e.menuItem?.key||``)),1)]),(0,t.createElementVNode)(`button`,{class:`robot-history-delete`,onClick:(0,t.withModifiers)(e=>(0,t.unref)(te)(n),[`stop`]),title:`删除此记录`},[...I[19]||=[(0,t.createElementVNode)(`div`,{class:`i-mdi:close`},null,-1)]],8,v)],42,p))),128))])])])],64)):(0,t.unref)(R).trim()?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:2},[(0,t.createCommentVNode)(` 搜索结果 `),(0,t.createElementVNode)(`div`,y,[(0,t.createCommentVNode)(` 无结果状态 `),(0,t.unref)(W)?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createCommentVNode)(` 搜索结果列表 `),(0,t.createElementVNode)(`div`,x,[(0,t.createElementVNode)(`div`,S,[I[21]||=(0,t.createElementVNode)(`div`,{class:`i-mdi:menu robot-group-icon`},null,-1),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(e.resultGroupTitle)+` `,1),(0,t.createElementVNode)(`span`,C,(0,t.toDisplayString)((0,t.unref)(H).length),1)]),(0,t.createElementVNode)(`div`,w,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(H),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e.key,class:(0,t.normalizeClass)((0,t.unref)(K)(n,!1)),onClick:n=>(0,t.unref)(re)(e),onMouseenter:e=>z.value=n},[e.icon?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.icon),{key:0,class:`robot-item-icon`})):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,E,[...I[22]||=[(0,t.createElementVNode)(`div`,{class:`i-mdi:file-document-outline`},null,-1)]])),(0,t.createElementVNode)(`div`,D,[(0,t.createElementVNode)(`div`,O,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(ee)(e.label,(0,t.unref)(R)),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:n},[e.matched?((0,t.openBlock)(),(0,t.createElementBlock)(`mark`,k,(0,t.toDisplayString)(e.text),1)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(e.text),1)],64))],64))),128))]),(0,t.createElementVNode)(`div`,A,(0,t.toDisplayString)((0,t.unref)(q)(e.key)),1)]),e.children?.length?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,j,(0,t.toDisplayString)(e.children.length),1)):(0,t.createCommentVNode)(`v-if`,!0)],42,T))),128))])])],2112)):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,b,[I[20]||=(0,t.createElementVNode)(`div`,{class:`i-mdi:magnify robot-empty-icon`},null,-1),(0,t.createElementVNode)(`p`,null,`未找到 "`+(0,t.toDisplayString)((0,t.unref)(R))+`" 相关内容`,1)]))])],64)):(0,t.createCommentVNode)(`v-if`,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,s,[I[14]||=(0,t.createElementVNode)(`div`,{class:`i-mdi:magnify robot-empty-icon`},null,-1),(0,t.createElementVNode)(`p`,null,(0,t.toDisplayString)(e.emptyText),1)]))]),(0,t.createCommentVNode)(` 搜索底部 `),(0,t.createElementVNode)(`div`,M,[I[23]||=(0,t.createElementVNode)(`div`,{class:`robot-footer-actions`},[(0,t.createElementVNode)(`div`,{class:`robot-action-item`},[(0,t.createElementVNode)(`kbd`,null,`↵`),(0,t.createElementVNode)(`span`,null,`选择`)]),(0,t.createElementVNode)(`div`,{class:`robot-action-item`},[(0,t.createElementVNode)(`kbd`,null,`↑↓`),(0,t.createElementVNode)(`span`,null,`导航`)]),(0,t.createElementVNode)(`div`,{class:`robot-action-item`},[(0,t.createElementVNode)(`kbd`,null,`esc`),(0,t.createElementVNode)(`span`,null,`关闭`)])],-1),(0,t.unref)(G)?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,N,[(0,t.unref)(R).trim()&&(0,t.unref)(W)?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,P,` 共 `+(0,t.toDisplayString)((0,t.unref)(H).length)+` 项结果 `,1)):!(0,t.unref)(R).trim()&&(0,t.unref)(U).length>0?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,F,(0,t.toDisplayString)((0,t.unref)(U).length)+` 条历史记录 `,1)):(0,t.createCommentVNode)(`v-if`,!0)])):(0,t.createCommentVNode)(`v-if`,!0)])],2)],32)):(0,t.createCommentVNode)(`v-if`,!0)]),_:1})]))]))}});var L=e.t(I,[[`__scopeId`,`data-v-88dfb808`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return L}});
|
package/dist/C_GlobalSearch2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./export-helper.js";import{Fragment as t,Teleport as n,Transition as r,computed as i,createBlock as a,createCommentVNode as o,createElementBlock as s,createElementVNode as c,createTextVNode as l,createVNode as u,defineComponent as d,isRef as f,nextTick as p,normalizeClass as m,onMounted as h,onUnmounted as g,openBlock as _,ref as v,renderList as y,resolveDynamicComponent as b,toDisplayString as x,unref as S,vModelText as C,watch as w,withCtx as T,withDirectives as E,withKeys as D,withModifiers as O}from"vue";function k(e){let{menuItems:t,isDark:n,onSelect:r,storageKey:a=`robot-search-history`,maxHistory:o=10,maxDisplayHistory:s=5}=e,c=Math.min(100,Math.max(0,Math.trunc(o))),l=Math.min(c,Math.max(0,Math.trunc(s))),u=v(!1),d=v(``),f=v(0),m=v(),_=v([]),y=i(()=>n?.()??!1),b=i(()=>{if(!d.value.trim())return[];let e=d.value.toLowerCase();return t().filter(t=>t.label.toLowerCase().includes(e)||D(t.key).toLowerCase().includes(e))}),x=i(()=>_.value.slice(0,l)),S=i(()=>b.value.length>0),C=i(()=>S.value||x.value.length>0),T=(e,t)=>[`robot-result-item`,t&&`robot-history-item`,{"robot-result-item-selected":f.value===e}],E=(e,t)=>{if(!t)return[{text:e,matched:!1}];let n=RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)})`,`gi`);return e.split(n).filter(Boolean).map(e=>({text:e,matched:e.toLocaleLowerCase()===t.toLocaleLowerCase()}))},D=e=>e.replace(/^\//,``).replace(/\//g,` > `)||`首页`,O=()=>{if(!(typeof localStorage>`u`))try{let e=_.value.map(e=>({query:e.query,menuKey:e.menuItem?.key??null,timestamp:e.timestamp}));localStorage.setItem(a,JSON.stringify(e))}catch{}},k=e=>{if(!e.label.trim())return;let t=e.label,n=_.value.filter(n=>!(n.query===t&&n.menuItem?.key===e.key));_.value=[{query:t,menuItem:e,timestamp:Date.now()},...n].slice(0,c),O()},A=()=>{if(!(typeof localStorage>`u`))try{let e=localStorage.getItem(a);if(e){let n=JSON.parse(e);if(!Array.isArray(n))return;let r=new Map(t().map(e=>[e.key,e]));_.value=n.flatMap(e=>{if(typeof e==`string`)return[{query:e.slice(0,200),menuItem:null,timestamp:0}];if(!e||typeof e!=`object`)return[];let t=e,n=typeof t.query==`string`?t.query:``;if(!n.trim())return[];let i=t.menuItem&&typeof t.menuItem==`object`?t.menuItem:null,a=typeof t.menuKey==`string`?t.menuKey:typeof i?.key==`string`?i.key:``;return[{query:n.slice(0,200),menuItem:r.get(a)??null,timestamp:typeof t.timestamp==`number`&&Number.isFinite(t.timestamp)?t.timestamp:0}]}).slice(0,c)}}catch{_.value=[]}},j=()=>{if(_.value=[],!(typeof localStorage>`u`))try{localStorage.removeItem(a)}catch{}},M=e=>{_.value.splice(e,1),O(),f.value>=_.value.length&&(f.value=Math.max(0,_.value.length-1))},N=async()=>{u.value=!0,d.value=``,f.value=0,await p(),m.value?.focus()},P=()=>{u.value=!1,d.value=``,f.value=0},F=e=>{if(e.menuItem){let t=!!e.menuItem.children?.length;r?.(e.menuItem.key,t),P()}else d.value=e.query,f.value=0},I=e=>{k(e);let t=!!e.children?.length;r?.(e.key,t),P()},L=()=>{let e=!d.value.trim()&&x.value.length>0,t=d.value.trim()&&b.value.length>0;if(e){let e=x.value[f.value];e&&F(e)}else if(t){let e=b.value[f.value];e&&I(e)}},R=()=>{let e=d.value.trim()?b.value.length-1:x.value.length-1;f.value=Math.min(f.value+1,e)},z=()=>{f.value=Math.max(f.value-1,0)};w(d,()=>{f.value=0});let B=e=>{e.defaultPrevented||(e.ctrlKey||e.metaKey)&&e.key===`k`&&(e.preventDefault(),N())};return h(()=>{A(),document.addEventListener(`keydown`,B)}),g(()=>document.removeEventListener(`keydown`,B)),{showDialog:u,searchValue:d,selectedIndex:f,searchInputRef:m,isDark:y,filteredMenuItems:b,displayHistory:x,hasResults:S,hasContent:C,getItemClasses:T,highlightMatch:E,formatMenuPath:D,clearHistory:j,removeHistoryItem:M,openDialog:N,closeDialog:P,selectHistoryItem:F,selectItem:I,handleEnter:L,focusNext:R,focusPrev:z}}const A={class:`robot-search-palette`},j={class:`robot-search-header`},M=[`placeholder`],N={class:`robot-search-content`},P={key:0,class:`robot-empty-state`},F={class:`robot-search-results`},I={class:`robot-result-group`},L={class:`robot-group-title`},R={class:`robot-group-count`},z={class:`robot-group-items`},B=[`onClick`,`onMouseenter`],ee={key:1,class:`robot-item-icon robot-default-icon`},te={class:`robot-item-content`},ne={class:`robot-item-label`},re={class:`robot-item-desc`},ie=[`onClick`],ae={class:`robot-search-results`},oe={key:0,class:`robot-empty-state`},se={class:`robot-result-group`},ce={class:`robot-group-title`},le={class:`robot-group-count`},ue={class:`robot-group-items`},de=[`onClick`,`onMouseenter`],V={key:1,class:`robot-item-icon robot-default-icon`},fe={class:`robot-item-content`},pe={class:`robot-item-label`},me={key:0,class:`robot-highlight`},he={class:`robot-item-desc`},ge={key:2,class:`robot-item-badge`},_e={class:`robot-search-footer`},ve={key:0,class:`robot-footer-info`},ye={key:0},be={key:1};var H=e(d({name:`C_GlobalSearch`,__name:`index`,props:{options:{},placeholder:{default:`搜索导航菜单...`},emptyText:{default:`输入关键词搜索菜单`},resultGroupTitle:{default:`菜单导航`}},setup(e,{expose:i}){let{showDialog:d,searchValue:p,selectedIndex:h,searchInputRef:g,isDark:v,filteredMenuItems:w,displayHistory:H,hasResults:U,hasContent:W,getItemClasses:G,highlightMatch:xe,formatMenuPath:K,clearHistory:q,removeHistoryItem:J,openDialog:Y,closeDialog:X,selectHistoryItem:Se,selectItem:Ce,handleEnter:Z,focusNext:Q,focusPrev:$}=k(e.options);return i({openDialog:Y,closeDialog:X}),(i,k)=>(_(),s(`div`,A,[o(` 搜索触发按钮 `),c(`div`,{class:m([`robot-search-trigger`,{"trigger-dark":S(v)}]),onClick:k[0]||=(...e)=>S(Y)&&S(Y)(...e)},[...k[11]||=[c(`div`,{class:`i-mdi:search robot-trigger-icon`},null,-1),c(`span`,{class:`robot-trigger-text`},`搜索`,-1),c(`span`,{class:`robot-trigger-shortcut`},`Ctrl K`,-1)]],2),o(` 搜索对话框 `),(_(),a(n,{to:`body`},[u(r,{name:`robot-dialog`},{default:T(()=>[S(d)?(_(),s(`div`,{key:0,class:`robot-dialog-overlay`,onClick:k[9]||=(...e)=>S(X)&&S(X)(...e),onKeydown:k[10]||=D((...e)=>S(X)&&S(X)(...e),[`esc`])},[c(`div`,{class:m([`robot-dialog-container`,{"dialog-dark":S(v)}]),onClick:k[8]||=O(()=>{},[`stop`])},[o(` 搜索头部 `),c(`div`,j,[k[13]||=c(`div`,{class:`i-mdi:magnify robot-search-icon`},null,-1),E(c(`input`,{ref_key:`searchInputRef`,ref:g,"onUpdate:modelValue":k[1]||=e=>f(p)?p.value=e:null,type:`text`,placeholder:e.placeholder,class:`robot-search-input`,onKeydown:[k[2]||=D((...e)=>S(X)&&S(X)(...e),[`esc`]),k[3]||=D((...e)=>S(Z)&&S(Z)(...e),[`enter`]),k[4]||=D((...e)=>S(Q)&&S(Q)(...e),[`arrow-down`]),k[5]||=D((...e)=>S($)&&S($)(...e),[`arrow-up`])]},null,40,M),[[C,S(p)]]),c(`button`,{class:`robot-close-btn`,onClick:k[6]||=(...e)=>S(X)&&S(X)(...e)},[...k[12]||=[c(`div`,{class:`i-mdi:close`},null,-1)]])]),o(` 搜索内容 `),c(`div`,N,[o(` 空状态 `),S(W)?!S(p).trim()&&S(H).length>0?(_(),s(t,{key:1},[o(` 搜索历史 `),c(`div`,F,[c(`div`,I,[c(`div`,L,[k[16]||=c(`div`,{class:`i-mdi:clock-time-four-outline robot-group-icon`},null,-1),k[17]||=l(` 最近搜索 `,-1),c(`span`,R,x(S(H).length),1),c(`button`,{class:`robot-clear-history`,onClick:k[7]||=(...e)=>S(q)&&S(q)(...e),title:`清空历史`},[...k[15]||=[c(`div`,{class:`i-mdi:delete-outline`},null,-1)]])]),c(`div`,z,[(_(!0),s(t,null,y(S(H),(e,t)=>(_(),s(`div`,{key:`history-${t}`,class:m(S(G)(t,!0)),onClick:t=>S(Se)(e),onMouseenter:e=>h.value=t},[e.menuItem?.icon?(_(),a(b(e.menuItem.icon),{key:0,class:`robot-item-icon`})):(_(),s(`div`,ee,[...k[18]||=[c(`div`,{class:`i-mdi:file-document-outline`},null,-1)]])),c(`div`,te,[c(`div`,ne,x(e.query),1),c(`div`,re,x(S(K)(e.menuItem?.key||``)),1)]),c(`button`,{class:`robot-history-delete`,onClick:O(e=>S(J)(t),[`stop`]),title:`删除此记录`},[...k[19]||=[c(`div`,{class:`i-mdi:close`},null,-1)]],8,ie)],42,B))),128))])])])],64)):S(p).trim()?(_(),s(t,{key:2},[o(` 搜索结果 `),c(`div`,ae,[o(` 无结果状态 `),S(U)?(_(),s(t,{key:1},[o(` 搜索结果列表 `),c(`div`,se,[c(`div`,ce,[k[21]||=c(`div`,{class:`i-mdi:menu robot-group-icon`},null,-1),l(` `+x(e.resultGroupTitle)+` `,1),c(`span`,le,x(S(w).length),1)]),c(`div`,ue,[(_(!0),s(t,null,y(S(w),(e,n)=>(_(),s(`div`,{key:e.key,class:m(S(G)(n,!1)),onClick:t=>S(Ce)(e),onMouseenter:e=>h.value=n},[e.icon?(_(),a(b(e.icon),{key:0,class:`robot-item-icon`})):(_(),s(`div`,V,[...k[22]||=[c(`div`,{class:`i-mdi:file-document-outline`},null,-1)]])),c(`div`,fe,[c(`div`,pe,[(_(!0),s(t,null,y(S(xe)(e.label,S(p)),(e,n)=>(_(),s(t,{key:n},[e.matched?(_(),s(`mark`,me,x(e.text),1)):(_(),s(t,{key:1},[l(x(e.text),1)],64))],64))),128))]),c(`div`,he,x(S(K)(e.key)),1)]),e.children?.length?(_(),s(`div`,ge,x(e.children.length),1)):o(`v-if`,!0)],42,de))),128))])])],2112)):(_(),s(`div`,oe,[k[20]||=c(`div`,{class:`i-mdi:magnify robot-empty-icon`},null,-1),c(`p`,null,`未找到 "`+x(S(p))+`" 相关内容`,1)]))])],64)):o(`v-if`,!0):(_(),s(`div`,P,[k[14]||=c(`div`,{class:`i-mdi:magnify robot-empty-icon`},null,-1),c(`p`,null,x(e.emptyText),1)]))]),o(` 搜索底部 `),c(`div`,_e,[k[23]||=c(`div`,{class:`robot-footer-actions`},[c(`div`,{class:`robot-action-item`},[c(`kbd`,null,`↵`),c(`span`,null,`选择`)]),c(`div`,{class:`robot-action-item`},[c(`kbd`,null,`↑↓`),c(`span`,null,`导航`)]),c(`div`,{class:`robot-action-item`},[c(`kbd`,null,`esc`),c(`span`,null,`关闭`)])],-1),S(W)?(_(),s(`div`,ve,[S(p).trim()&&S(U)?(_(),s(`span`,ye,` 共 `+x(S(w).length)+` 项结果 `,1)):!S(p).trim()&&S(H).length>0?(_(),s(`span`,be,x(S(H).length)+` 条历史记录 `,1)):o(`v-if`,!0)])):o(`v-if`,!0)])],2)],32)):o(`v-if`,!0)]),_:1})]))]))}}),[[`__scopeId`,`data-v-
|
|
1
|
+
import{t as e}from"./export-helper.js";import{Fragment as t,Teleport as n,Transition as r,computed as i,createBlock as a,createCommentVNode as o,createElementBlock as s,createElementVNode as c,createTextVNode as l,createVNode as u,defineComponent as d,isRef as f,nextTick as p,normalizeClass as m,onMounted as h,onUnmounted as g,openBlock as _,ref as v,renderList as y,resolveDynamicComponent as b,toDisplayString as x,unref as S,vModelText as C,watch as w,withCtx as T,withDirectives as E,withKeys as D,withModifiers as O}from"vue";function k(e){let{menuItems:t,isDark:n,onSelect:r,storageKey:a=`robot-search-history`,maxHistory:o=10,maxDisplayHistory:s=5}=e,c=Math.min(100,Math.max(0,Math.trunc(o))),l=Math.min(c,Math.max(0,Math.trunc(s))),u=v(!1),d=v(``),f=v(0),m=v(),_=v([]),y=i(()=>n?.()??!1),b=i(()=>{if(!d.value.trim())return[];let e=d.value.toLowerCase();return t().filter(t=>t.label.toLowerCase().includes(e)||D(t.key).toLowerCase().includes(e))}),x=i(()=>_.value.slice(0,l)),S=i(()=>b.value.length>0),C=i(()=>S.value||x.value.length>0),T=(e,t)=>[`robot-result-item`,t&&`robot-history-item`,{"robot-result-item-selected":f.value===e}],E=(e,t)=>{if(!t)return[{text:e,matched:!1}];let n=RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)})`,`gi`);return e.split(n).filter(Boolean).map(e=>({text:e,matched:e.toLocaleLowerCase()===t.toLocaleLowerCase()}))},D=e=>e.replace(/^\//,``).replace(/\//g,` > `)||`首页`,O=()=>{if(!(typeof localStorage>`u`))try{let e=_.value.map(e=>({query:e.query,menuKey:e.menuItem?.key??null,timestamp:e.timestamp}));localStorage.setItem(a,JSON.stringify(e))}catch{}},k=e=>{if(!e.label.trim())return;let t=e.label,n=_.value.filter(n=>!(n.query===t&&n.menuItem?.key===e.key));_.value=[{query:t,menuItem:e,timestamp:Date.now()},...n].slice(0,c),O()},A=()=>{if(!(typeof localStorage>`u`))try{let e=localStorage.getItem(a);if(e){let n=JSON.parse(e);if(!Array.isArray(n))return;let r=new Map(t().map(e=>[e.key,e]));_.value=n.flatMap(e=>{if(typeof e==`string`)return[{query:e.slice(0,200),menuItem:null,timestamp:0}];if(!e||typeof e!=`object`)return[];let t=e,n=typeof t.query==`string`?t.query:``;if(!n.trim())return[];let i=t.menuItem&&typeof t.menuItem==`object`?t.menuItem:null,a=typeof t.menuKey==`string`?t.menuKey:typeof i?.key==`string`?i.key:``;return[{query:n.slice(0,200),menuItem:r.get(a)??null,timestamp:typeof t.timestamp==`number`&&Number.isFinite(t.timestamp)?t.timestamp:0}]}).slice(0,c)}}catch{_.value=[]}},j=()=>{if(_.value=[],!(typeof localStorage>`u`))try{localStorage.removeItem(a)}catch{}},M=e=>{_.value.splice(e,1),O(),f.value>=_.value.length&&(f.value=Math.max(0,_.value.length-1))},N=async()=>{u.value=!0,d.value=``,f.value=0,await p(),m.value?.focus()},P=()=>{u.value=!1,d.value=``,f.value=0},F=e=>{if(e.menuItem){let t=!!e.menuItem.children?.length;r?.(e.menuItem.key,t),P()}else d.value=e.query,f.value=0},I=e=>{k(e);let t=!!e.children?.length;r?.(e.key,t),P()},L=()=>{let e=!d.value.trim()&&x.value.length>0,t=d.value.trim()&&b.value.length>0;if(e){let e=x.value[f.value];e&&F(e)}else if(t){let e=b.value[f.value];e&&I(e)}},R=()=>{let e=d.value.trim()?b.value.length-1:x.value.length-1;f.value=Math.min(f.value+1,e)},z=()=>{f.value=Math.max(f.value-1,0)};w(d,()=>{f.value=0});let B=e=>{e.defaultPrevented||(e.ctrlKey||e.metaKey)&&e.key===`k`&&(e.preventDefault(),N())};return h(()=>{A(),document.addEventListener(`keydown`,B)}),g(()=>document.removeEventListener(`keydown`,B)),{showDialog:u,searchValue:d,selectedIndex:f,searchInputRef:m,isDark:y,filteredMenuItems:b,displayHistory:x,hasResults:S,hasContent:C,getItemClasses:T,highlightMatch:E,formatMenuPath:D,clearHistory:j,removeHistoryItem:M,openDialog:N,closeDialog:P,selectHistoryItem:F,selectItem:I,handleEnter:L,focusNext:R,focusPrev:z}}const A={class:`robot-search-palette`},j={class:`robot-search-header`},M=[`placeholder`],N={class:`robot-search-content`},P={key:0,class:`robot-empty-state`},F={class:`robot-search-results`},I={class:`robot-result-group`},L={class:`robot-group-title`},R={class:`robot-group-count`},z={class:`robot-group-items`},B=[`onClick`,`onMouseenter`],ee={key:1,class:`robot-item-icon robot-default-icon`},te={class:`robot-item-content`},ne={class:`robot-item-label`},re={class:`robot-item-desc`},ie=[`onClick`],ae={class:`robot-search-results`},oe={key:0,class:`robot-empty-state`},se={class:`robot-result-group`},ce={class:`robot-group-title`},le={class:`robot-group-count`},ue={class:`robot-group-items`},de=[`onClick`,`onMouseenter`],V={key:1,class:`robot-item-icon robot-default-icon`},fe={class:`robot-item-content`},pe={class:`robot-item-label`},me={key:0,class:`robot-highlight`},he={class:`robot-item-desc`},ge={key:2,class:`robot-item-badge`},_e={class:`robot-search-footer`},ve={key:0,class:`robot-footer-info`},ye={key:0},be={key:1};var H=e(d({name:`C_GlobalSearch`,__name:`index`,props:{options:{},placeholder:{default:`搜索导航菜单...`},emptyText:{default:`输入关键词搜索菜单`},resultGroupTitle:{default:`菜单导航`}},setup(e,{expose:i}){let{showDialog:d,searchValue:p,selectedIndex:h,searchInputRef:g,isDark:v,filteredMenuItems:w,displayHistory:H,hasResults:U,hasContent:W,getItemClasses:G,highlightMatch:xe,formatMenuPath:K,clearHistory:q,removeHistoryItem:J,openDialog:Y,closeDialog:X,selectHistoryItem:Se,selectItem:Ce,handleEnter:Z,focusNext:Q,focusPrev:$}=k(e.options);return i({openDialog:Y,closeDialog:X}),(i,k)=>(_(),s(`div`,A,[o(` 搜索触发按钮 `),c(`div`,{class:m([`robot-search-trigger`,{"trigger-dark":S(v)}]),onClick:k[0]||=(...e)=>S(Y)&&S(Y)(...e)},[...k[11]||=[c(`div`,{class:`i-mdi:search robot-trigger-icon`},null,-1),c(`span`,{class:`robot-trigger-text`},`搜索`,-1),c(`span`,{class:`robot-trigger-shortcut`},`Ctrl K`,-1)]],2),o(` 搜索对话框 `),(_(),a(n,{to:`body`},[u(r,{name:`robot-dialog`},{default:T(()=>[S(d)?(_(),s(`div`,{key:0,class:`robot-dialog-overlay`,onClick:k[9]||=(...e)=>S(X)&&S(X)(...e),onKeydown:k[10]||=D((...e)=>S(X)&&S(X)(...e),[`esc`])},[c(`div`,{class:m([`robot-dialog-container`,{"dialog-dark":S(v)}]),onClick:k[8]||=O(()=>{},[`stop`])},[o(` 搜索头部 `),c(`div`,j,[k[13]||=c(`div`,{class:`i-mdi:magnify robot-search-icon`},null,-1),E(c(`input`,{ref_key:`searchInputRef`,ref:g,"onUpdate:modelValue":k[1]||=e=>f(p)?p.value=e:null,type:`text`,placeholder:e.placeholder,class:`robot-search-input`,onKeydown:[k[2]||=D((...e)=>S(X)&&S(X)(...e),[`esc`]),k[3]||=D((...e)=>S(Z)&&S(Z)(...e),[`enter`]),k[4]||=D((...e)=>S(Q)&&S(Q)(...e),[`arrow-down`]),k[5]||=D((...e)=>S($)&&S($)(...e),[`arrow-up`])]},null,40,M),[[C,S(p)]]),c(`button`,{class:`robot-close-btn`,onClick:k[6]||=(...e)=>S(X)&&S(X)(...e)},[...k[12]||=[c(`div`,{class:`i-mdi:close`},null,-1)]])]),o(` 搜索内容 `),c(`div`,N,[o(` 空状态 `),S(W)?!S(p).trim()&&S(H).length>0?(_(),s(t,{key:1},[o(` 搜索历史 `),c(`div`,F,[c(`div`,I,[c(`div`,L,[k[16]||=c(`div`,{class:`i-mdi:clock-time-four-outline robot-group-icon`},null,-1),k[17]||=l(` 最近搜索 `,-1),c(`span`,R,x(S(H).length),1),c(`button`,{class:`robot-clear-history`,onClick:k[7]||=(...e)=>S(q)&&S(q)(...e),title:`清空历史`},[...k[15]||=[c(`div`,{class:`i-mdi:delete-outline`},null,-1)]])]),c(`div`,z,[(_(!0),s(t,null,y(S(H),(e,t)=>(_(),s(`div`,{key:`history-${t}`,class:m(S(G)(t,!0)),onClick:t=>S(Se)(e),onMouseenter:e=>h.value=t},[e.menuItem?.icon?(_(),a(b(e.menuItem.icon),{key:0,class:`robot-item-icon`})):(_(),s(`div`,ee,[...k[18]||=[c(`div`,{class:`i-mdi:file-document-outline`},null,-1)]])),c(`div`,te,[c(`div`,ne,x(e.query),1),c(`div`,re,x(S(K)(e.menuItem?.key||``)),1)]),c(`button`,{class:`robot-history-delete`,onClick:O(e=>S(J)(t),[`stop`]),title:`删除此记录`},[...k[19]||=[c(`div`,{class:`i-mdi:close`},null,-1)]],8,ie)],42,B))),128))])])])],64)):S(p).trim()?(_(),s(t,{key:2},[o(` 搜索结果 `),c(`div`,ae,[o(` 无结果状态 `),S(U)?(_(),s(t,{key:1},[o(` 搜索结果列表 `),c(`div`,se,[c(`div`,ce,[k[21]||=c(`div`,{class:`i-mdi:menu robot-group-icon`},null,-1),l(` `+x(e.resultGroupTitle)+` `,1),c(`span`,le,x(S(w).length),1)]),c(`div`,ue,[(_(!0),s(t,null,y(S(w),(e,n)=>(_(),s(`div`,{key:e.key,class:m(S(G)(n,!1)),onClick:t=>S(Ce)(e),onMouseenter:e=>h.value=n},[e.icon?(_(),a(b(e.icon),{key:0,class:`robot-item-icon`})):(_(),s(`div`,V,[...k[22]||=[c(`div`,{class:`i-mdi:file-document-outline`},null,-1)]])),c(`div`,fe,[c(`div`,pe,[(_(!0),s(t,null,y(S(xe)(e.label,S(p)),(e,n)=>(_(),s(t,{key:n},[e.matched?(_(),s(`mark`,me,x(e.text),1)):(_(),s(t,{key:1},[l(x(e.text),1)],64))],64))),128))]),c(`div`,he,x(S(K)(e.key)),1)]),e.children?.length?(_(),s(`div`,ge,x(e.children.length),1)):o(`v-if`,!0)],42,de))),128))])])],2112)):(_(),s(`div`,oe,[k[20]||=c(`div`,{class:`i-mdi:magnify robot-empty-icon`},null,-1),c(`p`,null,`未找到 "`+x(S(p))+`" 相关内容`,1)]))])],64)):o(`v-if`,!0):(_(),s(`div`,P,[k[14]||=c(`div`,{class:`i-mdi:magnify robot-empty-icon`},null,-1),c(`p`,null,x(e.emptyText),1)]))]),o(` 搜索底部 `),c(`div`,_e,[k[23]||=c(`div`,{class:`robot-footer-actions`},[c(`div`,{class:`robot-action-item`},[c(`kbd`,null,`↵`),c(`span`,null,`选择`)]),c(`div`,{class:`robot-action-item`},[c(`kbd`,null,`↑↓`),c(`span`,null,`导航`)]),c(`div`,{class:`robot-action-item`},[c(`kbd`,null,`esc`),c(`span`,null,`关闭`)])],-1),S(W)?(_(),s(`div`,ve,[S(p).trim()&&S(U)?(_(),s(`span`,ye,` 共 `+x(S(w).length)+` 项结果 `,1)):!S(p).trim()&&S(H).length>0?(_(),s(`span`,be,x(S(H).length)+` 条历史记录 `,1)):o(`v-if`,!0)])):o(`v-if`,!0)])],2)],32)):o(`v-if`,!0)]),_:1})]))]))}}),[[`__scopeId`,`data-v-88dfb808`]]);export{k as n,H as t};
|
package/dist/C_Guide.css
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
/* unplugin-vue-components disabled */.c-icon[data-v-
|
|
1
|
+
/* unplugin-vue-components disabled */.c-icon[data-v-075758a0] {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
5
|
+
position: relative;
|
|
6
|
+
flex-shrink: 0;
|
|
7
|
+
vertical-align: middle;
|
|
5
8
|
user-select: none;
|
|
6
9
|
transition: all 0.2s ease-in-out;
|
|
7
10
|
}
|
|
8
|
-
.c-icon--clickable[data-v-
|
|
11
|
+
.c-icon--clickable[data-v-075758a0] {
|
|
9
12
|
cursor: pointer;
|
|
10
13
|
}
|
|
11
|
-
.c-icon--clickable[data-v-
|
|
14
|
+
.c-icon--clickable[data-v-075758a0]:hover {
|
|
12
15
|
opacity: 0.8;
|
|
13
16
|
transform: scale(1.05);
|
|
14
17
|
}
|
|
15
|
-
.c-icon--clickable[data-v-
|
|
18
|
+
.c-icon--clickable[data-v-075758a0]:active {
|
|
16
19
|
transform: scale(0.95);
|
|
17
20
|
}
|
|
18
|
-
.c-icon--clickable[data-v-
|
|
21
|
+
.c-icon--clickable[data-v-075758a0]:focus-visible {
|
|
19
22
|
outline: 2px solid currentColor;
|
|
20
23
|
outline-offset: 2px;
|
|
21
24
|
border-radius: 4px;
|
|
22
25
|
}
|
|
23
|
-
.c-icon--loading[data-v-
|
|
26
|
+
.c-icon--loading[data-v-075758a0] {
|
|
24
27
|
opacity: 0.6;
|
|
25
28
|
cursor: wait;
|
|
26
29
|
}
|
|
27
|
-
.c-
|
|
28
|
-
|
|
30
|
+
.c-icon__loading[data-v-075758a0] {
|
|
31
|
+
position: absolute;
|
|
32
|
+
inset: 0;
|
|
29
33
|
}
|
|
30
|
-
.c-
|
|
31
|
-
position: relative;
|
|
32
|
-
}
|
|
33
|
-
.c-icon__spinner[data-v-711aedcd] {
|
|
34
|
+
.c-icon__spinner[data-v-075758a0] {
|
|
34
35
|
width: 100%;
|
|
35
36
|
height: 100%;
|
|
36
37
|
border: 2px solid currentColor;
|
|
37
38
|
border-radius: 50%;
|
|
38
39
|
border-top-color: transparent;
|
|
39
|
-
animation: spin-
|
|
40
|
+
animation: spin-075758a0 1s linear infinite;
|
|
40
41
|
}
|
|
41
|
-
.c-icon__error[data-v-
|
|
42
|
+
.c-icon__error[data-v-075758a0] {
|
|
42
43
|
font-size: 0.8em;
|
|
43
44
|
opacity: 0.5;
|
|
44
45
|
}
|
|
45
|
-
.c-icon__rotatable[data-v-
|
|
46
|
+
.c-icon__rotatable[data-v-075758a0] {
|
|
46
47
|
transition: transform 0.3s ease-in-out;
|
|
47
48
|
}
|
|
48
|
-
.c-icon__flippable[data-v-
|
|
49
|
+
.c-icon__flippable[data-v-075758a0] {
|
|
49
50
|
transition: transform 0.3s ease-in-out;
|
|
50
51
|
}
|
|
51
|
-
@keyframes spin-
|
|
52
|
+
@keyframes spin-075758a0 {
|
|
52
53
|
0% {
|
|
53
54
|
transform: rotate(0deg);
|
|
54
55
|
}
|
|
@@ -56,6 +57,12 @@
|
|
|
56
57
|
transform: rotate(360deg);
|
|
57
58
|
}
|
|
58
59
|
}
|
|
60
|
+
/* unplugin-vue-components disabled */
|
|
61
|
+
/* layer: default */
|
|
62
|
+
.inline-flex[data-v-075758a0]{display:inline-flex;}
|
|
63
|
+
.transform[data-v-075758a0]{transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}
|
|
64
|
+
.px[data-v-075758a0]{padding-left:1rem;padding-right:1rem;}
|
|
65
|
+
|
|
59
66
|
|
|
60
67
|
.driver-popover{all:unset;font-family:var(--driver-popover-font-family,"Helvetica Neue", Inter, ui-sans-serif, "Apple Color Emoji", Helvetica, Arial, sans-serif);box-sizing:border-box;color:#2d2d2d;z-index:1000000000;background-color:#fff;border-radius:5px;min-width:250px;max-width:300px;margin:0;padding:15px;position:fixed;top:0;right:0;box-shadow:0 1px 10px #0006}.driver-popover-title{zoom:1;margin:0;font-size:19px;font-weight:700;line-height:1.5;display:block;position:relative}.driver-popover-close-btn{all:unset;cursor:pointer;color:#d2d2d2;z-index:1;text-align:center;width:32px;height:28px;font-size:18px;font-weight:500;transition:color .2s;position:absolute;top:0;right:0}.driver-popover-close-btn:hover,.driver-popover-close-btn:focus{color:#2d2d2d}.driver-popover-title[style*=block]+.driver-popover-description{margin-top:5px}.driver-popover-description{zoom:1;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.5}.driver-popover-footer{text-align:right;zoom:1;justify-content:space-between;align-items:center;margin-top:15px;display:flex}.driver-popover-progress-text{color:#727272;zoom:1;font-size:13px;font-weight:400}.driver-popover-footer-btn{all:unset;box-sizing:border-box;color:#2d2d2d;cursor:pointer;zoom:1;background-color:#fff;border:1px solid #ccc;border-radius:3px;outline:0;padding:3px 7px;font-size:12px;line-height:1.3;text-decoration:none;display:inline-block}.driver-popover-footer .driver-popover-btn-disabled{opacity:.5;pointer-events:none}.driver-popover-footer-btn:hover,.driver-popover-footer-btn:focus{background-color:#f7f7f7}.driver-popover-navigation-btns{flex-grow:1;justify-content:flex-end;display:flex}.driver-popover-navigation-btns button+button{margin-left:4px}.driver-popover-arrow{content:"";border:5px solid #fff;position:absolute}.driver-popover-arrow-side-over{display:none}.driver-popover-arrow-side-left{border-top-color:#0000;border-bottom-color:#0000;border-right-color:#0000;left:100%}.driver-popover-arrow-side-right{border-top-color:#0000;border-bottom-color:#0000;border-left-color:#0000;right:100%}.driver-popover-arrow-side-top{border-bottom-color:#0000;border-left-color:#0000;border-right-color:#0000;top:100%}.driver-popover-arrow-side-bottom{border-top-color:#0000;border-left-color:#0000;border-right-color:#0000;bottom:100%}.driver-popover-arrow-side-center,.driver-popover-arrow-none{display:none}.driver-active .driver-overlay{pointer-events:none}.driver-active.driver-no-scroll{overflow:hidden}.driver-active *{pointer-events:none}.driver-active .driver-active-element,.driver-active .driver-active-element *,.driver-popover,.driver-popover *{pointer-events:auto}@keyframes animate-fade-in{0%{opacity:0}to{opacity:1}}.driver-fade .driver-overlay{animation:animate-fade-in var(--driver-animation-duration,.4s) ease-in-out}.driver-fade .driver-popover{animation:animate-fade-in var(--driver-animation-duration,.4s)}.driver-active-element-parent-no-scroll{overflow:hidden!important}.driver-no-interaction,.driver-no-interaction *{pointer-events:none!important}
|
|
61
68
|
|
|
@@ -65,7 +72,7 @@
|
|
|
65
72
|
* @Description: 引导入口键盘焦点样式,不依赖宿主样式
|
|
66
73
|
* Copyright (c) 2026 by CHENY, All Rights Reserved 😎.
|
|
67
74
|
*/
|
|
68
|
-
[data-v-
|
|
75
|
+
.c-guide-trigger[data-v-fb8d9f5d]:focus-visible {
|
|
69
76
|
outline: 2px solid var(--c-primary, #2080f0);
|
|
70
77
|
outline-offset: 4px;
|
|
71
78
|
border-radius: 4px;
|
|
@@ -181,3 +188,8 @@
|
|
|
181
188
|
.driver-popover.c-guide-popover .driver-popover-arrow-side-bottom {
|
|
182
189
|
border-bottom-color: var(--c-guide-bg, var(--c-bg-surface, #fff));
|
|
183
190
|
}
|
|
191
|
+
/* unplugin-vue-components disabled */
|
|
192
|
+
/* layer: default */
|
|
193
|
+
.m62[data-v-fb8d9f5d]{margin:15.5rem;}
|
|
194
|
+
.hidden[data-v-fb8d9f5d]{display:none;}
|
|
195
|
+
|
package/dist/C_Guide2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk.cjs`);const e=require(`./C_Icon2.cjs`),t=require(`./export-helper.cjs`);let n=require(`vue`),r=require(`naive-ui`);const i={navigation:`<rect x="34" y="12" width="56" height="72" rx="6" fill="currentColor" opacity=".12"/><path d="M46 30h30M46 48h30M46 66h20"/><rect x="108" y="12" width="118" height="72" rx="6" fill="currentColor" opacity=".07"/><path d="M122 32h64M122 48h90M122 64h74"/>`,search:`<rect x="28" y="26" width="204" height="44" rx="10" fill="currentColor" opacity=".09"/><circle cx="56" cy="46" r="8"/><path d="m62 52 6 6M86 44h104M86 55h70"/>`,tabs:`<rect x="28" y="24" width="204" height="56" rx="6" fill="currentColor" opacity=".07"/><rect x="40" y="16" width="58" height="26" rx="6" fill="currentColor" opacity=".2"/><path d="M50 29h25m10-3 6 6m0-6-6 6M112 29h38M166 29h38M44 56h100M44 67h144"/>`,account:`<circle cx="60" cy="48" r="22" fill="currentColor" opacity=".12"/><circle cx="60" cy="41" r="6"/><path d="M49 60c0-13 22-13 22 0M94 40h40m-8-6 8 6-8 6M94 58h40m-32-6-8 6 8 6"/><rect x="154" y="20" width="62" height="56" rx="6" fill="currentColor" opacity=".09"/><path d="M168 36h34M168 48h34M168 60h22"/>`,overview:`<rect x="28" y="14" width="204" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M42 30h76M42 42h52"/><rect x="42" y="54" width="48" height="16" rx="4"/><rect x="106" y="54" width="48" height="16" rx="4"/><rect x="170" y="54" width="48" height="16" rx="4"/>`,notification:`<circle cx="130" cy="48" r="36" fill="currentColor" opacity=".07"/><path d="M109 63h42l-6-10V40a15 15 0 0 0-30 0v13l-6 10ZM124 71h12"/><circle cx="150" cy="26" r="8" fill="currentColor" opacity=".3"/>`,fullscreen:`<rect x="50" y="14" width="160" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M66 40V28h20M174 28h20v12M66 56v12h20M174 68h20V56"/><rect x="106" y="34" width="48" height="28" rx="4"/>`,language:`<rect x="54" y="18" width="72" height="54" rx="8" fill="currentColor" opacity=".1"/><rect x="134" y="24" width="72" height="54" rx="8" fill="currentColor" opacity=".07"/><path d="M70 34h40M90 27v7M79 34c2 15 9 22 27 28M101 34c-3 15-13 24-28 29M151 64l16-27 16 27M158 53h18"/>`,theme:`<circle cx="78" cy="48" r="15" fill="currentColor" opacity=".12"/><path d="M78 24v-6M78 78v-6M54 48h-6M108 48h-6M61 31l-5-5M100 70l-5-5M61 65l-5 5M100 26l-5 5M168 22a26 26 0 1 0 28 42 26 26 0 0 1-28-42Z"/>`,settings:`<rect x="44" y="14" width="172" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M62 31h136M62 48h136M62 65h136"/><circle cx="94" cy="31" r="5" fill="currentColor"/><circle cx="168" cy="48" r="5" fill="currentColor"/><circle cx="124" cy="65" r="5" fill="currentColor"/>`};function a(e){return e.width>0&&e.height>0&&e.right>0&&e.bottom>0&&e.left<window.innerWidth&&e.top<window.innerHeight}function o(e){if(!(!e||typeof document>`u`))return(typeof e==`string`?Array.from(document.querySelectorAll(e)):[typeof e==`function`?e():e]).find(e=>{if(!e?.isConnected)return!1;let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView?.getComputedStyle(e);return a(t)&&n?.visibility!==`hidden`})}function s(e){let{illustration:t}=e.popover,n=t&&i[t];return n?`<div class="c-guide-figure"><svg viewBox="0 0 260 96" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">${n}</svg></div><div class="c-guide-copy">${e.popover.description}</div>`:e.popover.description}const c=(0,n.defineComponent)({name:`C_Guide`,__name:`index`,props:{steps:{default:()=>[]},doneBtnText:{default:`完成`},nextBtnText:{default:`下一步`},prevBtnText:{default:`上一步`},showSkipButton:{type:Boolean,default:!0},skipBtnText:{default:`跳过引导`},showProgress:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},animate:{type:Boolean,default:!0},allowClose:{type:Boolean,default:!0},skipMissingElements:{type:Boolean,default:!0},theme:{},persistence:{},popoverClass:{default:`driverjs-theme`},showTrigger:{type:Boolean,default:!0},triggerTooltip:{default:`功能引导`},triggerIcon:{default:`mdi:sign-routes`}},emits:[`start`,`complete`,`close`,`skip`,`step-change`,`error`],setup(t,{expose:i,emit:a}){let c=t,l=a,u=(0,r.useThemeVars)(),d=(0,n.ref)(!1),f=(0,n.computed)(()=>`${c.persistence?.keyPrefix??`c_guide`}_completed`),p=null,m,h=0,g=()=>{if(!c.persistence?.enabled)return!1;try{return localStorage.getItem(f.value)===`true`}catch{return!1}},_=()=>{if(c.persistence?.enabled)try{localStorage.setItem(f.value,`true`)}catch{}},v=()=>{try{localStorage.removeItem(f.value)}catch{}},y=()=>{h++,d.value=!1;let e=m;m=void 0,e?.()},b=e=>{let t=c.theme??{},n={"--c-guide-bg":t.popoverBgColor??u.value.popoverColor,"--c-guide-text":t.popoverTextColor??u.value.textColor1,"--c-guide-text-secondary":t.popoverTextColor??u.value.textColor2,"--c-guide-text-muted":u.value.textColor3,"--c-guide-primary":t.primaryColor??u.value.primaryColor,"--c-guide-primary-hover":t.primaryColor??u.value.primaryColorHover,"--c-guide-border":u.value.borderColor,"--c-guide-radius":t.borderRadius??`14px`};for(let[t,r]of Object.entries(n))e.wrapper.style.setProperty(t,r)},x=()=>c.theme?.overlayOpacity===void 0?{}:{overlayOpacity:c.theme.overlayOpacity},S=e=>d.value||!e&&g(),C=async(e=!1)=>{if(S(e))return;y();let t=h;d.value=!0;try{let{driver:e}=await import(`driver.js`);if(t!==h)return;let n=c.steps.filter(e=>!e.skipIf?.()&&(!c.skipMissingElements||!e.element||o(e.element)));if(!n.length)return;let r=`close`,i=0,a=!1,u=!1,d=e=>{e.nextButton.disabled=u,e.previousButton.disabled=u},f=()=>{a||(a=!0,p===S&&(p=null,m=void 0),r===`complete`?(_(),l(`complete`)):r!==`dispose`&&(r===`skip`&&l(`skip`,i),l(`close`,i)))},g=()=>{S.destroy(),f()},v=()=>{u||(S.isLastStep()?(r=`complete`,g()):S.moveNext())},y=x(),S=e({popoverClass:`c-guide-popover ${c.popoverClass}`.trim(),animate:c.animate&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,showProgress:c.showProgress,progressText:`{{current}} / {{total}}`,allowClose:c.allowClose,allowKeyboardControl:c.keyboard,skipMissingElement:c.skipMissingElements,...y,doneBtnText:c.doneBtnText,nextBtnText:c.nextBtnText,prevBtnText:c.prevBtnText,steps:n.map(e=>({element:e.element?()=>o(e.element):void 0,popover:{...e.popover,description:s(e)},onHighlightStarted:(t,n,{state:r})=>{u=!0,i=r.activeIndex??i,e.onHighlightStarted?.(t,e),l(`step-change`,i,e)},onHighlighted:()=>{u=!1;let{popover:e}=S.getState();e&&d(e)},onDeselected:t=>e.onDeselected?.(t,e)})),onPopoverRender:e=>{if(b(e),d(e),c.showSkipButton&&c.allowClose){let t=document.createElement(`button`);t.type=`button`,t.className=`c-guide-skip-btn`,t.textContent=c.skipBtnText,t.addEventListener(`click`,()=>{r=`skip`,g()}),e.footer.prepend(t)}},onNextClick:v,onPrevClick:()=>{u||S.movePrevious()},onDestroyStarted:g,onDestroyed:f});p=S,m=()=>{r=`dispose`,g()},l(`start`),t===h&&S.drive()}catch(e){t===h&&(y(),l(`error`,e))}finally{t===h&&(d.value=!1)}};return(0,n.onBeforeUnmount)(y),(0,n.watch)(()=>c.steps,y),(0,n.watch)([u,()=>c.theme],()=>{let e=p?.getState().popover;e&&b(e)},{deep:!0}),i({startGuide:C,stopGuide:y,resetCompleted:v,isCompleted:g}),(t,i)=>c.showTrigger?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(r.NTooltip),{key:0,placement:`bottom`,trigger:`hover`},{trigger:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(r.NButton),{text:``,loading:d.value,"aria-label":c.triggerTooltip,onClick:i[0]||=e=>C(!0)},{default:(0,n.withCtx)(()=>[(0,n.createVNode)(e.t,{name:c.triggerIcon,size:18},null,8,[`name`])]),_:1},8,[`loading`,`aria-label`])]),default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`span`,null,(0,n.toDisplayString)(c.triggerTooltip),1)]),_:1})):(0,n.createCommentVNode)(`v-if`,!0)}});var l=t.t(c,[[`__scopeId`,`data-v-
|
|
1
|
+
require(`./chunk.cjs`);const e=require(`./C_Icon2.cjs`),t=require(`./export-helper.cjs`);let n=require(`vue`),r=require(`naive-ui`);const i={navigation:`<rect x="34" y="12" width="56" height="72" rx="6" fill="currentColor" opacity=".12"/><path d="M46 30h30M46 48h30M46 66h20"/><rect x="108" y="12" width="118" height="72" rx="6" fill="currentColor" opacity=".07"/><path d="M122 32h64M122 48h90M122 64h74"/>`,search:`<rect x="28" y="26" width="204" height="44" rx="10" fill="currentColor" opacity=".09"/><circle cx="56" cy="46" r="8"/><path d="m62 52 6 6M86 44h104M86 55h70"/>`,tabs:`<rect x="28" y="24" width="204" height="56" rx="6" fill="currentColor" opacity=".07"/><rect x="40" y="16" width="58" height="26" rx="6" fill="currentColor" opacity=".2"/><path d="M50 29h25m10-3 6 6m0-6-6 6M112 29h38M166 29h38M44 56h100M44 67h144"/>`,account:`<circle cx="60" cy="48" r="22" fill="currentColor" opacity=".12"/><circle cx="60" cy="41" r="6"/><path d="M49 60c0-13 22-13 22 0M94 40h40m-8-6 8 6-8 6M94 58h40m-32-6-8 6 8 6"/><rect x="154" y="20" width="62" height="56" rx="6" fill="currentColor" opacity=".09"/><path d="M168 36h34M168 48h34M168 60h22"/>`,overview:`<rect x="28" y="14" width="204" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M42 30h76M42 42h52"/><rect x="42" y="54" width="48" height="16" rx="4"/><rect x="106" y="54" width="48" height="16" rx="4"/><rect x="170" y="54" width="48" height="16" rx="4"/>`,notification:`<circle cx="130" cy="48" r="36" fill="currentColor" opacity=".07"/><path d="M109 63h42l-6-10V40a15 15 0 0 0-30 0v13l-6 10ZM124 71h12"/><circle cx="150" cy="26" r="8" fill="currentColor" opacity=".3"/>`,fullscreen:`<rect x="50" y="14" width="160" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M66 40V28h20M174 28h20v12M66 56v12h20M174 68h20V56"/><rect x="106" y="34" width="48" height="28" rx="4"/>`,language:`<rect x="54" y="18" width="72" height="54" rx="8" fill="currentColor" opacity=".1"/><rect x="134" y="24" width="72" height="54" rx="8" fill="currentColor" opacity=".07"/><path d="M70 34h40M90 27v7M79 34c2 15 9 22 27 28M101 34c-3 15-13 24-28 29M151 64l16-27 16 27M158 53h18"/>`,theme:`<circle cx="78" cy="48" r="15" fill="currentColor" opacity=".12"/><path d="M78 24v-6M78 78v-6M54 48h-6M108 48h-6M61 31l-5-5M100 70l-5-5M61 65l-5 5M100 26l-5 5M168 22a26 26 0 1 0 28 42 26 26 0 0 1-28-42Z"/>`,settings:`<rect x="44" y="14" width="172" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M62 31h136M62 48h136M62 65h136"/><circle cx="94" cy="31" r="5" fill="currentColor"/><circle cx="168" cy="48" r="5" fill="currentColor"/><circle cx="124" cy="65" r="5" fill="currentColor"/>`};function a(e){return e.width>0&&e.height>0&&e.right>0&&e.bottom>0&&e.left<window.innerWidth&&e.top<window.innerHeight}function o(e){if(!(!e||typeof document>`u`))return(typeof e==`string`?Array.from(document.querySelectorAll(e)):[typeof e==`function`?e():e]).find(e=>{if(!e?.isConnected)return!1;let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView?.getComputedStyle(e);return a(t)&&n?.visibility!==`hidden`})}function s(e){let{illustration:t}=e.popover,n=t&&i[t];return n?`<div class="c-guide-figure"><svg viewBox="0 0 260 96" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">${n}</svg></div><div class="c-guide-copy">${e.popover.description}</div>`:e.popover.description}const c=(0,n.defineComponent)({name:`C_Guide`,__name:`index`,props:{steps:{default:()=>[]},doneBtnText:{default:`完成`},nextBtnText:{default:`下一步`},prevBtnText:{default:`上一步`},showSkipButton:{type:Boolean,default:!0},skipBtnText:{default:`跳过引导`},showProgress:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},animate:{type:Boolean,default:!0},allowClose:{type:Boolean,default:!0},skipMissingElements:{type:Boolean,default:!0},theme:{},persistence:{},popoverClass:{default:`driverjs-theme`},showTrigger:{type:Boolean,default:!0},triggerTooltip:{default:`功能引导`},triggerIcon:{default:`mdi:sign-routes`}},emits:[`start`,`complete`,`close`,`skip`,`step-change`,`error`],setup(t,{expose:i,emit:a}){let c=t,l=a,u=(0,r.useThemeVars)(),d=(0,n.ref)(!1),f=(0,n.computed)(()=>`${c.persistence?.keyPrefix??`c_guide`}_completed`),p=null,m,h=0,g=()=>{if(!c.persistence?.enabled)return!1;try{return localStorage.getItem(f.value)===`true`}catch{return!1}},_=()=>{if(c.persistence?.enabled)try{localStorage.setItem(f.value,`true`)}catch{}},v=()=>{try{localStorage.removeItem(f.value)}catch{}},y=()=>{h++,d.value=!1;let e=m;m=void 0,e?.()},b=e=>{let t=c.theme??{},n={"--c-guide-bg":t.popoverBgColor??u.value.popoverColor,"--c-guide-text":t.popoverTextColor??u.value.textColor1,"--c-guide-text-secondary":t.popoverTextColor??u.value.textColor2,"--c-guide-text-muted":u.value.textColor3,"--c-guide-primary":t.primaryColor??u.value.primaryColor,"--c-guide-primary-hover":t.primaryColor??u.value.primaryColorHover,"--c-guide-border":u.value.borderColor,"--c-guide-radius":t.borderRadius??`14px`};for(let[t,r]of Object.entries(n))e.wrapper.style.setProperty(t,r)},x=()=>c.theme?.overlayOpacity===void 0?{}:{overlayOpacity:c.theme.overlayOpacity},S=e=>d.value||!e&&g(),C=async(e=!1)=>{if(S(e))return;y();let t=h;d.value=!0;try{let{driver:e}=await import(`driver.js`);if(t!==h)return;let n=c.steps.filter(e=>!e.skipIf?.()&&(!c.skipMissingElements||!e.element||o(e.element)));if(!n.length)return;let r=`close`,i=0,a=!1,u=!1,d=e=>{e.nextButton.disabled=u,e.previousButton.disabled=u},f=()=>{a||(a=!0,p===S&&(p=null,m=void 0),r===`complete`?(_(),l(`complete`)):r!==`dispose`&&(r===`skip`&&l(`skip`,i),l(`close`,i)))},g=()=>{S.destroy(),f()},v=()=>{u||(S.isLastStep()?(r=`complete`,g()):S.moveNext())},y=x(),S=e({popoverClass:`c-guide-popover ${c.popoverClass}`.trim(),animate:c.animate&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,showProgress:c.showProgress,progressText:`{{current}} / {{total}}`,allowClose:c.allowClose,allowKeyboardControl:c.keyboard,skipMissingElement:c.skipMissingElements,...y,doneBtnText:c.doneBtnText,nextBtnText:c.nextBtnText,prevBtnText:c.prevBtnText,steps:n.map(e=>({element:e.element?()=>o(e.element):void 0,popover:{...e.popover,description:s(e)},onHighlightStarted:(t,n,{state:r})=>{u=!0,i=r.activeIndex??i,e.onHighlightStarted?.(t,e),l(`step-change`,i,e)},onHighlighted:()=>{u=!1;let{popover:e}=S.getState();e&&d(e)},onDeselected:t=>e.onDeselected?.(t,e)})),onPopoverRender:e=>{if(b(e),d(e),c.showSkipButton&&c.allowClose){let t=document.createElement(`button`);t.type=`button`,t.className=`c-guide-skip-btn`,t.textContent=c.skipBtnText,t.addEventListener(`click`,()=>{r=`skip`,g()}),e.footer.prepend(t)}},onNextClick:v,onPrevClick:()=>{u||S.movePrevious()},onDestroyStarted:g,onDestroyed:f});p=S,m=()=>{r=`dispose`,g()},l(`start`),t===h&&S.drive()}catch(e){t===h&&(y(),l(`error`,e))}finally{t===h&&(d.value=!1)}};return(0,n.onBeforeUnmount)(y),(0,n.watch)(()=>c.steps,y),(0,n.watch)([u,()=>c.theme],()=>{let e=p?.getState().popover;e&&b(e)},{deep:!0}),i({startGuide:C,stopGuide:y,resetCompleted:v,isCompleted:g}),(t,i)=>c.showTrigger?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(r.NTooltip),{key:0,placement:`bottom`,trigger:`hover`},{trigger:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(r.NButton),{class:`c-guide-trigger`,text:``,loading:d.value,"aria-label":c.triggerTooltip,onClick:i[0]||=e=>C(!0)},{default:(0,n.withCtx)(()=>[(0,n.createVNode)(e.t,{name:c.triggerIcon,size:18},null,8,[`name`])]),_:1},8,[`loading`,`aria-label`])]),default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`span`,null,(0,n.toDisplayString)(c.triggerTooltip),1)]),_:1})):(0,n.createCommentVNode)(`v-if`,!0)}});var l=t.t(c,[[`__scopeId`,`data-v-fb8d9f5d`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
|
package/dist/C_Guide2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./C_Icon2.js";import{t}from"./export-helper.js";import{computed as n,createBlock as r,createCommentVNode as i,createElementVNode as a,createVNode as o,defineComponent as s,onBeforeUnmount as c,openBlock as l,ref as u,toDisplayString as d,unref as f,watch as p,withCtx as m}from"vue";import{NButton as h,NTooltip as g,useThemeVars as _}from"naive-ui";const v={navigation:`<rect x="34" y="12" width="56" height="72" rx="6" fill="currentColor" opacity=".12"/><path d="M46 30h30M46 48h30M46 66h20"/><rect x="108" y="12" width="118" height="72" rx="6" fill="currentColor" opacity=".07"/><path d="M122 32h64M122 48h90M122 64h74"/>`,search:`<rect x="28" y="26" width="204" height="44" rx="10" fill="currentColor" opacity=".09"/><circle cx="56" cy="46" r="8"/><path d="m62 52 6 6M86 44h104M86 55h70"/>`,tabs:`<rect x="28" y="24" width="204" height="56" rx="6" fill="currentColor" opacity=".07"/><rect x="40" y="16" width="58" height="26" rx="6" fill="currentColor" opacity=".2"/><path d="M50 29h25m10-3 6 6m0-6-6 6M112 29h38M166 29h38M44 56h100M44 67h144"/>`,account:`<circle cx="60" cy="48" r="22" fill="currentColor" opacity=".12"/><circle cx="60" cy="41" r="6"/><path d="M49 60c0-13 22-13 22 0M94 40h40m-8-6 8 6-8 6M94 58h40m-32-6-8 6 8 6"/><rect x="154" y="20" width="62" height="56" rx="6" fill="currentColor" opacity=".09"/><path d="M168 36h34M168 48h34M168 60h22"/>`,overview:`<rect x="28" y="14" width="204" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M42 30h76M42 42h52"/><rect x="42" y="54" width="48" height="16" rx="4"/><rect x="106" y="54" width="48" height="16" rx="4"/><rect x="170" y="54" width="48" height="16" rx="4"/>`,notification:`<circle cx="130" cy="48" r="36" fill="currentColor" opacity=".07"/><path d="M109 63h42l-6-10V40a15 15 0 0 0-30 0v13l-6 10ZM124 71h12"/><circle cx="150" cy="26" r="8" fill="currentColor" opacity=".3"/>`,fullscreen:`<rect x="50" y="14" width="160" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M66 40V28h20M174 28h20v12M66 56v12h20M174 68h20V56"/><rect x="106" y="34" width="48" height="28" rx="4"/>`,language:`<rect x="54" y="18" width="72" height="54" rx="8" fill="currentColor" opacity=".1"/><rect x="134" y="24" width="72" height="54" rx="8" fill="currentColor" opacity=".07"/><path d="M70 34h40M90 27v7M79 34c2 15 9 22 27 28M101 34c-3 15-13 24-28 29M151 64l16-27 16 27M158 53h18"/>`,theme:`<circle cx="78" cy="48" r="15" fill="currentColor" opacity=".12"/><path d="M78 24v-6M78 78v-6M54 48h-6M108 48h-6M61 31l-5-5M100 70l-5-5M61 65l-5 5M100 26l-5 5M168 22a26 26 0 1 0 28 42 26 26 0 0 1-28-42Z"/>`,settings:`<rect x="44" y="14" width="172" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M62 31h136M62 48h136M62 65h136"/><circle cx="94" cy="31" r="5" fill="currentColor"/><circle cx="168" cy="48" r="5" fill="currentColor"/><circle cx="124" cy="65" r="5" fill="currentColor"/>`};function y(e){return e.width>0&&e.height>0&&e.right>0&&e.bottom>0&&e.left<window.innerWidth&&e.top<window.innerHeight}function b(e){if(!(!e||typeof document>`u`))return(typeof e==`string`?Array.from(document.querySelectorAll(e)):[typeof e==`function`?e():e]).find(e=>{if(!e?.isConnected)return!1;let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView?.getComputedStyle(e);return y(t)&&n?.visibility!==`hidden`})}function x(e){let{illustration:t}=e.popover,n=t&&v[t];return n?`<div class="c-guide-figure"><svg viewBox="0 0 260 96" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">${n}</svg></div><div class="c-guide-copy">${e.popover.description}</div>`:e.popover.description}var S=t(s({name:`C_Guide`,__name:`index`,props:{steps:{default:()=>[]},doneBtnText:{default:`完成`},nextBtnText:{default:`下一步`},prevBtnText:{default:`上一步`},showSkipButton:{type:Boolean,default:!0},skipBtnText:{default:`跳过引导`},showProgress:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},animate:{type:Boolean,default:!0},allowClose:{type:Boolean,default:!0},skipMissingElements:{type:Boolean,default:!0},theme:{},persistence:{},popoverClass:{default:`driverjs-theme`},showTrigger:{type:Boolean,default:!0},triggerTooltip:{default:`功能引导`},triggerIcon:{default:`mdi:sign-routes`}},emits:[`start`,`complete`,`close`,`skip`,`step-change`,`error`],setup(t,{expose:s,emit:v}){let y=t,S=v,C=_(),w=u(!1),T=n(()=>`${y.persistence?.keyPrefix??`c_guide`}_completed`),E=null,D,O=0,k=()=>{if(!y.persistence?.enabled)return!1;try{return localStorage.getItem(T.value)===`true`}catch{return!1}},A=()=>{if(y.persistence?.enabled)try{localStorage.setItem(T.value,`true`)}catch{}},j=()=>{try{localStorage.removeItem(T.value)}catch{}},M=()=>{O++,w.value=!1;let e=D;D=void 0,e?.()},N=e=>{let t=y.theme??{},n={"--c-guide-bg":t.popoverBgColor??C.value.popoverColor,"--c-guide-text":t.popoverTextColor??C.value.textColor1,"--c-guide-text-secondary":t.popoverTextColor??C.value.textColor2,"--c-guide-text-muted":C.value.textColor3,"--c-guide-primary":t.primaryColor??C.value.primaryColor,"--c-guide-primary-hover":t.primaryColor??C.value.primaryColorHover,"--c-guide-border":C.value.borderColor,"--c-guide-radius":t.borderRadius??`14px`};for(let[t,r]of Object.entries(n))e.wrapper.style.setProperty(t,r)},P=()=>y.theme?.overlayOpacity===void 0?{}:{overlayOpacity:y.theme.overlayOpacity},F=e=>w.value||!e&&k(),I=async(e=!1)=>{if(F(e))return;M();let t=O;w.value=!0;try{let{driver:e}=await import(`driver.js`);if(t!==O)return;let n=y.steps.filter(e=>!e.skipIf?.()&&(!y.skipMissingElements||!e.element||b(e.element)));if(!n.length)return;let r=`close`,i=0,a=!1,o=!1,s=e=>{e.nextButton.disabled=o,e.previousButton.disabled=o},c=()=>{a||(a=!0,E===f&&(E=null,D=void 0),r===`complete`?(A(),S(`complete`)):r!==`dispose`&&(r===`skip`&&S(`skip`,i),S(`close`,i)))},l=()=>{f.destroy(),c()},u=()=>{o||(f.isLastStep()?(r=`complete`,l()):f.moveNext())},d=P(),f=e({popoverClass:`c-guide-popover ${y.popoverClass}`.trim(),animate:y.animate&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,showProgress:y.showProgress,progressText:`{{current}} / {{total}}`,allowClose:y.allowClose,allowKeyboardControl:y.keyboard,skipMissingElement:y.skipMissingElements,...d,doneBtnText:y.doneBtnText,nextBtnText:y.nextBtnText,prevBtnText:y.prevBtnText,steps:n.map(e=>({element:e.element?()=>b(e.element):void 0,popover:{...e.popover,description:x(e)},onHighlightStarted:(t,n,{state:r})=>{o=!0,i=r.activeIndex??i,e.onHighlightStarted?.(t,e),S(`step-change`,i,e)},onHighlighted:()=>{o=!1;let{popover:e}=f.getState();e&&s(e)},onDeselected:t=>e.onDeselected?.(t,e)})),onPopoverRender:e=>{if(N(e),s(e),y.showSkipButton&&y.allowClose){let t=document.createElement(`button`);t.type=`button`,t.className=`c-guide-skip-btn`,t.textContent=y.skipBtnText,t.addEventListener(`click`,()=>{r=`skip`,l()}),e.footer.prepend(t)}},onNextClick:u,onPrevClick:()=>{o||f.movePrevious()},onDestroyStarted:l,onDestroyed:c});E=f,D=()=>{r=`dispose`,l()},S(`start`),t===O&&f.drive()}catch(e){t===O&&(M(),S(`error`,e))}finally{t===O&&(w.value=!1)}};return c(M),p(()=>y.steps,M),p([C,()=>y.theme],()=>{let e=E?.getState().popover;e&&N(e)},{deep:!0}),s({startGuide:I,stopGuide:M,resetCompleted:j,isCompleted:k}),(t,n)=>y.showTrigger?(l(),r(f(g),{key:0,placement:`bottom`,trigger:`hover`},{trigger:m(()=>[o(f(h),{text:``,loading:w.value,"aria-label":y.triggerTooltip,onClick:n[0]||=e=>I(!0)},{default:m(()=>[o(e,{name:y.triggerIcon,size:18},null,8,[`name`])]),_:1},8,[`loading`,`aria-label`])]),default:m(()=>[a(`span`,null,d(y.triggerTooltip),1)]),_:1})):i(`v-if`,!0)}}),[[`__scopeId`,`data-v-
|
|
1
|
+
import{t as e}from"./C_Icon2.js";import{t}from"./export-helper.js";import{computed as n,createBlock as r,createCommentVNode as i,createElementVNode as a,createVNode as o,defineComponent as s,onBeforeUnmount as c,openBlock as l,ref as u,toDisplayString as d,unref as f,watch as p,withCtx as m}from"vue";import{NButton as h,NTooltip as g,useThemeVars as _}from"naive-ui";const v={navigation:`<rect x="34" y="12" width="56" height="72" rx="6" fill="currentColor" opacity=".12"/><path d="M46 30h30M46 48h30M46 66h20"/><rect x="108" y="12" width="118" height="72" rx="6" fill="currentColor" opacity=".07"/><path d="M122 32h64M122 48h90M122 64h74"/>`,search:`<rect x="28" y="26" width="204" height="44" rx="10" fill="currentColor" opacity=".09"/><circle cx="56" cy="46" r="8"/><path d="m62 52 6 6M86 44h104M86 55h70"/>`,tabs:`<rect x="28" y="24" width="204" height="56" rx="6" fill="currentColor" opacity=".07"/><rect x="40" y="16" width="58" height="26" rx="6" fill="currentColor" opacity=".2"/><path d="M50 29h25m10-3 6 6m0-6-6 6M112 29h38M166 29h38M44 56h100M44 67h144"/>`,account:`<circle cx="60" cy="48" r="22" fill="currentColor" opacity=".12"/><circle cx="60" cy="41" r="6"/><path d="M49 60c0-13 22-13 22 0M94 40h40m-8-6 8 6-8 6M94 58h40m-32-6-8 6 8 6"/><rect x="154" y="20" width="62" height="56" rx="6" fill="currentColor" opacity=".09"/><path d="M168 36h34M168 48h34M168 60h22"/>`,overview:`<rect x="28" y="14" width="204" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M42 30h76M42 42h52"/><rect x="42" y="54" width="48" height="16" rx="4"/><rect x="106" y="54" width="48" height="16" rx="4"/><rect x="170" y="54" width="48" height="16" rx="4"/>`,notification:`<circle cx="130" cy="48" r="36" fill="currentColor" opacity=".07"/><path d="M109 63h42l-6-10V40a15 15 0 0 0-30 0v13l-6 10ZM124 71h12"/><circle cx="150" cy="26" r="8" fill="currentColor" opacity=".3"/>`,fullscreen:`<rect x="50" y="14" width="160" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M66 40V28h20M174 28h20v12M66 56v12h20M174 68h20V56"/><rect x="106" y="34" width="48" height="28" rx="4"/>`,language:`<rect x="54" y="18" width="72" height="54" rx="8" fill="currentColor" opacity=".1"/><rect x="134" y="24" width="72" height="54" rx="8" fill="currentColor" opacity=".07"/><path d="M70 34h40M90 27v7M79 34c2 15 9 22 27 28M101 34c-3 15-13 24-28 29M151 64l16-27 16 27M158 53h18"/>`,theme:`<circle cx="78" cy="48" r="15" fill="currentColor" opacity=".12"/><path d="M78 24v-6M78 78v-6M54 48h-6M108 48h-6M61 31l-5-5M100 70l-5-5M61 65l-5 5M100 26l-5 5M168 22a26 26 0 1 0 28 42 26 26 0 0 1-28-42Z"/>`,settings:`<rect x="44" y="14" width="172" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M62 31h136M62 48h136M62 65h136"/><circle cx="94" cy="31" r="5" fill="currentColor"/><circle cx="168" cy="48" r="5" fill="currentColor"/><circle cx="124" cy="65" r="5" fill="currentColor"/>`};function y(e){return e.width>0&&e.height>0&&e.right>0&&e.bottom>0&&e.left<window.innerWidth&&e.top<window.innerHeight}function b(e){if(!(!e||typeof document>`u`))return(typeof e==`string`?Array.from(document.querySelectorAll(e)):[typeof e==`function`?e():e]).find(e=>{if(!e?.isConnected)return!1;let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView?.getComputedStyle(e);return y(t)&&n?.visibility!==`hidden`})}function x(e){let{illustration:t}=e.popover,n=t&&v[t];return n?`<div class="c-guide-figure"><svg viewBox="0 0 260 96" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">${n}</svg></div><div class="c-guide-copy">${e.popover.description}</div>`:e.popover.description}var S=t(s({name:`C_Guide`,__name:`index`,props:{steps:{default:()=>[]},doneBtnText:{default:`完成`},nextBtnText:{default:`下一步`},prevBtnText:{default:`上一步`},showSkipButton:{type:Boolean,default:!0},skipBtnText:{default:`跳过引导`},showProgress:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},animate:{type:Boolean,default:!0},allowClose:{type:Boolean,default:!0},skipMissingElements:{type:Boolean,default:!0},theme:{},persistence:{},popoverClass:{default:`driverjs-theme`},showTrigger:{type:Boolean,default:!0},triggerTooltip:{default:`功能引导`},triggerIcon:{default:`mdi:sign-routes`}},emits:[`start`,`complete`,`close`,`skip`,`step-change`,`error`],setup(t,{expose:s,emit:v}){let y=t,S=v,C=_(),w=u(!1),T=n(()=>`${y.persistence?.keyPrefix??`c_guide`}_completed`),E=null,D,O=0,k=()=>{if(!y.persistence?.enabled)return!1;try{return localStorage.getItem(T.value)===`true`}catch{return!1}},A=()=>{if(y.persistence?.enabled)try{localStorage.setItem(T.value,`true`)}catch{}},j=()=>{try{localStorage.removeItem(T.value)}catch{}},M=()=>{O++,w.value=!1;let e=D;D=void 0,e?.()},N=e=>{let t=y.theme??{},n={"--c-guide-bg":t.popoverBgColor??C.value.popoverColor,"--c-guide-text":t.popoverTextColor??C.value.textColor1,"--c-guide-text-secondary":t.popoverTextColor??C.value.textColor2,"--c-guide-text-muted":C.value.textColor3,"--c-guide-primary":t.primaryColor??C.value.primaryColor,"--c-guide-primary-hover":t.primaryColor??C.value.primaryColorHover,"--c-guide-border":C.value.borderColor,"--c-guide-radius":t.borderRadius??`14px`};for(let[t,r]of Object.entries(n))e.wrapper.style.setProperty(t,r)},P=()=>y.theme?.overlayOpacity===void 0?{}:{overlayOpacity:y.theme.overlayOpacity},F=e=>w.value||!e&&k(),I=async(e=!1)=>{if(F(e))return;M();let t=O;w.value=!0;try{let{driver:e}=await import(`driver.js`);if(t!==O)return;let n=y.steps.filter(e=>!e.skipIf?.()&&(!y.skipMissingElements||!e.element||b(e.element)));if(!n.length)return;let r=`close`,i=0,a=!1,o=!1,s=e=>{e.nextButton.disabled=o,e.previousButton.disabled=o},c=()=>{a||(a=!0,E===f&&(E=null,D=void 0),r===`complete`?(A(),S(`complete`)):r!==`dispose`&&(r===`skip`&&S(`skip`,i),S(`close`,i)))},l=()=>{f.destroy(),c()},u=()=>{o||(f.isLastStep()?(r=`complete`,l()):f.moveNext())},d=P(),f=e({popoverClass:`c-guide-popover ${y.popoverClass}`.trim(),animate:y.animate&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,showProgress:y.showProgress,progressText:`{{current}} / {{total}}`,allowClose:y.allowClose,allowKeyboardControl:y.keyboard,skipMissingElement:y.skipMissingElements,...d,doneBtnText:y.doneBtnText,nextBtnText:y.nextBtnText,prevBtnText:y.prevBtnText,steps:n.map(e=>({element:e.element?()=>b(e.element):void 0,popover:{...e.popover,description:x(e)},onHighlightStarted:(t,n,{state:r})=>{o=!0,i=r.activeIndex??i,e.onHighlightStarted?.(t,e),S(`step-change`,i,e)},onHighlighted:()=>{o=!1;let{popover:e}=f.getState();e&&s(e)},onDeselected:t=>e.onDeselected?.(t,e)})),onPopoverRender:e=>{if(N(e),s(e),y.showSkipButton&&y.allowClose){let t=document.createElement(`button`);t.type=`button`,t.className=`c-guide-skip-btn`,t.textContent=y.skipBtnText,t.addEventListener(`click`,()=>{r=`skip`,l()}),e.footer.prepend(t)}},onNextClick:u,onPrevClick:()=>{o||f.movePrevious()},onDestroyStarted:l,onDestroyed:c});E=f,D=()=>{r=`dispose`,l()},S(`start`),t===O&&f.drive()}catch(e){t===O&&(M(),S(`error`,e))}finally{t===O&&(w.value=!1)}};return c(M),p(()=>y.steps,M),p([C,()=>y.theme],()=>{let e=E?.getState().popover;e&&N(e)},{deep:!0}),s({startGuide:I,stopGuide:M,resetCompleted:j,isCompleted:k}),(t,n)=>y.showTrigger?(l(),r(f(g),{key:0,placement:`bottom`,trigger:`hover`},{trigger:m(()=>[o(f(h),{class:`c-guide-trigger`,text:``,loading:w.value,"aria-label":y.triggerTooltip,onClick:n[0]||=e=>I(!0)},{default:m(()=>[o(e,{name:y.triggerIcon,size:18},null,8,[`name`])]),_:1},8,[`loading`,`aria-label`])]),default:m(()=>[a(`span`,null,d(y.triggerTooltip),1)]),_:1})):i(`v-if`,!0)}}),[[`__scopeId`,`data-v-fb8d9f5d`]]);export{S as t};
|
package/dist/C_Icon.css
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
/* unplugin-vue-components disabled */.c-icon[data-v-
|
|
1
|
+
/* unplugin-vue-components disabled */.c-icon[data-v-075758a0] {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
5
|
+
position: relative;
|
|
6
|
+
flex-shrink: 0;
|
|
7
|
+
vertical-align: middle;
|
|
5
8
|
user-select: none;
|
|
6
9
|
transition: all 0.2s ease-in-out;
|
|
7
10
|
}
|
|
8
|
-
.c-icon--clickable[data-v-
|
|
11
|
+
.c-icon--clickable[data-v-075758a0] {
|
|
9
12
|
cursor: pointer;
|
|
10
13
|
}
|
|
11
|
-
.c-icon--clickable[data-v-
|
|
14
|
+
.c-icon--clickable[data-v-075758a0]:hover {
|
|
12
15
|
opacity: 0.8;
|
|
13
16
|
transform: scale(1.05);
|
|
14
17
|
}
|
|
15
|
-
.c-icon--clickable[data-v-
|
|
18
|
+
.c-icon--clickable[data-v-075758a0]:active {
|
|
16
19
|
transform: scale(0.95);
|
|
17
20
|
}
|
|
18
|
-
.c-icon--clickable[data-v-
|
|
21
|
+
.c-icon--clickable[data-v-075758a0]:focus-visible {
|
|
19
22
|
outline: 2px solid currentColor;
|
|
20
23
|
outline-offset: 2px;
|
|
21
24
|
border-radius: 4px;
|
|
22
25
|
}
|
|
23
|
-
.c-icon--loading[data-v-
|
|
26
|
+
.c-icon--loading[data-v-075758a0] {
|
|
24
27
|
opacity: 0.6;
|
|
25
28
|
cursor: wait;
|
|
26
29
|
}
|
|
27
|
-
.c-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
.c-icon__loading[data-v-711aedcd] {
|
|
31
|
-
position: relative;
|
|
30
|
+
.c-icon__loading[data-v-075758a0] {
|
|
31
|
+
position: absolute;
|
|
32
|
+
inset: 0;
|
|
32
33
|
}
|
|
33
|
-
.c-icon__spinner[data-v-
|
|
34
|
+
.c-icon__spinner[data-v-075758a0] {
|
|
34
35
|
width: 100%;
|
|
35
36
|
height: 100%;
|
|
36
37
|
border: 2px solid currentColor;
|
|
37
38
|
border-radius: 50%;
|
|
38
39
|
border-top-color: transparent;
|
|
39
|
-
animation: spin-
|
|
40
|
+
animation: spin-075758a0 1s linear infinite;
|
|
40
41
|
}
|
|
41
|
-
.c-icon__error[data-v-
|
|
42
|
+
.c-icon__error[data-v-075758a0] {
|
|
42
43
|
font-size: 0.8em;
|
|
43
44
|
opacity: 0.5;
|
|
44
45
|
}
|
|
45
|
-
.c-icon__rotatable[data-v-
|
|
46
|
+
.c-icon__rotatable[data-v-075758a0] {
|
|
46
47
|
transition: transform 0.3s ease-in-out;
|
|
47
48
|
}
|
|
48
|
-
.c-icon__flippable[data-v-
|
|
49
|
+
.c-icon__flippable[data-v-075758a0] {
|
|
49
50
|
transition: transform 0.3s ease-in-out;
|
|
50
51
|
}
|
|
51
|
-
@keyframes spin-
|
|
52
|
+
@keyframes spin-075758a0 {
|
|
52
53
|
0% {
|
|
53
54
|
transform: rotate(0deg);
|
|
54
55
|
}
|
|
@@ -56,3 +57,9 @@
|
|
|
56
57
|
transform: rotate(360deg);
|
|
57
58
|
}
|
|
58
59
|
}
|
|
60
|
+
/* unplugin-vue-components disabled */
|
|
61
|
+
/* layer: default */
|
|
62
|
+
.inline-flex[data-v-075758a0]{display:inline-flex;}
|
|
63
|
+
.transform[data-v-075758a0]{transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}
|
|
64
|
+
.px[data-v-075758a0]{padding-left:1rem;padding-right:1rem;}
|
|
65
|
+
|
package/dist/C_Icon2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./chunk.cjs`);const e=require(`./export-helper.cjs`);let t=require(`vue`),n=require(`@iconify/vue`);const r=async(e,t)=>{if(!e)return``;if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)||e.startsWith(`/`))return e;if(t)try{return await t(e)}catch(t){return console.error(`[useImage] 自定义解析器处理失败: ${e}`,t),``}return e},
|
|
1
|
+
require(`./chunk.cjs`);const e=require(`./export-helper.cjs`);let t=require(`vue`),n=require(`@iconify/vue`);const r=async(e,t)=>{if(!e)return``;if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)||e.startsWith(`/`))return e;if(t)try{return await t(e)}catch(t){return console.error(`[useImage] 自定义解析器处理失败: ${e}`,t),``}return e};function i(e){if(typeof e==`number`)return`${Math.max(0,e)}px`;let t=e.trim();return/^\d+(?:\.\d+)?$/.test(t)?`${t}px`:t}const a={width:24,height:24,body:`<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.7" d="M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Zm7 4v6m0 4h.01"/>`},o=[`title`,`aria-label`,`aria-busy`,`role`,`tabindex`],s=[`viewBox`,`fill`],c=[`d`],l=[`src`,`alt`],u=(0,t.defineComponent)({name:`C_Icon`,__name:`index`,props:{name:{},type:{default:`iconify`},color:{default:`currentColor`},size:{default:18},svgPath:{default:``},viewBox:{default:`0 0 24 24`},alt:{default:``},clickable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},fallbackIcon:{default:``},loadTimeout:{default:5e3},title:{default:``},ariaLabel:{default:``},customClass:{default:``},rotate:{default:0},flip:{default:void 0},componentProps:{default:()=>({})}},emits:[`click`,`error`,`load`],setup(e,{expose:u,emit:d}){let f=e,p=d,m=(0,t.ref)(),h=(0,t.ref)(),g=(0,t.shallowRef)(null),_=(0,t.shallowRef)(null),v=(0,t.ref)(!1),y=(0,t.ref)(``),b=(0,t.ref)(``),x=(0,t.ref)(!1),S=!1,C=0,w,T=new Set,E=(0,t.computed)(()=>i(f.size)),D=(0,t.computed)(()=>({fontSize:E.value,color:f.color,width:E.value,height:E.value})),O=(0,t.computed)(()=>({display:`inline-flex`,width:E.value,height:E.value,transform:[f.rotate?`rotate(${f.rotate}deg)`:``,f.flip?`scaleX(${f.flip===`horizontal`||f.flip===`both`?-1:1}) scaleY(${f.flip===`vertical`||f.flip===`both`?-1:1})`:``].filter(Boolean).join(` `)||void 0})),k=(0,t.computed)(()=>{if(typeof f.name==`string`)return f.name;let e=f.name;return e?.__name||e?.name||(f.type===`svg`?`SVG Icon`:`Icon`)}),A=(0,t.computed)(()=>f.type===`component`&&typeof f.name!=`string`?f.name:null),j=()=>{C++,clearTimeout(w);for(let e of T)e();T.clear()},M=(e,t,r)=>{let i=C,a=(0,n.getIcon)(e);if(a){t(a);return}let o=!1,s=()=>{o=!0,clearTimeout(l),u?.(),T.delete(s)},c=e=>{o||i!==C||(s(),e?t(e):r())},l=setTimeout(()=>c(),Math.max(100,f.loadTimeout));T.add(s);let u=(0,n.loadIcons)([e],(t,r,i)=>{i.length===0&&c((0,n.getIcon)(e))})},N=(e,t,n)=>{v.value||(clearTimeout(w),x.value=!1,v.value=!0,y.value=t,p(`error`,e,n),f.fallbackIcon&&M(f.fallbackIcon.replace(/^i-([^:-]+)[:-]/,`$1:`),e=>{_.value=e},()=>{}))},P=()=>{v.value||(clearTimeout(w),x.value=!1,p(`load`))},F=async()=>{let e=C;await(0,t.nextTick)();let n=t=>{if(e!==C||!h.value)return;let r=getComputedStyle(h.value),i=r.maskImage||r.getPropertyValue(`-webkit-mask-image`);if(i&&i!==`none`||r.backgroundImage&&r.backgroundImage!==`none`){P();return}if(t===3){N(`unocss`,`UnoCSS 图标样式未生成`);return}let a=setTimeout(()=>{T.delete(o),n(t+1)},[50,150,400][t]),o=()=>clearTimeout(a);T.add(o)};n(0)},I=e=>{g.value=(0,n.getIcon)(e)||null,S&&(x.value=!g.value,M(e,e=>{g.value=e,P()},()=>N(`iconify`,`Iconify 图标不存在或请求超时`)))},L=async e=>{let t=C;x.value=!0,w=setTimeout(()=>{t===C&&N(`image`,`图片图标加载超时`)},Math.max(100,f.loadTimeout));try{let n=await r(e);if(t!==C||v.value)return;n?b.value=n:N(`image`,`图片路径解析失败`)}catch(e){t===C&&N(`image`,`图片路径解析失败`,e)}},R=e=>{f.type===`iconify`?I(e):f.type===`unocss`?e.startsWith(`i-`)?S&&F():N(`unocss`,`UnoCSS 图标名称应以 i- 开头`):f.type===`image`?L(e):N(`type`,`不支持的图标类型`)},z=()=>{if(j(),v.value=!1,y.value=``,g.value=null,_.value=null,b.value=``,x.value=!1,f.type===`svg`){f.svgPath?S&&P():N(`svg`,`SVG 路径不能为空`);return}if(!f.name){N(`validation`,`图标名称不能为空`);return}if(f.type===`component`){A.value?S&&P():N(`component`,`无法解析图标组件`);return}if(typeof f.name!=`string`){N(f.type,`图标名称必须为字符串`);return}R(f.name)},B=e=>{f.clickable&&!f.loading&&p(`click`,e)},V=e=>{f.clickable&&!f.loading&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),p(`click`,e))};return(0,t.watch)(()=>[f.name,f.type,f.svgPath,f.fallbackIcon,f.loadTimeout],()=>{z()},{immediate:!0}),(0,t.onMounted)(()=>{S=!0,z()}),(0,t.onBeforeUnmount)(j),u({validate:z,hasError:(0,t.readonly)(v),errorMessage:(0,t.readonly)(y),el:m}),(r,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{ref_key:`iconRef`,ref:m,class:(0,t.normalizeClass)([`c-icon`,[`c-icon--${e.type}`,{"c-icon--clickable":e.clickable,"c-icon--loading":e.loading||x.value,"c-icon--error":v.value}]]),style:(0,t.normalizeStyle)(D.value),title:e.title||(v.value?y.value:void 0),"aria-label":e.ariaLabel||k.value,"aria-busy":e.loading||x.value||void 0,role:e.clickable?`button`:`img`,tabindex:e.clickable?0:void 0,onClick:B,onKeydown:V},[e.type===`iconify`&&!v.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.Icon),{key:0,icon:g.value||(0,t.unref)(a),style:(0,t.normalizeStyle)(O.value),color:e.color},null,8,[`icon`,`style`,`color`])):e.type===`unocss`&&!v.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:1,ref_key:`unoRef`,ref:h,class:(0,t.normalizeClass)([e.name,e.customClass]),style:(0,t.normalizeStyle)(O.value)},null,6)):e.type===`component`&&A.value&&!v.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(A.value),(0,t.mergeProps)({key:2,style:O.value},e.componentProps),null,16,[`style`])):e.type===`svg`&&!v.value?((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,{key:3,viewBox:e.viewBox,style:(0,t.normalizeStyle)(O.value),fill:e.color,"aria-hidden":`true`},[(0,t.createElementVNode)(`path`,{d:e.svgPath},null,8,c)],12,s)):e.type===`image`&&b.value&&!v.value?((0,t.openBlock)(),(0,t.createElementBlock)(`img`,{key:b.value,src:b.value,alt:e.alt||k.value,style:(0,t.normalizeStyle)(O.value),onError:i[0]||=e=>N(`image`,`图片图标加载失败`),onLoad:P},null,44,l)):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.Icon),{key:5,icon:_.value||(0,t.unref)(a),style:(0,t.normalizeStyle)(O.value),color:e.color},null,8,[`icon`,`style`,`color`])),e.loading?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:6,class:`c-icon__loading`,style:(0,t.normalizeStyle)(O.value),"aria-hidden":`true`},[...i[1]||=[(0,t.createElementVNode)(`span`,{class:`c-icon__spinner`},null,-1)]],4)):(0,t.createCommentVNode)(`v-if`,!0)],46,o))}});var d=e.t(u,[[`__scopeId`,`data-v-075758a0`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return d}});
|
package/dist/C_Icon2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./export-helper.js";import{
|
|
1
|
+
import{t as e}from"./export-helper.js";import{computed as t,createBlock as n,createCommentVNode as r,createElementBlock as i,createElementVNode as a,defineComponent as o,mergeProps as s,nextTick as c,normalizeClass as l,normalizeStyle as u,onBeforeUnmount as d,onMounted as f,openBlock as p,readonly as m,ref as h,resolveDynamicComponent as ee,shallowRef as g,unref as _,watch as v}from"vue";import{Icon as y,getIcon as b,loadIcons as x}from"@iconify/vue";const S=async(e,t)=>{if(!e)return``;if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`data:`)||e.startsWith(`blob:`)||e.startsWith(`/`))return e;if(t)try{return await t(e)}catch(t){return console.error(`[useImage] 自定义解析器处理失败: ${e}`,t),``}return e};function C(e){if(typeof e==`number`)return`${Math.max(0,e)}px`;let t=e.trim();return/^\d+(?:\.\d+)?$/.test(t)?`${t}px`:t}const w={width:24,height:24,body:`<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.7" d="M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Zm7 4v6m0 4h.01"/>`},T=[`title`,`aria-label`,`aria-busy`,`role`,`tabindex`],te=[`viewBox`,`fill`],E=[`d`],D=[`src`,`alt`];var O=e(o({name:`C_Icon`,__name:`index`,props:{name:{},type:{default:`iconify`},color:{default:`currentColor`},size:{default:18},svgPath:{default:``},viewBox:{default:`0 0 24 24`},alt:{default:``},clickable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},fallbackIcon:{default:``},loadTimeout:{default:5e3},title:{default:``},ariaLabel:{default:``},customClass:{default:``},rotate:{default:0},flip:{default:void 0},componentProps:{default:()=>({})}},emits:[`click`,`error`,`load`],setup(e,{expose:o,emit:O}){let k=e,A=O,j=h(),M=h(),N=g(null),P=g(null),F=h(!1),I=h(``),L=h(``),R=h(!1),z=!1,B=0,V,H=new Set,U=t(()=>C(k.size)),W=t(()=>({fontSize:U.value,color:k.color,width:U.value,height:U.value})),G=t(()=>({display:`inline-flex`,width:U.value,height:U.value,transform:[k.rotate?`rotate(${k.rotate}deg)`:``,k.flip?`scaleX(${k.flip===`horizontal`||k.flip===`both`?-1:1}) scaleY(${k.flip===`vertical`||k.flip===`both`?-1:1})`:``].filter(Boolean).join(` `)||void 0})),K=t(()=>{if(typeof k.name==`string`)return k.name;let e=k.name;return e?.__name||e?.name||(k.type===`svg`?`SVG Icon`:`Icon`)}),q=t(()=>k.type===`component`&&typeof k.name!=`string`?k.name:null),J=()=>{B++,clearTimeout(V);for(let e of H)e();H.clear()},Y=(e,t,n)=>{let r=B,i=b(e);if(i){t(i);return}let a=!1,o=()=>{a=!0,clearTimeout(c),l?.(),H.delete(o)},s=e=>{a||r!==B||(o(),e?t(e):n())},c=setTimeout(()=>s(),Math.max(100,k.loadTimeout));H.add(o);let l=x([e],(t,n,r)=>{r.length===0&&s(b(e))})},X=(e,t,n)=>{F.value||(clearTimeout(V),R.value=!1,F.value=!0,I.value=t,A(`error`,e,n),k.fallbackIcon&&Y(k.fallbackIcon.replace(/^i-([^:-]+)[:-]/,`$1:`),e=>{P.value=e},()=>{}))},Z=()=>{F.value||(clearTimeout(V),R.value=!1,A(`load`))},ne=async()=>{let e=B;await c();let t=n=>{if(e!==B||!M.value)return;let r=getComputedStyle(M.value),i=r.maskImage||r.getPropertyValue(`-webkit-mask-image`);if(i&&i!==`none`||r.backgroundImage&&r.backgroundImage!==`none`){Z();return}if(n===3){X(`unocss`,`UnoCSS 图标样式未生成`);return}let a=setTimeout(()=>{H.delete(o),t(n+1)},[50,150,400][n]),o=()=>clearTimeout(a);H.add(o)};t(0)},Q=e=>{N.value=b(e)||null,z&&(R.value=!N.value,Y(e,e=>{N.value=e,Z()},()=>X(`iconify`,`Iconify 图标不存在或请求超时`)))},re=async e=>{let t=B;R.value=!0,V=setTimeout(()=>{t===B&&X(`image`,`图片图标加载超时`)},Math.max(100,k.loadTimeout));try{let n=await S(e);if(t!==B||F.value)return;n?L.value=n:X(`image`,`图片路径解析失败`)}catch(e){t===B&&X(`image`,`图片路径解析失败`,e)}},ie=e=>{k.type===`iconify`?Q(e):k.type===`unocss`?e.startsWith(`i-`)?z&&ne():X(`unocss`,`UnoCSS 图标名称应以 i- 开头`):k.type===`image`?re(e):X(`type`,`不支持的图标类型`)},$=()=>{if(J(),F.value=!1,I.value=``,N.value=null,P.value=null,L.value=``,R.value=!1,k.type===`svg`){k.svgPath?z&&Z():X(`svg`,`SVG 路径不能为空`);return}if(!k.name){X(`validation`,`图标名称不能为空`);return}if(k.type===`component`){q.value?z&&Z():X(`component`,`无法解析图标组件`);return}if(typeof k.name!=`string`){X(k.type,`图标名称必须为字符串`);return}ie(k.name)},ae=e=>{k.clickable&&!k.loading&&A(`click`,e)},oe=e=>{k.clickable&&!k.loading&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),A(`click`,e))};return v(()=>[k.name,k.type,k.svgPath,k.fallbackIcon,k.loadTimeout],()=>{$()},{immediate:!0}),f(()=>{z=!0,$()}),d(J),o({validate:$,hasError:m(F),errorMessage:m(I),el:j}),(t,o)=>(p(),i(`span`,{ref_key:`iconRef`,ref:j,class:l([`c-icon`,[`c-icon--${e.type}`,{"c-icon--clickable":e.clickable,"c-icon--loading":e.loading||R.value,"c-icon--error":F.value}]]),style:u(W.value),title:e.title||(F.value?I.value:void 0),"aria-label":e.ariaLabel||K.value,"aria-busy":e.loading||R.value||void 0,role:e.clickable?`button`:`img`,tabindex:e.clickable?0:void 0,onClick:ae,onKeydown:oe},[e.type===`iconify`&&!F.value?(p(),n(_(y),{key:0,icon:N.value||_(w),style:u(G.value),color:e.color},null,8,[`icon`,`style`,`color`])):e.type===`unocss`&&!F.value?(p(),i(`span`,{key:1,ref_key:`unoRef`,ref:M,class:l([e.name,e.customClass]),style:u(G.value)},null,6)):e.type===`component`&&q.value&&!F.value?(p(),n(ee(q.value),s({key:2,style:G.value},e.componentProps),null,16,[`style`])):e.type===`svg`&&!F.value?(p(),i(`svg`,{key:3,viewBox:e.viewBox,style:u(G.value),fill:e.color,"aria-hidden":`true`},[a(`path`,{d:e.svgPath},null,8,E)],12,te)):e.type===`image`&&L.value&&!F.value?(p(),i(`img`,{key:L.value,src:L.value,alt:e.alt||K.value,style:u(G.value),onError:o[0]||=e=>X(`image`,`图片图标加载失败`),onLoad:Z},null,44,D)):(p(),n(_(y),{key:5,icon:P.value||_(w),style:u(G.value),color:e.color},null,8,[`icon`,`style`,`color`])),e.loading?(p(),i(`span`,{key:6,class:`c-icon__loading`,style:u(G.value),"aria-hidden":`true`},[...o[1]||=[a(`span`,{class:`c-icon__spinner`},null,-1)]],4)):r(`v-if`,!0)],46,T))}}),[[`__scopeId`,`data-v-075758a0`]]);export{O as t};
|