import{P as s,$ as a}from"./utils-lib.js?v=1761009159";import{c as e,r as l,q as o,H as n,I as t,y as p,v as r,x as i,z as m,e as u,B as c,F as P,b0 as d,Q as _,C as v,al as H,G as b,N as h,ak as y}from"./base-lib.js?v=1761009159";import{getCliVersion as f,setCliVersion as g}from"./site.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";const j={class:"p-[20px]"},x=e({__name:"php-command",setup(e){const x=l(),k=l([{content:"此处可设置命令行运行php时使用的PHP版本"},{content:"安装新的PHP版本后此处需要重新设置"},{content:"其它PHP版本在命令行可通过php+版本的方式运行，如：php74,php80"},{content:"PHP-CLI:一种运行 PHP 脚本的方式，它允许您在命令行终端中直接执行PHP脚本文件，请根据您的需求选择合适的版本。"}]),C=l(),q=l(!1),I=()=>{s({loading:"正在设置版本，请稍后...",request:g({php_version:C.value}),message:!0})};return o(()=>{(async()=>{s({loading:q,request:f(),data:{"select.version":[String,C],versions:[Array,x]}})})()}),(s,e)=>{const l=y,o=H,f=b,g=a,V=n("bt-loading");return t((r(),i("div",j,[e[2]||(e[2]=m("span",{class:"mr-[12px]"},"PHP-CLI版本",-1)),u(o,{modelValue:p(C),"onUpdate:modelValue":e[0]||(e[0]=s=>_(C)?C.value=s:null),class:"!w-[32rem]",placeholder:"请选择版本"},{default:c(()=>[(r(!0),i(P,null,d(p(x),(s,a)=>(r(),h(l,{key:a,label:s.name,value:s.version},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),u(f,{type:"primary",onClick:I,class:"!my-[20px] !block"},{default:c(()=>e[1]||(e[1]=[v("保存",-1)])),_:1,__:[1]}),u(g,{options:p(k)},null,8,["options"])])),[[V,p(q)]])}}});export{x as default};
