@duxweb/dvha-pro 1.0.19 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/layout/list.cjs +1 -1
- package/dist/cjs/components/layout/table.cjs +1 -1
- package/dist/cjs/hooks/table.cjs +1 -1
- package/dist/cjs/langs/en-US.json.cjs +1 -1
- package/dist/cjs/langs/zh-CN.json.cjs +1 -1
- package/dist/cjs/pages/menu/avatar.cjs +1 -1
- package/dist/esm/components/layout/list.js +20 -16
- package/dist/esm/components/layout/table.js +27 -23
- package/dist/esm/hooks/table.js +16 -19
- package/dist/esm/langs/en-US.json.js +5 -3
- package/dist/esm/langs/zh-CN.json.js +5 -3
- package/dist/esm/pages/menu/avatar.js +82 -82
- package/dist/types/components/layout/list.d.ts +7 -1
- package/dist/types/components/layout/table.d.ts +7 -1
- package/dist/types/components/list/card.d.ts +6 -0
- package/dist/types/components/list/list.d.ts +6 -0
- package/dist/types/components/table/tablePage.d.ts +6 -0
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("@duxweb/dvha-core"),G=require("@vueuse/core"),i=require("naive-ui"),H=require("../../hooks/action.cjs");require("@overlastic/vue");require("clsx");require("vue-echarts");require("vue-cropper");const X=require("../modal/modalPage.cjs");require("jinrishici");require("lodash-es");require("vue-draggable-plus");const T=require("../drawer/drawerPage.cjs");require("aieditor");require("vee-validate");require("vue-router");require("@vee-validate/i18n");require("colorizr");require("echarts");require("@ant-design/colors");require("@unocss/preset-icons/browser");require("@unocss/preset-typography");require("unocss/preset-wind4");require("@vee-validate/i18n/dist/locale/en.json");require("@vee-validate/i18n/dist/locale/zh_CN.json");require("vue-command-palette");require("@duxweb/dvha-naiveui");const Y=require("../../pages/page.cjs");require("../../pages/page404.cjs");const Z=require("../../pages/pageEmpty.cjs");require("@iconify-json/tabler/icons.json");const ee=require("./filter.cjs"),te=require("./filterLayout.cjs"),ae=require("./tools.cjs");require("mime");require("vue3-ace-editor");require("ace-builds/src-noconflict/mode-vue");require("ace-builds/src-noconflict/mode-javascript");require("ace-builds/src-noconflict/mode-html");require("ace-builds/src-noconflict/mode-json");require("ace-builds/src-noconflict/mode-json5");require("ace-builds/src-noconflict/theme-tomorrow_night");require("ace-builds/src-noconflict/theme-tomorrow");require("ace-builds/src-noconflict/ext-searchbox");require("ace-builds/src-noconflict/ext-language_tools");require("ace-builds/src-noconflict/mode-snippets");require("dayjs");require("@tanstack/vue-query");require("pinia");function re(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!e.isVNode(r)}const ie=e.defineComponent({name:"DuxListLayout",props:{rowKey:{type:String,default:"id"},path:{type:String,required:!0},filter:{type:Object},filterSchema:{type:Array},pagination:{type:[Boolean,Object],default:!0},tabs:{type:Array},tools:{type:Object},actions:{type:Array,default:()=>[]},checkable:{type:Boolean},sideLeftTitle:{type:String,default:""},sideRightTitle:{type:String,default:""}},setup(r,{slots:t}){var L;const A=e.toRef(r.filter||{}),{t:c}=m.useI18n(),{renderAction:D}=H.useAction(),F=e.toRef(r.pagination&&typeof r.pagination=="object"?r.pagination:{page:1,pageSize:20}),v=e.ref({}),j=()=>{Object.assign(v.value,A.value)},n=m.useExtendList({path:r.path,filters:v.value,pagination:F.value}),{meta:b,list:q,isLoading:x,autoRefetch:U,autoCountdown:w,onAutoRefetch:B,isExporting:O,isExportingRows:E,isImporting:y,onExport:I,onExportRows:M,onImport:W}=n,J=e.computed(()=>({page:n.page.value,pageSize:n.pageSize.value,pageCount:n.pageCount.value,pageSizes:n.pageSizes,pageSlot:5,onUpdatePage:n.onUpdatePage,onUpdatePageSize:n.onUpdatePageSize,showSizePicker:!0,showQuickJumper:!0})),h=e.reactive({show:!1}),p=e.reactive({show:!1}),s=e.reactive({show:!1}),N=e.ref(((L=r.filterSchema)==null?void 0:L.length)||0),{width:o}=G.useWindowSize(),S=()=>{var f;if(!((f=r.filterSchema)!=null&&f.length))return 0;const l=r.filterSchema.length;if(l<=3)return l;const d=o.value||1024;let u=3;return d>=1280?u=4:d>=1024?u=3:d>=768?u=2:u=1,Math.min(l,u)};e.watch(o,()=>{N.value=S()}),e.onMounted(()=>{N.value=S()});const _=e.computed(()=>(r.filterSchema||[]).slice(0,N.value)),k=e.computed(()=>(r.filterSchema||[]).slice(N.value)),K=e.computed(()=>k.value.length>0),C=l=>l.map(d=>{const{title:u,...f}=d;return{tag:ee.DuxTableFilter,attrs:{label:u,class:"flex-1 min-w-0"},children:f}}),{render:Q}=m.useJsonSchema({data:e.computed(()=>C(_.value))}),{render:$}=m.useJsonSchema({data:e.computed(()=>C(k.value))}),V=e.computed(()=>({import:!0,export:!0,refresh:!0,...r.tools}));return()=>e.createVNode(Y.DuxPage,{padding:!1,scrollbar:!1},{sideLeft:()=>{var l;return t!=null&&t.sideLeft&&o.value>=1024?(l=t==null?void 0:t.sideLeft)==null?void 0:l.call(t):void 0},sideRight:()=>{var l;return t!=null&&t.sideRight&&o.value>=1024?(l=t==null?void 0:t.sideRight)==null?void 0:l.call(t):void 0},default:()=>{var l,d,u,f,P,z,R;return e.createVNode("div",{class:"flex flex-col h-full relative"},[e.createVNode("div",{class:"lg:justify-between gap-2 p-3"},[e.createVNode("div",{class:"flex flex-col lg:flex-row lg:items-center gap-2"},[r.checkable&&e.createVNode("div",{class:"hidden lg:flex items-center pl-2"},[e.createVNode(i.NTooltip,null,{trigger:()=>e.createVNode("div",{class:"flex items-center"},[e.createVNode(i.NCheckbox,{checked:n.isAllChecked.value,indeterminate:n.isIndeterminate.value,onUpdateChecked:n.toggleSelectAll},null)]),default:()=>c("components.list.selectAll")})]),r.tabs&&e.createVNode("div",null,[e.createVNode(i.NTabs,{type:"segment",size:"small",style:{"--n-tab-padding":"4px 10px"},"default-value":(d=(l=r.tabs)==null?void 0:l[0])==null?void 0:d.value,value:(u=v.value)==null?void 0:u.tab,onUpdateValue:a=>{v.value.tab=a}},{default:()=>{var a;return[(a=r.tabs)==null?void 0:a.map(g=>e.createVNode(i.NTab,{name:g.value,tab:g.label},null))]}})]),e.createVNode("div",{class:"flex gap-2"},[(t==null?void 0:t.sideLeft)&&o.value<1024&&e.createVNode(i.NButton,{class:"flex-none",secondary:!0,onClick:()=>{p.show=!p.show}},{icon:()=>e.createVNode("div",{class:"i-tabler:layout-sidebar-inactive size-4"},null)}),e.createVNode("div",{class:"flex flex-wrap gap-2 items-center flex-1 lg:flex-none"},[e.h(Q)]),e.createVNode(i.NButton,{type:"primary",secondary:!0,onClick:j},{icon:()=>e.createVNode("div",{class:"i-tabler:search size-4"},null),default:()=>c("components.button.search")}),(t==null?void 0:t.sideRight)&&o.value<1024&&e.createVNode(i.NButton,{class:"flex-none",secondary:!0,onClick:()=>{s.show=!s.show}},{icon:()=>e.createVNode("div",{class:"i-tabler:layout-sidebar-right-inactive size-4"},null)}),K.value&&e.createVNode(i.NButton,{iconPlacement:"right",onClick:()=>{h.show=!h.show}},{default:()=>c("components.button.advanced"),icon:()=>e.createVNode("div",{class:["i-tabler:chevrons-down size-4 transition-all"]},null)})])]),e.createVNode("div",{class:"flex gap-2"},[(f=t.actions)==null?void 0:f.call(t),((P=r.actions)==null?void 0:P.length)>0&&D({type:o.value<1024?"dropdown":"button",text:o.value<1024,items:r.actions})])]),e.createVNode(i.NSpin,{show:x.value,class:"flex-1 min-h-0",contentClass:"h-full"},{default:()=>{var a;return[e.createVNode("div",{class:["h-full overflow-auto rounded-lg px-3"]},[!x.value&&q.value.length===0&&e.createVNode("div",{class:"flex justify-center items-center h-full"},[e.createVNode(Z.DuxPageEmpty,null,null)]),q.value.length>0&&((a=t==null?void 0:t.default)==null?void 0:a.call(t,n))])]}}),e.createVNode("div",{class:"flex justify-between px-3 py-2 gap-2"},[e.createVNode("div",null,[e.createVNode("div",{class:"flex gap-1 items-center"},[r.checkable&&e.createVNode(i.NTooltip,null,{trigger:()=>e.createVNode(i.NButton,{loading:y.value,circle:!0,quaternary:!0},{default:()=>[e.createVNode(i.NCheckbox,{checked:n.isAllChecked.value,indeterminate:n.isIndeterminate.value,onUpdateChecked:n.toggleSelectAll},null)]}),default:()=>c("components.list.selectAll")}),(z=t==null?void 0:t.tools)==null?void 0:z.call(t),V.value.export&&e.createVNode(i.NTooltip,null,{trigger:()=>e.createVNode(i.NButton,{loading:O.value,onClick:I,circle:!0,quaternary:!0},{icon:()=>e.createVNode("div",{class:"i-tabler:database-export size-4"},null)}),default:()=>c("components.button.export")}),V.value.import&&e.createVNode(i.NTooltip,null,{trigger:()=>e.createVNode(i.NButton,{loading:y.value,onClick:W,circle:!0,quaternary:!0},{icon:()=>e.createVNode("div",{class:"i-tabler:database-import size-4"},null)}),default:()=>c("components.button.import")}),V.value.refresh&&e.createVNode(i.NTooltip,null,{trigger:()=>e.createVNode(i.NButton,{onClick:B,circle:!0,quaternary:!0},{icon:()=>U.value?e.createVNode(i.NProgress,{class:"size-4",type:"circle",percentage:w.value*10,strokeWidth:20,color:"rgba(var(--ui-color-primary))"},{default:()=>[e.createVNode("span",{class:"text-8px"},[w.value])]}):e.createVNode("div",{class:"i-tabler:refresh size-4"},null)}),default:()=>c("components.button.autoRefresh")})])]),e.createVNode("div",{class:"flex items-center gap-2"},[(R=t==null?void 0:t.bottom)==null?void 0:R.call(t),r.pagination&&e.createVNode(i.NPagination,e.mergeProps(J.value,{simple:o.value<768}),{prefix:()=>{var a;return e.createVNode("div",null,[c("components.list.total",{total:((a=b==null?void 0:b.value)==null?void 0:a.total)||0})])}})])]),e.createVNode(ae.DuxTableTools,{number:n.checkeds.value.length,group:[[{icon:"i-tabler:x",onClick:()=>{var a;n.checkeds.value=[],(a=n.onUpdateChecked)==null||a.call(n,[])}}],[{label:c("components.button.export"),icon:"i-tabler:file-export",loading:E.value,onClick:M},{label:c("components.button.delete"),type:"error",icon:"i-tabler:trash"}]]},null),e.createVNode(i.NModal,{draggable:!0,class:"bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur",show:h.show,onUpdateShow:a=>h.show=a},{default:({draggableClass:a})=>{let g;return e.createVNode(X.default,{title:c("components.button.filter"),handle:a,onClose:()=>h.show=!1},{default:()=>[e.createVNode(te.DuxFilterLayout,{showLabel:!0,labelPlacement:"top"},re(g=e.h($))?g:{default:()=>[g]})]})}}),e.createVNode(i.NDrawer,{show:p.show,onUpdateShow:a=>p.show=a,autoFocus:!1,placement:"left"},{default:()=>[e.createVNode(T.DuxDrawerPage,{title:r.sideLeftTitle||c("components.button.sideLeft"),onClose:()=>p.show=!1,scrollbar:!1},{default:()=>{var a;return[(a=t==null?void 0:t.sideLeft)==null?void 0:a.call(t)]}})]}),e.createVNode(i.NDrawer,{show:s.show,onUpdateShow:a=>s.show=a,autoFocus:!1,placement:"right"},{default:()=>[e.createVNode(T.DuxDrawerPage,{title:r.sideRightTitle||c("components.button.sideRight"),onClose:()=>s.show=!1,scrollbar:!1},{default:()=>{var a;return[(a=t==null?void 0:t.sideRight)==null?void 0:a.call(t)]}})]})])}})}});exports.DuxListLayout=ie;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("@duxweb/dvha-core"),G=require("@vueuse/core"),i=require("naive-ui"),H=require("../../hooks/action.cjs");require("@overlastic/vue");require("clsx");require("vue-echarts");require("vue-cropper");const X=require("../modal/modalPage.cjs");require("jinrishici");require("lodash-es");require("vue-draggable-plus");const T=require("../drawer/drawerPage.cjs");require("aieditor");require("vee-validate");require("vue-router");require("@vee-validate/i18n");require("colorizr");require("echarts");require("@ant-design/colors");require("@unocss/preset-icons/browser");require("@unocss/preset-typography");require("unocss/preset-wind4");require("@vee-validate/i18n/dist/locale/en.json");require("@vee-validate/i18n/dist/locale/zh_CN.json");require("vue-command-palette");require("@duxweb/dvha-naiveui");const Y=require("../../pages/page.cjs");require("../../pages/page404.cjs");const Z=require("../../pages/pageEmpty.cjs");require("@iconify-json/tabler/icons.json");const ee=require("./filter.cjs"),te=require("./filterLayout.cjs"),ae=require("./tools.cjs");require("mime");require("vue3-ace-editor");require("ace-builds/src-noconflict/mode-vue");require("ace-builds/src-noconflict/mode-javascript");require("ace-builds/src-noconflict/mode-html");require("ace-builds/src-noconflict/mode-json");require("ace-builds/src-noconflict/mode-json5");require("ace-builds/src-noconflict/theme-tomorrow_night");require("ace-builds/src-noconflict/theme-tomorrow");require("ace-builds/src-noconflict/ext-searchbox");require("ace-builds/src-noconflict/ext-language_tools");require("ace-builds/src-noconflict/mode-snippets");require("dayjs");require("@tanstack/vue-query");require("pinia");function re(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!e.isVNode(r)}const ie=e.defineComponent({name:"DuxListLayout",props:{rowKey:{type:String,default:"id"},path:{type:String,required:!0},filter:{type:Object},filterSchema:{type:Array},pagination:{type:[Boolean,Object],default:!0},tabs:{type:Array},tools:{type:Object},actions:{type:Array,default:()=>[]},checkable:{type:Boolean},sideLeftTitle:{type:String,default:""},sideRightTitle:{type:String,default:""},hookListProps:{type:Object}},setup(r,{slots:t}){var L;const A=e.toRef(r.filter||{}),{t:o}=m.useI18n(),{renderAction:D}=H.useAction(),j=e.toRef(r.pagination&&typeof r.pagination=="object"?r.pagination:{page:1,pageSize:20}),v=e.ref({}),F=()=>{Object.assign(v.value,A.value)},n=m.useExtendList({path:r.path,filters:v.value,pagination:j.value,...r.hookListProps}),{meta:b,list:q,isLoading:x,autoRefetch:U,autoCountdown:w,onAutoRefetch:B,isExporting:O,isExportingRows:E,isImporting:y,onExport:I,onExportRows:M,onImport:W}=n,J=e.computed(()=>({page:n.page.value,pageSize:n.pageSize.value,pageCount:n.pageCount.value,pageSizes:n.pageSizes,pageSlot:5,onUpdatePage:n.onUpdatePage,onUpdatePageSize:n.onUpdatePageSize,showSizePicker:!0,showQuickJumper:!0})),h=e.reactive({show:!1}),p=e.reactive({show:!1}),s=e.reactive({show:!1}),N=e.ref(((L=r.filterSchema)==null?void 0:L.length)||0),{width:u}=G.useWindowSize(),S=()=>{var f;if(!((f=r.filterSchema)!=null&&f.length))return 0;const l=r.filterSchema.length;if(l<=3)return l;const d=u.value||1024;let c=3;return d>=1280?c=4:d>=1024?c=3:d>=768?c=2:c=1,Math.min(l,c)};e.watch(u,()=>{N.value=S()}),e.onMounted(()=>{N.value=S()});const _=e.computed(()=>(r.filterSchema||[]).slice(0,N.value)),k=e.computed(()=>(r.filterSchema||[]).slice(N.value)),K=e.computed(()=>k.value.length>0),C=l=>l.map(d=>{const{title:c,...f}=d;return{tag:ee.DuxTableFilter,attrs:{label:c,class:"flex-1 min-w-0"},children:f}}),{render:Q}=m.useJsonSchema({data:e.computed(()=>C(_.value))}),{render:$}=m.useJsonSchema({data:e.computed(()=>C(k.value))}),V=e.computed(()=>({import:!1,export:!0,refresh:!0,...r.tools}));return()=>e.createVNode(Y.DuxPage,{padding:!1,scrollbar:!1},{sideLeft:()=>{var l;return t!=null&&t.sideLeft&&u.value>=1024?(l=t==null?void 0:t.sideLeft)==null?void 0:l.call(t):void 0},sideRight:()=>{var l;return t!=null&&t.sideRight&&u.value>=1024?(l=t==null?void 0:t.sideRight)==null?void 0:l.call(t):void 0},default:()=>{var l,d,c,f,P,z,R;return e.createVNode("div",{class:"flex flex-col h-full relative"},[e.createVNode("div",{class:"lg:justify-between gap-2 p-3"},[e.createVNode("div",{class:"flex flex-col lg:flex-row lg:items-center gap-2"},[r.checkable&&e.createVNode("div",{class:"hidden lg:flex items-center pl-2"},[e.createVNode(i.NTooltip,null,{trigger:()=>e.createVNode("div",{class:"flex items-center"},[e.createVNode(i.NCheckbox,{checked:n.isAllChecked.value,indeterminate:n.isIndeterminate.value,onUpdateChecked:n.toggleSelectAll},null)]),default:()=>o("components.list.selectAll")})]),r.tabs&&e.createVNode("div",null,[e.createVNode(i.NTabs,{type:"segment",size:"small",style:{"--n-tab-padding":"4px 10px"},"default-value":(d=(l=r.tabs)==null?void 0:l[0])==null?void 0:d.value,value:(c=v.value)==null?void 0:c.tab,onUpdateValue:a=>{v.value.tab=a}},{default:()=>{var a;return[(a=r.tabs)==null?void 0:a.map(g=>e.createVNode(i.NTab,{name:g.value,tab:g.label},null))]}})]),e.createVNode("div",{class:"flex gap-2"},[(t==null?void 0:t.sideLeft)&&u.value<1024&&e.createVNode(i.NButton,{class:"flex-none",secondary:!0,onClick:()=>{p.show=!p.show}},{icon:()=>e.createVNode("div",{class:"i-tabler:layout-sidebar-inactive size-4"},null)}),e.createVNode("div",{class:"flex flex-wrap gap-2 items-center flex-1 lg:flex-none"},[e.h(Q)]),e.createVNode(i.NButton,{type:"primary",secondary:!0,onClick:F},{icon:()=>e.createVNode("div",{class:"i-tabler:search size-4"},null),default:()=>o("components.button.search")}),(t==null?void 0:t.sideRight)&&u.value<1024&&e.createVNode(i.NButton,{class:"flex-none",secondary:!0,onClick:()=>{s.show=!s.show}},{icon:()=>e.createVNode("div",{class:"i-tabler:layout-sidebar-right-inactive size-4"},null)}),K.value&&e.createVNode(i.NButton,{iconPlacement:"right",onClick:()=>{h.show=!h.show}},{default:()=>o("components.button.advanced"),icon:()=>e.createVNode("div",{class:["i-tabler:chevrons-down size-4 transition-all"]},null)})])]),e.createVNode("div",{class:"flex gap-2"},[(f=t.actions)==null?void 0:f.call(t),((P=r.actions)==null?void 0:P.length)>0&&D({type:u.value<1024?"dropdown":"button",text:u.value<1024,items:r.actions})])]),e.createVNode(i.NSpin,{show:x.value,class:"flex-1 min-h-0",contentClass:"h-full"},{default:()=>{var a;return[e.createVNode("div",{class:["h-full overflow-auto rounded-lg px-3"]},[!x.value&&q.value.length===0&&e.createVNode("div",{class:"flex justify-center items-center h-full"},[e.createVNode(Z.DuxPageEmpty,null,null)]),q.value.length>0&&((a=t==null?void 0:t.default)==null?void 0:a.call(t,n))])]}}),e.createVNode("div",{class:"flex justify-between px-3 py-2 gap-2"},[e.createVNode("div",null,[e.createVNode("div",{class:"flex gap-1 items-center"},[r.checkable&&e.createVNode(i.NTooltip,null,{trigger:()=>e.createVNode(i.NButton,{loading:y.value,circle:!0,quaternary:!0},{default:()=>[e.createVNode(i.NCheckbox,{checked:n.isAllChecked.value,indeterminate:n.isIndeterminate.value,onUpdateChecked:n.toggleSelectAll},null)]}),default:()=>o("components.list.selectAll")}),(z=t==null?void 0:t.tools)==null?void 0:z.call(t),V.value.export&&e.createVNode(i.NTooltip,null,{trigger:()=>e.createVNode(i.NButton,{loading:O.value,onClick:I,circle:!0,quaternary:!0},{icon:()=>e.createVNode("div",{class:"i-tabler:database-export size-4"},null)}),default:()=>o("components.button.export")}),V.value.import&&e.createVNode(i.NTooltip,null,{trigger:()=>e.createVNode(i.NButton,{loading:y.value,onClick:W,circle:!0,quaternary:!0},{icon:()=>e.createVNode("div",{class:"i-tabler:database-import size-4"},null)}),default:()=>o("components.button.import")}),V.value.refresh&&e.createVNode(i.NTooltip,null,{trigger:()=>e.createVNode(i.NButton,{onClick:B,circle:!0,quaternary:!0},{icon:()=>U.value?e.createVNode(i.NProgress,{class:"size-4",type:"circle",percentage:w.value*10,strokeWidth:20,color:"rgba(var(--ui-color-primary))"},{default:()=>[e.createVNode("span",{class:"text-8px"},[w.value])]}):e.createVNode("div",{class:"i-tabler:refresh size-4"},null)}),default:()=>o("components.button.autoRefresh")})])]),e.createVNode("div",{class:"flex items-center gap-2"},[(R=t==null?void 0:t.bottom)==null?void 0:R.call(t),r.pagination&&e.createVNode(i.NPagination,e.mergeProps(J.value,{simple:u.value<768}),{prefix:()=>{var a;return e.createVNode("div",null,[o("components.list.total",{total:((a=b==null?void 0:b.value)==null?void 0:a.total)||0})])}})])]),e.createVNode(ae.DuxTableTools,{number:n.checkeds.value.length,group:[[{icon:"i-tabler:x",onClick:()=>{var a;n.checkeds.value=[],(a=n.onUpdateChecked)==null||a.call(n,[])}}],[{label:o("components.button.export"),icon:"i-tabler:file-export",loading:E.value,onClick:M},{label:o("components.button.delete"),type:"error",icon:"i-tabler:trash"}]]},null),e.createVNode(i.NModal,{draggable:!0,class:"bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur",show:h.show,onUpdateShow:a=>h.show=a},{default:({draggableClass:a})=>{let g;return e.createVNode(X.default,{title:o("components.button.filter"),handle:a,onClose:()=>h.show=!1},{default:()=>[e.createVNode(te.DuxFilterLayout,{showLabel:!0,labelPlacement:"top"},re(g=e.h($))?g:{default:()=>[g]})]})}}),e.createVNode(i.NDrawer,{show:p.show,onUpdateShow:a=>p.show=a,autoFocus:!1,placement:"left"},{default:()=>[e.createVNode(T.DuxDrawerPage,{title:r.sideLeftTitle||o("components.button.sideLeft"),onClose:()=>p.show=!1,scrollbar:!1},{default:()=>{var a;return[(a=t==null?void 0:t.sideLeft)==null?void 0:a.call(t)]}})]}),e.createVNode(i.NDrawer,{show:s.show,onUpdateShow:a=>s.show=a,autoFocus:!1,placement:"right"},{default:()=>[e.createVNode(T.DuxDrawerPage,{title:r.sideRightTitle||o("components.button.sideRight"),onClose:()=>s.show=!1,scrollbar:!1},{default:()=>{var a;return[(a=t==null?void 0:t.sideRight)==null?void 0:a.call(t)]}})]})])}})}});exports.DuxListLayout=ie;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("@duxweb/dvha-core"),H=require("@vueuse/core"),i=require("naive-ui"),Q=require("../../hooks/action.cjs");require("@overlastic/vue");require("clsx");require("vue-echarts");require("vue-cropper");const X=require("../modal/modalPage.cjs");require("jinrishici");require("lodash-es");require("vue-draggable-plus");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("@duxweb/dvha-core"),H=require("@vueuse/core"),i=require("naive-ui"),Q=require("../../hooks/action.cjs");require("@overlastic/vue");require("clsx");require("vue-echarts");require("vue-cropper");const X=require("../modal/modalPage.cjs");require("jinrishici");require("lodash-es");require("vue-draggable-plus");const j=require("../drawer/drawerPage.cjs");require("aieditor");require("vee-validate");require("vue-router");require("@vee-validate/i18n");require("colorizr");require("echarts");require("@ant-design/colors");require("@unocss/preset-icons/browser");require("@unocss/preset-typography");require("unocss/preset-wind4");require("@vee-validate/i18n/dist/locale/en.json");require("@vee-validate/i18n/dist/locale/zh_CN.json");require("vue-command-palette");require("@duxweb/dvha-naiveui");const Y=require("../../pages/page.cjs");require("../../pages/page404.cjs");require("@iconify-json/tabler/icons.json");const Z=require("./filter.cjs"),ee=require("./filterLayout.cjs"),te=require("./tools.cjs");require("mime");require("vue3-ace-editor");require("ace-builds/src-noconflict/mode-vue");require("ace-builds/src-noconflict/mode-javascript");require("ace-builds/src-noconflict/mode-html");require("ace-builds/src-noconflict/mode-json");require("ace-builds/src-noconflict/mode-json5");require("ace-builds/src-noconflict/theme-tomorrow_night");require("ace-builds/src-noconflict/theme-tomorrow");require("ace-builds/src-noconflict/ext-searchbox");require("ace-builds/src-noconflict/ext-language_tools");require("ace-builds/src-noconflict/mode-snippets");require("dayjs");require("@tanstack/vue-query");const re=require("../../hooks/table.cjs");require("pinia");function ae(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!e.isVNode(r)}const ie=e.defineComponent({name:"DuxTableLayout",props:{path:{type:String,required:!0},filter:{type:Object},filterSchema:{type:Array},columns:{type:Array},pagination:{type:[Boolean,Object],default:!0},tabs:{type:Array},actions:{type:Array,default:()=>[]},tools:{type:Object},sideLeftTitle:{type:String,default:""},sideRightTitle:{type:String,default:""},hookTableProps:{type:Object}},setup(r,{slots:t}){var y,V;const g=e.toRef(r,"filter",{}),L=e.toRef(r,"columns",[]),{t:o}=m.useI18n(),{renderAction:P}=Q.useAction(),p=re.useTable({path:r.path,filters:g.value,columns:L,pagination:r.pagination,...r.hookTableProps}),{columns:q,tablePagination:D,table:z,onUpdateColumnSelected:B,onUpdateChecked:v,columnSelected:O,autoRefetch:A,autoCountdown:w,onAutoRefetch:U,isExporting:E,isExportingRows:F,isImporting:W,onExport:I,onExportRows:J,onImport:M}=p,_=e.computed(()=>q.value.filter(n=>"title"in n&&"key"in n).map(n=>({label:n.title,value:n.key}))),{width:l}=H.useWindowSize(),$=e.computed(()=>q.value.reduce((c,u)=>c+(Number(u==null?void 0:u.width)||Number(u==null?void 0:u.minWidth)||110),0)),f=e.reactive({show:!1}),b=e.reactive({show:!1}),h=e.reactive({show:!1}),N=e.computed(()=>(r.filterSchema||[]).map(n=>{const{label:c,...u}=n;return{tag:Z.DuxTableFilter,attrs:{label:c},children:u}})),{render:K}=m.useJsonSchema({data:(y=N.value)==null?void 0:y.slice(1)}),{render:G}=m.useJsonSchema({data:(V=N.value)==null?void 0:V.slice(0,1)}),s=e.computed(()=>({import:!1,export:!0,refresh:!0,...r.tools}));return()=>e.createVNode(Y.DuxPage,{actions:r.actions,scrollbar:!1},{sideLeft:()=>{var n;return t!=null&&t.sideLeft&&l.value>=1024?(n=t==null?void 0:t.sideLeft)==null?void 0:n.call(t):void 0},sideRight:()=>{var n;return t!=null&&t.sideRight&&l.value>=1024?(n=t==null?void 0:t.sideRight)==null?void 0:n.call(t):void 0},default:()=>{var n,c,u,x,T,R,S,k,C;return e.createVNode("div",{class:"flex flex-col gap-2 h-full relative"},[e.createVNode("div",{class:"flex gap-2 justify-between flex-col lg:flex-row"},[r.tabs&&e.createVNode("div",{class:"flex flex-none"},[e.createVNode(i.NTabs,{type:"segment",size:"small",style:{"--n-tab-padding":"4px 10px"},"default-value":(c=(n=r.tabs)==null?void 0:n[0])==null?void 0:c.value,value:(u=g.value)==null?void 0:u.tab,onUpdateValue:a=>{g.value.tab=a}},{default:()=>{var a;return[(a=r.tabs)==null?void 0:a.map(d=>e.createVNode(i.NTab,{name:d.value,tab:d.label},null))]}})]),e.createVNode("div",{class:["overflow-hidden flex-1 flex gap-2"]},[(t==null?void 0:t.sideLeft)&&l.value<1024&&e.createVNode(i.NButton,{class:"flex-none",secondary:!0,onClick:()=>{b.show=!b.show}},{icon:()=>e.createVNode("div",{class:"i-tabler:layout-sidebar-inactive size-4"},null)}),e.createVNode("div",{class:["flex-1 lg:flex gap-2 flex-wrap",r.tabs?"justify-end":"justify-start"]},[e.h(G)]),(t==null?void 0:t.sideRight)&&l.value<1024&&e.createVNode(i.NButton,{class:"flex-none",secondary:!0,onClick:()=>{h.show=!h.show}},{icon:()=>e.createVNode("div",{class:"i-tabler:layout-sidebar-right-inactive size-4"},null)})]),e.createVNode("div",{class:"flex gap-2 justify-between lg:justify-end"},[e.createVNode("div",{class:"flex gap-2 items-center"},[N.value.length>1&&e.createVNode(i.NButton,{iconPlacement:"right",onClick:()=>{f.show=!f.show}},{default:()=>o("components.button.filter"),icon:()=>e.createVNode("div",{class:["i-tabler:chevrons-down size-4 transition-all"]},null)}),(x=t==null?void 0:t.tools)==null?void 0:x.call(t),e.createVNode(i.NPopselect,{options:_.value,value:O.value,onUpdateValue:a=>{B(a)},multiple:!0,placement:"bottom-start",trigger:"click"},{default:()=>[e.createVNode(i.NTooltip,null,{trigger:()=>e.createVNode(i.NButton,{secondary:!0,"icon-placement":"right"},{icon:()=>e.createVNode("div",{class:"i-tabler:columns size-4"},null)}),default:()=>o("components.list.columnSetting")})]}),s.value.export&&e.createVNode(i.NTooltip,null,{trigger:()=>e.createVNode(i.NButton,{secondary:!0,loading:E.value,onClick:I},{icon:()=>e.createVNode("div",{class:"i-tabler:database-export size-4"},null)}),default:()=>o("components.button.export")}),s.value.import&&e.createVNode(i.NTooltip,null,{trigger:()=>e.createVNode(i.NButton,{secondary:!0,loading:W.value,onClick:M},{icon:()=>e.createVNode("div",{class:"i-tabler:database-import size-4"},null)}),default:()=>o("components.button.import")}),s.value.refresh&&e.createVNode(i.NTooltip,null,{trigger:()=>e.createVNode(i.NButton,{secondary:!0,onClick:U},{icon:()=>A.value?e.createVNode(i.NProgress,{class:"size-4",type:"circle",percentage:w.value*10,strokeWidth:20,color:"rgba(var(--ui-color-primary))"},{default:()=>[e.createVNode("span",{class:"text-8px"},[w.value])]}):e.createVNode("div",{class:"i-tabler:refresh size-4"},null)}),default:()=>o("components.button.autoRefresh")})]),e.createVNode("div",{class:"flex gap-2 justify-end"},[(T=t.actions)==null?void 0:T.call(t),((R=r.actions)==null?void 0:R.length)>0&&P({type:l.value<1024?"dropdown":"button",items:r.actions})])])]),e.createVNode("div",{class:"flex-1 min-h-0"},[(S=t==null?void 0:t.default)==null?void 0:S.call(t,{...p,width:$.value})]),e.createVNode("div",{class:"flex justify-between"},[e.createVNode("div",null,[(k=t==null?void 0:t.bottom)==null?void 0:k.call(t)]),e.createVNode("div",null,[r.pagination&&e.createVNode(i.NPagination,e.mergeProps(D.value,{simple:l.value<768}),{prefix:()=>e.createVNode("div",null,[o("components.list.total",{total:p.total.value||0})])})])]),e.createVNode(te.DuxTableTools,{number:((C=z.value.checkedRowKeys)==null?void 0:C.length)||0||0,group:[[{icon:"i-tabler:x",onClick:()=>{v==null||v([])}}],[{label:o("components.button.export"),icon:"i-tabler:file-export",loading:F.value,onClick:J},{label:o("components.button.delete"),type:"error",icon:"i-tabler:trash"}]]},null),e.createVNode(i.NModal,{draggable:!0,class:"bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur",show:f.show,onUpdateShow:a=>f.show=a},{default:({draggableClass:a})=>{let d;return e.createVNode(X.default,{title:o("components.button.filter"),handle:a,onClose:()=>f.show=!1},{default:()=>[e.createVNode(ee.DuxFilterLayout,{showLabel:!0,labelPlacement:"top"},ae(d=e.h(K))?d:{default:()=>[d]})]})}}),e.createVNode(i.NDrawer,{show:b.show,onUpdateShow:a=>b.show=a,autoFocus:!1,placement:"left"},{default:()=>[e.createVNode(j.DuxDrawerPage,{title:r.sideLeftTitle||o("components.button.sideLeft"),onClose:()=>b.show=!1,scrollbar:!1},{default:()=>{var a;return[(a=t==null?void 0:t.sideLeft)==null?void 0:a.call(t)]}})]}),e.createVNode(i.NDrawer,{show:h.show,onUpdateShow:a=>h.show=a,autoFocus:!1,placement:"right"},{default:()=>[e.createVNode(j.DuxDrawerPage,{title:r.sideRightTitle||o("components.button.sideRight"),onClose:()=>h.show=!1,scrollbar:!1},{default:()=>{var a;return[(a=t==null?void 0:t.sideRight)==null?void 0:a.call(t)]}})]})])}})}});exports.DuxTableLayout=ie;
|
package/dist/cjs/hooks/table.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),i=require("@duxweb/dvha-core"),p=require("@duxweb/dvha-naiveui"),r=require("naive-ui");function d(u){const{t:o}=i.useI18n(),l=r.useMessage(),a=r.useNotification(),t=n.ref(null);return p.useNaiveTable({...u,onExportSuccess:e=>{var s,c;(s=t.value)==null||s.destroy(),t.value=null,a.success({title:o("hooks.table.exportSuccess"),content:o("hooks.table.exportSuccessContent",{count:((c=e==null?void 0:e.data)==null?void 0:c.length)||0}),duration:6e3})},onExportProgress:e=>{!t.value&&e&&(t.value=a.create({title:o("hooks.table.exportProgress"),content:()=>o("hooks.table.exportProgressContent",{page:e.page||1}),avatar:()=>n.createVNode(r.NProgress,{class:"size-10 text-sm",type:"circle",percentage:50},{default:()=>[n.createVNode("div",{class:"text-xs"},[e.page||1])]}),onClose:()=>{t.value=null}}))},onExportError:e=>{var s;(s=t.value)==null||s.destroy(),t.value=null,l.error(o("hooks.table.exportFailedContent",{error:(e==null?void 0:e.message)||o("common.unknownError")}))},onImportSuccess:e=>{var s;(s=t.value)==null||s.destroy(),t.value=null,a.success({title:o("hooks.table.importSuccess"),content:o("hooks.table.importSuccessContent",{count:(e==null?void 0:e.processedItems)||0}),duration:6e3})},onImportProgress:e=>{t.value||(t.value=a.create({title:o("hooks.table.importProgress"),content:()=>o("hooks.table.importProgressContent",{processed:(e==null?void 0:e.processedItems)||0,total:(e==null?void 0:e.totalItems)||0}),avatar:()=>n.createVNode(r.NProgress,{class:"size-10 text-sm",type:"circle",percentage:(e==null?void 0:e.percentage)||0},{default:()=>[n.createVNode("div",{class:"text-xs"},[(e==null?void 0:e.percentage)||0,n.createTextVNode("%")])]}),onClose:()=>{t.value=null}}))},onImportError:e=>{var s;(s=t.value)==null||s.destroy(),t.value=null,l.error(o("hooks.table.importFailedContent",{error:(e==null?void 0:e.message)||o("common.unknownError")}))}})}exports.useTable=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={search:"Search",empty:"No data",menu:"Menu",theme:"Theme",dark:"Dark",light:"Light",back:"Back",loading:"Loading...",success:"Success",error:"Error",unknownError:"Unknown error"},t={tab:{lock:"Lock",closeOther:"Close Other",closeLeft:"Close Left",closeRight:"Close Right"},dialog:{confirm:{title:"Confirm",content:"Are you sure you want to confirm?"},cancel:{title:"Cancel",content:"Are you sure you want to cancel?"},success:{title:"Success",content:"Your operation has been successful"},error:{title:"Error",content:"Your operation has been failed"},prompt:{title:"Prompt"}},button:{confirm:"Confirm",cancel:"Cancel",submit:"Submit",reset:"Reset",delete:"Delete",search:"Search",advanced:"Advanced",export:"Export",import:"Import",autoRefresh:"Auto Refresh",filter:"Filter",refresh:"Refresh",select:"Select",create:"Create",download:"Download",rename:"Rename",preview:"Preview"},form:{edit:"Edit",create:"Create"},list:{selectAll:"Select All",columnSetting:"Column Setting",selectedItems:"Selected Items: {num}",total:"Total: {total}"},editor:{placeholder:"Please enter content"},upload:{fileManager:"File Manager",uploadFile:"Upload File",cancel:"Cancel",delete:"Delete",error:"Upload failed",empty:"No files",desc:"Click or drag files to this area",dropHere:"Drop files here",allFormats:"Support any format files",supportFormats:"Support {formats} format files",maxSize:"Max file size: {size}MB",success:"Upload success",failed:"Upload failed",fileExtension:"{ext} file",status:{pending:"Pending",uploading:"Uploading",success:"Success",cancelled:"Cancelled",error:"Error"},file:{name:"File Name",size:"Size",type:"Type",status:"Status"},actions:"Actions"},uploadManage:{title:"File Manager",all:"All",image:"Images",media:"Media",docs:"Documents",upload:"Upload",empty:"No files",emptyDesc:"No more files, please upload files",back:"Back to parent",parentLevel:"Parent Level",namePlaceholder:"Please enter name",createError:"Create failed",editError:"Edit failed",delError:"Delete failed",delTitle:"Confirm Delete",delDesc:"Are you sure you want to delete the selected files? This action cannot be undone."},crop:{title:"Crop",select:"Select",confirm:"Confirm"},stats:{realTimeData:"Real-time Data"},data:{selectTitle:"Please select data"},menu:{language:"Language",chinese:"中文",english:"English",color:"Color",primaryColor:"Primary Color",neutralColor:"Neutral Color",theme:"Theme",followSystem:"Follow System",lightMode:"Light",darkMode:"Dark",logout:"Logout"},iconPicker:{title:"Icon Picker"}},o={table:{exportSuccess:"Export data successfully",exportProgress:"Exporting data, please wait...",exportFailed:"Export data failed",exportSuccessContent:"Successfully exported {count} records",exportProgressContent:"Page {page} data",exportFailedContent:"Export data failed: {error}",importSuccess:"Import data successfully",importProgress:"Importing data, please wait...",importFailed:"Import data failed",importSuccessContent:"Successfully imported {count} records",importProgressContent:"{processed} / {total} records",importFailedContent:"Import data failed: {error}",saveSuccess:"Save successfully",copySuccess:"Copy successfully",copyFailed:"Copy failed"},download:{failed:"Download failed"}},a={400:{title:"400",desc:"Request error"},401:{title:"401",desc:"You do not have permission to access this page"},403:{title:"403",desc:"You do not have permission to access this page"},404:{title:"404",desc:"Page not found"},500:{title:"500",desc:"Server error"},empty:{title:"No data",desc:"No more data, please try again later"},loading:{title:"Loading",desc:"Data is loading, please try again later"},login:{success:"Login success",error:"Login failed, please check your username and password",placeholder:{username:"Please enter username",password:"Please enter password"},buttons:{login:"Login"}}},r={common:e,components:t,hooks:o,pages:a};exports.common=e;exports.components=t;exports.default=
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={search:"Search",empty:"No data",menu:"Menu",theme:"Theme",dark:"Dark",light:"Light",back:"Back",loading:"Loading...",success:"Success",error:"Error",unknownError:"Unknown error"},t={tab:{lock:"Lock",closeOther:"Close Other",closeLeft:"Close Left",closeRight:"Close Right"},dialog:{confirm:{title:"Confirm",content:"Are you sure you want to confirm?"},cancel:{title:"Cancel",content:"Are you sure you want to cancel?"},success:{title:"Success",content:"Your operation has been successful"},error:{title:"Error",content:"Your operation has been failed"},prompt:{title:"Prompt"}},button:{confirm:"Confirm",cancel:"Cancel",submit:"Submit",reset:"Reset",delete:"Delete",search:"Search",advanced:"Advanced",export:"Export",import:"Import",autoRefresh:"Auto Refresh",filter:"Filter",refresh:"Refresh",select:"Select",create:"Create",download:"Download",rename:"Rename",preview:"Preview"},form:{edit:"Edit",create:"Create"},list:{selectAll:"Select All",columnSetting:"Column Setting",selectedItems:"Selected Items: {num}",total:"Total: {total}"},editor:{placeholder:"Please enter content"},upload:{fileManager:"File Manager",uploadFile:"Upload File",cancel:"Cancel",delete:"Delete",error:"Upload failed",empty:"No files",desc:"Click or drag files to this area",dropHere:"Drop files here",allFormats:"Support any format files",supportFormats:"Support {formats} format files",maxSize:"Max file size: {size}MB",success:"Upload success",failed:"Upload failed",fileExtension:"{ext} file",status:{pending:"Pending",uploading:"Uploading",success:"Success",cancelled:"Cancelled",error:"Error"},file:{name:"File Name",size:"Size",type:"Type",status:"Status"},actions:"Actions"},uploadManage:{title:"File Manager",all:"All",image:"Images",media:"Media",docs:"Documents",upload:"Upload",empty:"No files",emptyDesc:"No more files, please upload files",back:"Back to parent",parentLevel:"Parent Level",namePlaceholder:"Please enter name",createError:"Create failed",editError:"Edit failed",delError:"Delete failed",delTitle:"Confirm Delete",delDesc:"Are you sure you want to delete the selected files? This action cannot be undone."},crop:{title:"Crop",select:"Select",confirm:"Confirm"},stats:{realTimeData:"Real-time Data"},data:{selectTitle:"Please select data"},menu:{language:"Language",chinese:"中文",english:"English",color:"Color",primaryColor:"Primary Color",neutralColor:"Neutral Color",theme:"Theme",followSystem:"Follow System",lightMode:"Light",darkMode:"Dark",logout:"Logout"},iconPicker:{title:"Icon Picker"}},o={table:{exportSuccess:"Export data successfully",exportProgress:"Exporting data, please wait...",exportFailed:"Export data failed",exportSuccessContent:"Successfully exported {count} records",exportProgressContent:"Page {page} data",exportFailedContent:"Export data failed: {error}",importSuccess:"Import data successfully",importProgress:"Importing data, please wait...",importFailed:"Import data failed",importSuccessContent:"Successfully imported {count} records",importProgressContent:"{processed} / {total} records",importFailedContent:"Import data failed: {error}",saveSuccess:"Save successfully",copySuccess:"Copy successfully",copyFailed:"Copy failed"},download:{failed:"Download failed"}},a={400:{title:"400",desc:"Request error"},401:{title:"401",desc:"You do not have permission to access this page"},403:{title:"403",desc:"You do not have permission to access this page"},404:{title:"404",desc:"Page not found"},500:{title:"500",desc:"Server error"},empty:{title:"No data",desc:"No more data, please try again later"},loading:{title:"Loading",desc:"Data is loading, please try again later"},login:{success:"Login success",error:"Login failed, please check your username and password",placeholder:{username:"Please enter username",password:"Please enter password"},buttons:{login:"Login"}}},r={"zh-CN":"Chinese","en-US":"English","ja-JP":"Japanese","ko-KR":"Korean","ru-RU":"Russian"},l={common:e,components:t,hooks:o,pages:a,locale:r};exports.common=e;exports.components=t;exports.default=l;exports.hooks=o;exports.locale=r;exports.pages=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={search:"搜索",empty:"暂无数据",menu:"菜单",theme:"主题",dark:"暗色模式",light:"亮色模式",back:"返回",loading:"加载中...",success:"操作成功",error:"操作失败",unknownError:"未知错误",keyword:"请输入关键字"},t={tab:{lock:"锁定",closeOther:"关闭其他",closeLeft:"关闭左侧",closeRight:"关闭右侧"},dialog:{confirm:{title:"确定",content:"确定要确认吗?"},cancel:{title:"取消",content:"确定要取消吗?"},success:{title:"成功",content:"您的操作已成功"},error:{title:"错误",content:"您的操作已失败"},prompt:{title:"提示"}},button:{confirm:"确定",cancel:"取消",submit:"提交",reset:"重置",delete:"删除",search:"查询",advanced:"高级",export:"导出",import:"导入",autoRefresh:"自动刷新",filter:"筛选",refresh:"刷新",select:"选择",create:"新建",download:"下载",rename:"重命名",preview:"预览",sideLeft:"左侧",sideRight:"右侧"},form:{edit:"编辑",create:"新增",success:"保存成功",error:"保存失败"},list:{selectAll:"全选",columnSetting:"列设置",selectedItems:"选中项: {num}",total:"共 {total} 条"},editor:{placeholder:"请输入内容"},upload:{fileManager:"文件管理器",uploadFile:"上传文件",cancel:"取消",delete:"删除",error:"上传失败",empty:"暂无文件",desc:"点击或拖拽文件到此区域",dropHere:"拖拽文件到此处",allFormats:"支持任意格式文件",supportFormats:"支持 {formats} 格式文件",maxSize:"最大文件大小: {size}MB",success:"上传成功",failed:"上传失败",fileExtension:"{ext}文件",status:{pending:"待上传",uploading:"上传中",success:"已上传",cancelled:"已取消",error:"失败"},file:{name:"文件名",size:"大小",type:"类型",status:"状态"},actions:"操作"},uploadManage:{title:"文件管理",all:"全部",image:"图片",media:"媒体",docs:"文档",upload:"上传",empty:"暂无文件",emptyDesc:"暂无更多文件,请先上传文件",back:"返回上一级",parentLevel:"上一级",namePlaceholder:"请输入名称",createError:"创建失败",editError:"修改失败",delError:"删除失败",delTitle:"确认删除",delDesc:"确定要删除选中的文件吗?删除后不可恢复。"},crop:{title:"裁剪",select:"选择",confirm:"确认"},stats:{realTimeData:"实时数据"},data:{selectTitle:"请选择数据"},menu:{language:"语言",chinese:"中文",english:"English",color:"颜色",primaryColor:"主题色",neutralColor:"中性色",theme:"主题",followSystem:"跟随系统",lightMode:"亮色",darkMode:"暗色",logout:"退出登录"},iconPicker:{title:"图标选择"}},o={table:{exportSuccess:"导出数据成功",exportProgress:"导出数据中, 请稍后...",exportFailed:"导出数据失败",exportSuccessContent:"成功导出 {count} 条数据",exportProgressContent:"第 {page} 页数据",exportFailedContent:"导出数据失败:{error}",importSuccess:"导入数据成功",importProgress:"导入数据中, 请稍后...",importFailed:"导入数据失败",importSuccessContent:"成功导入 {count} 条数据",importProgressContent:"{processed} / {total} 条数据",importFailedContent:"导入数据失败:{error}",saveSuccess:"保存成功",copySuccess:"复制成功",copyFailed:"复制失败"},download:{failed:"下载失败"}},r={400:{title:"400",desc:"请求错误"},401:{title:"401",desc:"您没有权限访问该页面"},403:{title:"403",desc:"您没有权限访问该页面"},404:{title:"404",desc:"页面不存在"},500:{title:"500",desc:"服务器错误"},empty:{title:"暂无数据",desc:"暂无更多数据,请先创建数据"},loading:{title:"加载中",desc:"数据正在加载中,请稍后..."},login:{success:"登录成功",error:"登录失败,请检查用户名和密码",placeholder:{username:"请输入用户名",password:"请输入密码"},buttons:{login:"登录"}}},s={common:e,components:t,hooks:o,pages:r};exports.common=e;exports.components=t;exports.default=
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={search:"搜索",empty:"暂无数据",menu:"菜单",theme:"主题",dark:"暗色模式",light:"亮色模式",back:"返回",loading:"加载中...",success:"操作成功",error:"操作失败",unknownError:"未知错误",keyword:"请输入关键字"},t={tab:{lock:"锁定",closeOther:"关闭其他",closeLeft:"关闭左侧",closeRight:"关闭右侧"},dialog:{confirm:{title:"确定",content:"确定要确认吗?"},cancel:{title:"取消",content:"确定要取消吗?"},success:{title:"成功",content:"您的操作已成功"},error:{title:"错误",content:"您的操作已失败"},prompt:{title:"提示"}},button:{confirm:"确定",cancel:"取消",submit:"提交",reset:"重置",delete:"删除",search:"查询",advanced:"高级",export:"导出",import:"导入",autoRefresh:"自动刷新",filter:"筛选",refresh:"刷新",select:"选择",create:"新建",download:"下载",rename:"重命名",preview:"预览",sideLeft:"左侧",sideRight:"右侧"},form:{edit:"编辑",create:"新增",success:"保存成功",error:"保存失败"},list:{selectAll:"全选",columnSetting:"列设置",selectedItems:"选中项: {num}",total:"共 {total} 条"},editor:{placeholder:"请输入内容"},upload:{fileManager:"文件管理器",uploadFile:"上传文件",cancel:"取消",delete:"删除",error:"上传失败",empty:"暂无文件",desc:"点击或拖拽文件到此区域",dropHere:"拖拽文件到此处",allFormats:"支持任意格式文件",supportFormats:"支持 {formats} 格式文件",maxSize:"最大文件大小: {size}MB",success:"上传成功",failed:"上传失败",fileExtension:"{ext}文件",status:{pending:"待上传",uploading:"上传中",success:"已上传",cancelled:"已取消",error:"失败"},file:{name:"文件名",size:"大小",type:"类型",status:"状态"},actions:"操作"},uploadManage:{title:"文件管理",all:"全部",image:"图片",media:"媒体",docs:"文档",upload:"上传",empty:"暂无文件",emptyDesc:"暂无更多文件,请先上传文件",back:"返回上一级",parentLevel:"上一级",namePlaceholder:"请输入名称",createError:"创建失败",editError:"修改失败",delError:"删除失败",delTitle:"确认删除",delDesc:"确定要删除选中的文件吗?删除后不可恢复。"},crop:{title:"裁剪",select:"选择",confirm:"确认"},stats:{realTimeData:"实时数据"},data:{selectTitle:"请选择数据"},menu:{language:"语言",chinese:"中文",english:"English",color:"颜色",primaryColor:"主题色",neutralColor:"中性色",theme:"主题",followSystem:"跟随系统",lightMode:"亮色",darkMode:"暗色",logout:"退出登录"},iconPicker:{title:"图标选择"}},o={table:{exportSuccess:"导出数据成功",exportProgress:"导出数据中, 请稍后...",exportFailed:"导出数据失败",exportSuccessContent:"成功导出 {count} 条数据",exportProgressContent:"第 {page} 页数据",exportFailedContent:"导出数据失败:{error}",importSuccess:"导入数据成功",importProgress:"导入数据中, 请稍后...",importFailed:"导入数据失败",importSuccessContent:"成功导入 {count} 条数据",importProgressContent:"{processed} / {total} 条数据",importFailedContent:"导入数据失败:{error}",saveSuccess:"保存成功",copySuccess:"复制成功",copyFailed:"复制失败"},download:{failed:"下载失败"}},r={400:{title:"400",desc:"请求错误"},401:{title:"401",desc:"您没有权限访问该页面"},403:{title:"403",desc:"您没有权限访问该页面"},404:{title:"404",desc:"页面不存在"},500:{title:"500",desc:"服务器错误"},empty:{title:"暂无数据",desc:"暂无更多数据,请先创建数据"},loading:{title:"加载中",desc:"数据正在加载中,请稍后..."},login:{success:"登录成功",error:"登录失败,请检查用户名和密码",placeholder:{username:"请输入用户名",password:"请输入密码"},buttons:{login:"登录"}}},s={"zh-CN":"中文","en-US":"English","ja-JP":"日本語","ko-KR":"한국어","ru-RU":"Русский"},l={common:e,components:t,hooks:o,pages:r,locale:s};exports.common=e;exports.components=t;exports.default=l;exports.hooks=o;exports.locale=s;exports.pages=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@duxweb/dvha-core"),w=require("naive-ui"),z=require("vue-router");require("clsx");const g=require("../../components/widget/avatar.cjs");require("vue-echarts");require("@overlastic/vue");require("dayjs");require("mime");require("lodash-es");require("@tanstack/vue-query");require("@duxweb/dvha-naiveui");require("@vueuse/core");require("pinia");require("vue-cropper");require("jinrishici");require("vue-draggable-plus");require("aieditor");require("vee-validate");require("@vee-validate/i18n");require("colorizr");require("echarts");require("@ant-design/colors");require("@unocss/preset-icons/browser");require("@unocss/preset-typography");require("unocss/preset-wind4");require("@vee-validate/i18n/dist/locale/en.json");require("@vee-validate/i18n/dist/locale/zh_CN.json");const $=require("./button.cjs");require("vue-command-palette");require("../page404.cjs");require("@iconify-json/tabler/icons.json");require("vue3-ace-editor");require("ace-builds/src-noconflict/mode-vue");require("ace-builds/src-noconflict/mode-javascript");require("ace-builds/src-noconflict/mode-html");require("ace-builds/src-noconflict/mode-json");require("ace-builds/src-noconflict/mode-json5");require("ace-builds/src-noconflict/theme-tomorrow_night");require("ace-builds/src-noconflict/theme-tomorrow");require("ace-builds/src-noconflict/ext-searchbox");require("ace-builds/src-noconflict/ext-language_tools");require("ace-builds/src-noconflict/mode-snippets");const D=e.defineComponent({name:"DuxMenuAvatar",props:{collapsed:{type:Boolean,default:!1}},setup(b){const{t}=c.useI18n(),d=c.useI18n(),q=z.useRouter(),{config:f,getRoutePath:h}=c.useManage(),{mutate:y}=c.useLogout(),{mode:p,primaryColors:k,neutralColors:N,colorMapping:m,setColor:v,setMode:x}=c.useTheme(),u=(a,l)=>e.createVNode("div",{class:"flex gap-2 items-center w-30"},[e.createVNode("div",{class:"flex-1 min-w-0"},[a]),e.createVNode("div",null,[l&&e.createVNode("div",{class:"i-tabler:check"},null)])]),i=a=>e.createVNode("div",{class:`${a} size-4`},null),V=e.computed(()=>{var l;const a=(l=f.userMenus)==null?void 0:l.map(r=>({label:t(r.label||"",{},r.label),key:r.key,icon:()=>i(r.icon),path:r.path}));return(a==null?void 0:a.length)>0?[...a,{type:"divider"}]:[]}),n=c.useGetAuth(),C=e.computed(()=>{var a,l;return[{key:"header",type:"render",render:()=>{var r,s,o;return e.createVNode("div",{class:"flex gap-2 px-3 pb-1 pt-1 items-center "},[e.createVNode(g.DuxAvatar,{round:!0,size:28,src:(r=n.info)==null?void 0:r.avatar},null),e.createVNode("div",{class:"flex flex-col"},[e.createVNode("div",{class:"text-sm font-medium"},[(s=n.info)==null?void 0:s.nickname]),e.createVNode("div",{class:"text-xs text-muted"},[(o=n.info)==null?void 0:o.username])])])}},{type:"divider"},...V.value,{label:t("components.menu.language"),key:"locale",icon:()=>i("i-tabler:language"),children:[...(d.getLocales()||[]).map(r=>({label:()=>u(t(`locale.${r}`),d.getLocale()===r),key:`locale.${r}`}))]},{label:t("components.menu.color"),key:"color",icon:()=>i("i-tabler:palette"),children:[{label:()=>e.createVNode("div",{class:"flex gap-2 items-center w-30"},[e.createVNode("div",{class:"size-2 rounded-full",style:{backgroundColor:"rgb(var(--ui-color-primary))"}},null),e.createVNode("div",null,[t("components.menu.primaryColor")])]),key:"color.primary",children:(a=k.value)==null?void 0:a.map(r=>({label:()=>u(e.createVNode("div",{class:"flex gap-2 items-center"},[e.createVNode("div",{class:"size-2 rounded-full",style:{backgroundColor:`rgb(var(--base-color-${r}-500))`}},null),e.createVNode("div",null,[r])]),m.value.primary===r),key:`color.primary.${r}`}))},{label:()=>e.createVNode("div",{class:"flex gap-2 items-center w-30"},[e.createVNode("div",{class:"size-2 rounded-full",style:{backgroundColor:"rgb(var(--ui-color-gray-600))"}},null),e.createVNode("div",null,[t("components.menu.neutralColor")])]),key:"color.neutral",children:(l=N.value)==null?void 0:l.map(r=>({label:()=>u(e.createVNode("div",{class:"flex gap-2 items-center"},[e.createVNode("div",{class:"size-2 rounded-full",style:{backgroundColor:`rgb(var(--base-color-${r}-600))`}},null),e.createVNode("div",null,[r])]),m.value.gray===r),key:`color.neutral.${r}`}))}]},{label:t("components.menu.theme"),key:"theme",icon:()=>i("i-tabler:brightness-half"),children:[{label:()=>u(t("components.menu.followSystem"),p.value==="auto"),key:"theme.auto"},{label:()=>u(t("components.menu.lightMode"),p.value==="light"),key:"theme.light"},{label:()=>u(t("components.menu.darkMode"),p.value==="dark"),key:"theme.dark"}]},{type:"divider"},{label:t("components.menu.logout"),key:"logout",icon:()=>i("i-tabler:logout")}]});function M(a,l){const r=a.lastIndexOf("."),[s,o]=r===-1?[a,""]:[a.substring(0,r),a.substring(r+1)];switch(s){case"locale":d.changeLocale(o);break;case"color.primary":v("primary",o);break;case"color.neutral":v("gray",o);break;case"theme":x(o);break;case"logout":y();break;default:if(!(l!=null&&l.path))return;q.push(h(l.path))}}return()=>e.createVNode(w.NDropdown,{options:C.value,placement:"bottom-start",trigger:"click",onSelect:M,width:200},{default:()=>[e.createVNode($.default,{collapsed:b.collapsed},{icon:()=>{var a;return e.createVNode(g.DuxAvatar,{class:"group-hover:shadow-lg",round:!0,size:28,src:(a=n.info)==null?void 0:a.avatar},null)},default:()=>{var a,l;return e.createVNode("div",{class:"flex flex-col"},[e.createVNode("div",{class:"text-sm font-medium"},[(a=n.info)==null?void 0:a.nickname]),e.createVNode("div",{class:"text-xs text-muted"},[(l=n.info)==null?void 0:l.username])])}})]})}});exports.default=D;
|
|
@@ -92,6 +92,9 @@ const yt = /* @__PURE__ */ ie({
|
|
|
92
92
|
sideRightTitle: {
|
|
93
93
|
type: String,
|
|
94
94
|
default: ""
|
|
95
|
+
},
|
|
96
|
+
hookListProps: {
|
|
97
|
+
type: Object
|
|
95
98
|
}
|
|
96
99
|
},
|
|
97
100
|
setup(i, {
|
|
@@ -110,17 +113,18 @@ const yt = /* @__PURE__ */ ie({
|
|
|
110
113
|
}, l = ce({
|
|
111
114
|
path: i.path,
|
|
112
115
|
filters: b.value,
|
|
113
|
-
pagination: B.value
|
|
116
|
+
pagination: B.value,
|
|
117
|
+
...i.hookListProps
|
|
114
118
|
}), {
|
|
115
119
|
meta: w,
|
|
116
120
|
list: k,
|
|
117
121
|
isLoading: C,
|
|
118
122
|
autoRefetch: _,
|
|
119
|
-
autoCountdown:
|
|
123
|
+
autoCountdown: L,
|
|
120
124
|
onAutoRefetch: K,
|
|
121
125
|
isExporting: Q,
|
|
122
126
|
isExportingRows: G,
|
|
123
|
-
isImporting:
|
|
127
|
+
isImporting: z,
|
|
124
128
|
onExport: H,
|
|
125
129
|
onExportRows: X,
|
|
126
130
|
onImport: Y
|
|
@@ -142,7 +146,7 @@ const yt = /* @__PURE__ */ ie({
|
|
|
142
146
|
show: !1
|
|
143
147
|
}), x = T(((F = i.filterSchema) == null ? void 0 : F.length) || 0), {
|
|
144
148
|
width: u
|
|
145
|
-
} = de(),
|
|
149
|
+
} = de(), P = () => {
|
|
146
150
|
var p;
|
|
147
151
|
if (!((p = i.filterSchema) != null && p.length)) return 0;
|
|
148
152
|
const n = i.filterSchema.length;
|
|
@@ -153,11 +157,11 @@ const yt = /* @__PURE__ */ ie({
|
|
|
153
157
|
return c >= 1280 ? o = 4 : c >= 1024 ? o = 3 : c >= 768 ? o = 2 : o = 1, Math.min(n, o);
|
|
154
158
|
};
|
|
155
159
|
le(u, () => {
|
|
156
|
-
x.value =
|
|
160
|
+
x.value = P();
|
|
157
161
|
}), ne(() => {
|
|
158
|
-
x.value =
|
|
162
|
+
x.value = P();
|
|
159
163
|
});
|
|
160
|
-
const $ = m(() => (i.filterSchema || []).slice(0, x.value)),
|
|
164
|
+
const $ = m(() => (i.filterSchema || []).slice(0, x.value)), R = m(() => (i.filterSchema || []).slice(x.value)), ee = m(() => R.value.length > 0), A = (n) => n.map((c) => {
|
|
161
165
|
const {
|
|
162
166
|
title: o,
|
|
163
167
|
...p
|
|
@@ -177,9 +181,9 @@ const yt = /* @__PURE__ */ ie({
|
|
|
177
181
|
}), {
|
|
178
182
|
render: ae
|
|
179
183
|
} = E({
|
|
180
|
-
data: m(() => A(
|
|
184
|
+
data: m(() => A(R.value))
|
|
181
185
|
}), y = m(() => ({
|
|
182
|
-
import: !
|
|
186
|
+
import: !1,
|
|
183
187
|
export: !0,
|
|
184
188
|
refresh: !0,
|
|
185
189
|
...i.tools
|
|
@@ -197,7 +201,7 @@ const yt = /* @__PURE__ */ ie({
|
|
|
197
201
|
return t != null && t.sideRight && u.value >= 1024 ? (n = t == null ? void 0 : t.sideRight) == null ? void 0 : n.call(t) : void 0;
|
|
198
202
|
},
|
|
199
203
|
default: () => {
|
|
200
|
-
var n, c, o, p,
|
|
204
|
+
var n, c, o, p, j, N, D;
|
|
201
205
|
return e("div", {
|
|
202
206
|
class: "flex flex-col h-full relative"
|
|
203
207
|
}, [e("div", {
|
|
@@ -279,7 +283,7 @@ const yt = /* @__PURE__ */ ie({
|
|
|
279
283
|
}, null)
|
|
280
284
|
})])]), e("div", {
|
|
281
285
|
class: "flex gap-2"
|
|
282
|
-
}, [(p = t.actions) == null ? void 0 : p.call(t), ((
|
|
286
|
+
}, [(p = t.actions) == null ? void 0 : p.call(t), ((j = i.actions) == null ? void 0 : j.length) > 0 && W({
|
|
283
287
|
type: u.value < 1024 ? "dropdown" : "button",
|
|
284
288
|
text: u.value < 1024,
|
|
285
289
|
items: i.actions
|
|
@@ -302,7 +306,7 @@ const yt = /* @__PURE__ */ ie({
|
|
|
302
306
|
class: "flex gap-1 items-center"
|
|
303
307
|
}, [i.checkable && e(s, null, {
|
|
304
308
|
trigger: () => e(d, {
|
|
305
|
-
loading:
|
|
309
|
+
loading: z.value,
|
|
306
310
|
circle: !0,
|
|
307
311
|
quaternary: !0
|
|
308
312
|
}, {
|
|
@@ -313,7 +317,7 @@ const yt = /* @__PURE__ */ ie({
|
|
|
313
317
|
}, null)]
|
|
314
318
|
}),
|
|
315
319
|
default: () => r("components.list.selectAll")
|
|
316
|
-
}), (
|
|
320
|
+
}), (N = t == null ? void 0 : t.tools) == null ? void 0 : N.call(t), y.value.export && e(s, null, {
|
|
317
321
|
trigger: () => e(d, {
|
|
318
322
|
loading: Q.value,
|
|
319
323
|
onClick: H,
|
|
@@ -327,7 +331,7 @@ const yt = /* @__PURE__ */ ie({
|
|
|
327
331
|
default: () => r("components.button.export")
|
|
328
332
|
}), y.value.import && e(s, null, {
|
|
329
333
|
trigger: () => e(d, {
|
|
330
|
-
loading:
|
|
334
|
+
loading: z.value,
|
|
331
335
|
onClick: Y,
|
|
332
336
|
circle: !0,
|
|
333
337
|
quaternary: !0
|
|
@@ -346,13 +350,13 @@ const yt = /* @__PURE__ */ ie({
|
|
|
346
350
|
icon: () => _.value ? e(ge, {
|
|
347
351
|
class: "size-4",
|
|
348
352
|
type: "circle",
|
|
349
|
-
percentage:
|
|
353
|
+
percentage: L.value * 10,
|
|
350
354
|
strokeWidth: 20,
|
|
351
355
|
color: "rgba(var(--ui-color-primary))"
|
|
352
356
|
}, {
|
|
353
357
|
default: () => [e("span", {
|
|
354
358
|
class: "text-8px"
|
|
355
|
-
}, [
|
|
359
|
+
}, [L.value])]
|
|
356
360
|
}) : e("div", {
|
|
357
361
|
class: "i-tabler:refresh size-4"
|
|
358
362
|
}, null)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as te, toRef as
|
|
1
|
+
import { defineComponent as te, toRef as D, computed as b, reactive as x, createVNode as t, h as A, mergeProps as ie, isVNode as ae } from "vue";
|
|
2
2
|
import { useI18n as re, useJsonSchema as O } from "@duxweb/dvha-core";
|
|
3
3
|
import { useWindowSize as ne } from "@vueuse/core";
|
|
4
4
|
import { NTabs as oe, NTab as le, NButton as l, NPopselect as ue, NTooltip as h, NProgress as ce, NPagination as de, NModal as pe, NDrawer as U } from "naive-ui";
|
|
@@ -88,13 +88,16 @@ const gt = /* @__PURE__ */ te({
|
|
|
88
88
|
sideRightTitle: {
|
|
89
89
|
type: String,
|
|
90
90
|
default: ""
|
|
91
|
+
},
|
|
92
|
+
hookTableProps: {
|
|
93
|
+
type: Object
|
|
91
94
|
}
|
|
92
95
|
},
|
|
93
96
|
setup(i, {
|
|
94
97
|
slots: e
|
|
95
98
|
}) {
|
|
96
|
-
var
|
|
97
|
-
const g =
|
|
99
|
+
var C, S;
|
|
100
|
+
const g = D(i, "filter", {}), F = D(i, "columns", []), {
|
|
98
101
|
t: n
|
|
99
102
|
} = re(), {
|
|
100
103
|
renderAction: V
|
|
@@ -102,7 +105,8 @@ const gt = /* @__PURE__ */ te({
|
|
|
102
105
|
path: i.path,
|
|
103
106
|
filters: g.value,
|
|
104
107
|
columns: F,
|
|
105
|
-
pagination: i.pagination
|
|
108
|
+
pagination: i.pagination,
|
|
109
|
+
...i.hookTableProps
|
|
106
110
|
}), {
|
|
107
111
|
columns: R,
|
|
108
112
|
tablePagination: W,
|
|
@@ -111,7 +115,7 @@ const gt = /* @__PURE__ */ te({
|
|
|
111
115
|
onUpdateChecked: w,
|
|
112
116
|
columnSelected: M,
|
|
113
117
|
autoRefetch: _,
|
|
114
|
-
autoCountdown:
|
|
118
|
+
autoCountdown: k,
|
|
115
119
|
onAutoRefetch: q,
|
|
116
120
|
isExporting: J,
|
|
117
121
|
isExportingRows: K,
|
|
@@ -124,11 +128,11 @@ const gt = /* @__PURE__ */ te({
|
|
|
124
128
|
value: r.key
|
|
125
129
|
}))), {
|
|
126
130
|
width: u
|
|
127
|
-
} = ne(), Z = b(() => R.value.reduce((c, o) => c + (Number(o == null ? void 0 : o.width) || Number(o == null ? void 0 : o.minWidth) || 110), 0)), p =
|
|
131
|
+
} = ne(), Z = b(() => R.value.reduce((c, o) => c + (Number(o == null ? void 0 : o.width) || Number(o == null ? void 0 : o.minWidth) || 110), 0)), p = x({
|
|
128
132
|
show: !1
|
|
129
|
-
}), f =
|
|
133
|
+
}), f = x({
|
|
130
134
|
show: !1
|
|
131
|
-
}), m =
|
|
135
|
+
}), m = x({
|
|
132
136
|
show: !1
|
|
133
137
|
}), y = b(() => (i.filterSchema || []).map((r) => {
|
|
134
138
|
const {
|
|
@@ -145,13 +149,13 @@ const gt = /* @__PURE__ */ te({
|
|
|
145
149
|
})), {
|
|
146
150
|
render: $
|
|
147
151
|
} = O({
|
|
148
|
-
data: (
|
|
152
|
+
data: (C = y.value) == null ? void 0 : C.slice(1)
|
|
149
153
|
}), {
|
|
150
154
|
render: ee
|
|
151
155
|
} = O({
|
|
152
|
-
data: (
|
|
153
|
-
}),
|
|
154
|
-
import: !
|
|
156
|
+
data: (S = y.value) == null ? void 0 : S.slice(0, 1)
|
|
157
|
+
}), s = b(() => ({
|
|
158
|
+
import: !1,
|
|
155
159
|
export: !0,
|
|
156
160
|
refresh: !0,
|
|
157
161
|
...i.tools
|
|
@@ -169,7 +173,7 @@ const gt = /* @__PURE__ */ te({
|
|
|
169
173
|
return e != null && e.sideRight && u.value >= 1024 ? (r = e == null ? void 0 : e.sideRight) == null ? void 0 : r.call(e) : void 0;
|
|
170
174
|
},
|
|
171
175
|
default: () => {
|
|
172
|
-
var r, c, o, j, L, N,
|
|
176
|
+
var r, c, o, T, j, L, N, P, z;
|
|
173
177
|
return t("div", {
|
|
174
178
|
class: "flex flex-col gap-2 h-full relative"
|
|
175
179
|
}, [t("div", {
|
|
@@ -233,7 +237,7 @@ const gt = /* @__PURE__ */ te({
|
|
|
233
237
|
icon: () => t("div", {
|
|
234
238
|
class: ["i-tabler:chevrons-down size-4 transition-all"]
|
|
235
239
|
}, null)
|
|
236
|
-
}), (
|
|
240
|
+
}), (T = e == null ? void 0 : e.tools) == null ? void 0 : T.call(e), t(ue, {
|
|
237
241
|
options: Y.value,
|
|
238
242
|
value: M.value,
|
|
239
243
|
onUpdateValue: (a) => {
|
|
@@ -254,7 +258,7 @@ const gt = /* @__PURE__ */ te({
|
|
|
254
258
|
}),
|
|
255
259
|
default: () => n("components.list.columnSetting")
|
|
256
260
|
})]
|
|
257
|
-
}),
|
|
261
|
+
}), s.value.export && t(h, null, {
|
|
258
262
|
trigger: () => t(l, {
|
|
259
263
|
secondary: !0,
|
|
260
264
|
loading: J.value,
|
|
@@ -265,7 +269,7 @@ const gt = /* @__PURE__ */ te({
|
|
|
265
269
|
}, null)
|
|
266
270
|
}),
|
|
267
271
|
default: () => n("components.button.export")
|
|
268
|
-
}),
|
|
272
|
+
}), s.value.import && t(h, null, {
|
|
269
273
|
trigger: () => t(l, {
|
|
270
274
|
secondary: !0,
|
|
271
275
|
loading: G.value,
|
|
@@ -276,7 +280,7 @@ const gt = /* @__PURE__ */ te({
|
|
|
276
280
|
}, null)
|
|
277
281
|
}),
|
|
278
282
|
default: () => n("components.button.import")
|
|
279
|
-
}),
|
|
283
|
+
}), s.value.refresh && t(h, null, {
|
|
280
284
|
trigger: () => t(l, {
|
|
281
285
|
secondary: !0,
|
|
282
286
|
onClick: q
|
|
@@ -284,13 +288,13 @@ const gt = /* @__PURE__ */ te({
|
|
|
284
288
|
icon: () => _.value ? t(ce, {
|
|
285
289
|
class: "size-4",
|
|
286
290
|
type: "circle",
|
|
287
|
-
percentage:
|
|
291
|
+
percentage: k.value * 10,
|
|
288
292
|
strokeWidth: 20,
|
|
289
293
|
color: "rgba(var(--ui-color-primary))"
|
|
290
294
|
}, {
|
|
291
295
|
default: () => [t("span", {
|
|
292
296
|
class: "text-8px"
|
|
293
|
-
}, [
|
|
297
|
+
}, [k.value])]
|
|
294
298
|
}) : t("div", {
|
|
295
299
|
class: "i-tabler:refresh size-4"
|
|
296
300
|
}, null)
|
|
@@ -298,24 +302,24 @@ const gt = /* @__PURE__ */ te({
|
|
|
298
302
|
default: () => n("components.button.autoRefresh")
|
|
299
303
|
})]), t("div", {
|
|
300
304
|
class: "flex gap-2 justify-end"
|
|
301
|
-
}, [(
|
|
305
|
+
}, [(j = e.actions) == null ? void 0 : j.call(e), ((L = i.actions) == null ? void 0 : L.length) > 0 && V({
|
|
302
306
|
type: u.value < 1024 ? "dropdown" : "button",
|
|
303
307
|
items: i.actions
|
|
304
308
|
})])])]), t("div", {
|
|
305
309
|
class: "flex-1 min-h-0"
|
|
306
|
-
}, [(
|
|
310
|
+
}, [(N = e == null ? void 0 : e.default) == null ? void 0 : N.call(e, {
|
|
307
311
|
...v,
|
|
308
312
|
width: Z.value
|
|
309
313
|
})]), t("div", {
|
|
310
314
|
class: "flex justify-between"
|
|
311
|
-
}, [t("div", null, [(
|
|
315
|
+
}, [t("div", null, [(P = e == null ? void 0 : e.bottom) == null ? void 0 : P.call(e)]), t("div", null, [i.pagination && t(de, ie(W.value, {
|
|
312
316
|
simple: u.value < 768
|
|
313
317
|
}), {
|
|
314
318
|
prefix: () => t("div", null, [n("components.list.total", {
|
|
315
319
|
total: v.total.value || 0
|
|
316
320
|
})])
|
|
317
321
|
})])]), t(ve, {
|
|
318
|
-
number: ((
|
|
322
|
+
number: ((z = I.value.checkedRowKeys) == null ? void 0 : z.length) || 0 || 0,
|
|
319
323
|
group: [[{
|
|
320
324
|
icon: "i-tabler:x",
|
|
321
325
|
onClick: () => {
|
package/dist/esm/hooks/table.js
CHANGED
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useNaiveTable as
|
|
4
|
-
import { useMessage as
|
|
5
|
-
function
|
|
1
|
+
import { ref as i, createVNode as l, createTextVNode as p } from "vue";
|
|
2
|
+
import { useI18n as m } from "@duxweb/dvha-core";
|
|
3
|
+
import { useNaiveTable as x } from "@duxweb/dvha-naiveui";
|
|
4
|
+
import { useMessage as g, useNotification as d, NProgress as c } from "naive-ui";
|
|
5
|
+
function E(u) {
|
|
6
6
|
const {
|
|
7
7
|
t: o
|
|
8
|
-
} =
|
|
9
|
-
return
|
|
10
|
-
...
|
|
8
|
+
} = m(), r = g(), n = d(), t = i(null);
|
|
9
|
+
return x({
|
|
10
|
+
...u,
|
|
11
11
|
// 传递导出回调
|
|
12
12
|
onExportSuccess: (e) => {
|
|
13
|
-
var s,
|
|
13
|
+
var s, a;
|
|
14
14
|
(s = t.value) == null || s.destroy(), t.value = null, n.success({
|
|
15
15
|
title: o("hooks.table.exportSuccess"),
|
|
16
16
|
content: o("hooks.table.exportSuccessContent", {
|
|
17
|
-
count: ((
|
|
18
|
-
var u;
|
|
19
|
-
return m + ((u = r == null ? void 0 : r.data) == null ? void 0 : u.length);
|
|
20
|
-
}, 0)) || 0
|
|
17
|
+
count: ((a = e == null ? void 0 : e.data) == null ? void 0 : a.length) || 0
|
|
21
18
|
}),
|
|
22
19
|
duration: 6e3
|
|
23
20
|
});
|
|
@@ -28,7 +25,7 @@ function y(i) {
|
|
|
28
25
|
content: () => o("hooks.table.exportProgressContent", {
|
|
29
26
|
page: e.page || 1
|
|
30
27
|
}),
|
|
31
|
-
avatar: () => l(
|
|
28
|
+
avatar: () => l(c, {
|
|
32
29
|
class: "size-10 text-sm",
|
|
33
30
|
type: "circle",
|
|
34
31
|
percentage: 50
|
|
@@ -44,7 +41,7 @@ function y(i) {
|
|
|
44
41
|
},
|
|
45
42
|
onExportError: (e) => {
|
|
46
43
|
var s;
|
|
47
|
-
(s = t.value) == null || s.destroy(), t.value = null,
|
|
44
|
+
(s = t.value) == null || s.destroy(), t.value = null, r.error(o("hooks.table.exportFailedContent", {
|
|
48
45
|
error: (e == null ? void 0 : e.message) || o("common.unknownError")
|
|
49
46
|
}));
|
|
50
47
|
},
|
|
@@ -66,14 +63,14 @@ function y(i) {
|
|
|
66
63
|
processed: (e == null ? void 0 : e.processedItems) || 0,
|
|
67
64
|
total: (e == null ? void 0 : e.totalItems) || 0
|
|
68
65
|
}),
|
|
69
|
-
avatar: () => l(
|
|
66
|
+
avatar: () => l(c, {
|
|
70
67
|
class: "size-10 text-sm",
|
|
71
68
|
type: "circle",
|
|
72
69
|
percentage: (e == null ? void 0 : e.percentage) || 0
|
|
73
70
|
}, {
|
|
74
71
|
default: () => [l("div", {
|
|
75
72
|
class: "text-xs"
|
|
76
|
-
}, [(e == null ? void 0 : e.percentage) || 0,
|
|
73
|
+
}, [(e == null ? void 0 : e.percentage) || 0, p("%")])]
|
|
77
74
|
}),
|
|
78
75
|
onClose: () => {
|
|
79
76
|
t.value = null;
|
|
@@ -82,12 +79,12 @@ function y(i) {
|
|
|
82
79
|
},
|
|
83
80
|
onImportError: (e) => {
|
|
84
81
|
var s;
|
|
85
|
-
(s = t.value) == null || s.destroy(), t.value = null,
|
|
82
|
+
(s = t.value) == null || s.destroy(), t.value = null, r.error(o("hooks.table.importFailedContent", {
|
|
86
83
|
error: (e == null ? void 0 : e.message) || o("common.unknownError")
|
|
87
84
|
}));
|
|
88
85
|
}
|
|
89
86
|
});
|
|
90
87
|
}
|
|
91
88
|
export {
|
|
92
|
-
|
|
89
|
+
E as useTable
|
|
93
90
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
const e = { search: "Search", empty: "No data", menu: "Menu", theme: "Theme", dark: "Dark", light: "Light", back: "Back", loading: "Loading...", success: "Success", error: "Error", unknownError: "Unknown error" }, t = { tab: { lock: "Lock", closeOther: "Close Other", closeLeft: "Close Left", closeRight: "Close Right" }, dialog: { confirm: { title: "Confirm", content: "Are you sure you want to confirm?" }, cancel: { title: "Cancel", content: "Are you sure you want to cancel?" }, success: { title: "Success", content: "Your operation has been successful" }, error: { title: "Error", content: "Your operation has been failed" }, prompt: { title: "Prompt" } }, button: { confirm: "Confirm", cancel: "Cancel", submit: "Submit", reset: "Reset", delete: "Delete", search: "Search", advanced: "Advanced", export: "Export", import: "Import", autoRefresh: "Auto Refresh", filter: "Filter", refresh: "Refresh", select: "Select", create: "Create", download: "Download", rename: "Rename", preview: "Preview" }, form: { edit: "Edit", create: "Create" }, list: { selectAll: "Select All", columnSetting: "Column Setting", selectedItems: "Selected Items: {num}", total: "Total: {total}" }, editor: { placeholder: "Please enter content" }, upload: { fileManager: "File Manager", uploadFile: "Upload File", cancel: "Cancel", delete: "Delete", error: "Upload failed", empty: "No files", desc: "Click or drag files to this area", dropHere: "Drop files here", allFormats: "Support any format files", supportFormats: "Support {formats} format files", maxSize: "Max file size: {size}MB", success: "Upload success", failed: "Upload failed", fileExtension: "{ext} file", status: { pending: "Pending", uploading: "Uploading", success: "Success", cancelled: "Cancelled", error: "Error" }, file: { name: "File Name", size: "Size", type: "Type", status: "Status" }, actions: "Actions" }, uploadManage: { title: "File Manager", all: "All", image: "Images", media: "Media", docs: "Documents", upload: "Upload", empty: "No files", emptyDesc: "No more files, please upload files", back: "Back to parent", parentLevel: "Parent Level", namePlaceholder: "Please enter name", createError: "Create failed", editError: "Edit failed", delError: "Delete failed", delTitle: "Confirm Delete", delDesc: "Are you sure you want to delete the selected files? This action cannot be undone." }, crop: { title: "Crop", select: "Select", confirm: "Confirm" }, stats: { realTimeData: "Real-time Data" }, data: { selectTitle: "Please select data" }, menu: { language: "Language", chinese: "中文", english: "English", color: "Color", primaryColor: "Primary Color", neutralColor: "Neutral Color", theme: "Theme", followSystem: "Follow System", lightMode: "Light", darkMode: "Dark", logout: "Logout" }, iconPicker: { title: "Icon Picker" } }, o = { table: { exportSuccess: "Export data successfully", exportProgress: "Exporting data, please wait...", exportFailed: "Export data failed", exportSuccessContent: "Successfully exported {count} records", exportProgressContent: "Page {page} data", exportFailedContent: "Export data failed: {error}", importSuccess: "Import data successfully", importProgress: "Importing data, please wait...", importFailed: "Import data failed", importSuccessContent: "Successfully imported {count} records", importProgressContent: "{processed} / {total} records", importFailedContent: "Import data failed: {error}", saveSuccess: "Save successfully", copySuccess: "Copy successfully", copyFailed: "Copy failed" }, download: { failed: "Download failed" } }, a = { 400: { title: "400", desc: "Request error" }, 401: { title: "401", desc: "You do not have permission to access this page" }, 403: { title: "403", desc: "You do not have permission to access this page" }, 404: { title: "404", desc: "Page not found" }, 500: { title: "500", desc: "Server error" }, empty: { title: "No data", desc: "No more data, please try again later" }, loading: { title: "Loading", desc: "Data is loading, please try again later" }, login: { success: "Login success", error: "Login failed, please check your username and password", placeholder: { username: "Please enter username", password: "Please enter password" }, buttons: { login: "Login" } } }, r = {
|
|
1
|
+
const e = { search: "Search", empty: "No data", menu: "Menu", theme: "Theme", dark: "Dark", light: "Light", back: "Back", loading: "Loading...", success: "Success", error: "Error", unknownError: "Unknown error" }, t = { tab: { lock: "Lock", closeOther: "Close Other", closeLeft: "Close Left", closeRight: "Close Right" }, dialog: { confirm: { title: "Confirm", content: "Are you sure you want to confirm?" }, cancel: { title: "Cancel", content: "Are you sure you want to cancel?" }, success: { title: "Success", content: "Your operation has been successful" }, error: { title: "Error", content: "Your operation has been failed" }, prompt: { title: "Prompt" } }, button: { confirm: "Confirm", cancel: "Cancel", submit: "Submit", reset: "Reset", delete: "Delete", search: "Search", advanced: "Advanced", export: "Export", import: "Import", autoRefresh: "Auto Refresh", filter: "Filter", refresh: "Refresh", select: "Select", create: "Create", download: "Download", rename: "Rename", preview: "Preview" }, form: { edit: "Edit", create: "Create" }, list: { selectAll: "Select All", columnSetting: "Column Setting", selectedItems: "Selected Items: {num}", total: "Total: {total}" }, editor: { placeholder: "Please enter content" }, upload: { fileManager: "File Manager", uploadFile: "Upload File", cancel: "Cancel", delete: "Delete", error: "Upload failed", empty: "No files", desc: "Click or drag files to this area", dropHere: "Drop files here", allFormats: "Support any format files", supportFormats: "Support {formats} format files", maxSize: "Max file size: {size}MB", success: "Upload success", failed: "Upload failed", fileExtension: "{ext} file", status: { pending: "Pending", uploading: "Uploading", success: "Success", cancelled: "Cancelled", error: "Error" }, file: { name: "File Name", size: "Size", type: "Type", status: "Status" }, actions: "Actions" }, uploadManage: { title: "File Manager", all: "All", image: "Images", media: "Media", docs: "Documents", upload: "Upload", empty: "No files", emptyDesc: "No more files, please upload files", back: "Back to parent", parentLevel: "Parent Level", namePlaceholder: "Please enter name", createError: "Create failed", editError: "Edit failed", delError: "Delete failed", delTitle: "Confirm Delete", delDesc: "Are you sure you want to delete the selected files? This action cannot be undone." }, crop: { title: "Crop", select: "Select", confirm: "Confirm" }, stats: { realTimeData: "Real-time Data" }, data: { selectTitle: "Please select data" }, menu: { language: "Language", chinese: "中文", english: "English", color: "Color", primaryColor: "Primary Color", neutralColor: "Neutral Color", theme: "Theme", followSystem: "Follow System", lightMode: "Light", darkMode: "Dark", logout: "Logout" }, iconPicker: { title: "Icon Picker" } }, o = { table: { exportSuccess: "Export data successfully", exportProgress: "Exporting data, please wait...", exportFailed: "Export data failed", exportSuccessContent: "Successfully exported {count} records", exportProgressContent: "Page {page} data", exportFailedContent: "Export data failed: {error}", importSuccess: "Import data successfully", importProgress: "Importing data, please wait...", importFailed: "Import data failed", importSuccessContent: "Successfully imported {count} records", importProgressContent: "{processed} / {total} records", importFailedContent: "Import data failed: {error}", saveSuccess: "Save successfully", copySuccess: "Copy successfully", copyFailed: "Copy failed" }, download: { failed: "Download failed" } }, a = { 400: { title: "400", desc: "Request error" }, 401: { title: "401", desc: "You do not have permission to access this page" }, 403: { title: "403", desc: "You do not have permission to access this page" }, 404: { title: "404", desc: "Page not found" }, 500: { title: "500", desc: "Server error" }, empty: { title: "No data", desc: "No more data, please try again later" }, loading: { title: "Loading", desc: "Data is loading, please try again later" }, login: { success: "Login success", error: "Login failed, please check your username and password", placeholder: { username: "Please enter username", password: "Please enter password" }, buttons: { login: "Login" } } }, r = { "zh-CN": "Chinese", "en-US": "English", "ja-JP": "Japanese", "ko-KR": "Korean", "ru-RU": "Russian" }, l = {
|
|
2
2
|
common: e,
|
|
3
3
|
components: t,
|
|
4
4
|
hooks: o,
|
|
5
|
-
pages: a
|
|
5
|
+
pages: a,
|
|
6
|
+
locale: r
|
|
6
7
|
};
|
|
7
8
|
export {
|
|
8
9
|
e as common,
|
|
9
10
|
t as components,
|
|
10
|
-
|
|
11
|
+
l as default,
|
|
11
12
|
o as hooks,
|
|
13
|
+
r as locale,
|
|
12
14
|
a as pages
|
|
13
15
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
const e = { search: "搜索", empty: "暂无数据", menu: "菜单", theme: "主题", dark: "暗色模式", light: "亮色模式", back: "返回", loading: "加载中...", success: "操作成功", error: "操作失败", unknownError: "未知错误", keyword: "请输入关键字" }, t = { tab: { lock: "锁定", closeOther: "关闭其他", closeLeft: "关闭左侧", closeRight: "关闭右侧" }, dialog: { confirm: { title: "确定", content: "确定要确认吗?" }, cancel: { title: "取消", content: "确定要取消吗?" }, success: { title: "成功", content: "您的操作已成功" }, error: { title: "错误", content: "您的操作已失败" }, prompt: { title: "提示" } }, button: { confirm: "确定", cancel: "取消", submit: "提交", reset: "重置", delete: "删除", search: "查询", advanced: "高级", export: "导出", import: "导入", autoRefresh: "自动刷新", filter: "筛选", refresh: "刷新", select: "选择", create: "新建", download: "下载", rename: "重命名", preview: "预览", sideLeft: "左侧", sideRight: "右侧" }, form: { edit: "编辑", create: "新增", success: "保存成功", error: "保存失败" }, list: { selectAll: "全选", columnSetting: "列设置", selectedItems: "选中项: {num}", total: "共 {total} 条" }, editor: { placeholder: "请输入内容" }, upload: { fileManager: "文件管理器", uploadFile: "上传文件", cancel: "取消", delete: "删除", error: "上传失败", empty: "暂无文件", desc: "点击或拖拽文件到此区域", dropHere: "拖拽文件到此处", allFormats: "支持任意格式文件", supportFormats: "支持 {formats} 格式文件", maxSize: "最大文件大小: {size}MB", success: "上传成功", failed: "上传失败", fileExtension: "{ext}文件", status: { pending: "待上传", uploading: "上传中", success: "已上传", cancelled: "已取消", error: "失败" }, file: { name: "文件名", size: "大小", type: "类型", status: "状态" }, actions: "操作" }, uploadManage: { title: "文件管理", all: "全部", image: "图片", media: "媒体", docs: "文档", upload: "上传", empty: "暂无文件", emptyDesc: "暂无更多文件,请先上传文件", back: "返回上一级", parentLevel: "上一级", namePlaceholder: "请输入名称", createError: "创建失败", editError: "修改失败", delError: "删除失败", delTitle: "确认删除", delDesc: "确定要删除选中的文件吗?删除后不可恢复。" }, crop: { title: "裁剪", select: "选择", confirm: "确认" }, stats: { realTimeData: "实时数据" }, data: { selectTitle: "请选择数据" }, menu: { language: "语言", chinese: "中文", english: "English", color: "颜色", primaryColor: "主题色", neutralColor: "中性色", theme: "主题", followSystem: "跟随系统", lightMode: "亮色", darkMode: "暗色", logout: "退出登录" }, iconPicker: { title: "图标选择" } }, o = { table: { exportSuccess: "导出数据成功", exportProgress: "导出数据中, 请稍后...", exportFailed: "导出数据失败", exportSuccessContent: "成功导出 {count} 条数据", exportProgressContent: "第 {page} 页数据", exportFailedContent: "导出数据失败:{error}", importSuccess: "导入数据成功", importProgress: "导入数据中, 请稍后...", importFailed: "导入数据失败", importSuccessContent: "成功导入 {count} 条数据", importProgressContent: "{processed} / {total} 条数据", importFailedContent: "导入数据失败:{error}", saveSuccess: "保存成功", copySuccess: "复制成功", copyFailed: "复制失败" }, download: { failed: "下载失败" } }, r = { 400: { title: "400", desc: "请求错误" }, 401: { title: "401", desc: "您没有权限访问该页面" }, 403: { title: "403", desc: "您没有权限访问该页面" }, 404: { title: "404", desc: "页面不存在" }, 500: { title: "500", desc: "服务器错误" }, empty: { title: "暂无数据", desc: "暂无更多数据,请先创建数据" }, loading: { title: "加载中", desc: "数据正在加载中,请稍后..." }, login: { success: "登录成功", error: "登录失败,请检查用户名和密码", placeholder: { username: "请输入用户名", password: "请输入密码" }, buttons: { login: "登录" } } }, s = {
|
|
1
|
+
const e = { search: "搜索", empty: "暂无数据", menu: "菜单", theme: "主题", dark: "暗色模式", light: "亮色模式", back: "返回", loading: "加载中...", success: "操作成功", error: "操作失败", unknownError: "未知错误", keyword: "请输入关键字" }, t = { tab: { lock: "锁定", closeOther: "关闭其他", closeLeft: "关闭左侧", closeRight: "关闭右侧" }, dialog: { confirm: { title: "确定", content: "确定要确认吗?" }, cancel: { title: "取消", content: "确定要取消吗?" }, success: { title: "成功", content: "您的操作已成功" }, error: { title: "错误", content: "您的操作已失败" }, prompt: { title: "提示" } }, button: { confirm: "确定", cancel: "取消", submit: "提交", reset: "重置", delete: "删除", search: "查询", advanced: "高级", export: "导出", import: "导入", autoRefresh: "自动刷新", filter: "筛选", refresh: "刷新", select: "选择", create: "新建", download: "下载", rename: "重命名", preview: "预览", sideLeft: "左侧", sideRight: "右侧" }, form: { edit: "编辑", create: "新增", success: "保存成功", error: "保存失败" }, list: { selectAll: "全选", columnSetting: "列设置", selectedItems: "选中项: {num}", total: "共 {total} 条" }, editor: { placeholder: "请输入内容" }, upload: { fileManager: "文件管理器", uploadFile: "上传文件", cancel: "取消", delete: "删除", error: "上传失败", empty: "暂无文件", desc: "点击或拖拽文件到此区域", dropHere: "拖拽文件到此处", allFormats: "支持任意格式文件", supportFormats: "支持 {formats} 格式文件", maxSize: "最大文件大小: {size}MB", success: "上传成功", failed: "上传失败", fileExtension: "{ext}文件", status: { pending: "待上传", uploading: "上传中", success: "已上传", cancelled: "已取消", error: "失败" }, file: { name: "文件名", size: "大小", type: "类型", status: "状态" }, actions: "操作" }, uploadManage: { title: "文件管理", all: "全部", image: "图片", media: "媒体", docs: "文档", upload: "上传", empty: "暂无文件", emptyDesc: "暂无更多文件,请先上传文件", back: "返回上一级", parentLevel: "上一级", namePlaceholder: "请输入名称", createError: "创建失败", editError: "修改失败", delError: "删除失败", delTitle: "确认删除", delDesc: "确定要删除选中的文件吗?删除后不可恢复。" }, crop: { title: "裁剪", select: "选择", confirm: "确认" }, stats: { realTimeData: "实时数据" }, data: { selectTitle: "请选择数据" }, menu: { language: "语言", chinese: "中文", english: "English", color: "颜色", primaryColor: "主题色", neutralColor: "中性色", theme: "主题", followSystem: "跟随系统", lightMode: "亮色", darkMode: "暗色", logout: "退出登录" }, iconPicker: { title: "图标选择" } }, o = { table: { exportSuccess: "导出数据成功", exportProgress: "导出数据中, 请稍后...", exportFailed: "导出数据失败", exportSuccessContent: "成功导出 {count} 条数据", exportProgressContent: "第 {page} 页数据", exportFailedContent: "导出数据失败:{error}", importSuccess: "导入数据成功", importProgress: "导入数据中, 请稍后...", importFailed: "导入数据失败", importSuccessContent: "成功导入 {count} 条数据", importProgressContent: "{processed} / {total} 条数据", importFailedContent: "导入数据失败:{error}", saveSuccess: "保存成功", copySuccess: "复制成功", copyFailed: "复制失败" }, download: { failed: "下载失败" } }, r = { 400: { title: "400", desc: "请求错误" }, 401: { title: "401", desc: "您没有权限访问该页面" }, 403: { title: "403", desc: "您没有权限访问该页面" }, 404: { title: "404", desc: "页面不存在" }, 500: { title: "500", desc: "服务器错误" }, empty: { title: "暂无数据", desc: "暂无更多数据,请先创建数据" }, loading: { title: "加载中", desc: "数据正在加载中,请稍后..." }, login: { success: "登录成功", error: "登录失败,请检查用户名和密码", placeholder: { username: "请输入用户名", password: "请输入密码" }, buttons: { login: "登录" } } }, s = { "zh-CN": "中文", "en-US": "English", "ja-JP": "日本語", "ko-KR": "한국어", "ru-RU": "Русский" }, l = {
|
|
2
2
|
common: e,
|
|
3
3
|
components: t,
|
|
4
4
|
hooks: o,
|
|
5
|
-
pages: r
|
|
5
|
+
pages: r,
|
|
6
|
+
locale: s
|
|
6
7
|
};
|
|
7
8
|
export {
|
|
8
9
|
e as common,
|
|
9
10
|
t as components,
|
|
10
|
-
|
|
11
|
+
l as default,
|
|
11
12
|
o as hooks,
|
|
13
|
+
s as locale,
|
|
12
14
|
r as pages
|
|
13
15
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as f, useManage as
|
|
1
|
+
import { defineComponent as A, computed as v, createVNode as e } from "vue";
|
|
2
|
+
import { useI18n as f, useManage as L, useLogout as R, useTheme as I, useGetAuth as S } from "@duxweb/dvha-core";
|
|
3
3
|
import { NDropdown as B } from "naive-ui";
|
|
4
|
-
import { useRouter as
|
|
4
|
+
import { useRouter as N } from "vue-router";
|
|
5
5
|
import "clsx";
|
|
6
|
-
import { DuxAvatar as
|
|
6
|
+
import { DuxAvatar as g } from "../../components/widget/avatar.js";
|
|
7
7
|
import "vue-echarts";
|
|
8
8
|
import "@overlastic/vue";
|
|
9
9
|
import "dayjs";
|
|
@@ -27,7 +27,7 @@ import "@unocss/preset-typography";
|
|
|
27
27
|
import "unocss/preset-wind4";
|
|
28
28
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
29
29
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
30
|
-
import
|
|
30
|
+
import G from "./button.js";
|
|
31
31
|
import "vue-command-palette";
|
|
32
32
|
import "../page404.js";
|
|
33
33
|
import "@iconify-json/tabler/icons.json";
|
|
@@ -42,7 +42,7 @@ import "ace-builds/src-noconflict/theme-tomorrow";
|
|
|
42
42
|
import "ace-builds/src-noconflict/ext-searchbox";
|
|
43
43
|
import "ace-builds/src-noconflict/ext-language_tools";
|
|
44
44
|
import "ace-builds/src-noconflict/mode-snippets";
|
|
45
|
-
const
|
|
45
|
+
const $e = /* @__PURE__ */ A({
|
|
46
46
|
name: "DuxMenuAvatar",
|
|
47
47
|
props: {
|
|
48
48
|
collapsed: {
|
|
@@ -50,78 +50,75 @@ const Ne = /* @__PURE__ */ $({
|
|
|
50
50
|
default: !1
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
setup(
|
|
53
|
+
setup(b) {
|
|
54
54
|
const {
|
|
55
|
-
t
|
|
56
|
-
} = f(),
|
|
57
|
-
config:
|
|
55
|
+
t: r
|
|
56
|
+
} = f(), c = f(), h = N(), {
|
|
57
|
+
config: y,
|
|
58
58
|
getRoutePath: k
|
|
59
|
-
} = A(), {
|
|
60
|
-
mutate: C
|
|
61
59
|
} = L(), {
|
|
60
|
+
mutate: x
|
|
61
|
+
} = R(), {
|
|
62
62
|
mode: m,
|
|
63
|
-
primaryColors:
|
|
64
|
-
neutralColors:
|
|
63
|
+
primaryColors: C,
|
|
64
|
+
neutralColors: M,
|
|
65
65
|
colorMapping: p,
|
|
66
66
|
setColor: d,
|
|
67
|
-
setMode:
|
|
68
|
-
} =
|
|
67
|
+
setMode: w
|
|
68
|
+
} = I(), n = (t, l) => e("div", {
|
|
69
69
|
class: "flex gap-2 items-center w-30"
|
|
70
70
|
}, [e("div", {
|
|
71
71
|
class: "flex-1 min-w-0"
|
|
72
|
-
}, [
|
|
72
|
+
}, [t]), e("div", null, [l && e("div", {
|
|
73
73
|
class: "i-tabler:check"
|
|
74
|
-
}, null)])]),
|
|
75
|
-
class: `${
|
|
76
|
-
}, null),
|
|
77
|
-
var
|
|
78
|
-
const
|
|
79
|
-
label:
|
|
74
|
+
}, null)])]), s = (t) => e("div", {
|
|
75
|
+
class: `${t} size-4`
|
|
76
|
+
}, null), z = v(() => {
|
|
77
|
+
var l;
|
|
78
|
+
const t = (l = y.userMenus) == null ? void 0 : l.map((o) => ({
|
|
79
|
+
label: r(o.label || "", {}, o.label),
|
|
80
80
|
key: o.key,
|
|
81
|
-
icon: () =>
|
|
81
|
+
icon: () => s(o.icon),
|
|
82
82
|
path: o.path
|
|
83
83
|
}));
|
|
84
|
-
return (
|
|
84
|
+
return (t == null ? void 0 : t.length) > 0 ? [...t, {
|
|
85
85
|
type: "divider"
|
|
86
86
|
}] : [];
|
|
87
|
-
}),
|
|
88
|
-
var
|
|
87
|
+
}), i = S(), $ = v(() => {
|
|
88
|
+
var t, l;
|
|
89
89
|
return [{
|
|
90
90
|
key: "header",
|
|
91
91
|
type: "render",
|
|
92
92
|
render: () => {
|
|
93
|
-
var o,
|
|
93
|
+
var o, u, a;
|
|
94
94
|
return e("div", {
|
|
95
95
|
class: "flex gap-2 px-3 pb-1 pt-1 items-center "
|
|
96
|
-
}, [e(
|
|
96
|
+
}, [e(g, {
|
|
97
97
|
round: !0,
|
|
98
98
|
size: 28,
|
|
99
|
-
src: (o =
|
|
99
|
+
src: (o = i.info) == null ? void 0 : o.avatar
|
|
100
100
|
}, null), e("div", {
|
|
101
101
|
class: "flex flex-col"
|
|
102
102
|
}, [e("div", {
|
|
103
103
|
class: "text-sm font-medium"
|
|
104
|
-
}, [(
|
|
104
|
+
}, [(u = i.info) == null ? void 0 : u.nickname]), e("div", {
|
|
105
105
|
class: "text-xs text-muted"
|
|
106
|
-
}, [(
|
|
106
|
+
}, [(a = i.info) == null ? void 0 : a.username])])]);
|
|
107
107
|
}
|
|
108
108
|
}, {
|
|
109
109
|
type: "divider"
|
|
110
|
-
}, ...
|
|
111
|
-
label:
|
|
110
|
+
}, ...z.value, {
|
|
111
|
+
label: r("components.menu.language"),
|
|
112
112
|
key: "locale",
|
|
113
|
-
icon: () =>
|
|
114
|
-
children: [{
|
|
115
|
-
label: () =>
|
|
116
|
-
key:
|
|
117
|
-
}
|
|
118
|
-
label: () => a(t("components.menu.english"), u.getLocale() === "en-US"),
|
|
119
|
-
key: "locale.en-US"
|
|
120
|
-
}]
|
|
113
|
+
icon: () => s("i-tabler:language"),
|
|
114
|
+
children: [...(c.getLocales() || []).map((o) => ({
|
|
115
|
+
label: () => n(r(`locale.${o}`), c.getLocale() === o),
|
|
116
|
+
key: `locale.${o}`
|
|
117
|
+
}))]
|
|
121
118
|
}, {
|
|
122
|
-
label:
|
|
119
|
+
label: r("components.menu.color"),
|
|
123
120
|
key: "color",
|
|
124
|
-
icon: () =>
|
|
121
|
+
icon: () => s("i-tabler:palette"),
|
|
125
122
|
children: [{
|
|
126
123
|
label: () => e("div", {
|
|
127
124
|
class: "flex gap-2 items-center w-30"
|
|
@@ -130,10 +127,10 @@ const Ne = /* @__PURE__ */ $({
|
|
|
130
127
|
style: {
|
|
131
128
|
backgroundColor: "rgb(var(--ui-color-primary))"
|
|
132
129
|
}
|
|
133
|
-
}, null), e("div", null, [
|
|
130
|
+
}, null), e("div", null, [r("components.menu.primaryColor")])]),
|
|
134
131
|
key: "color.primary",
|
|
135
|
-
children: (
|
|
136
|
-
label: () =>
|
|
132
|
+
children: (t = C.value) == null ? void 0 : t.map((o) => ({
|
|
133
|
+
label: () => n(e("div", {
|
|
137
134
|
class: "flex gap-2 items-center"
|
|
138
135
|
}, [e("div", {
|
|
139
136
|
class: "size-2 rounded-full",
|
|
@@ -151,10 +148,10 @@ const Ne = /* @__PURE__ */ $({
|
|
|
151
148
|
style: {
|
|
152
149
|
backgroundColor: "rgb(var(--ui-color-gray-600))"
|
|
153
150
|
}
|
|
154
|
-
}, null), e("div", null, [
|
|
151
|
+
}, null), e("div", null, [r("components.menu.neutralColor")])]),
|
|
155
152
|
key: "color.neutral",
|
|
156
|
-
children: (
|
|
157
|
-
label: () =>
|
|
153
|
+
children: (l = M.value) == null ? void 0 : l.map((o) => ({
|
|
154
|
+
label: () => n(e("div", {
|
|
158
155
|
class: "flex gap-2 items-center"
|
|
159
156
|
}, [e("div", {
|
|
160
157
|
class: "size-2 rounded-full",
|
|
@@ -166,81 +163,84 @@ const Ne = /* @__PURE__ */ $({
|
|
|
166
163
|
}))
|
|
167
164
|
}]
|
|
168
165
|
}, {
|
|
169
|
-
label:
|
|
166
|
+
label: r("components.menu.theme"),
|
|
170
167
|
key: "theme",
|
|
171
|
-
icon: () =>
|
|
168
|
+
icon: () => s("i-tabler:brightness-half"),
|
|
172
169
|
children: [{
|
|
173
|
-
label: () =>
|
|
170
|
+
label: () => n(r("components.menu.followSystem"), m.value === "auto"),
|
|
174
171
|
key: "theme.auto"
|
|
175
172
|
}, {
|
|
176
|
-
label: () =>
|
|
173
|
+
label: () => n(r("components.menu.lightMode"), m.value === "light"),
|
|
177
174
|
key: "theme.light"
|
|
178
175
|
}, {
|
|
179
|
-
label: () =>
|
|
176
|
+
label: () => n(r("components.menu.darkMode"), m.value === "dark"),
|
|
180
177
|
key: "theme.dark"
|
|
181
178
|
}]
|
|
182
179
|
}, {
|
|
183
180
|
type: "divider"
|
|
184
181
|
}, {
|
|
185
|
-
label:
|
|
182
|
+
label: r("components.menu.logout"),
|
|
186
183
|
key: "logout",
|
|
187
|
-
icon: () =>
|
|
184
|
+
icon: () => s("i-tabler:logout")
|
|
188
185
|
}];
|
|
189
186
|
});
|
|
190
|
-
function
|
|
191
|
-
const o =
|
|
192
|
-
switch (
|
|
187
|
+
function D(t, l) {
|
|
188
|
+
const o = t.lastIndexOf("."), [u, a] = o === -1 ? [t, ""] : [t.substring(0, o), t.substring(o + 1)];
|
|
189
|
+
switch (u) {
|
|
193
190
|
case "locale":
|
|
194
|
-
|
|
191
|
+
c.changeLocale(a);
|
|
195
192
|
break;
|
|
196
193
|
case "color.primary":
|
|
197
|
-
d("primary",
|
|
194
|
+
d("primary", a);
|
|
198
195
|
break;
|
|
199
196
|
case "color.neutral":
|
|
200
|
-
d("gray",
|
|
197
|
+
d("gray", a);
|
|
201
198
|
break;
|
|
202
199
|
case "theme":
|
|
203
|
-
|
|
200
|
+
w(a);
|
|
204
201
|
break;
|
|
205
202
|
case "logout":
|
|
206
|
-
|
|
203
|
+
x();
|
|
207
204
|
break;
|
|
208
205
|
default:
|
|
209
|
-
if (!(
|
|
206
|
+
if (!(l != null && l.path))
|
|
210
207
|
return;
|
|
211
|
-
|
|
208
|
+
h.push(k(l.path));
|
|
212
209
|
}
|
|
213
210
|
}
|
|
214
211
|
return () => e(B, {
|
|
215
|
-
options:
|
|
212
|
+
options: $.value,
|
|
216
213
|
placement: "bottom-start",
|
|
217
214
|
trigger: "click",
|
|
218
|
-
onSelect:
|
|
215
|
+
onSelect: D,
|
|
219
216
|
width: 200
|
|
220
217
|
}, {
|
|
221
|
-
default: () => [e(
|
|
222
|
-
collapsed:
|
|
218
|
+
default: () => [e(G, {
|
|
219
|
+
collapsed: b.collapsed
|
|
223
220
|
}, {
|
|
224
221
|
icon: () => {
|
|
225
|
-
var
|
|
226
|
-
return e(
|
|
222
|
+
var t;
|
|
223
|
+
return e(g, {
|
|
227
224
|
class: "group-hover:shadow-lg",
|
|
228
225
|
round: !0,
|
|
229
226
|
size: 28,
|
|
230
|
-
src: (
|
|
227
|
+
src: (t = i.info) == null ? void 0 : t.avatar
|
|
231
228
|
}, null);
|
|
232
229
|
},
|
|
233
|
-
default: () =>
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
230
|
+
default: () => {
|
|
231
|
+
var t, l;
|
|
232
|
+
return e("div", {
|
|
233
|
+
class: "flex flex-col"
|
|
234
|
+
}, [e("div", {
|
|
235
|
+
class: "text-sm font-medium"
|
|
236
|
+
}, [(t = i.info) == null ? void 0 : t.nickname]), e("div", {
|
|
237
|
+
class: "text-xs text-muted"
|
|
238
|
+
}, [(l = i.info) == null ? void 0 : l.username])]);
|
|
239
|
+
}
|
|
240
240
|
})]
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
243
|
});
|
|
244
244
|
export {
|
|
245
|
-
|
|
245
|
+
$e as default
|
|
246
246
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsonSchemaNode } from '@duxweb/dvha-core';
|
|
1
|
+
import type { JsonSchemaNode, UseExtendListProps } from '@duxweb/dvha-core';
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
3
|
import type { UseActionItem } from '../../hooks';
|
|
4
4
|
export interface TablePagination {
|
|
@@ -53,6 +53,9 @@ export declare const DuxListLayout: import("vue").DefineComponent<import("vue").
|
|
|
53
53
|
type: StringConstructor;
|
|
54
54
|
default: string;
|
|
55
55
|
};
|
|
56
|
+
hookListProps: {
|
|
57
|
+
type: PropType<UseExtendListProps>;
|
|
58
|
+
};
|
|
56
59
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
57
60
|
rowKey: {
|
|
58
61
|
type: StringConstructor;
|
|
@@ -96,6 +99,9 @@ export declare const DuxListLayout: import("vue").DefineComponent<import("vue").
|
|
|
96
99
|
type: StringConstructor;
|
|
97
100
|
default: string;
|
|
98
101
|
};
|
|
102
|
+
hookListProps: {
|
|
103
|
+
type: PropType<UseExtendListProps>;
|
|
104
|
+
};
|
|
99
105
|
}>> & Readonly<{}>, {
|
|
100
106
|
checkable: boolean;
|
|
101
107
|
rowKey: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { JsonSchemaNode } from '@duxweb/dvha-core';
|
|
2
|
-
import type { TableColumn, TablePagination, UseNaiveTableReturn } from '@duxweb/dvha-naiveui';
|
|
2
|
+
import type { TableColumn, TablePagination, UseNaiveTableReturn, UseTableProps } from '@duxweb/dvha-naiveui';
|
|
3
3
|
import type { PropType } from 'vue';
|
|
4
4
|
import type { UseActionItem } from '../../hooks';
|
|
5
5
|
export interface TablePageTools {
|
|
@@ -49,6 +49,9 @@ export declare const DuxTableLayout: import("vue").DefineComponent<import("vue")
|
|
|
49
49
|
type: StringConstructor;
|
|
50
50
|
default: string;
|
|
51
51
|
};
|
|
52
|
+
hookTableProps: {
|
|
53
|
+
type: PropType<UseTableProps>;
|
|
54
|
+
};
|
|
52
55
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
53
56
|
path: {
|
|
54
57
|
type: StringConstructor;
|
|
@@ -88,6 +91,9 @@ export declare const DuxTableLayout: import("vue").DefineComponent<import("vue")
|
|
|
88
91
|
type: StringConstructor;
|
|
89
92
|
default: string;
|
|
90
93
|
};
|
|
94
|
+
hookTableProps: {
|
|
95
|
+
type: PropType<UseTableProps>;
|
|
96
|
+
};
|
|
91
97
|
}>> & Readonly<{}>, {
|
|
92
98
|
pagination: boolean | TablePagination;
|
|
93
99
|
actions: UseActionItem[];
|
|
@@ -68,6 +68,9 @@ export declare const DuxCardPage: import("vue").DefineComponent<import("vue").Ex
|
|
|
68
68
|
type: StringConstructor;
|
|
69
69
|
default: string;
|
|
70
70
|
};
|
|
71
|
+
hookListProps: {
|
|
72
|
+
type: import("vue").PropType<import("@duxweb/dvha-core").UseExtendListProps>;
|
|
73
|
+
};
|
|
71
74
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
72
75
|
rowKey: {
|
|
73
76
|
type: StringConstructor;
|
|
@@ -111,6 +114,9 @@ export declare const DuxCardPage: import("vue").DefineComponent<import("vue").Ex
|
|
|
111
114
|
type: StringConstructor;
|
|
112
115
|
default: string;
|
|
113
116
|
};
|
|
117
|
+
hookListProps: {
|
|
118
|
+
type: import("vue").PropType<import("@duxweb/dvha-core").UseExtendListProps>;
|
|
119
|
+
};
|
|
114
120
|
}>> & Readonly<{}>, {
|
|
115
121
|
checkable: boolean;
|
|
116
122
|
rowKey: string;
|
|
@@ -56,6 +56,9 @@ export declare const DuxListPage: import("vue").DefineComponent<import("vue").Ex
|
|
|
56
56
|
type: StringConstructor;
|
|
57
57
|
default: string;
|
|
58
58
|
};
|
|
59
|
+
hookListProps: {
|
|
60
|
+
type: import("vue").PropType<import("@duxweb/dvha-core").UseExtendListProps>;
|
|
61
|
+
};
|
|
59
62
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
60
63
|
rowKey: {
|
|
61
64
|
type: StringConstructor;
|
|
@@ -99,6 +102,9 @@ export declare const DuxListPage: import("vue").DefineComponent<import("vue").Ex
|
|
|
99
102
|
type: StringConstructor;
|
|
100
103
|
default: string;
|
|
101
104
|
};
|
|
105
|
+
hookListProps: {
|
|
106
|
+
type: import("vue").PropType<import("@duxweb/dvha-core").UseExtendListProps>;
|
|
107
|
+
};
|
|
102
108
|
}>> & Readonly<{}>, {
|
|
103
109
|
checkable: boolean;
|
|
104
110
|
rowKey: string;
|
|
@@ -44,6 +44,9 @@ export declare const DuxTablePage: import("vue").DefineComponent<import("vue").E
|
|
|
44
44
|
type: StringConstructor;
|
|
45
45
|
default: string;
|
|
46
46
|
};
|
|
47
|
+
hookTableProps: {
|
|
48
|
+
type: PropType<import("@duxweb/dvha-naiveui").UseTableProps>;
|
|
49
|
+
};
|
|
47
50
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
48
51
|
path: {
|
|
49
52
|
type: StringConstructor;
|
|
@@ -83,6 +86,9 @@ export declare const DuxTablePage: import("vue").DefineComponent<import("vue").E
|
|
|
83
86
|
type: StringConstructor;
|
|
84
87
|
default: string;
|
|
85
88
|
};
|
|
89
|
+
hookTableProps: {
|
|
90
|
+
type: PropType<import("@duxweb/dvha-naiveui").UseTableProps>;
|
|
91
|
+
};
|
|
86
92
|
}>> & Readonly<{}>, {
|
|
87
93
|
pagination: boolean | import("@duxweb/dvha-naiveui").TablePagination;
|
|
88
94
|
actions: import("../..").UseActionItem[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duxweb/dvha-pro",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.20",
|
|
5
5
|
"author": "DuxWeb",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@ant-design/colors": "^7.2.1",
|
|
36
|
-
"@duxweb/dvha-core": "^1.0.
|
|
37
|
-
"@duxweb/dvha-naiveui": "^1.0.
|
|
36
|
+
"@duxweb/dvha-core": "^1.0.20",
|
|
37
|
+
"@duxweb/dvha-naiveui": "^1.0.20",
|
|
38
38
|
"@iconify-json/tabler": "^1.2.18",
|
|
39
39
|
"@overlastic/vue": "^0.8.1",
|
|
40
40
|
"@tanstack/vue-query": "^5.80.7",
|
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
"naive-ui": "^2.42.0",
|
|
60
60
|
"pinia": "^3.0.3",
|
|
61
61
|
"pinia-plugin-persistedstate": "^4.3.0",
|
|
62
|
-
"sass-embedded": "^1.89.1",
|
|
63
62
|
"unocss": "^66.2.1",
|
|
64
63
|
"vee-validate": "^4.15.1",
|
|
65
64
|
"vue": "^3.5.0",
|
|
@@ -73,6 +72,7 @@
|
|
|
73
72
|
"devDependencies": {
|
|
74
73
|
"@unocss/cli": "^66.2.1",
|
|
75
74
|
"rimraf": "^6.0.1",
|
|
75
|
+
"sass-embedded": "^1.89.1",
|
|
76
76
|
"tslib": "^2.8.1",
|
|
77
77
|
"vue-tsc": "^2.2.10"
|
|
78
78
|
},
|