WokerTask/public/admin/assets/edit.2c1367db.js

2 lines
6.4 KiB
JavaScript

import{_ as $}from"./index.6b2879d7.js";import{U as I,J as O,C as z,D as T,N as j,O as H,v as L,H as P,I as S,F as G,w as J}from"./element-plus.ff90c99c.js";import{_ as M}from"./index.vue_vue_type_style_index_0_lang.98199e6e.js";import{_ as Q}from"./picker.ffe50cdd.js";import{u as W,a as K}from"./vue-router.6d4cf914.js";import{a as X}from"./useDictOptions.15bfecbd.js";import{g as Y,h as Z,i as ee,j as te}from"./article.0c150709.js";import{e as oe}from"./index.87cea444.js";import{d as w,$ as b,s as le,o as d,c as V,W as e,Q as u,u as a,a as r,F as ae,a9 as ue,P as re,U as p}from"./@vue.f8dfc830.js";import"./lodash-es.a73406b7.js";import"./@vueuse.a2e59ee9.js";import"./@element-plus.0374639c.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.7f1be2bc.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.34a21088.js";import"./@wangeditor.fcd049a6.js";import"./index.000b2a9c.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.af59f801.js";import"./index.5098f7f9.js";import"./index.vue_vue_type_script_setup_true_lang.44dbc460.js";import"./index.4cdb7b3d.js";import"./index.d9c62109.js";import"./index.vue_vue_type_script_setup_true_lang.ec118b31.js";import"./usePaging.bd7a7dec.js";import"./vue3-video-play.5592bdaa.js";import"./vuedraggable.99ce9db3.js";import"./vue.80fb6650.js";import"./sortablejs.76b408b5.js";import"./lodash.3e731b89.js";import"./axios.c2babb35.js";import"./pinia.4b196199.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.3a7f085f.js";import"./color.5ae3e2dd.js";import"./clone.7bcb5228.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.37836f15.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.79024f1a.js";const ie={class:"article-edit"},se={class:"xl:flex"},me={class:"w-80"},ne={class:"w-80"},de={class:"w-80"},pe=r("div",{class:"form-tips"},"\u5EFA\u8BAE\u5C3A\u5BF8\uFF1A240*180px",-1),_e={class:"w-80"},ce=r("div",{class:"form-tips"},"\u9ED8\u8BA4\u4E3A0\uFF0C \u6570\u503C\u8D8A\u5927\u8D8A\u6392\u524D",-1),fe={class:"xl:ml-20"},Ee=w({name:"articleListsEdit"}),wt=w({...Ee,setup(be){const n=W(),F=K(),t=b({id:"",title:"",image:"",cid:"",desc:"",author:"",content:"",click_virtual:0,sort:0,is_show:1,abstract:""}),{removeTab:v}=oe(),_=le(),B=b({title:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u7AE0\u6807\u9898",trigger:"blur"}],cid:[{required:!0,message:"\u8BF7\u9009\u62E9\u6587\u7AE0\u680F\u76EE",trigger:"blur"}]}),g=async()=>{const s=await Y({id:n.query.id});Object.keys(t).forEach(o=>{t[o]=s[o]})},{optionsData:A}=X({article_cate:{api:Z}}),h=async()=>{var s;await((s=_.value)==null?void 0:s.validate()),n.query.id?await ee(t):await te(t),v(),F.back()};return n.query.id&&g(),(s,o)=>{const C=I,c=O,m=z,i=T,x=j,D=H,k=Q,f=L,E=P,R=S,y=M,U=G,q=J,N=$;return d(),V("div",ie,[e(c,{class:"!border-none",shadow:"never"},{default:u(()=>[e(C,{content:s.$route.meta.title,onBack:o[0]||(o[0]=l=>s.$router.back())},null,8,["content"])]),_:1}),e(c,{class:"mt-4 !border-none",shadow:"never"},{default:u(()=>[e(U,{ref_key:"formRef",ref:_,class:"ls-form",model:a(t),"label-width":"85px",rules:a(B)},{default:u(()=>[r("div",se,[r("div",null,[e(i,{label:"\u6587\u7AE0\u6807\u9898",prop:"title"},{default:u(()=>[r("div",me,[e(m,{modelValue:a(t).title,"onUpdate:modelValue":o[1]||(o[1]=l=>a(t).title=l),placeholder:"\u8BF7\u8F93\u5165\u6587\u7AE0\u6807\u9898",type:"textarea",autosize:{minRows:3,maxRows:3},maxlength:"64","show-word-limit":"",clearable:""},null,8,["modelValue"])])]),_:1}),e(i,{label:"\u6587\u7AE0\u680F\u76EE",prop:"cid"},{default:u(()=>[e(D,{class:"w-80",modelValue:a(t).cid,"onUpdate:modelValue":o[2]||(o[2]=l=>a(t).cid=l),placeholder:"\u8BF7\u9009\u62E9\u6587\u7AE0\u680F\u76EE",clearable:""},{default:u(()=>[(d(!0),V(ae,null,ue(a(A).article_cate,l=>(d(),re(x,{key:l.id,label:l.name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(i,{label:"\u6587\u7AE0\u7B80\u4ECB",prop:"desc"},{default:u(()=>[r("div",ne,[e(m,{modelValue:a(t).desc,"onUpdate:modelValue":o[3]||(o[3]=l=>a(t).desc=l),placeholder:"\u8BF7\u8F93\u5165\u6587\u7AE0\u7B80\u4ECB",type:"textarea",autosize:{minRows:3,maxRows:6},maxlength:200,"show-word-limit":"",clearable:""},null,8,["modelValue"])])]),_:1}),e(i,{label:"\u6458\u8981",prop:"abstract"},{default:u(()=>[r("div",de,[e(m,{type:"textarea",autosize:{minRows:6,maxRows:6},modelValue:a(t).abstract,"onUpdate:modelValue":o[4]||(o[4]=l=>a(t).abstract=l),maxlength:"200","show-word-limit":"",clearable:""},null,8,["modelValue"])])]),_:1}),e(i,{label:"\u6587\u7AE0\u5C01\u9762",prop:"image"},{default:u(()=>[r("div",null,[r("div",null,[e(k,{modelValue:a(t).image,"onUpdate:modelValue":o[5]||(o[5]=l=>a(t).image=l),limit:1},null,8,["modelValue"])]),pe])]),_:1}),e(i,{label:"\u4F5C\u8005",prop:"author"},{default:u(()=>[r("div",_e,[e(m,{modelValue:a(t).author,"onUpdate:modelValue":o[6]||(o[6]=l=>a(t).author=l),placeholder:"\u8BF7\u8F93\u5165\u4F5C\u8005\u540D\u79F0"},null,8,["modelValue"])])]),_:1}),e(i,{label:"\u6392\u5E8F",prop:"sort"},{default:u(()=>[r("div",null,[e(f,{modelValue:a(t).sort,"onUpdate:modelValue":o[7]||(o[7]=l=>a(t).sort=l),min:0,max:9999},null,8,["modelValue"]),ce])]),_:1}),e(i,{label:"\u521D\u59CB\u6D4F\u89C8\u91CF",prop:"click_virtual"},{default:u(()=>[r("div",null,[e(f,{modelValue:a(t).click_virtual,"onUpdate:modelValue":o[8]||(o[8]=l=>a(t).click_virtual=l),min:0},null,8,["modelValue"])])]),_:1}),e(i,{label:"\u6587\u7AE0\u72B6\u6001",required:"",prop:"is_show"},{default:u(()=>[e(R,{modelValue:a(t).is_show,"onUpdate:modelValue":o[9]||(o[9]=l=>a(t).is_show=l)},{default:u(()=>[e(E,{label:1},{default:u(()=>[p("\u663E\u793A")]),_:1}),e(E,{label:0},{default:u(()=>[p("\u9690\u85CF")]),_:1})]),_:1},8,["modelValue"])]),_:1})]),r("div",fe,[e(i,{label:"\u6587\u7AE0\u5185\u5BB9",prop:"content"},{default:u(()=>[e(y,{modelValue:a(t).content,"onUpdate:modelValue":o[10]||(o[10]=l=>a(t).content=l),height:667,width:375},null,8,["modelValue"])]),_:1})])])]),_:1},8,["model","rules"])]),_:1}),e(N,null,{default:u(()=>[e(q,{type:"primary",onClick:h},{default:u(()=>[p("\u4FDD\u5B58")]),_:1})]),_:1})])}}});export{wt as default};