← Back
Editing: theme-install.js
import{_ as e}from"./index104.js?v=1765440387";import{a6 as s,c as r,K as t,M as l,cu as a,a7 as o}from"./utils-lib.js?v=1765440387";import{c as i,s as n,e as p,B as u,q as m,v as c,A as d,x as h}from"./base-lib.js?v=1765440387";import{b as _}from"./index96.js?v=1765440387";import{a as f}from"./index482.js?v=1765440387";import{B as x}from"./index480.js?v=1765440387";import{u as j}from"./column.js?v=1765440387";import{u as g}from"./useStore5.js?v=1765440387";import{a3 as b}from"./useMethod5.js?v=1765440387";import"./__commonjsHelpers__.js?v=1765440387";import"./index.vue_vue_type_script_setup_true_lang6.js?v=1765440387";import"./index131.js?v=1765440387";import"./index105.js?v=1765440387";import"./validator.js?v=1765440387";import"./index.vue_vue_type_style_index_0_scoped_b3c4124c_lang.js?v=1765440387";import"./useStore4.js?v=1765440387";import"./site.js?v=1765440387";import"./useController5.js?v=1765440387";import"./useController6.js?v=1765440387";import"./useStore14.js?v=1765440387";import"./form-item.js?v=1765440387";const v={class:"p-[2rem]"},w=i({__name:"theme-install",setup(i){const{localRow:w}=n(g()),{isRefreshThemeInstall:B,isRefreshThemeList:q}=n(_()),{BtTable:y,BtPage:C,BtRecommendSearch:R,BtRefresh:S,BtColumn:T,BtBatch:k,BtTableCategory:P,BtErrorMask:M,tableRef:H,classList:L,refresh:W,BtSearch:A}=s({request:e=>f(e),columns:[{label:"名称",prop:"name",minWidth:180,isCustom:!0,render:e=>p("span",{class:"flex items-center"},[p("img",{class:"w-[25px] h-[25px]",src:e.screenshot_url},null),p("span",{class:"ml-[5px]"},[e.name])])},{label:"描述",width:200,prop:"description",showOverflowTooltip:!0},{label:"作者",prop:"author",render:e=>p(r,{target:"_blank",style:"color : #1d9534",href:e.author.author_url},{default:()=>[e.author.author]})},{label:"WP",prop:"requires",width:50,render:e=>e.requires?e.requires:"--"},{label:"PHP",prop:"requires_php",render:e=>e.requires_php?e.requires_php:"--"},{label:"等级",prop:"rating",width:140,render:e=>{const s=e.rating?e.rating/20:0;return p("div",{class:"flex items-center"},[p(x,{modelValue:s,disabled:!0,"allow-half":!0,class:"!text-[2rem]"},null)])}},j((e=>[{title:e.installed?"已安装":"安装",render:e=>{const s=w.value.wp_version<e.requires||w.value.php_version<e.requires_php||e.installed;return e.installed?p("span",{class:"text-[#999]",style:"cursor:not-allowed"},[u("已安装")]):p("span",{class:"bt-link",style:s?"cursor:not-allowed; color: #999;":"",onClick:s?void 0:()=>{t({loading:"安装中...",request:b({s_id:w.value.id,slug:e.slug}),success:e=>{e.status&&(B.value=!0,q.value=!0,l.success("安装成功"))}})}},[u("安装")])}}]),{label:"操作",width:100,fixed:"right"})],extension:[a("search",{name:"local-setting-plugin",list:[]}),o(B)]});return(s,r)=>{const t=e;return m(),c("div",v,[p(t,null,{"header-right":d((()=>[p(h(A),{type:"local-setting-theme",placeholder:"请输入主题名称",class:"!w-[270px] mr-[10px]"})])),content:d((()=>[p(h(y),{"max-height":500})])),"footer-right":d((()=>[p(h(C))])),_:1})])}}});export{w as default};
Save File
Cancel