2 lines
8.6 KiB
JavaScript
2 lines
8.6 KiB
JavaScript
import{_ as K}from"./BasicMainCard-3ff3ca7d.js";import{_ as X}from"./BasicModal.vue_vue_type_style_index_0_lang-04d97f2a.js";import{_ as G}from"./BasicInput.vue_vue_type_style_index_0_lang-82c40198.js";import{_ as Q,u as Y}from"./useBaseTable-3820970d.js";import{_ as Z}from"./button.vue_vue_type_style_index_0_lang-5de0d8e3.js";import{I as T}from"./Icon-87be71cf.js";import{t as tt}from"./useDataTime-4d99ffa4.js";import{getBooksTable as et,updateBook as ot,addBook as at,deleteBook as lt}from"./books-a7e152d7.js";import{d as it,g as _,o as I,c as M,b as s,w as d,a,e as st,J as rt,j as x,k as $,y as nt,t as ut,D as c,K as ct}from"./index-6af34310.js";import{g as j}from"./convert-2ad76038.js";import{g as P}from"./index-fedcc8bf.js";import{M as mt}from"./index-402d2a38.js";import{S as dt}from"./index-1cc8f5ba.js";import{T as z}from"./isSymbol-74667f0e.js";import{U as pt}from"./index-a8d977ad.js";import"./Grid-c00ab853.js";import"./index-971b2d4a.js";import"./_plugin-vue_export-helper-4395e3ae.js";import"./shallowequal-73e7ce81.js";import"./index-56af14ac.js";import"./vnode-6bd0f81f.js";import"./index-12698051.js";import"./useState-99a639ca.js";import"./useRefs-a7f6cac5.js";import"./_flatRest-fd0e6fb4.js";import"./isMobile-e2e89480.js";import"./omit-0d248b9d.js";import"./index-31d268cb.js";import"./Col-1a0e8c9f.js";import"./styleChecker-3b14718f.js";import"./isPlainObject-f211f712.js";import"./usePrice-bc935b83.js";import"./index-a9aa8901.js";import"./SearchOutlined-15a5b0f1.js";import"./FormItemContext-752394af.js";import"./index-54c8d4d2.js";import"./updateLocale-ce5acd65.js";import"./useMemo-b6d62481.js";import"./lodash-e4e61e75.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-064ba967.js";import"./index-2e0cb6a7.js";import"./Badge-34585beb.js";import"./isNumeric-3f69e2aa.js";import"./index-12ea9e69.js";import"./index-7ce3f98c.js";import"./index-850ddaf5.js";import"./DialogWrap-532fa905.js";import"./pickAttrs-a6fd0b4c.js";import"./css-aae66f86.js";import"./index-0bc83ff9.js";import"./toArray-1c539327.js";import"./index-f3fb0dd4.js";import"./index-d224c105.js";import"./index-dd895eee.js";const vt=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:p=>p.record.index+1},{title:"عنوان",dataIndex:"title",key:"title"},{title:"زیرعنوان",dataIndex:"sub_title",key:"sub_title"},{title:"تعداد قصه ها",dataIndex:"total_storys",key:"total_storys",align:"center",width:120,customRender:p=>p.record.total_storys??0},{title:"تصویر کاور",dataIndex:"cover",key:"cover",customRender:p=>p.record.cover||"-"},{title:"زمان ایجاد",dataIndex:"created_at",key:"created_at",customRender:p=>tt(p.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}],ft={class:"flex justify-between items-center mb-4"},_t=a("h2",null,"کتاب ها",-1),gt={class:"gap-2 flex justify-center"},ht=a("span",null,"حذف",-1),bt=a("span",null,"ویرایش",-1),yt={class:"space-y-4 relative"},xt={key:0,class:"absolute inset-0 bg-white/60 z-10 flex items-center justify-center"},kt=a("div",{class:"mb-1 text-sm text-gray-600"},"عنوان *",-1),wt=a("div",{class:"mb-1 text-sm text-gray-600"},"زیرعنوان",-1),Bt=a("div",{class:"mb-1 text-sm text-gray-600"},"آپلود تصویر کاور",-1),Ct={key:0},It=a("div",null,"آپلود کاور",-1),Mt={key:0,class:"mt-1"},Ut={class:"h-2 rounded bg-gray-200 overflow-hidden"},Tt={class:"text-xs text-gray-700 font-semibold text-center mt-1"},$e=it({__name:"index",setup(p){const D={authorization:`Bearer ${P()||localStorage.getItem("tamin_token")||""}`},[N,L]=Y(),O=_({columns:vt,api:et,defaultPageLimit:20}),b=_(!1),k=_(!1),w=_(null),g=_([]),h=_(0),v=_(0),u=_({title:"",sub_title:null,cover:null});function V(){g.value=[],k.value=!1,w.value=null,u.value={title:"",sub_title:null,cover:null},b.value=!0}function R(){b.value=!1}function q(o){return o.type.startsWith("image/")?o.size/1024/1024<5?!0:(c.error("حجم تصویر باید کمتر از 5MB باشد"),!1):(c.error("فقط فا
|