From c819327f853a004c13ca1f463e369d4369b7391f Mon Sep 17 00:00:00 2001 From: Leonmmcoset Date: Sat, 7 Feb 2026 18:54:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0Lua=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/cmleonos/docs/.vuepress/dist/404.html | 8 +- ....html-B-2P5V78.js => 404.html-BozFi7tE.js} | 2 +- .../{app-BITa06va.js => app-C2pVPwUc.js} | 2 +- ...-CJdMGWM7.js => commands.html-BVVm3joo.js} | 4 +- ...vM18Nz.js => get-started.html-CVeJRoHk.js} | 2 +- ...tml-DS7rXIvH.js => index.html-MspKP7L1.js} | 2 +- ....html-DxDsLuB0.js => lua.html-Cnr7xLDd.js} | 12 ++- .../docs/.vuepress/dist/commands.html | 8 +- .../docs/.vuepress/dist/get-started.html | 6 +- docs/cmleonos/docs/.vuepress/dist/index.html | 6 +- docs/cmleonos/docs/.vuepress/dist/lua.html | 14 +++- docs/cmleonos/docs/lua.md | 73 +++++++++++++++++++ 12 files changed, 112 insertions(+), 27 deletions(-) rename docs/cmleonos/docs/.vuepress/dist/assets/{404.html-B-2P5V78.js => 404.html-BozFi7tE.js} (82%) rename docs/cmleonos/docs/.vuepress/dist/assets/{app-BITa06va.js => app-C2pVPwUc.js} (99%) rename docs/cmleonos/docs/.vuepress/dist/assets/{commands.html-CJdMGWM7.js => commands.html-BVVm3joo.js} (98%) rename docs/cmleonos/docs/.vuepress/dist/assets/{get-started.html-D_vM18Nz.js => get-started.html-CVeJRoHk.js} (97%) rename docs/cmleonos/docs/.vuepress/dist/assets/{index.html-DS7rXIvH.js => index.html-MspKP7L1.js} (96%) rename docs/cmleonos/docs/.vuepress/dist/assets/{lua.html-DxDsLuB0.js => lua.html-Cnr7xLDd.js} (89%) diff --git a/docs/cmleonos/docs/.vuepress/dist/404.html b/docs/cmleonos/docs/.vuepress/dist/404.html index 50622ef..9c73e68 100644 --- a/docs/cmleonos/docs/.vuepress/dist/404.html +++ b/docs/cmleonos/docs/.vuepress/dist/404.html @@ -33,11 +33,11 @@ CMLeonOS官方文档站 - - + + -

404

How did we get here?
Take me home
- +

404

Looks like we've got some broken links.
Take me home
+ diff --git a/docs/cmleonos/docs/.vuepress/dist/assets/404.html-B-2P5V78.js b/docs/cmleonos/docs/.vuepress/dist/assets/404.html-BozFi7tE.js similarity index 82% rename from docs/cmleonos/docs/.vuepress/dist/assets/404.html-B-2P5V78.js rename to docs/cmleonos/docs/.vuepress/dist/assets/404.html-BozFi7tE.js index 8902abb..092977d 100644 --- a/docs/cmleonos/docs/.vuepress/dist/assets/404.html-B-2P5V78.js +++ b/docs/cmleonos/docs/.vuepress/dist/assets/404.html-BozFi7tE.js @@ -1 +1 @@ -import{_ as e,c as o,b as a,o as n}from"./app-BITa06va.js";const l={};function r(s,t){return n(),o("div",null,[...t[0]||(t[0]=[a("p",null,"404 Not Found",-1)])])}const _=e(l,[["render",r]]),d=JSON.parse('{"path":"/404.html","title":"","lang":"zh-CN","frontmatter":{"layout":"NotFound"},"headers":[],"git":{},"filePathRelative":null}');export{_ as comp,d as data}; +import{_ as e,c as o,b as a,o as n}from"./app-C2pVPwUc.js";const l={};function r(s,t){return n(),o("div",null,[...t[0]||(t[0]=[a("p",null,"404 Not Found",-1)])])}const _=e(l,[["render",r]]),d=JSON.parse('{"path":"/404.html","title":"","lang":"zh-CN","frontmatter":{"layout":"NotFound"},"headers":[],"git":{},"filePathRelative":null}');export{_ as comp,d as data}; diff --git a/docs/cmleonos/docs/.vuepress/dist/assets/app-BITa06va.js b/docs/cmleonos/docs/.vuepress/dist/assets/app-C2pVPwUc.js similarity index 99% rename from docs/cmleonos/docs/.vuepress/dist/assets/app-BITa06va.js rename to docs/cmleonos/docs/.vuepress/dist/assets/app-C2pVPwUc.js index bce7b82..ffc1539 100644 --- a/docs/cmleonos/docs/.vuepress/dist/assets/app-BITa06va.js +++ b/docs/cmleonos/docs/.vuepress/dist/assets/app-C2pVPwUc.js @@ -16,7 +16,7 @@ * @vue/runtime-dom v3.5.27 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Xo;const ai=typeof window<"u"&&window.trustedTypes;if(ai)try{Xo=ai.createPolicy("vue",{createHTML:e=>e})}catch{}const Ta=Xo?e=>Xo.createHTML(e):e=>e,Cf="http://www.w3.org/2000/svg",Tf="http://www.w3.org/1998/Math/MathML",Rt=typeof document<"u"?document:null,ci=Rt&&Rt.createElement("template"),Af={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?Rt.createElementNS(Cf,e):t==="mathml"?Rt.createElementNS(Tf,e):n?Rt.createElement(e,{is:n}):Rt.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Rt.createTextNode(e),createComment:e=>Rt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Rt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{ci.innerHTML=Ta(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const l=ci.content;if(r==="svg"||r==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},zt="transition",Bn="animation",lr=Symbol("_vtc"),Aa={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},xf=Me({},ql,Aa),Lf=e=>(e.displayName="Transition",e.props=xf,e),bs=Lf((e,{slots:t})=>Q(_u,Rf(e),t)),rn=(e,t=[])=>{re(e)?e.forEach(n=>n(...t)):e&&e(...t)},ui=e=>e?re(e)?e.some(t=>t.length>1):e.length>1:!1;function Rf(e){const t={};for(const E in e)E in Aa||(t[E]=e[E]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=s,appearActiveClass:c=i,appearToClass:u=l,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,v=Of(o),_=v&&v[0],S=v&&v[1],{onBeforeEnter:C,onEnter:T,onEnterCancelled:g,onLeave:b,onLeaveCancelled:H,onBeforeAppear:J=C,onAppear:$=T,onAppearCancelled:w=g}=t,R=(E,M,D,j)=>{E._enterCancelled=j,on(E,M?u:l),on(E,M?c:i),D&&D()},k=(E,M)=>{E._isLeaving=!1,on(E,f),on(E,p),on(E,h),M&&M()},z=E=>(M,D)=>{const j=E?$:T,L=()=>R(M,E,D);rn(j,[M,L]),fi(()=>{on(M,E?a:s),Tt(M,E?u:l),ui(j)||di(M,r,_,L)})};return Me(t,{onBeforeEnter(E){rn(C,[E]),Tt(E,s),Tt(E,i)},onBeforeAppear(E){rn(J,[E]),Tt(E,a),Tt(E,c)},onEnter:z(!1),onAppear:z(!0),onLeave(E,M){E._isLeaving=!0;const D=()=>k(E,M);Tt(E,f),E._enterCancelled?(Tt(E,h),mi(E)):(mi(E),Tt(E,h)),fi(()=>{E._isLeaving&&(on(E,f),Tt(E,p),ui(b)||di(E,r,S,D))}),rn(b,[E,D])},onEnterCancelled(E){R(E,!1,void 0,!0),rn(g,[E])},onAppearCancelled(E){R(E,!0,void 0,!0),rn(w,[E])},onLeaveCancelled(E){k(E),rn(H,[E])}})}function Of(e){if(e==null)return null;if(Ee(e))return[Io(e.enter),Io(e.leave)];{const t=Io(e);return[t,t]}}function Io(e){return Cc(e)}function Tt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[lr]||(e[lr]=new Set)).add(t)}function on(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[lr];n&&(n.delete(t),n.size||(e[lr]=void 0))}function fi(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Pf=0;function di(e,t,n,r){const o=e._endId=++Pf,s=()=>{o===e._endId&&r()};if(n!=null)return setTimeout(s,n);const{type:i,timeout:l,propCount:a}=If(e,t);if(!i)return r();const c=i+"end";let u=0;const f=()=>{e.removeEventListener(c,h),s()},h=p=>{p.target===e&&++u>=a&&f()};setTimeout(()=>{u(n[v]||"").split(", "),o=r(`${zt}Delay`),s=r(`${zt}Duration`),i=hi(o,s),l=r(`${Bn}Delay`),a=r(`${Bn}Duration`),c=hi(l,a);let u=null,f=0,h=0;t===zt?i>0&&(u=zt,f=i,h=s.length):t===Bn?c>0&&(u=Bn,f=c,h=a.length):(f=Math.max(i,c),u=f>0?i>c?zt:Bn:null,h=u?u===zt?s.length:a.length:0);const p=u===zt&&/\b(?:transform|all)(?:,|$)/.test(r(`${zt}Property`).toString());return{type:u,timeout:f,propCount:h,hasTransform:p}}function hi(e,t){for(;e.lengthpi(n)+pi(e[r])))}function pi(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function mi(e){return(e?e.ownerDocument:document).body.offsetHeight}function kf(e,t,n){const r=e[lr];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Zr=Symbol("_vod"),xa=Symbol("_vsh"),eo={name:"show",beforeMount(e,{value:t},{transition:n}){e[Zr]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):jn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),jn(e,!0),r.enter(e)):r.leave(e,()=>{jn(e,!1)}):jn(e,t))},beforeUnmount(e,{value:t}){jn(e,t)}};function jn(e,t){e.style.display=t?e[Zr]:"none",e[xa]=!t}const Nf=Symbol(""),Mf=/(?:^|;)\s*display\s*:/;function Df(e,t,n){const r=e.style,o=Oe(n);let s=!1;if(n&&!o){if(t)if(Oe(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&Br(r,l,"")}else for(const i in t)n[i]==null&&Br(r,i,"");for(const i in n)i==="display"&&(s=!0),Br(r,i,n[i])}else if(o){if(t!==n){const i=r[Nf];i&&(n+=";"+i),r.cssText=n,s=Mf.test(n)}}else t&&e.removeAttribute("style");Zr in e&&(e[Zr]=s?r.display:"",e[xa]&&(r.display="none"))}const gi=/\s*!important$/;function Br(e,t,n){if(re(n))n.forEach(r=>Br(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=$f(e,t);gi.test(n)?e.setProperty(en(r),n.replace(gi,""),"important"):e[r]=n}}const vi=["Webkit","Moz","ms"],ko={};function $f(e,t){const n=ko[t];if(n)return n;let r=tt(t);if(r!=="filter"&&r in e)return ko[t]=r;r=dr(r);for(let o=0;oNo||(Vf.then(()=>No=0),No=Date.now());function Uf(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;gt(Wf(r,n.value),t,5,[r])};return n.value=e,n.attached=zf(),n}function Wf(e,t){if(re(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const wi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Gf=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?kf(e,r,i):t==="style"?Df(e,n,r):fr(t)?is(t)||Bf(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Kf(e,t,r,i))?(yi(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&_i(e,t,r,i,s,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Oe(r))?yi(e,tt(t),r,s,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),_i(e,t,r,i))};function Kf(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&wi(t)&&oe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return wi(t)&&Oe(n)?!1:t in e}const qf={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Yf=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=o=>{if(!("key"in o))return;const s=en(o.key);if(t.some(i=>i===s||qf[i]===s))return e(o)})},Jf=Me({patchProp:Gf},Af);let Mo,Ci=!1;function Qf(){return Mo=Ci?Mo:lf(Jf),Ci=!0,Mo}const Xf=(...e)=>{const t=Qf().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=ed(r);if(o)return n(o,!0,Zf(o))},t};function Zf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ed(e){return Oe(e)?document.querySelector(e):e}var br=e=>/^[a-z][a-z0-9+.-]*:/.test(e)||e.startsWith("//"),td=/.md((\?|#).*)?$/,nd=(e,t="/")=>br(e)||e.startsWith("/")&&!e.startsWith(t)&&!td.test(e),_r=e=>/^(https?:)?\/\//.test(e),Ti=e=>{if(!e||e.endsWith("/"))return e;let t=e.replace(/(^|\/)README.md$/i,"$1index.html");return t.endsWith(".md")?t=`${t.substring(0,t.length-3)}.html`:t.endsWith(".html")||(t=`${t}.html`),t.endsWith("/index.html")&&(t=t.substring(0,t.length-10)),t},rd="http://.",od=(e,t)=>{if(!e.startsWith("/")&&t){const n=t.slice(0,t.lastIndexOf("/"));return Ti(new URL(`${n}/${e}`,rd).pathname)}return Ti(e)},sd=(e,t)=>{const n=Object.keys(e).sort((r,o)=>{const s=o.split("/").length-r.split("/").length;return s!==0?s:o.length-r.length});for(const r of n)if(t.startsWith(r))return r;return"/"},id=/(#|\?)/,La=e=>{const[t,...n]=e.split(id);return{pathname:t,hashAndQueries:n.join("")}},ld=["link","meta","script","style","noscript","template"],ad=["title","base"],cd=([e,t,n])=>ad.includes(e)?e:ld.includes(e)?e==="meta"&&t.name?`${e}.${t.name}`:e==="template"&&t.id?`${e}.${t.id}`:JSON.stringify([e,Object.entries(t).map(([r,o])=>typeof o=="boolean"?o?[r,""]:null:[r,o]).filter(r=>r!=null).sort(([r],[o])=>r.localeCompare(o)),n]):null,ud=e=>{const t=new Set,n=[];return e.forEach(r=>{const o=cd(r);o&&!t.has(o)&&(t.add(o),n.push(r))}),n},fd=e=>e.endsWith("/")||e.endsWith(".html")?e:`${e}/`,Ra=e=>e.endsWith("/")?e.slice(0,-1):e,Oa=e=>e.startsWith("/")?e.slice(1):e,_s=e=>Object.prototype.toString.call(e)==="[object Object]",pt=e=>typeof e=="string";const dd="modulepreload",hd=function(e){return"/"+e},Ai={},Vn=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));o=Promise.allSettled(n.map(a=>{if(a=hd(a),a in Ai)return;Ai[a]=!0;const c=a.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":dd,c||(f.as="script"),f.crossOrigin="",f.href=a,l&&f.setAttribute("nonce",l),document.head.appendChild(f),c)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${a}`)))})}))}function s(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return o.then(i=>{for(const l of i||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})},pd=JSON.parse("{}"),md=Object.fromEntries([["/commands.html",{loader:()=>Vn(()=>import("./commands.html-CJdMGWM7.js"),[]),meta:{title:"命令列表"}}],["/get-started.html",{loader:()=>Vn(()=>import("./get-started.html-D_vM18Nz.js"),[]),meta:{title:"配置教程"}}],["/lua.html",{loader:()=>Vn(()=>import("./lua.html-DxDsLuB0.js"),[]),meta:{title:"CMLeonOS Lua API 文档"}}],["/",{loader:()=>Vn(()=>import("./index.html-DS7rXIvH.js"),[]),meta:{title:"主页"}}],["/404.html",{loader:()=>Vn(()=>import("./404.html-B-2P5V78.js"),[]),meta:{title:""}}]]);/*! +**/let Xo;const ai=typeof window<"u"&&window.trustedTypes;if(ai)try{Xo=ai.createPolicy("vue",{createHTML:e=>e})}catch{}const Ta=Xo?e=>Xo.createHTML(e):e=>e,Cf="http://www.w3.org/2000/svg",Tf="http://www.w3.org/1998/Math/MathML",Rt=typeof document<"u"?document:null,ci=Rt&&Rt.createElement("template"),Af={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?Rt.createElementNS(Cf,e):t==="mathml"?Rt.createElementNS(Tf,e):n?Rt.createElement(e,{is:n}):Rt.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Rt.createTextNode(e),createComment:e=>Rt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Rt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{ci.innerHTML=Ta(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const l=ci.content;if(r==="svg"||r==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},zt="transition",Bn="animation",lr=Symbol("_vtc"),Aa={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},xf=Me({},ql,Aa),Lf=e=>(e.displayName="Transition",e.props=xf,e),bs=Lf((e,{slots:t})=>Q(_u,Rf(e),t)),rn=(e,t=[])=>{re(e)?e.forEach(n=>n(...t)):e&&e(...t)},ui=e=>e?re(e)?e.some(t=>t.length>1):e.length>1:!1;function Rf(e){const t={};for(const E in e)E in Aa||(t[E]=e[E]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=s,appearActiveClass:c=i,appearToClass:u=l,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,v=Of(o),_=v&&v[0],S=v&&v[1],{onBeforeEnter:C,onEnter:T,onEnterCancelled:g,onLeave:b,onLeaveCancelled:H,onBeforeAppear:J=C,onAppear:$=T,onAppearCancelled:w=g}=t,R=(E,M,D,j)=>{E._enterCancelled=j,on(E,M?u:l),on(E,M?c:i),D&&D()},k=(E,M)=>{E._isLeaving=!1,on(E,f),on(E,p),on(E,h),M&&M()},z=E=>(M,D)=>{const j=E?$:T,L=()=>R(M,E,D);rn(j,[M,L]),fi(()=>{on(M,E?a:s),Tt(M,E?u:l),ui(j)||di(M,r,_,L)})};return Me(t,{onBeforeEnter(E){rn(C,[E]),Tt(E,s),Tt(E,i)},onBeforeAppear(E){rn(J,[E]),Tt(E,a),Tt(E,c)},onEnter:z(!1),onAppear:z(!0),onLeave(E,M){E._isLeaving=!0;const D=()=>k(E,M);Tt(E,f),E._enterCancelled?(Tt(E,h),mi(E)):(mi(E),Tt(E,h)),fi(()=>{E._isLeaving&&(on(E,f),Tt(E,p),ui(b)||di(E,r,S,D))}),rn(b,[E,D])},onEnterCancelled(E){R(E,!1,void 0,!0),rn(g,[E])},onAppearCancelled(E){R(E,!0,void 0,!0),rn(w,[E])},onLeaveCancelled(E){k(E),rn(H,[E])}})}function Of(e){if(e==null)return null;if(Ee(e))return[Io(e.enter),Io(e.leave)];{const t=Io(e);return[t,t]}}function Io(e){return Cc(e)}function Tt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[lr]||(e[lr]=new Set)).add(t)}function on(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[lr];n&&(n.delete(t),n.size||(e[lr]=void 0))}function fi(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Pf=0;function di(e,t,n,r){const o=e._endId=++Pf,s=()=>{o===e._endId&&r()};if(n!=null)return setTimeout(s,n);const{type:i,timeout:l,propCount:a}=If(e,t);if(!i)return r();const c=i+"end";let u=0;const f=()=>{e.removeEventListener(c,h),s()},h=p=>{p.target===e&&++u>=a&&f()};setTimeout(()=>{u(n[v]||"").split(", "),o=r(`${zt}Delay`),s=r(`${zt}Duration`),i=hi(o,s),l=r(`${Bn}Delay`),a=r(`${Bn}Duration`),c=hi(l,a);let u=null,f=0,h=0;t===zt?i>0&&(u=zt,f=i,h=s.length):t===Bn?c>0&&(u=Bn,f=c,h=a.length):(f=Math.max(i,c),u=f>0?i>c?zt:Bn:null,h=u?u===zt?s.length:a.length:0);const p=u===zt&&/\b(?:transform|all)(?:,|$)/.test(r(`${zt}Property`).toString());return{type:u,timeout:f,propCount:h,hasTransform:p}}function hi(e,t){for(;e.lengthpi(n)+pi(e[r])))}function pi(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function mi(e){return(e?e.ownerDocument:document).body.offsetHeight}function kf(e,t,n){const r=e[lr];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Zr=Symbol("_vod"),xa=Symbol("_vsh"),eo={name:"show",beforeMount(e,{value:t},{transition:n}){e[Zr]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):jn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),jn(e,!0),r.enter(e)):r.leave(e,()=>{jn(e,!1)}):jn(e,t))},beforeUnmount(e,{value:t}){jn(e,t)}};function jn(e,t){e.style.display=t?e[Zr]:"none",e[xa]=!t}const Nf=Symbol(""),Mf=/(?:^|;)\s*display\s*:/;function Df(e,t,n){const r=e.style,o=Oe(n);let s=!1;if(n&&!o){if(t)if(Oe(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&Br(r,l,"")}else for(const i in t)n[i]==null&&Br(r,i,"");for(const i in n)i==="display"&&(s=!0),Br(r,i,n[i])}else if(o){if(t!==n){const i=r[Nf];i&&(n+=";"+i),r.cssText=n,s=Mf.test(n)}}else t&&e.removeAttribute("style");Zr in e&&(e[Zr]=s?r.display:"",e[xa]&&(r.display="none"))}const gi=/\s*!important$/;function Br(e,t,n){if(re(n))n.forEach(r=>Br(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=$f(e,t);gi.test(n)?e.setProperty(en(r),n.replace(gi,""),"important"):e[r]=n}}const vi=["Webkit","Moz","ms"],ko={};function $f(e,t){const n=ko[t];if(n)return n;let r=tt(t);if(r!=="filter"&&r in e)return ko[t]=r;r=dr(r);for(let o=0;oNo||(Vf.then(()=>No=0),No=Date.now());function Uf(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;gt(Wf(r,n.value),t,5,[r])};return n.value=e,n.attached=zf(),n}function Wf(e,t){if(re(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const wi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Gf=(e,t,n,r,o,s)=>{const i=o==="svg";t==="class"?kf(e,r,i):t==="style"?Df(e,n,r):fr(t)?is(t)||Bf(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Kf(e,t,r,i))?(yi(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&_i(e,t,r,i,s,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Oe(r))?yi(e,tt(t),r,s,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),_i(e,t,r,i))};function Kf(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&wi(t)&&oe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return wi(t)&&Oe(n)?!1:t in e}const qf={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Yf=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=o=>{if(!("key"in o))return;const s=en(o.key);if(t.some(i=>i===s||qf[i]===s))return e(o)})},Jf=Me({patchProp:Gf},Af);let Mo,Ci=!1;function Qf(){return Mo=Ci?Mo:lf(Jf),Ci=!0,Mo}const Xf=(...e)=>{const t=Qf().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=ed(r);if(o)return n(o,!0,Zf(o))},t};function Zf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ed(e){return Oe(e)?document.querySelector(e):e}var br=e=>/^[a-z][a-z0-9+.-]*:/.test(e)||e.startsWith("//"),td=/.md((\?|#).*)?$/,nd=(e,t="/")=>br(e)||e.startsWith("/")&&!e.startsWith(t)&&!td.test(e),_r=e=>/^(https?:)?\/\//.test(e),Ti=e=>{if(!e||e.endsWith("/"))return e;let t=e.replace(/(^|\/)README.md$/i,"$1index.html");return t.endsWith(".md")?t=`${t.substring(0,t.length-3)}.html`:t.endsWith(".html")||(t=`${t}.html`),t.endsWith("/index.html")&&(t=t.substring(0,t.length-10)),t},rd="http://.",od=(e,t)=>{if(!e.startsWith("/")&&t){const n=t.slice(0,t.lastIndexOf("/"));return Ti(new URL(`${n}/${e}`,rd).pathname)}return Ti(e)},sd=(e,t)=>{const n=Object.keys(e).sort((r,o)=>{const s=o.split("/").length-r.split("/").length;return s!==0?s:o.length-r.length});for(const r of n)if(t.startsWith(r))return r;return"/"},id=/(#|\?)/,La=e=>{const[t,...n]=e.split(id);return{pathname:t,hashAndQueries:n.join("")}},ld=["link","meta","script","style","noscript","template"],ad=["title","base"],cd=([e,t,n])=>ad.includes(e)?e:ld.includes(e)?e==="meta"&&t.name?`${e}.${t.name}`:e==="template"&&t.id?`${e}.${t.id}`:JSON.stringify([e,Object.entries(t).map(([r,o])=>typeof o=="boolean"?o?[r,""]:null:[r,o]).filter(r=>r!=null).sort(([r],[o])=>r.localeCompare(o)),n]):null,ud=e=>{const t=new Set,n=[];return e.forEach(r=>{const o=cd(r);o&&!t.has(o)&&(t.add(o),n.push(r))}),n},fd=e=>e.endsWith("/")||e.endsWith(".html")?e:`${e}/`,Ra=e=>e.endsWith("/")?e.slice(0,-1):e,Oa=e=>e.startsWith("/")?e.slice(1):e,_s=e=>Object.prototype.toString.call(e)==="[object Object]",pt=e=>typeof e=="string";const dd="modulepreload",hd=function(e){return"/"+e},Ai={},Vn=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));o=Promise.allSettled(n.map(a=>{if(a=hd(a),a in Ai)return;Ai[a]=!0;const c=a.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":dd,c||(f.as="script"),f.crossOrigin="",f.href=a,l&&f.setAttribute("nonce",l),document.head.appendChild(f),c)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${a}`)))})}))}function s(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return o.then(i=>{for(const l of i||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})},pd=JSON.parse("{}"),md=Object.fromEntries([["/commands.html",{loader:()=>Vn(()=>import("./commands.html-BVVm3joo.js"),[]),meta:{title:"命令列表"}}],["/get-started.html",{loader:()=>Vn(()=>import("./get-started.html-CVeJRoHk.js"),[]),meta:{title:"配置教程"}}],["/lua.html",{loader:()=>Vn(()=>import("./lua.html-Cnr7xLDd.js"),[]),meta:{title:"CMLeonOS Lua API 文档"}}],["/",{loader:()=>Vn(()=>import("./index.html-MspKP7L1.js"),[]),meta:{title:"主页"}}],["/404.html",{loader:()=>Vn(()=>import("./404.html-BozFi7tE.js"),[]),meta:{title:""}}]]);/*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT diff --git a/docs/cmleonos/docs/.vuepress/dist/assets/commands.html-CJdMGWM7.js b/docs/cmleonos/docs/.vuepress/dist/assets/commands.html-BVVm3joo.js similarity index 98% rename from docs/cmleonos/docs/.vuepress/dist/assets/commands.html-CJdMGWM7.js rename to docs/cmleonos/docs/.vuepress/dist/assets/commands.html-BVVm3joo.js index e861141..d7f97a4 100644 --- a/docs/cmleonos/docs/.vuepress/dist/assets/commands.html-CJdMGWM7.js +++ b/docs/cmleonos/docs/.vuepress/dist/assets/commands.html-BVVm3joo.js @@ -1,4 +1,4 @@ -import{_ as e,c as n,a,o as l}from"./app-BITa06va.js";const i={};function r(t,s){return l(),n("div",null,[...s[0]||(s[0]=[a(`

命令列表

CMLeonOS 提供了丰富的命令行工具,以下是所有可用命令的详细说明。

系统命令

echo

输出文本到控制台。

用法:

echo <text>
+import{_ as e,c as n,a,o as l}from"./app-C2pVPwUc.js";const i={};function r(t,s){return l(),n("div",null,[...s[0]||(s[0]=[a(`

命令列表

CMLeonOS 提供了丰富的命令行工具,以下是所有可用命令的详细说明。

系统命令

echo

输出文本到控制台。

用法:

echo <text>
 

示例:

echo Hello World
 

clear / cls

清空控制台屏幕。

用法:

clear
 # 或
@@ -140,4 +140,4 @@ import{_ as e,c as n,a,o as l}from"./app-BITa06va.js";const i={};function r(t,s)
 

示例:

env
 env PATH
 env MYVAR hello
-

注意事项

  1. 所有命令不区分大小写
  2. 使用 help 命令可以查看所有可用命令
  3. 使用 help <command> 可以查看特定命令的详细帮助
  4. 文件路径使用反斜杠 \\ 或正斜杠 / 均可
  5. 支持相对路径和绝对路径
`,366)])])}const d=e(i,[["render",r]]),c=JSON.parse('{"path":"/commands.html","title":"命令列表","lang":"zh-CN","frontmatter":{},"headers":[{"level":2,"title":"系统命令","slug":"系统命令","link":"#系统命令","children":[{"level":3,"title":"echo","slug":"echo","link":"#echo","children":[]},{"level":3,"title":"clear / cls","slug":"clear-cls","link":"#clear-cls","children":[]},{"level":3,"title":"time","slug":"time","link":"#time","children":[]},{"level":3,"title":"date","slug":"date","link":"#date","children":[]},{"level":3,"title":"uptime","slug":"uptime","link":"#uptime","children":[]},{"level":3,"title":"whoami","slug":"whoami","link":"#whoami","children":[]},{"level":3,"title":"sleep","slug":"sleep","link":"#sleep","children":[]}]},{"level":2,"title":"文件系统命令","slug":"文件系统命令","link":"#文件系统命令","children":[{"level":3,"title":"ls","slug":"ls","link":"#ls","children":[]},{"level":3,"title":"cd","slug":"cd","link":"#cd","children":[]},{"level":3,"title":"pwd","slug":"pwd","link":"#pwd","children":[]},{"level":3,"title":"mkdir","slug":"mkdir","link":"#mkdir","children":[]},{"level":3,"title":"rm","slug":"rm","link":"#rm","children":[]},{"level":3,"title":"rmdir","slug":"rmdir","link":"#rmdir","children":[]},{"level":3,"title":"cat","slug":"cat","link":"#cat","children":[]},{"level":3,"title":"touch","slug":"touch","link":"#touch","children":[]},{"level":3,"title":"cp","slug":"cp","link":"#cp","children":[]},{"level":3,"title":"mv","slug":"mv","link":"#mv","children":[]},{"level":3,"title":"rename","slug":"rename","link":"#rename","children":[]},{"level":3,"title":"find","slug":"find","link":"#find","children":[]},{"level":3,"title":"tree","slug":"tree","link":"#tree","children":[]},{"level":3,"title":"head","slug":"head","link":"#head","children":[]},{"level":3,"title":"tail","slug":"tail","link":"#tail","children":[]},{"level":3,"title":"wc","slug":"wc","link":"#wc","children":[]},{"level":3,"title":"grep","slug":"grep","link":"#grep","children":[]},{"level":3,"title":"getdisk","slug":"getdisk","link":"#getdisk","children":[]}]},{"level":2,"title":"编辑器命令","slug":"编辑器命令","link":"#编辑器命令","children":[{"level":3,"title":"edit","slug":"edit","link":"#edit","children":[]},{"level":3,"title":"nano","slug":"nano","link":"#nano","children":[]}]},{"level":2,"title":"用户管理命令","slug":"用户管理命令","link":"#用户管理命令","children":[{"level":3,"title":"user","slug":"user","link":"#user","children":[]},{"level":3,"title":"cpass","slug":"cpass","link":"#cpass","children":[]},{"level":3,"title":"hostname","slug":"hostname","link":"#hostname","children":[]}]},{"level":2,"title":"网络命令","slug":"网络命令","link":"#网络命令","children":[{"level":3,"title":"ipconfig","slug":"ipconfig","link":"#ipconfig","children":[]},{"level":3,"title":"setdns","slug":"setdns","link":"#setdns","children":[]},{"level":3,"title":"setgateway","slug":"setgateway","link":"#setgateway","children":[]},{"level":3,"title":"nslookup","slug":"nslookup","link":"#nslookup","children":[]},{"level":3,"title":"ping","slug":"ping","link":"#ping","children":[]},{"level":3,"title":"wget","slug":"wget","link":"#wget","children":[]},{"level":3,"title":"ftp","slug":"ftp","link":"#ftp","children":[]},{"level":3,"title":"tcpserver","slug":"tcpserver","link":"#tcpserver","children":[]},{"level":3,"title":"tcpclient","slug":"tcpclient","link":"#tcpclient","children":[]}]},{"level":2,"title":"脚本命令","slug":"脚本命令","link":"#脚本命令","children":[{"level":3,"title":"lua","slug":"lua","link":"#lua","children":[]},{"level":3,"title":"com","slug":"com","link":"#com","children":[]},{"level":3,"title":"branswe","slug":"branswe","link":"#branswe","children":[]}]},{"level":2,"title":"实用工具命令","slug":"实用工具命令","link":"#实用工具命令","children":[{"level":3,"title":"calc","slug":"calc","link":"#calc","children":[]},{"level":3,"title":"history","slug":"history","link":"#history","children":[]},{"level":3,"title":"prompt","slug":"prompt","link":"#prompt","children":[]},{"level":3,"title":"background","slug":"background","link":"#background","children":[]},{"level":3,"title":"beep","slug":"beep","link":"#beep","children":[]},{"level":3,"title":"cal","slug":"cal","link":"#cal","children":[]},{"level":3,"title":"base64","slug":"base64","link":"#base64","children":[]},{"level":3,"title":"alias","slug":"alias","link":"#alias","children":[]},{"level":3,"title":"unalias","slug":"unalias","link":"#unalias","children":[]}]},{"level":2,"title":"系统信息命令","slug":"系统信息命令","link":"#系统信息命令","children":[{"level":3,"title":"version","slug":"version","link":"#version","children":[]},{"level":3,"title":"settings","slug":"settings","link":"#settings","children":[]},{"level":3,"title":"about","slug":"about","link":"#about","children":[]},{"level":3,"title":"help","slug":"help","link":"#help","children":[]}]},{"level":2,"title":"系统控制命令","slug":"系统控制命令","link":"#系统控制命令","children":[{"level":3,"title":"restart","slug":"restart","link":"#restart","children":[]},{"level":3,"title":"shutdown","slug":"shutdown","link":"#shutdown","children":[]}]},{"level":2,"title":"备份与恢复命令","slug":"备份与恢复命令","link":"#备份与恢复命令","children":[{"level":3,"title":"backup","slug":"backup","link":"#backup","children":[]},{"level":3,"title":"restore","slug":"restore","link":"#restore","children":[]}]},{"level":2,"title":"测试命令","slug":"测试命令","link":"#测试命令","children":[{"level":3,"title":"cuitest","slug":"cuitest","link":"#cuitest","children":[]},{"level":3,"title":"testgui","slug":"testgui","link":"#testgui","children":[]},{"level":3,"title":"labyrinth","slug":"labyrinth","link":"#labyrinth","children":[]},{"level":3,"title":"diff","slug":"diff","link":"#diff","children":[]}]},{"level":2,"title":"环境变量命令","slug":"环境变量命令","link":"#环境变量命令","children":[{"level":3,"title":"env","slug":"env","link":"#env","children":[]}]},{"level":2,"title":"注意事项","slug":"注意事项","link":"#注意事项","children":[]}],"git":{"updatedTime":1770365910000,"contributors":[{"name":"Leonmmcoset","username":"Leonmmcoset","email":"testmod@qq.com","commits":2,"url":"https://github.com/Leonmmcoset"}],"changelog":[{"hash":"b715d32556869be728358d6f42c0062b5abb8318","time":1770365910000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"文档"},{"hash":"4384578fdb936483c76ffe61512a6530b54cf9ce","time":1770300033000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"update"}]},"filePathRelative":"commands.md"}');export{d as comp,c as data}; +

注意事项

  1. 所有命令不区分大小写
  2. 使用 help 命令可以查看所有可用命令
  3. 使用 help <command> 可以查看特定命令的详细帮助
  4. 文件路径使用反斜杠 \\ 或正斜杠 / 均可
  5. 支持相对路径和绝对路径
`,366)])])}const d=e(i,[["render",r]]),c=JSON.parse('{"path":"/commands.html","title":"命令列表","lang":"zh-CN","frontmatter":{},"headers":[{"level":2,"title":"系统命令","slug":"系统命令","link":"#系统命令","children":[{"level":3,"title":"echo","slug":"echo","link":"#echo","children":[]},{"level":3,"title":"clear / cls","slug":"clear-cls","link":"#clear-cls","children":[]},{"level":3,"title":"time","slug":"time","link":"#time","children":[]},{"level":3,"title":"date","slug":"date","link":"#date","children":[]},{"level":3,"title":"uptime","slug":"uptime","link":"#uptime","children":[]},{"level":3,"title":"whoami","slug":"whoami","link":"#whoami","children":[]},{"level":3,"title":"sleep","slug":"sleep","link":"#sleep","children":[]}]},{"level":2,"title":"文件系统命令","slug":"文件系统命令","link":"#文件系统命令","children":[{"level":3,"title":"ls","slug":"ls","link":"#ls","children":[]},{"level":3,"title":"cd","slug":"cd","link":"#cd","children":[]},{"level":3,"title":"pwd","slug":"pwd","link":"#pwd","children":[]},{"level":3,"title":"mkdir","slug":"mkdir","link":"#mkdir","children":[]},{"level":3,"title":"rm","slug":"rm","link":"#rm","children":[]},{"level":3,"title":"rmdir","slug":"rmdir","link":"#rmdir","children":[]},{"level":3,"title":"cat","slug":"cat","link":"#cat","children":[]},{"level":3,"title":"touch","slug":"touch","link":"#touch","children":[]},{"level":3,"title":"cp","slug":"cp","link":"#cp","children":[]},{"level":3,"title":"mv","slug":"mv","link":"#mv","children":[]},{"level":3,"title":"rename","slug":"rename","link":"#rename","children":[]},{"level":3,"title":"find","slug":"find","link":"#find","children":[]},{"level":3,"title":"tree","slug":"tree","link":"#tree","children":[]},{"level":3,"title":"head","slug":"head","link":"#head","children":[]},{"level":3,"title":"tail","slug":"tail","link":"#tail","children":[]},{"level":3,"title":"wc","slug":"wc","link":"#wc","children":[]},{"level":3,"title":"grep","slug":"grep","link":"#grep","children":[]},{"level":3,"title":"getdisk","slug":"getdisk","link":"#getdisk","children":[]}]},{"level":2,"title":"编辑器命令","slug":"编辑器命令","link":"#编辑器命令","children":[{"level":3,"title":"edit","slug":"edit","link":"#edit","children":[]},{"level":3,"title":"nano","slug":"nano","link":"#nano","children":[]}]},{"level":2,"title":"用户管理命令","slug":"用户管理命令","link":"#用户管理命令","children":[{"level":3,"title":"user","slug":"user","link":"#user","children":[]},{"level":3,"title":"cpass","slug":"cpass","link":"#cpass","children":[]},{"level":3,"title":"hostname","slug":"hostname","link":"#hostname","children":[]}]},{"level":2,"title":"网络命令","slug":"网络命令","link":"#网络命令","children":[{"level":3,"title":"ipconfig","slug":"ipconfig","link":"#ipconfig","children":[]},{"level":3,"title":"setdns","slug":"setdns","link":"#setdns","children":[]},{"level":3,"title":"setgateway","slug":"setgateway","link":"#setgateway","children":[]},{"level":3,"title":"nslookup","slug":"nslookup","link":"#nslookup","children":[]},{"level":3,"title":"ping","slug":"ping","link":"#ping","children":[]},{"level":3,"title":"wget","slug":"wget","link":"#wget","children":[]},{"level":3,"title":"ftp","slug":"ftp","link":"#ftp","children":[]},{"level":3,"title":"tcpserver","slug":"tcpserver","link":"#tcpserver","children":[]},{"level":3,"title":"tcpclient","slug":"tcpclient","link":"#tcpclient","children":[]}]},{"level":2,"title":"脚本命令","slug":"脚本命令","link":"#脚本命令","children":[{"level":3,"title":"lua","slug":"lua","link":"#lua","children":[]},{"level":3,"title":"com","slug":"com","link":"#com","children":[]},{"level":3,"title":"branswe","slug":"branswe","link":"#branswe","children":[]}]},{"level":2,"title":"实用工具命令","slug":"实用工具命令","link":"#实用工具命令","children":[{"level":3,"title":"calc","slug":"calc","link":"#calc","children":[]},{"level":3,"title":"history","slug":"history","link":"#history","children":[]},{"level":3,"title":"prompt","slug":"prompt","link":"#prompt","children":[]},{"level":3,"title":"background","slug":"background","link":"#background","children":[]},{"level":3,"title":"beep","slug":"beep","link":"#beep","children":[]},{"level":3,"title":"cal","slug":"cal","link":"#cal","children":[]},{"level":3,"title":"base64","slug":"base64","link":"#base64","children":[]},{"level":3,"title":"alias","slug":"alias","link":"#alias","children":[]},{"level":3,"title":"unalias","slug":"unalias","link":"#unalias","children":[]}]},{"level":2,"title":"系统信息命令","slug":"系统信息命令","link":"#系统信息命令","children":[{"level":3,"title":"version","slug":"version","link":"#version","children":[]},{"level":3,"title":"settings","slug":"settings","link":"#settings","children":[]},{"level":3,"title":"about","slug":"about","link":"#about","children":[]},{"level":3,"title":"help","slug":"help","link":"#help","children":[]}]},{"level":2,"title":"系统控制命令","slug":"系统控制命令","link":"#系统控制命令","children":[{"level":3,"title":"restart","slug":"restart","link":"#restart","children":[]},{"level":3,"title":"shutdown","slug":"shutdown","link":"#shutdown","children":[]}]},{"level":2,"title":"备份与恢复命令","slug":"备份与恢复命令","link":"#备份与恢复命令","children":[{"level":3,"title":"backup","slug":"backup","link":"#backup","children":[]},{"level":3,"title":"restore","slug":"restore","link":"#restore","children":[]}]},{"level":2,"title":"测试命令","slug":"测试命令","link":"#测试命令","children":[{"level":3,"title":"cuitest","slug":"cuitest","link":"#cuitest","children":[]},{"level":3,"title":"testgui","slug":"testgui","link":"#testgui","children":[]},{"level":3,"title":"labyrinth","slug":"labyrinth","link":"#labyrinth","children":[]},{"level":3,"title":"diff","slug":"diff","link":"#diff","children":[]}]},{"level":2,"title":"环境变量命令","slug":"环境变量命令","link":"#环境变量命令","children":[{"level":3,"title":"env","slug":"env","link":"#env","children":[]}]},{"level":2,"title":"注意事项","slug":"注意事项","link":"#注意事项","children":[]}],"git":{"updatedTime":1770370212000,"contributors":[{"name":"Leonmmcoset","username":"Leonmmcoset","email":"testmod@qq.com","commits":3,"url":"https://github.com/Leonmmcoset"}],"changelog":[{"hash":"361931c091130e507b2c98379ff0a45609505257","time":1770370212000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"update"},{"hash":"b715d32556869be728358d6f42c0062b5abb8318","time":1770365910000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"文档"},{"hash":"4384578fdb936483c76ffe61512a6530b54cf9ce","time":1770300033000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"update"}]},"filePathRelative":"commands.md"}');export{d as comp,c as data}; diff --git a/docs/cmleonos/docs/.vuepress/dist/assets/get-started.html-D_vM18Nz.js b/docs/cmleonos/docs/.vuepress/dist/assets/get-started.html-CVeJRoHk.js similarity index 97% rename from docs/cmleonos/docs/.vuepress/dist/assets/get-started.html-D_vM18Nz.js rename to docs/cmleonos/docs/.vuepress/dist/assets/get-started.html-CVeJRoHk.js index 40a19ba..39cc228 100644 --- a/docs/cmleonos/docs/.vuepress/dist/assets/get-started.html-D_vM18Nz.js +++ b/docs/cmleonos/docs/.vuepress/dist/assets/get-started.html-CVeJRoHk.js @@ -1 +1 @@ -import{_ as t,c as a,a as l,o as s}from"./app-BITa06va.js";const n={};function i(o,e){return s(),a("div",null,[...e[0]||(e[0]=[l('

配置教程

准备工作

首先,准备一台实体机/虚拟机,确保这台机器等于或大于以下配置:

  • 处理器:一核以上
  • 内存:512MB以上
  • 硬盘:512MB以上
  • 一个键盘
  • 一个蜂鸣器或音频输出设备
  • 建议装上AMD驱动的网卡(Intel驱动的网卡似乎无法运行)

配置硬盘

使用PE或其它工具格式化硬盘(注意只分一个区,文件系统选择FAT32)

安装CMLeonOS

将CMLeonOS的ISO文件挂载到虚拟机或实体机上,启动后按照提示进行 First time setup。

在 First time setup 中,系统会让你配置用户名、密码、主机名,配置完后会进行重启,重启之后正常登陆系统,然后就可以开始使用CMLeonOS了。

',9)])])}const r=t(n,[["render",i]]),m=JSON.parse('{"path":"/get-started.html","title":"配置教程","lang":"zh-CN","frontmatter":{},"headers":[{"level":2,"title":"准备工作","slug":"准备工作","link":"#准备工作","children":[]},{"level":2,"title":"配置硬盘","slug":"配置硬盘","link":"#配置硬盘","children":[]},{"level":2,"title":"安装CMLeonOS","slug":"安装cmleonos","link":"#安装cmleonos","children":[]}],"git":{"updatedTime":1770190333000,"contributors":[{"name":"Leonmmcoset","username":"Leonmmcoset","email":"testmod@qq.com","commits":1,"url":"https://github.com/Leonmmcoset"}],"changelog":[{"hash":"33510365f48beba3a56b2dc6afd4c54b1fbdab60","time":1770190333000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"docs&Lua input()"}]},"filePathRelative":"get-started.md"}');export{r as comp,m as data}; +import{_ as t,c as a,a as l,o as s}from"./app-C2pVPwUc.js";const n={};function i(o,e){return s(),a("div",null,[...e[0]||(e[0]=[l('

配置教程

准备工作

首先,准备一台实体机/虚拟机,确保这台机器等于或大于以下配置:

  • 处理器:一核以上
  • 内存:512MB以上
  • 硬盘:512MB以上
  • 一个键盘
  • 一个蜂鸣器或音频输出设备
  • 建议装上AMD驱动的网卡(Intel驱动的网卡似乎无法运行)

配置硬盘

使用PE或其它工具格式化硬盘(注意只分一个区,文件系统选择FAT32)

安装CMLeonOS

将CMLeonOS的ISO文件挂载到虚拟机或实体机上,启动后按照提示进行 First time setup。

在 First time setup 中,系统会让你配置用户名、密码、主机名,配置完后会进行重启,重启之后正常登陆系统,然后就可以开始使用CMLeonOS了。

',9)])])}const r=t(n,[["render",i]]),m=JSON.parse('{"path":"/get-started.html","title":"配置教程","lang":"zh-CN","frontmatter":{},"headers":[{"level":2,"title":"准备工作","slug":"准备工作","link":"#准备工作","children":[]},{"level":2,"title":"配置硬盘","slug":"配置硬盘","link":"#配置硬盘","children":[]},{"level":2,"title":"安装CMLeonOS","slug":"安装cmleonos","link":"#安装cmleonos","children":[]}],"git":{"updatedTime":1770190333000,"contributors":[{"name":"Leonmmcoset","username":"Leonmmcoset","email":"testmod@qq.com","commits":1,"url":"https://github.com/Leonmmcoset"}],"changelog":[{"hash":"33510365f48beba3a56b2dc6afd4c54b1fbdab60","time":1770190333000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"docs&Lua input()"}]},"filePathRelative":"get-started.md"}');export{r as comp,m as data}; diff --git a/docs/cmleonos/docs/.vuepress/dist/assets/index.html-DS7rXIvH.js b/docs/cmleonos/docs/.vuepress/dist/assets/index.html-MspKP7L1.js similarity index 96% rename from docs/cmleonos/docs/.vuepress/dist/assets/index.html-DS7rXIvH.js rename to docs/cmleonos/docs/.vuepress/dist/assets/index.html-MspKP7L1.js index af78fb9..e1cb68a 100644 --- a/docs/cmleonos/docs/.vuepress/dist/assets/index.html-DS7rXIvH.js +++ b/docs/cmleonos/docs/.vuepress/dist/assets/index.html-MspKP7L1.js @@ -1 +1 @@ -import{_ as e,c as t,o as a}from"./app-BITa06va.js";const o={};function m(s,i){return a(),t("div")}const c=e(o,[["render",m]]),l=JSON.parse('{"path":"/","title":"主页","lang":"zh-CN","frontmatter":{"home":true,"title":"主页","actions":[{"text":"开始配置","link":"/get-started.html","type":"primary"},{"text":"Lua 文档","link":"/lua.html","type":"secondary"},{"text":"命令列表","link":"/commands.html","type":"secondary"}],"features":[{"title":"安全用户系统","details":"用户系统是直接绑定在内核下的,通过 SHA-256 密码哈希算法对用户密码进行加密存储,确保用户密码的安全性。"},{"title":"Lua 脚本支持","details":"CMLeonOS支持 Lua 脚本,用户可以通过 Lua 脚本实现自定义功能。"},{"title":"网络","details":"CMLeonOS支持 TCP/IP 协议栈,用户可以通过网络连接到其他设备。"},{"title":"FTP 服务器","details":"CMLeonOS支持 FTP 服务器,用户可以通过 FTP 协议上传下载文件。"},{"title":"内置编辑器","details":"CMLeonOS支持内置编辑器,用户可以直接在CMLeonOS中编辑文件。"},{"title":"硬盘存储","details":"CMLeonOS支持硬盘存储,用户可以将文件持久存储在硬盘中。"},{"title":"命令别名","details":"CMLeonOS支持命令别名功能,用户可以创建自定义命令快捷方式。"}]},"headers":[],"git":{"updatedTime":1770300033000,"contributors":[{"name":"Leonmmcoset","username":"Leonmmcoset","email":"testmod@qq.com","commits":2,"url":"https://github.com/Leonmmcoset"}],"changelog":[{"hash":"4384578fdb936483c76ffe61512a6530b54cf9ce","time":1770300033000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"update"},{"hash":"33510365f48beba3a56b2dc6afd4c54b1fbdab60","time":1770190333000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"docs&Lua input()"}]},"filePathRelative":"README.md"}');export{c as comp,l as data}; +import{_ as e,c as t,o as a}from"./app-C2pVPwUc.js";const o={};function m(s,i){return a(),t("div")}const c=e(o,[["render",m]]),l=JSON.parse('{"path":"/","title":"主页","lang":"zh-CN","frontmatter":{"home":true,"title":"主页","actions":[{"text":"开始配置","link":"/get-started.html","type":"primary"},{"text":"Lua 文档","link":"/lua.html","type":"secondary"},{"text":"命令列表","link":"/commands.html","type":"secondary"}],"features":[{"title":"安全用户系统","details":"用户系统是直接绑定在内核下的,通过 SHA-256 密码哈希算法对用户密码进行加密存储,确保用户密码的安全性。"},{"title":"Lua 脚本支持","details":"CMLeonOS支持 Lua 脚本,用户可以通过 Lua 脚本实现自定义功能。"},{"title":"网络","details":"CMLeonOS支持 TCP/IP 协议栈,用户可以通过网络连接到其他设备。"},{"title":"FTP 服务器","details":"CMLeonOS支持 FTP 服务器,用户可以通过 FTP 协议上传下载文件。"},{"title":"内置编辑器","details":"CMLeonOS支持内置编辑器,用户可以直接在CMLeonOS中编辑文件。"},{"title":"硬盘存储","details":"CMLeonOS支持硬盘存储,用户可以将文件持久存储在硬盘中。"},{"title":"命令别名","details":"CMLeonOS支持命令别名功能,用户可以创建自定义命令快捷方式。"}]},"headers":[],"git":{"updatedTime":1770300033000,"contributors":[{"name":"Leonmmcoset","username":"Leonmmcoset","email":"testmod@qq.com","commits":2,"url":"https://github.com/Leonmmcoset"}],"changelog":[{"hash":"4384578fdb936483c76ffe61512a6530b54cf9ce","time":1770300033000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"update"},{"hash":"33510365f48beba3a56b2dc6afd4c54b1fbdab60","time":1770190333000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"docs&Lua input()"}]},"filePathRelative":"README.md"}');export{c as comp,l as data}; diff --git a/docs/cmleonos/docs/.vuepress/dist/assets/lua.html-DxDsLuB0.js b/docs/cmleonos/docs/.vuepress/dist/assets/lua.html-Cnr7xLDd.js similarity index 89% rename from docs/cmleonos/docs/.vuepress/dist/assets/lua.html-DxDsLuB0.js rename to docs/cmleonos/docs/.vuepress/dist/assets/lua.html-Cnr7xLDd.js index 9c18233..0a0ecb6 100644 --- a/docs/cmleonos/docs/.vuepress/dist/assets/lua.html-DxDsLuB0.js +++ b/docs/cmleonos/docs/.vuepress/dist/assets/lua.html-Cnr7xLDd.js @@ -1,4 +1,4 @@ -import{_ as s,c as a,a as e,o as t}from"./app-BITa06va.js";const p={};function l(i,n){return t(),a("div",null,[...n[0]||(n[0]=[e(`

CMLeonOS Lua API 文档

本文档记录了 CMLeonOS 中 Lua 支持的所有函数和库。

基础库 (base)

assert(v [, message])

如果 v 为 false 或 nil,则抛出错误。可选参数 message 为错误信息。

assert(true, "This should be true")
+import{_ as s,c as a,a as e,o as t}from"./app-C2pVPwUc.js";const p={};function l(i,n){return t(),a("div",null,[...n[0]||(n[0]=[e(`

CMLeonOS Lua API 文档

本文档记录了 CMLeonOS 中 Lua 支持的所有函数和库。

基础库 (base)

assert(v [, message])

如果 v 为 false 或 nil,则抛出错误。可选参数 message 为错误信息。

assert(true, "This should be true")
 assert(false, "This is false")
 

collectgarbage([opt])

垃圾回收控制。支持以下选项:

  • "collect" - 执行垃圾回收
  • "count" - 返回当前内存使用量(千字节)
  • "step" - 执行一步垃圾回收
  • "isrunning" - 返回垃圾回收器是否在运行
collectgarbage("collect")
 collectgarbage("count")
@@ -166,7 +166,13 @@ import{_ as s,c as a,a as e,o as t}from"./app-BITa06va.js";const p={};function l
 end
 local elapsed = os.timerstop()
 print("Elapsed time:", elapsed, "seconds")
-

注意

  • 如果在未调用 timerstart 的情况下调用 timerstop,将返回 nil
  • 每次调用 timerstop 后,计时器会被重置
  • 返回的时间单位为秒(浮点数)

输入输出库 (io)

io.close(file)

关闭文件。

local file = io.open("test.txt", "w")
+

注意

  • 如果在未调用 timerstart 的情况下调用 timerstop,将返回 nil
  • 每次调用 timerstop 后,计时器会被重置
  • 返回的时间单位为秒(浮点数)

os.tui_drawbox(x, y, width, height, title, borderColor, backgroundColor)

绘制带边框和标题的矩形框。

os.tui_drawbox(10, 5, 40, 10, "Title", "white", "darkblue")
+

参数

  • x - 矩形框的左上角 X 坐标
  • y - 矩形框的左上角 Y 坐标
  • width - 矩形框的宽度
  • height - 矩形框的高度
  • title - 矩形框的标题(可选)
  • borderColor - 边框颜色(black, blue, cyan, darkblue, darkcyan, darkgray, darkgreen, darkmagenta, darkred, darkyellow, gray, green, magenta, red, white, yellow)
  • backgroundColor - 背景颜色(同上)

os.tui_drawtext(x, y, text, foregroundColor, backgroundColor)

在指定位置绘制文本。

os.tui_drawtext(15, 8, "Hello World!", "yellow", "black")
+

参数

  • x - 文本的 X 坐标
  • y - 文本的 Y 坐标
  • text - 要绘制的文本内容
  • foregroundColor - 前景色(同上)
  • backgroundColor - 背景色(同上)

os.tui_setcolor(foregroundColor, backgroundColor)

设置前景色和背景色。

os.tui_setcolor("white", "black")
+

参数

  • foregroundColor - 前景色(black, blue, cyan, darkblue, darkcyan, darkgray, darkgreen, darkmagenta, darkred, darkyellow, gray, green, magenta, red, white, yellow)
  • backgroundColor - 背景色(同上)

os.tui_setcursor(x, y)

设置光标位置。

os.tui_setcursor(20, 10)
+

参数

  • x - 光标的 X 坐标
  • y - 光标的 Y 坐标

os.tui_clear()

清屏。

os.tui_clear()
+

os.tui_drawline(x, y, length, character, color)

绘制水平线。

os.tui_drawline(10, 15, 30, "-", "green")
+

参数

  • x - 线的起始 X 坐标
  • y - 线的起始 Y 坐标
  • length - 线的长度
  • character - 用于绘制线的字符
  • color - 线的颜色(同上)

输入输出库 (io)

io.close(file)

关闭文件。

local file = io.open("test.txt", "w")
 file:write("Hello")
 io.close(file)
 

io.flush()

刷新所有打开文件的输出缓冲区。

io.flush()
@@ -294,4 +300,4 @@ import{_ as s,c as a,a as e,o as t}from"./app-BITa06va.js";const p={};function l
 print("Hash:", hash)
 print("Encoded:", encoded)
 print("Decoded:", decoded)
-

注意事项

  1. 交互模式:使用 lua --shell 进入交互式 Lua Shell
  2. 错误处理:所有 Lua 执行错误都会被捕获并显示
  3. 系统函数os 库包含 CMLeonOS 特定的系统函数
  4. 加密支持:支持 SHA256 和 Base64 编码/解码
  5. 标准 Lua:完全兼容 Lua 5.1 标准

版本信息

  • Lua 版本:5.2
  • CMLeonOS 版本:最新
`,486)])])}const o=s(p,[["render",l]]),u=JSON.parse('{"path":"/lua.html","title":"CMLeonOS Lua API 文档","lang":"zh-CN","frontmatter":{},"headers":[{"level":2,"title":"基础库 (base)","slug":"基础库-base","link":"#基础库-base","children":[{"level":3,"title":"assert(v [, message])","slug":"assert-v-message","link":"#assert-v-message","children":[]},{"level":3,"title":"collectgarbage([opt])","slug":"collectgarbage-opt","link":"#collectgarbage-opt","children":[]},{"level":3,"title":"dofile([filename])","slug":"dofile-filename","link":"#dofile-filename","children":[]},{"level":3,"title":"input([prompt])","slug":"input-prompt","link":"#input-prompt","children":[]},{"level":3,"title":"error(message [, level])","slug":"error-message-level","link":"#error-message-level","children":[]},{"level":3,"title":"ipairs(t)","slug":"ipairs-t","link":"#ipairs-t","children":[]},{"level":3,"title":"loadfile([filename])","slug":"loadfile-filename","link":"#loadfile-filename","children":[]},{"level":3,"title":"load(string [, chunkname])","slug":"load-string-chunkname","link":"#load-string-chunkname","children":[]},{"level":3,"title":"loadstring(string [, chunkname])","slug":"loadstring-string-chunkname","link":"#loadstring-string-chunkname","children":[]},{"level":3,"title":"next(table [, index])","slug":"next-table-index","link":"#next-table-index","children":[]},{"level":3,"title":"pairs(t)","slug":"pairs-t","link":"#pairs-t","children":[]},{"level":3,"title":"pcall(f [, arg1, ...])","slug":"pcall-f-arg1","link":"#pcall-f-arg1","children":[]},{"level":3,"title":"print(...)","slug":"print","link":"#print","children":[]},{"level":3,"title":"rawequal(v1, v2)","slug":"rawequal-v1-v2","link":"#rawequal-v1-v2","children":[]},{"level":3,"title":"rawlen(v)","slug":"rawlen-v","link":"#rawlen-v","children":[]},{"level":3,"title":"rawget(table, index)","slug":"rawget-table-index","link":"#rawget-table-index","children":[]},{"level":3,"title":"rawset(table, index, value)","slug":"rawset-table-index-value","link":"#rawset-table-index-value","children":[]},{"level":3,"title":"select(index, ...)","slug":"select-index","link":"#select-index","children":[]},{"level":3,"title":"getmetatable(object)","slug":"getmetatable-object","link":"#getmetatable-object","children":[]},{"level":3,"title":"setmetatable(table, metatable)","slug":"setmetatable-table-metatable","link":"#setmetatable-table-metatable","children":[]},{"level":3,"title":"tonumber(e [, base])","slug":"tonumber-e-base","link":"#tonumber-e-base","children":[]},{"level":3,"title":"tostring(v)","slug":"tostring-v","link":"#tostring-v","children":[]},{"level":3,"title":"type(v)","slug":"type-v","link":"#type-v","children":[]},{"level":3,"title":"xpcall(f [, arg1, ...])","slug":"xpcall-f-arg1","link":"#xpcall-f-arg1","children":[]}]},{"level":2,"title":"数学库 (math)","slug":"数学库-math","link":"#数学库-math","children":[{"level":3,"title":"math.abs(x)","slug":"math-abs-x","link":"#math-abs-x","children":[]},{"level":3,"title":"math.acos(x)","slug":"math-acos-x","link":"#math-acos-x","children":[]},{"level":3,"title":"math.asin(x)","slug":"math-asin-x","link":"#math-asin-x","children":[]},{"level":3,"title":"math.atan2(y, x)","slug":"math-atan2-y-x","link":"#math-atan2-y-x","children":[]},{"level":3,"title":"math.atan(x)","slug":"math-atan-x","link":"#math-atan-x","children":[]},{"level":3,"title":"math.ceil(x)","slug":"math-ceil-x","link":"#math-ceil-x","children":[]},{"level":3,"title":"math.cosh(x)","slug":"math-cosh-x","link":"#math-cosh-x","children":[]},{"level":3,"title":"math.cos(x)","slug":"math-cos-x","link":"#math-cos-x","children":[]},{"level":3,"title":"math.deg(x)","slug":"math-deg-x","link":"#math-deg-x","children":[]},{"level":3,"title":"math.exp(x)","slug":"math-exp-x","link":"#math-exp-x","children":[]},{"level":3,"title":"math.floor(x)","slug":"math-floor-x","link":"#math-floor-x","children":[]},{"level":3,"title":"math.fmod(x, y)","slug":"math-fmod-x-y","link":"#math-fmod-x-y","children":[]},{"level":3,"title":"math.frexp(x)","slug":"math-frexp-x","link":"#math-frexp-x","children":[]},{"level":3,"title":"math.ldexp(m, e)","slug":"math-ldexp-m-e","link":"#math-ldexp-m-e","children":[]},{"level":3,"title":"math.log10(x)","slug":"math-log10-x","link":"#math-log10-x","children":[]},{"level":3,"title":"math.log(x [, base])","slug":"math-log-x-base","link":"#math-log-x-base","children":[]},{"level":3,"title":"math.max(x1, ...)","slug":"math-max-x1","link":"#math-max-x1","children":[]},{"level":3,"title":"math.min(x1, ...)","slug":"math-min-x1","link":"#math-min-x1","children":[]},{"level":3,"title":"math.modf(x)","slug":"math-modf-x","link":"#math-modf-x","children":[]},{"level":3,"title":"math.pow(x, y)","slug":"math-pow-x-y","link":"#math-pow-x-y","children":[]},{"level":3,"title":"math.rad(x)","slug":"math-rad-x","link":"#math-rad-x","children":[]},{"level":3,"title":"math.random([m [, n]])","slug":"math-random-m-n","link":"#math-random-m-n","children":[]},{"level":3,"title":"math.randomseed(x)","slug":"math-randomseed-x","link":"#math-randomseed-x","children":[]},{"level":3,"title":"math.sinh(x)","slug":"math-sinh-x","link":"#math-sinh-x","children":[]},{"level":3,"title":"math.sin(x)","slug":"math-sin-x","link":"#math-sin-x","children":[]},{"level":3,"title":"math.sqrt(x)","slug":"math-sqrt-x","link":"#math-sqrt-x","children":[]},{"level":3,"title":"math.tanh(x)","slug":"math-tanh-x","link":"#math-tanh-x","children":[]},{"level":3,"title":"math.tan(x)","slug":"math-tan-x","link":"#math-tan-x","children":[]},{"level":3,"title":"math.pi","slug":"math-pi","link":"#math-pi","children":[]},{"level":3,"title":"math.huge","slug":"math-huge","link":"#math-huge","children":[]}]},{"level":2,"title":"字符串库 (string)","slug":"字符串库-string","link":"#字符串库-string","children":[{"level":3,"title":"string.byte(s [, i [, j]])","slug":"string-byte-s-i-j","link":"#string-byte-s-i-j","children":[]},{"level":3,"title":"string.char(...)","slug":"string-char","link":"#string-char","children":[]},{"level":3,"title":"string.dump(function)","slug":"string-dump-function","link":"#string-dump-function","children":[]},{"level":3,"title":"string.find(s, pattern [, init [, plain]])","slug":"string-find-s-pattern-init-plain","link":"#string-find-s-pattern-init-plain","children":[]},{"level":3,"title":"string.format(formatstring, ...)","slug":"string-format-formatstring","link":"#string-format-formatstring","children":[]},{"level":3,"title":"string.gmatch(s, pattern)","slug":"string-gmatch-s-pattern","link":"#string-gmatch-s-pattern","children":[]},{"level":3,"title":"string.gsub(s, pattern, repl [, n])","slug":"string-gsub-s-pattern-repl-n","link":"#string-gsub-s-pattern-repl-n","children":[]},{"level":3,"title":"string.len(s)","slug":"string-len-s","link":"#string-len-s","children":[]},{"level":3,"title":"string.lower(s)","slug":"string-lower-s","link":"#string-lower-s","children":[]},{"level":3,"title":"string.match(s, pattern [, init])","slug":"string-match-s-pattern-init","link":"#string-match-s-pattern-init","children":[]},{"level":3,"title":"string.rep(s, n)","slug":"string-rep-s-n","link":"#string-rep-s-n","children":[]},{"level":3,"title":"string.reverse(s)","slug":"string-reverse-s","link":"#string-reverse-s","children":[]},{"level":3,"title":"string.sub(s, i [, j])","slug":"string-sub-s-i-j","link":"#string-sub-s-i-j","children":[]},{"level":3,"title":"string.upper(s)","slug":"string-upper-s","link":"#string-upper-s","children":[]}]},{"level":2,"title":"操作系统库 (os)","slug":"操作系统库-os","link":"#操作系统库-os","children":[{"level":3,"title":"os.clock()","slug":"os-clock","link":"#os-clock","children":[]},{"level":3,"title":"os.gethostname()","slug":"os-gethostname","link":"#os-gethostname","children":[]},{"level":3,"title":"os.getenv(varname)","slug":"os-getenv-varname","link":"#os-getenv-varname","children":[]},{"level":3,"title":"os.setenv(varname, value)","slug":"os-setenv-varname-value","link":"#os-setenv-varname-value","children":[]},{"level":3,"title":"os.delenv(varname)","slug":"os-delenv-varname","link":"#os-delenv-varname","children":[]},{"level":3,"title":"os.addenv(varname, value)","slug":"os-addenv-varname-value","link":"#os-addenv-varname-value","children":[]},{"level":3,"title":"os.execute(command)","slug":"os-execute-command","link":"#os-execute-command","children":[]},{"level":3,"title":"os.executefile(path)","slug":"os-executefile-path","link":"#os-executefile-path","children":[]},{"level":3,"title":"os.reboot()","slug":"os-reboot","link":"#os-reboot","children":[]},{"level":3,"title":"os.shutdown()","slug":"os-shutdown","link":"#os-shutdown","children":[]},{"level":3,"title":"os.sleep(seconds)","slug":"os-sleep-seconds","link":"#os-sleep-seconds","children":[]},{"level":3,"title":"os.beep()","slug":"os-beep","link":"#os-beep","children":[]},{"level":3,"title":"os.clear()","slug":"os-clear","link":"#os-clear","children":[]},{"level":3,"title":"os.getusername()","slug":"os-getusername","link":"#os-getusername","children":[]},{"level":3,"title":"os.isadmin()","slug":"os-isadmin","link":"#os-isadmin","children":[]},{"level":3,"title":"os.sha256(input)","slug":"os-sha256-input","link":"#os-sha256-input","children":[]},{"level":3,"title":"os.base64encrypt(input)","slug":"os-base64encrypt-input","link":"#os-base64encrypt-input","children":[]},{"level":3,"title":"os.base64decrypt(input)","slug":"os-base64decrypt-input","link":"#os-base64decrypt-input","children":[]},{"level":3,"title":"os.timerstart()","slug":"os-timerstart","link":"#os-timerstart","children":[]},{"level":3,"title":"os.timerstop()","slug":"os-timerstop","link":"#os-timerstop","children":[]}]},{"level":2,"title":"输入输出库 (io)","slug":"输入输出库-io","link":"#输入输出库-io","children":[{"level":3,"title":"io.close(file)","slug":"io-close-file","link":"#io-close-file","children":[]},{"level":3,"title":"io.flush()","slug":"io-flush","link":"#io-flush","children":[]},{"level":3,"title":"io.input([file])","slug":"io-input-file","link":"#io-input-file","children":[]},{"level":3,"title":"io.lines([filename])","slug":"io-lines-filename","link":"#io-lines-filename","children":[]},{"level":3,"title":"io.open(filename [, mode])","slug":"io-open-filename-mode","link":"#io-open-filename-mode","children":[]},{"level":3,"title":"io.output([file])","slug":"io-output-file","link":"#io-output-file","children":[]},{"level":3,"title":"io.popen(prog [, mode])","slug":"io-popen-prog-mode","link":"#io-popen-prog-mode","children":[]},{"level":3,"title":"io.read(...)","slug":"io-read","link":"#io-read","children":[]},{"level":3,"title":"io.tmpfile()","slug":"io-tmpfile","link":"#io-tmpfile","children":[]},{"level":3,"title":"io.type(file)","slug":"io-type-file","link":"#io-type-file","children":[]},{"level":3,"title":"io.write(...)","slug":"io-write","link":"#io-write","children":[]}]},{"level":2,"title":"协程库 (coroutine)","slug":"协程库-coroutine","link":"#协程库-coroutine","children":[{"level":3,"title":"coroutine.create(f)","slug":"coroutine-create-f","link":"#coroutine-create-f","children":[]},{"level":3,"title":"coroutine.resume(co [, val1, ...])","slug":"coroutine-resume-co-val1","link":"#coroutine-resume-co-val1","children":[]},{"level":3,"title":"coroutine.running()","slug":"coroutine-running","link":"#coroutine-running","children":[]},{"level":3,"title":"coroutine.status(co)","slug":"coroutine-status-co","link":"#coroutine-status-co","children":[]},{"level":3,"title":"coroutine.wrap(f)","slug":"coroutine-wrap-f","link":"#coroutine-wrap-f","children":[]},{"level":3,"title":"coroutine.yield(...)","slug":"coroutine-yield","link":"#coroutine-yield","children":[]}]},{"level":2,"title":"表库 (table)","slug":"表库-table","link":"#表库-table","children":[{"level":3,"title":"table.concat(list [, sep [, i [, j]])","slug":"table-concat-list-sep-i-j","link":"#table-concat-list-sep-i-j","children":[]},{"level":3,"title":"table.insert(list, [pos,] value)","slug":"table-insert-list-pos-value","link":"#table-insert-list-pos-value","children":[]},{"level":3,"title":"table.maxn(t)","slug":"table-maxn-t","link":"#table-maxn-t","children":[]},{"level":3,"title":"table.remove(list [, pos])","slug":"table-remove-list-pos","link":"#table-remove-list-pos","children":[]},{"level":3,"title":"table.sort(list [, comp])","slug":"table-sort-list-comp","link":"#table-sort-list-comp","children":[]}]},{"level":2,"title":"调试库 (debug)","slug":"调试库-debug","link":"#调试库-debug","children":[{"level":3,"title":"debug.debug()","slug":"debug-debug","link":"#debug-debug","children":[]},{"level":3,"title":"debug.getfenv(object)","slug":"debug-getfenv-object","link":"#debug-getfenv-object","children":[]},{"level":3,"title":"debug.gethook()","slug":"debug-gethook","link":"#debug-gethook","children":[]},{"level":3,"title":"debug.getinfo([thread [, f [, what]])","slug":"debug-getinfo-thread-f-what","link":"#debug-getinfo-thread-f-what","children":[]},{"level":3,"title":"debug.getlocal([thread [, f [, loc]])","slug":"debug-getlocal-thread-f-loc","link":"#debug-getlocal-thread-f-loc","children":[]},{"level":3,"title":"debug.getmetatable(object)","slug":"debug-getmetatable-object","link":"#debug-getmetatable-object","children":[]},{"level":3,"title":"debug.getregistry()","slug":"debug-getregistry","link":"#debug-getregistry","children":[]},{"level":3,"title":"debug.getupvalue(f [, i])","slug":"debug-getupvalue-f-i","link":"#debug-getupvalue-f-i","children":[]},{"level":3,"title":"debug.setfenv(object, table)","slug":"debug-setfenv-object-table","link":"#debug-setfenv-object-table","children":[]},{"level":3,"title":"debug.sethook(hook, mask [, count])","slug":"debug-sethook-hook-mask-count","link":"#debug-sethook-hook-mask-count","children":[]},{"level":3,"title":"debug.setlocal([thread [, f,] level, value)","slug":"debug-setlocal-thread-f-level-value","link":"#debug-setlocal-thread-f-level-value","children":[]},{"level":3,"title":"debug.setmetatable(object, table)","slug":"debug-setmetatable-object-table","link":"#debug-setmetatable-object-table","children":[]},{"level":3,"title":"debug.setupvalue(f [, i,] value)","slug":"debug-setupvalue-f-i-value","link":"#debug-setupvalue-f-i-value","children":[]},{"level":3,"title":"debug.traceback([thread [, message [, level]])","slug":"debug-traceback-thread-message-level","link":"#debug-traceback-thread-message-level","children":[]}]},{"level":2,"title":"位运算库 (bit)","slug":"位运算库-bit","link":"#位运算库-bit","children":[{"level":3,"title":"bit.band(x1, x2 [, ...])","slug":"bit-band-x1-x2","link":"#bit-band-x1-x2","children":[]},{"level":3,"title":"bit.bnot(x)","slug":"bit-bnot-x","link":"#bit-bnot-x","children":[]},{"level":3,"title":"bit.bor(x1, x2 [, ...])","slug":"bit-bor-x1-x2","link":"#bit-bor-x1-x2","children":[]},{"level":3,"title":"bit.bxor(x1, x2 [, ...])","slug":"bit-bxor-x1-x2","link":"#bit-bxor-x1-x2","children":[]},{"level":3,"title":"bit.lshift(x, disp)","slug":"bit-lshift-x-disp","link":"#bit-lshift-x-disp","children":[]},{"level":3,"title":"bit.rshift(x, disp)","slug":"bit-rshift-x-disp","link":"#bit-rshift-x-disp","children":[]},{"level":3,"title":"bit.arshift(x, disp)","slug":"bit-arshift-x-disp","link":"#bit-arshift-x-disp","children":[]},{"level":3,"title":"bit.rol(x, disp)","slug":"bit-rol-x-disp","link":"#bit-rol-x-disp","children":[]},{"level":3,"title":"bit.ror(x, disp)","slug":"bit-ror-x-disp","link":"#bit-ror-x-disp","children":[]},{"level":3,"title":"bit.tobit(x)","slug":"bit-tobit-x","link":"#bit-tobit-x","children":[]}]},{"level":2,"title":"编码库 (enc)","slug":"编码库-enc","link":"#编码库-enc","children":[{"level":3,"title":"enc.base64encode(input)","slug":"enc-base64encode-input","link":"#enc-base64encode-input","children":[]},{"level":3,"title":"enc.base64decode(input)","slug":"enc-base64decode-input","link":"#enc-base64decode-input","children":[]}]},{"level":2,"title":"JSON 库","slug":"json-库","link":"#json-库","children":[{"level":3,"title":"json.encode(table)","slug":"json-encode-table","link":"#json-encode-table","children":[]},{"level":3,"title":"json.decode(string)","slug":"json-decode-string","link":"#json-decode-string","children":[]},{"level":3,"title":"json.null()","slug":"json-null","link":"#json-null","children":[]},{"level":3,"title":"json.parse(string)","slug":"json-parse-string","link":"#json-parse-string","children":[]},{"level":3,"title":"json.stringify(table)","slug":"json-stringify-table","link":"#json-stringify-table","children":[]}]},{"level":2,"title":"包库 (package)","slug":"包库-package","link":"#包库-package","children":[{"level":3,"title":"package.loaded","slug":"package-loaded","link":"#package-loaded","children":[]},{"level":3,"title":"package.loaders","slug":"package-loaders","link":"#package-loaders","children":[]},{"level":3,"title":"package.loadlib(libname [, initfunc])","slug":"package-loadlib-libname-initfunc","link":"#package-loadlib-libname-initfunc","children":[]},{"level":3,"title":"package.path","slug":"package-path","link":"#package-path","children":[]},{"level":3,"title":"package.searchpath(name [, path [, sep [, rep]])","slug":"package-searchpath-name-path-sep-rep","link":"#package-searchpath-name-path-sep-rep","children":[]},{"level":3,"title":"package.seeall([name])","slug":"package-seeall-name","link":"#package-seeall-name","children":[]}]},{"level":2,"title":"使用示例","slug":"使用示例","link":"#使用示例","children":[{"level":3,"title":"交互式 Lua Shell","slug":"交互式-lua-shell","link":"#交互式-lua-shell","children":[]},{"level":3,"title":"执行 Lua 脚本文件","slug":"执行-lua-脚本文件","link":"#执行-lua-脚本文件","children":[]},{"level":3,"title":"系统信息查询","slug":"系统信息查询","link":"#系统信息查询","children":[]},{"level":3,"title":"环境变量操作","slug":"环境变量操作","link":"#环境变量操作","children":[]},{"level":3,"title":"加密和编码","slug":"加密和编码","link":"#加密和编码","children":[]}]},{"level":2,"title":"注意事项","slug":"注意事项","link":"#注意事项","children":[]},{"level":2,"title":"版本信息","slug":"版本信息","link":"#版本信息","children":[]}],"git":{"updatedTime":1770268517000,"contributors":[{"name":"Leonmmcoset","username":"Leonmmcoset","email":"testmod@qq.com","commits":5,"url":"https://github.com/Leonmmcoset"}],"changelog":[{"hash":"33012c48e64dfd0d9488960bc5305feaa64a1cca","time":1770268517000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"GUI测试+Lua增加计时器"},{"hash":"d02fb85b1c8625458e60f9eea59c37544a521f88","time":1770196518000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"json"},{"hash":"33510365f48beba3a56b2dc6afd4c54b1fbdab60","time":1770190333000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"docs&Lua input()"},{"hash":"33afd6f2b50d2185e2c906d8abbc7ddd3f67947f","time":1770185997000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"网络"},{"hash":"0020d125c77f60f3e62911609af9a418daf60bec","time":1770143767000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"Lua更新"}]},"filePathRelative":"lua.md"}');export{o as comp,u as data}; +

注意事项

  1. 交互模式:使用 lua --shell 进入交互式 Lua Shell
  2. 错误处理:所有 Lua 执行错误都会被捕获并显示
  3. 系统函数os 库包含 CMLeonOS 特定的系统函数
  4. 加密支持:支持 SHA256 和 Base64 编码/解码
  5. 标准 Lua:完全兼容 Lua 5.1 标准

版本信息

  • Lua 版本:5.2
  • CMLeonOS 版本:最新
`,514)])])}const c=s(p,[["render",l]]),u=JSON.parse('{"path":"/lua.html","title":"CMLeonOS Lua API 文档","lang":"zh-CN","frontmatter":{},"headers":[{"level":2,"title":"基础库 (base)","slug":"基础库-base","link":"#基础库-base","children":[{"level":3,"title":"assert(v [, message])","slug":"assert-v-message","link":"#assert-v-message","children":[]},{"level":3,"title":"collectgarbage([opt])","slug":"collectgarbage-opt","link":"#collectgarbage-opt","children":[]},{"level":3,"title":"dofile([filename])","slug":"dofile-filename","link":"#dofile-filename","children":[]},{"level":3,"title":"input([prompt])","slug":"input-prompt","link":"#input-prompt","children":[]},{"level":3,"title":"error(message [, level])","slug":"error-message-level","link":"#error-message-level","children":[]},{"level":3,"title":"ipairs(t)","slug":"ipairs-t","link":"#ipairs-t","children":[]},{"level":3,"title":"loadfile([filename])","slug":"loadfile-filename","link":"#loadfile-filename","children":[]},{"level":3,"title":"load(string [, chunkname])","slug":"load-string-chunkname","link":"#load-string-chunkname","children":[]},{"level":3,"title":"loadstring(string [, chunkname])","slug":"loadstring-string-chunkname","link":"#loadstring-string-chunkname","children":[]},{"level":3,"title":"next(table [, index])","slug":"next-table-index","link":"#next-table-index","children":[]},{"level":3,"title":"pairs(t)","slug":"pairs-t","link":"#pairs-t","children":[]},{"level":3,"title":"pcall(f [, arg1, ...])","slug":"pcall-f-arg1","link":"#pcall-f-arg1","children":[]},{"level":3,"title":"print(...)","slug":"print","link":"#print","children":[]},{"level":3,"title":"rawequal(v1, v2)","slug":"rawequal-v1-v2","link":"#rawequal-v1-v2","children":[]},{"level":3,"title":"rawlen(v)","slug":"rawlen-v","link":"#rawlen-v","children":[]},{"level":3,"title":"rawget(table, index)","slug":"rawget-table-index","link":"#rawget-table-index","children":[]},{"level":3,"title":"rawset(table, index, value)","slug":"rawset-table-index-value","link":"#rawset-table-index-value","children":[]},{"level":3,"title":"select(index, ...)","slug":"select-index","link":"#select-index","children":[]},{"level":3,"title":"getmetatable(object)","slug":"getmetatable-object","link":"#getmetatable-object","children":[]},{"level":3,"title":"setmetatable(table, metatable)","slug":"setmetatable-table-metatable","link":"#setmetatable-table-metatable","children":[]},{"level":3,"title":"tonumber(e [, base])","slug":"tonumber-e-base","link":"#tonumber-e-base","children":[]},{"level":3,"title":"tostring(v)","slug":"tostring-v","link":"#tostring-v","children":[]},{"level":3,"title":"type(v)","slug":"type-v","link":"#type-v","children":[]},{"level":3,"title":"xpcall(f [, arg1, ...])","slug":"xpcall-f-arg1","link":"#xpcall-f-arg1","children":[]}]},{"level":2,"title":"数学库 (math)","slug":"数学库-math","link":"#数学库-math","children":[{"level":3,"title":"math.abs(x)","slug":"math-abs-x","link":"#math-abs-x","children":[]},{"level":3,"title":"math.acos(x)","slug":"math-acos-x","link":"#math-acos-x","children":[]},{"level":3,"title":"math.asin(x)","slug":"math-asin-x","link":"#math-asin-x","children":[]},{"level":3,"title":"math.atan2(y, x)","slug":"math-atan2-y-x","link":"#math-atan2-y-x","children":[]},{"level":3,"title":"math.atan(x)","slug":"math-atan-x","link":"#math-atan-x","children":[]},{"level":3,"title":"math.ceil(x)","slug":"math-ceil-x","link":"#math-ceil-x","children":[]},{"level":3,"title":"math.cosh(x)","slug":"math-cosh-x","link":"#math-cosh-x","children":[]},{"level":3,"title":"math.cos(x)","slug":"math-cos-x","link":"#math-cos-x","children":[]},{"level":3,"title":"math.deg(x)","slug":"math-deg-x","link":"#math-deg-x","children":[]},{"level":3,"title":"math.exp(x)","slug":"math-exp-x","link":"#math-exp-x","children":[]},{"level":3,"title":"math.floor(x)","slug":"math-floor-x","link":"#math-floor-x","children":[]},{"level":3,"title":"math.fmod(x, y)","slug":"math-fmod-x-y","link":"#math-fmod-x-y","children":[]},{"level":3,"title":"math.frexp(x)","slug":"math-frexp-x","link":"#math-frexp-x","children":[]},{"level":3,"title":"math.ldexp(m, e)","slug":"math-ldexp-m-e","link":"#math-ldexp-m-e","children":[]},{"level":3,"title":"math.log10(x)","slug":"math-log10-x","link":"#math-log10-x","children":[]},{"level":3,"title":"math.log(x [, base])","slug":"math-log-x-base","link":"#math-log-x-base","children":[]},{"level":3,"title":"math.max(x1, ...)","slug":"math-max-x1","link":"#math-max-x1","children":[]},{"level":3,"title":"math.min(x1, ...)","slug":"math-min-x1","link":"#math-min-x1","children":[]},{"level":3,"title":"math.modf(x)","slug":"math-modf-x","link":"#math-modf-x","children":[]},{"level":3,"title":"math.pow(x, y)","slug":"math-pow-x-y","link":"#math-pow-x-y","children":[]},{"level":3,"title":"math.rad(x)","slug":"math-rad-x","link":"#math-rad-x","children":[]},{"level":3,"title":"math.random([m [, n]])","slug":"math-random-m-n","link":"#math-random-m-n","children":[]},{"level":3,"title":"math.randomseed(x)","slug":"math-randomseed-x","link":"#math-randomseed-x","children":[]},{"level":3,"title":"math.sinh(x)","slug":"math-sinh-x","link":"#math-sinh-x","children":[]},{"level":3,"title":"math.sin(x)","slug":"math-sin-x","link":"#math-sin-x","children":[]},{"level":3,"title":"math.sqrt(x)","slug":"math-sqrt-x","link":"#math-sqrt-x","children":[]},{"level":3,"title":"math.tanh(x)","slug":"math-tanh-x","link":"#math-tanh-x","children":[]},{"level":3,"title":"math.tan(x)","slug":"math-tan-x","link":"#math-tan-x","children":[]},{"level":3,"title":"math.pi","slug":"math-pi","link":"#math-pi","children":[]},{"level":3,"title":"math.huge","slug":"math-huge","link":"#math-huge","children":[]}]},{"level":2,"title":"字符串库 (string)","slug":"字符串库-string","link":"#字符串库-string","children":[{"level":3,"title":"string.byte(s [, i [, j]])","slug":"string-byte-s-i-j","link":"#string-byte-s-i-j","children":[]},{"level":3,"title":"string.char(...)","slug":"string-char","link":"#string-char","children":[]},{"level":3,"title":"string.dump(function)","slug":"string-dump-function","link":"#string-dump-function","children":[]},{"level":3,"title":"string.find(s, pattern [, init [, plain]])","slug":"string-find-s-pattern-init-plain","link":"#string-find-s-pattern-init-plain","children":[]},{"level":3,"title":"string.format(formatstring, ...)","slug":"string-format-formatstring","link":"#string-format-formatstring","children":[]},{"level":3,"title":"string.gmatch(s, pattern)","slug":"string-gmatch-s-pattern","link":"#string-gmatch-s-pattern","children":[]},{"level":3,"title":"string.gsub(s, pattern, repl [, n])","slug":"string-gsub-s-pattern-repl-n","link":"#string-gsub-s-pattern-repl-n","children":[]},{"level":3,"title":"string.len(s)","slug":"string-len-s","link":"#string-len-s","children":[]},{"level":3,"title":"string.lower(s)","slug":"string-lower-s","link":"#string-lower-s","children":[]},{"level":3,"title":"string.match(s, pattern [, init])","slug":"string-match-s-pattern-init","link":"#string-match-s-pattern-init","children":[]},{"level":3,"title":"string.rep(s, n)","slug":"string-rep-s-n","link":"#string-rep-s-n","children":[]},{"level":3,"title":"string.reverse(s)","slug":"string-reverse-s","link":"#string-reverse-s","children":[]},{"level":3,"title":"string.sub(s, i [, j])","slug":"string-sub-s-i-j","link":"#string-sub-s-i-j","children":[]},{"level":3,"title":"string.upper(s)","slug":"string-upper-s","link":"#string-upper-s","children":[]}]},{"level":2,"title":"操作系统库 (os)","slug":"操作系统库-os","link":"#操作系统库-os","children":[{"level":3,"title":"os.clock()","slug":"os-clock","link":"#os-clock","children":[]},{"level":3,"title":"os.gethostname()","slug":"os-gethostname","link":"#os-gethostname","children":[]},{"level":3,"title":"os.getenv(varname)","slug":"os-getenv-varname","link":"#os-getenv-varname","children":[]},{"level":3,"title":"os.setenv(varname, value)","slug":"os-setenv-varname-value","link":"#os-setenv-varname-value","children":[]},{"level":3,"title":"os.delenv(varname)","slug":"os-delenv-varname","link":"#os-delenv-varname","children":[]},{"level":3,"title":"os.addenv(varname, value)","slug":"os-addenv-varname-value","link":"#os-addenv-varname-value","children":[]},{"level":3,"title":"os.execute(command)","slug":"os-execute-command","link":"#os-execute-command","children":[]},{"level":3,"title":"os.executefile(path)","slug":"os-executefile-path","link":"#os-executefile-path","children":[]},{"level":3,"title":"os.reboot()","slug":"os-reboot","link":"#os-reboot","children":[]},{"level":3,"title":"os.shutdown()","slug":"os-shutdown","link":"#os-shutdown","children":[]},{"level":3,"title":"os.sleep(seconds)","slug":"os-sleep-seconds","link":"#os-sleep-seconds","children":[]},{"level":3,"title":"os.beep()","slug":"os-beep","link":"#os-beep","children":[]},{"level":3,"title":"os.clear()","slug":"os-clear","link":"#os-clear","children":[]},{"level":3,"title":"os.getusername()","slug":"os-getusername","link":"#os-getusername","children":[]},{"level":3,"title":"os.isadmin()","slug":"os-isadmin","link":"#os-isadmin","children":[]},{"level":3,"title":"os.sha256(input)","slug":"os-sha256-input","link":"#os-sha256-input","children":[]},{"level":3,"title":"os.base64encrypt(input)","slug":"os-base64encrypt-input","link":"#os-base64encrypt-input","children":[]},{"level":3,"title":"os.base64decrypt(input)","slug":"os-base64decrypt-input","link":"#os-base64decrypt-input","children":[]},{"level":3,"title":"os.timerstart()","slug":"os-timerstart","link":"#os-timerstart","children":[]},{"level":3,"title":"os.timerstop()","slug":"os-timerstop","link":"#os-timerstop","children":[]},{"level":3,"title":"os.tui_drawbox(x, y, width, height, title, borderColor, backgroundColor)","slug":"os-tui-drawbox-x-y-width-height-title-bordercolor-backgroundcolor","link":"#os-tui-drawbox-x-y-width-height-title-bordercolor-backgroundcolor","children":[]},{"level":3,"title":"os.tui_drawtext(x, y, text, foregroundColor, backgroundColor)","slug":"os-tui-drawtext-x-y-text-foregroundcolor-backgroundcolor","link":"#os-tui-drawtext-x-y-text-foregroundcolor-backgroundcolor","children":[]},{"level":3,"title":"os.tui_setcolor(foregroundColor, backgroundColor)","slug":"os-tui-setcolor-foregroundcolor-backgroundcolor","link":"#os-tui-setcolor-foregroundcolor-backgroundcolor","children":[]},{"level":3,"title":"os.tui_setcursor(x, y)","slug":"os-tui-setcursor-x-y","link":"#os-tui-setcursor-x-y","children":[]},{"level":3,"title":"os.tui_clear()","slug":"os-tui-clear","link":"#os-tui-clear","children":[]},{"level":3,"title":"os.tui_drawline(x, y, length, character, color)","slug":"os-tui-drawline-x-y-length-character-color","link":"#os-tui-drawline-x-y-length-character-color","children":[]}]},{"level":2,"title":"输入输出库 (io)","slug":"输入输出库-io","link":"#输入输出库-io","children":[{"level":3,"title":"io.close(file)","slug":"io-close-file","link":"#io-close-file","children":[]},{"level":3,"title":"io.flush()","slug":"io-flush","link":"#io-flush","children":[]},{"level":3,"title":"io.input([file])","slug":"io-input-file","link":"#io-input-file","children":[]},{"level":3,"title":"io.lines([filename])","slug":"io-lines-filename","link":"#io-lines-filename","children":[]},{"level":3,"title":"io.open(filename [, mode])","slug":"io-open-filename-mode","link":"#io-open-filename-mode","children":[]},{"level":3,"title":"io.output([file])","slug":"io-output-file","link":"#io-output-file","children":[]},{"level":3,"title":"io.popen(prog [, mode])","slug":"io-popen-prog-mode","link":"#io-popen-prog-mode","children":[]},{"level":3,"title":"io.read(...)","slug":"io-read","link":"#io-read","children":[]},{"level":3,"title":"io.tmpfile()","slug":"io-tmpfile","link":"#io-tmpfile","children":[]},{"level":3,"title":"io.type(file)","slug":"io-type-file","link":"#io-type-file","children":[]},{"level":3,"title":"io.write(...)","slug":"io-write","link":"#io-write","children":[]}]},{"level":2,"title":"协程库 (coroutine)","slug":"协程库-coroutine","link":"#协程库-coroutine","children":[{"level":3,"title":"coroutine.create(f)","slug":"coroutine-create-f","link":"#coroutine-create-f","children":[]},{"level":3,"title":"coroutine.resume(co [, val1, ...])","slug":"coroutine-resume-co-val1","link":"#coroutine-resume-co-val1","children":[]},{"level":3,"title":"coroutine.running()","slug":"coroutine-running","link":"#coroutine-running","children":[]},{"level":3,"title":"coroutine.status(co)","slug":"coroutine-status-co","link":"#coroutine-status-co","children":[]},{"level":3,"title":"coroutine.wrap(f)","slug":"coroutine-wrap-f","link":"#coroutine-wrap-f","children":[]},{"level":3,"title":"coroutine.yield(...)","slug":"coroutine-yield","link":"#coroutine-yield","children":[]}]},{"level":2,"title":"表库 (table)","slug":"表库-table","link":"#表库-table","children":[{"level":3,"title":"table.concat(list [, sep [, i [, j]])","slug":"table-concat-list-sep-i-j","link":"#table-concat-list-sep-i-j","children":[]},{"level":3,"title":"table.insert(list, [pos,] value)","slug":"table-insert-list-pos-value","link":"#table-insert-list-pos-value","children":[]},{"level":3,"title":"table.maxn(t)","slug":"table-maxn-t","link":"#table-maxn-t","children":[]},{"level":3,"title":"table.remove(list [, pos])","slug":"table-remove-list-pos","link":"#table-remove-list-pos","children":[]},{"level":3,"title":"table.sort(list [, comp])","slug":"table-sort-list-comp","link":"#table-sort-list-comp","children":[]}]},{"level":2,"title":"调试库 (debug)","slug":"调试库-debug","link":"#调试库-debug","children":[{"level":3,"title":"debug.debug()","slug":"debug-debug","link":"#debug-debug","children":[]},{"level":3,"title":"debug.getfenv(object)","slug":"debug-getfenv-object","link":"#debug-getfenv-object","children":[]},{"level":3,"title":"debug.gethook()","slug":"debug-gethook","link":"#debug-gethook","children":[]},{"level":3,"title":"debug.getinfo([thread [, f [, what]])","slug":"debug-getinfo-thread-f-what","link":"#debug-getinfo-thread-f-what","children":[]},{"level":3,"title":"debug.getlocal([thread [, f [, loc]])","slug":"debug-getlocal-thread-f-loc","link":"#debug-getlocal-thread-f-loc","children":[]},{"level":3,"title":"debug.getmetatable(object)","slug":"debug-getmetatable-object","link":"#debug-getmetatable-object","children":[]},{"level":3,"title":"debug.getregistry()","slug":"debug-getregistry","link":"#debug-getregistry","children":[]},{"level":3,"title":"debug.getupvalue(f [, i])","slug":"debug-getupvalue-f-i","link":"#debug-getupvalue-f-i","children":[]},{"level":3,"title":"debug.setfenv(object, table)","slug":"debug-setfenv-object-table","link":"#debug-setfenv-object-table","children":[]},{"level":3,"title":"debug.sethook(hook, mask [, count])","slug":"debug-sethook-hook-mask-count","link":"#debug-sethook-hook-mask-count","children":[]},{"level":3,"title":"debug.setlocal([thread [, f,] level, value)","slug":"debug-setlocal-thread-f-level-value","link":"#debug-setlocal-thread-f-level-value","children":[]},{"level":3,"title":"debug.setmetatable(object, table)","slug":"debug-setmetatable-object-table","link":"#debug-setmetatable-object-table","children":[]},{"level":3,"title":"debug.setupvalue(f [, i,] value)","slug":"debug-setupvalue-f-i-value","link":"#debug-setupvalue-f-i-value","children":[]},{"level":3,"title":"debug.traceback([thread [, message [, level]])","slug":"debug-traceback-thread-message-level","link":"#debug-traceback-thread-message-level","children":[]}]},{"level":2,"title":"位运算库 (bit)","slug":"位运算库-bit","link":"#位运算库-bit","children":[{"level":3,"title":"bit.band(x1, x2 [, ...])","slug":"bit-band-x1-x2","link":"#bit-band-x1-x2","children":[]},{"level":3,"title":"bit.bnot(x)","slug":"bit-bnot-x","link":"#bit-bnot-x","children":[]},{"level":3,"title":"bit.bor(x1, x2 [, ...])","slug":"bit-bor-x1-x2","link":"#bit-bor-x1-x2","children":[]},{"level":3,"title":"bit.bxor(x1, x2 [, ...])","slug":"bit-bxor-x1-x2","link":"#bit-bxor-x1-x2","children":[]},{"level":3,"title":"bit.lshift(x, disp)","slug":"bit-lshift-x-disp","link":"#bit-lshift-x-disp","children":[]},{"level":3,"title":"bit.rshift(x, disp)","slug":"bit-rshift-x-disp","link":"#bit-rshift-x-disp","children":[]},{"level":3,"title":"bit.arshift(x, disp)","slug":"bit-arshift-x-disp","link":"#bit-arshift-x-disp","children":[]},{"level":3,"title":"bit.rol(x, disp)","slug":"bit-rol-x-disp","link":"#bit-rol-x-disp","children":[]},{"level":3,"title":"bit.ror(x, disp)","slug":"bit-ror-x-disp","link":"#bit-ror-x-disp","children":[]},{"level":3,"title":"bit.tobit(x)","slug":"bit-tobit-x","link":"#bit-tobit-x","children":[]}]},{"level":2,"title":"编码库 (enc)","slug":"编码库-enc","link":"#编码库-enc","children":[{"level":3,"title":"enc.base64encode(input)","slug":"enc-base64encode-input","link":"#enc-base64encode-input","children":[]},{"level":3,"title":"enc.base64decode(input)","slug":"enc-base64decode-input","link":"#enc-base64decode-input","children":[]}]},{"level":2,"title":"JSON 库","slug":"json-库","link":"#json-库","children":[{"level":3,"title":"json.encode(table)","slug":"json-encode-table","link":"#json-encode-table","children":[]},{"level":3,"title":"json.decode(string)","slug":"json-decode-string","link":"#json-decode-string","children":[]},{"level":3,"title":"json.null()","slug":"json-null","link":"#json-null","children":[]},{"level":3,"title":"json.parse(string)","slug":"json-parse-string","link":"#json-parse-string","children":[]},{"level":3,"title":"json.stringify(table)","slug":"json-stringify-table","link":"#json-stringify-table","children":[]}]},{"level":2,"title":"包库 (package)","slug":"包库-package","link":"#包库-package","children":[{"level":3,"title":"package.loaded","slug":"package-loaded","link":"#package-loaded","children":[]},{"level":3,"title":"package.loaders","slug":"package-loaders","link":"#package-loaders","children":[]},{"level":3,"title":"package.loadlib(libname [, initfunc])","slug":"package-loadlib-libname-initfunc","link":"#package-loadlib-libname-initfunc","children":[]},{"level":3,"title":"package.path","slug":"package-path","link":"#package-path","children":[]},{"level":3,"title":"package.searchpath(name [, path [, sep [, rep]])","slug":"package-searchpath-name-path-sep-rep","link":"#package-searchpath-name-path-sep-rep","children":[]},{"level":3,"title":"package.seeall([name])","slug":"package-seeall-name","link":"#package-seeall-name","children":[]}]},{"level":2,"title":"使用示例","slug":"使用示例","link":"#使用示例","children":[{"level":3,"title":"交互式 Lua Shell","slug":"交互式-lua-shell","link":"#交互式-lua-shell","children":[]},{"level":3,"title":"执行 Lua 脚本文件","slug":"执行-lua-脚本文件","link":"#执行-lua-脚本文件","children":[]},{"level":3,"title":"系统信息查询","slug":"系统信息查询","link":"#系统信息查询","children":[]},{"level":3,"title":"环境变量操作","slug":"环境变量操作","link":"#环境变量操作","children":[]},{"level":3,"title":"加密和编码","slug":"加密和编码","link":"#加密和编码","children":[]}]},{"level":2,"title":"注意事项","slug":"注意事项","link":"#注意事项","children":[]},{"level":2,"title":"版本信息","slug":"版本信息","link":"#版本信息","children":[]}],"git":{"updatedTime":1770268517000,"contributors":[{"name":"Leonmmcoset","username":"Leonmmcoset","email":"testmod@qq.com","commits":5,"url":"https://github.com/Leonmmcoset"}],"changelog":[{"hash":"33012c48e64dfd0d9488960bc5305feaa64a1cca","time":1770268517000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"GUI测试+Lua增加计时器"},{"hash":"d02fb85b1c8625458e60f9eea59c37544a521f88","time":1770196518000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"json"},{"hash":"33510365f48beba3a56b2dc6afd4c54b1fbdab60","time":1770190333000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"docs&Lua input()"},{"hash":"33afd6f2b50d2185e2c906d8abbc7ddd3f67947f","time":1770185997000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"网络"},{"hash":"0020d125c77f60f3e62911609af9a418daf60bec","time":1770143767000,"email":"testmod@qq.com","author":"Leonmmcoset","message":"Lua更新"}]},"filePathRelative":"lua.md"}');export{c as comp,u as data}; diff --git a/docs/cmleonos/docs/.vuepress/dist/commands.html b/docs/cmleonos/docs/.vuepress/dist/commands.html index 1bc2dfc..2210d46 100644 --- a/docs/cmleonos/docs/.vuepress/dist/commands.html +++ b/docs/cmleonos/docs/.vuepress/dist/commands.html @@ -33,8 +33,8 @@ 命令列表 | CMLeonOS官方文档站 - - + +
- +

注意事项

  1. 所有命令不区分大小写
  2. 使用 help 命令可以查看所有可用命令
  3. 使用 help <command> 可以查看特定命令的详细帮助
  4. 文件路径使用反斜杠 \ 或正斜杠 / 均可
  5. 支持相对路径和绝对路径
最近更新::
Contributors: Leonmmcoset
+ diff --git a/docs/cmleonos/docs/.vuepress/dist/get-started.html b/docs/cmleonos/docs/.vuepress/dist/get-started.html index 78e35e9..bbed310 100644 --- a/docs/cmleonos/docs/.vuepress/dist/get-started.html +++ b/docs/cmleonos/docs/.vuepress/dist/get-started.html @@ -33,11 +33,11 @@ 配置教程 | CMLeonOS官方文档站 - - + +
- + diff --git a/docs/cmleonos/docs/.vuepress/dist/index.html b/docs/cmleonos/docs/.vuepress/dist/index.html index 38ac3e2..f194067 100644 --- a/docs/cmleonos/docs/.vuepress/dist/index.html +++ b/docs/cmleonos/docs/.vuepress/dist/index.html @@ -33,11 +33,11 @@ 主页 | CMLeonOS官方文档站 - - + +
- + diff --git a/docs/cmleonos/docs/.vuepress/dist/lua.html b/docs/cmleonos/docs/.vuepress/dist/lua.html index d413edd..b36aea2 100644 --- a/docs/cmleonos/docs/.vuepress/dist/lua.html +++ b/docs/cmleonos/docs/.vuepress/dist/lua.html @@ -33,8 +33,8 @@ CMLeonOS Lua API 文档 | CMLeonOS官方文档站 - - + +
- + diff --git a/docs/cmleonos/docs/lua.md b/docs/cmleonos/docs/lua.md index 5465305..dcae27a 100644 --- a/docs/cmleonos/docs/lua.md +++ b/docs/cmleonos/docs/lua.md @@ -721,6 +721,79 @@ print("Elapsed time:", elapsed, "seconds") - 每次调用 `timerstop` 后,计时器会被重置 - 返回的时间单位为秒(浮点数) +### os.tui_drawbox(x, y, width, height, title, borderColor, backgroundColor) +绘制带边框和标题的矩形框。 + +```lua +os.tui_drawbox(10, 5, 40, 10, "Title", "white", "darkblue") +``` + +**参数**: +- `x` - 矩形框的左上角 X 坐标 +- `y` - 矩形框的左上角 Y 坐标 +- `width` - 矩形框的宽度 +- `height` - 矩形框的高度 +- `title` - 矩形框的标题(可选) +- `borderColor` - 边框颜色(black, blue, cyan, darkblue, darkcyan, darkgray, darkgreen, darkmagenta, darkred, darkyellow, gray, green, magenta, red, white, yellow) +- `backgroundColor` - 背景颜色(同上) + +### os.tui_drawtext(x, y, text, foregroundColor, backgroundColor) +在指定位置绘制文本。 + +```lua +os.tui_drawtext(15, 8, "Hello World!", "yellow", "black") +``` + +**参数**: +- `x` - 文本的 X 坐标 +- `y` - 文本的 Y 坐标 +- `text` - 要绘制的文本内容 +- `foregroundColor` - 前景色(同上) +- `backgroundColor` - 背景色(同上) + +### os.tui_setcolor(foregroundColor, backgroundColor) +设置前景色和背景色。 + +```lua +os.tui_setcolor("white", "black") +``` + +**参数**: +- `foregroundColor` - 前景色(black, blue, cyan, darkblue, darkcyan, darkgray, darkgreen, darkmagenta, darkred, darkyellow, gray, green, magenta, red, white, yellow) +- `backgroundColor` - 背景色(同上) + +### os.tui_setcursor(x, y) +设置光标位置。 + +```lua +os.tui_setcursor(20, 10) +``` + +**参数**: +- `x` - 光标的 X 坐标 +- `y` - 光标的 Y 坐标 + +### os.tui_clear() +清屏。 + +```lua +os.tui_clear() +``` + +### os.tui_drawline(x, y, length, character, color) +绘制水平线。 + +```lua +os.tui_drawline(10, 15, 30, "-", "green") +``` + +**参数**: +- `x` - 线的起始 X 坐标 +- `y` - 线的起始 Y 坐标 +- `length` - 线的长度 +- `character` - 用于绘制线的字符 +- `color` - 线的颜色(同上) + --- ## 输入输出库 (io)