@duxweb/dvha-pro 1.0.38 → 1.0.39
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/table.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +1 -1
- package/dist/esm/components/layout/table.js +75 -71
- package/dist/esm/theme/uno.css.js +1 -1
- package/dist/types/components/layout/table.d.ts +6 -0
- package/dist/types/components/table/tablePage.d.ts +6 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),f=require("@duxweb/dvha-core"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),f=require("@duxweb/dvha-core"),W=require("@vueuse/core"),a=require("naive-ui"),J=require("../../hooks/action.cjs");require("@overlastic/vue");require("clsx");require("vue-echarts");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("vue-cropper");const M=require("../modal/modalPage.cjs");require("jinrishici");require("lodash-es");require("vue-draggable-plus");const _=require("./filter.cjs"),$=require("./filterLayout.cjs");require("@vee-validate/i18n");require("colorizr");require("echarts");require("highlight.js/lib/core");require("highlight.js/lib/languages/bash");require("highlight.js/lib/languages/css");require("highlight.js/lib/languages/go");require("highlight.js/lib/languages/java");require("highlight.js/lib/languages/javascript");require("highlight.js/lib/languages/json");require("highlight.js/lib/languages/markdown");require("highlight.js/lib/languages/php");require("highlight.js/lib/languages/python");require("highlight.js/lib/languages/shell");require("highlight.js/lib/languages/sql");require("highlight.js/lib/languages/typescript");require("highlight.js/lib/languages/xml");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("vee-validate");require("vue-router");require("vue-command-palette");require("@duxweb/dvha-naiveui");const K=require("../../pages/page.cjs");require("../../pages/page404.cjs");const q=require("../drawer/drawerPage.cjs"),G=require("./tools.cjs");require("short-unique-id");require("aieditor");require("mime");require("@iconify-json/tabler/icons.json");require("../posterEditor/elements/index.cjs");require("fabric");require("dayjs");require("@tanstack/vue-query");const H=require("../../hooks/table.cjs");require("pinia");function Q(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const X=e.defineComponent({name:"DuxTableLayout",props:{path:{type:String,required:!0},filter:{type:Object},filterSchema:{type:Array},filterNumber:{type:Number,default:1},sorter:{type:Object},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(t,{slots:o}){const b=e.toRef(t,"filter",{}),w=e.toRef(t,"sorter",{}),y=e.toRef(t,"columns",[]),{t:l}=f.useI18n(),{renderAction:V}=J.useAction(),h=H.useTable({...t.hookTableProps,path:t.path,filters:b.value,sorters:w.value,columns:y,pagination:t.pagination}),{columns:N,tablePagination:x,table:S,onUpdateColumnSelected:T,onUpdateChecked:R,columnSelected:k,autoRefetch:C,autoCountdown:p,onAutoRefetch:j,isExporting:L,isExportingRows:P,isImporting:D,onExport:z,onExportRows:O,onImport:B}=h,U=e.computed(()=>N.value.filter(r=>"title"in r&&"key"in r).map(r=>({label:r.title,value:r.key}))),{width:u}=W.useWindowSize(),A=e.computed(()=>N.value.reduce((i,d)=>i+(Number(d?.width)||Number(d?.minWidth)||110),0)),n=e.reactive({show:!1}),c=e.reactive({show:!1}),s=e.reactive({show:!1}),g=e.computed(()=>(t.filterSchema||[]).map(r=>{const{label:i,...d}=r;return{tag:_.DuxTableFilter,attrs:{label:i},children:d}})),{render:E}=f.useJsonSchema({data:e.computed(()=>g.value?.slice(t.filterNumber))}),{render:F}=f.useJsonSchema({data:e.computed(()=>g.value?.slice(0,t.filterNumber))}),m=e.computed(()=>({import:!1,export:!0,refresh:!0,...t.tools})),v=f.useTabStore(),I=v.tabs.find(r=>r.path===v.current);return()=>e.createVNode(K.DuxPage,{actions:t.actions,scrollbar:!1},{sideLeft:()=>o?.sideLeft&&u.value>=1024?o?.sideLeft?.():void 0,sideRight:()=>o?.sideRight&&u.value>=1024?o?.sideRight?.():void 0,default:()=>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"},[t.tabs&&e.createVNode("div",{class:"flex flex-none"},[e.createVNode(a.NTabs,{type:"segment",size:"small",style:{"--n-tab-padding":"4px 10px"},"default-value":t.tabs?.[0]?.value,value:b.value?.tab,onUpdateValue:r=>{b.value.tab=r}},{default:()=>[t.tabs?.map(r=>e.createVNode(a.NTab,{name:r.value,tab:r.label},null))]})]),e.createVNode("div",{class:["overflow-hidden flex-1 flex gap-2"]},[o?.sideLeft&&u.value<1024&&e.createVNode(a.NButton,{class:"flex-none",secondary:!0,onClick:()=>{c.show=!c.show}},{icon:()=>e.createVNode("div",{class:"i-tabler:layout-sidebar-inactive size-4"},null)}),e.createVNode("div",{class:["flex-1 flex flex-col lg:flex-row gap-2 flex-wrap",t.tabs?"justify-end":"justify-start"]},[!t.tabs&&!t.filterSchema?.length&&e.createVNode("div",{class:"flex flex-none items-center text-base font-medium"},[I?.label]),e.h(F)]),o?.sideRight&&u.value<1024&&e.createVNode(a.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)})]),e.createVNode("div",{class:"flex gap-2 justify-between lg:justify-end"},[e.createVNode("div",{class:"flex gap-2 items-center"},[g.value.length>t.filterNumber&&e.createVNode(a.NButton,{iconPlacement:"right",onClick:()=>{n.show=!n.show}},{default:()=>l("components.button.filter"),icon:()=>e.createVNode("div",{class:["i-tabler:chevrons-down size-4 transition-all"]},null)}),o?.tools?.(),e.createVNode(a.NPopselect,{options:U.value,value:k.value,onUpdateValue:r=>{T(r)},multiple:!0,placement:"bottom-start",trigger:"click"},{default:()=>[e.createVNode(a.NTooltip,null,{trigger:()=>e.createVNode(a.NButton,{secondary:!0,"icon-placement":"right"},{icon:()=>e.createVNode("div",{class:"i-tabler:columns size-4"},null)}),default:()=>l("components.list.columnSetting")})]}),m.value.export&&e.createVNode(a.NTooltip,null,{trigger:()=>e.createVNode(a.NButton,{secondary:!0,loading:L.value,onClick:z},{icon:()=>e.createVNode("div",{class:"i-tabler:database-export size-4"},null)}),default:()=>l("components.button.export")}),m.value.import&&e.createVNode(a.NTooltip,null,{trigger:()=>e.createVNode(a.NButton,{secondary:!0,loading:D.value,onClick:B},{icon:()=>e.createVNode("div",{class:"i-tabler:database-import size-4"},null)}),default:()=>l("components.button.import")}),m.value.refresh&&e.createVNode(a.NTooltip,null,{trigger:()=>e.createVNode(a.NButton,{secondary:!0,onClick:j},{icon:()=>C.value?e.createVNode(a.NProgress,{class:"size-4",type:"circle",percentage:p.value*10,strokeWidth:20,color:"rgba(var(--ui-color-primary))"},{default:()=>[e.createVNode("span",{class:"text-8px"},[p.value])]}):e.createVNode("div",{class:"i-tabler:refresh size-4"},null)}),default:()=>l("components.button.autoRefresh")})]),e.createVNode("div",{class:"flex gap-2 justify-end"},[o.actions?.(),t.actions?.length>0&&V({type:u.value<1024?"dropdown":"button",items:t.actions})])])]),o?.header?.(),e.createVNode("div",{class:"flex-1 min-h-0"},[o?.default?.({...h,width:A.value})]),e.createVNode("div",{class:"flex justify-between"},[e.createVNode("div",null,[o?.bottom?.()]),e.createVNode("div",null,[t.pagination&&e.createVNode(a.NPagination,e.mergeProps(x.value,{simple:u.value<768}),{prefix:()=>e.createVNode("div",null,[l("components.list.total",{total:h.total.value||0})])})])]),e.createVNode(G.DuxTableTools,{number:S.value.checkedRowKeys?.length||0||0,group:[[{icon:"i-tabler:x",onClick:()=>{R?.([])}}],[{label:l("components.button.export"),icon:"i-tabler:file-export",loading:P.value,onClick:O},{label:l("components.button.delete"),type:"error",icon:"i-tabler:trash"}]]},null),e.createVNode(a.NModal,{draggable:!0,class:"bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur min-w-110",show:n.show,onUpdateShow:r=>n.show=r},{default:({draggableClass:r})=>{let i;return e.createVNode(M.default,{title:l("components.button.filter"),handle:r,onClose:()=>n.show=!1},{default:()=>[e.createVNode($.DuxFilterLayout,{showLabel:!0,labelPlacement:"top"},Q(i=e.h(E))?i:{default:()=>[i]})]})}}),e.createVNode(a.NDrawer,{show:c.show,onUpdateShow:r=>c.show=r,autoFocus:!1,placement:"left"},{default:()=>[e.createVNode(q.DuxDrawerPage,{title:t.sideLeftTitle||l("components.button.sideLeft"),onClose:()=>c.show=!1,scrollbar:!1},{default:()=>[o?.sideLeft?.()]})]}),e.createVNode(a.NDrawer,{show:s.show,onUpdateShow:r=>s.show=r,autoFocus:!1,placement:"right"},{default:()=>[e.createVNode(q.DuxDrawerPage,{title:t.sideRightTitle||l("components.button.sideRight"),onClose:()=>s.show=!1,scrollbar:!1},{default:()=>[o?.sideRight?.()]})]})])})}});exports.DuxTableLayout=X;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=`/* layer: properties */
|
|
2
|
-
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*, ::before, ::after, ::backdrop{--un-
|
|
2
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*, ::before, ::after, ::backdrop{--un-text-opacity:100%;--un-bg-opacity:100%;--un-from-opacity:100%;--un-divide-y-reverse:initial;--un-border-style:solid;--un-divide-x-reverse:initial;--un-divide-opacity:100%;--un-shadow-opacity:100%;--un-border-opacity:100%;--un-ease:initial;--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-to-opacity:100%;--un-fill-opacity:100%;--un-outline-style:solid;}}
|
|
3
3
|
@property --un-text-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}
|
|
4
4
|
@property --un-outline-style{syntax:"*";inherits:false;initial-value:solid;}
|
|
5
5
|
@property --un-border-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useWindowSize as
|
|
4
|
-
import { NTabs as
|
|
5
|
-
import { useAction as
|
|
1
|
+
import { defineComponent as H, toRef as v, computed as s, reactive as w, createVNode as e, h as C, mergeProps as Q, isVNode as X } from "vue";
|
|
2
|
+
import { useI18n as Y, useJsonSchema as N, useTabStore as Z } from "@duxweb/dvha-core";
|
|
3
|
+
import { useWindowSize as $ } from "@vueuse/core";
|
|
4
|
+
import { NTabs as ee, NTab as te, NButton as r, NPopselect as oe, NTooltip as p, NProgress as le, NPagination as ie, NModal as ae, NDrawer as R } from "naive-ui";
|
|
5
|
+
import { useAction as re } from "../../hooks/action.js";
|
|
6
6
|
import "@overlastic/vue";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "vue-echarts";
|
|
@@ -18,12 +18,12 @@ import "ace-builds/src-noconflict/ext-searchbox";
|
|
|
18
18
|
import "ace-builds/src-noconflict/ext-language_tools";
|
|
19
19
|
import "ace-builds/src-noconflict/mode-snippets";
|
|
20
20
|
import "vue-cropper";
|
|
21
|
-
import
|
|
21
|
+
import ne from "../modal/modalPage.js";
|
|
22
22
|
import "jinrishici";
|
|
23
23
|
import "lodash-es";
|
|
24
24
|
import "vue-draggable-plus";
|
|
25
|
-
import { DuxTableFilter as
|
|
26
|
-
import { DuxFilterLayout as
|
|
25
|
+
import { DuxTableFilter as se } from "./filter.js";
|
|
26
|
+
import { DuxFilterLayout as ue } from "./filterLayout.js";
|
|
27
27
|
import "@vee-validate/i18n";
|
|
28
28
|
import "colorizr";
|
|
29
29
|
import "echarts";
|
|
@@ -51,10 +51,10 @@ import "vee-validate";
|
|
|
51
51
|
import "vue-router";
|
|
52
52
|
import "vue-command-palette";
|
|
53
53
|
import "@duxweb/dvha-naiveui";
|
|
54
|
-
import { DuxPage as
|
|
54
|
+
import { DuxPage as ce } from "../../pages/page.js";
|
|
55
55
|
import "../../pages/page404.js";
|
|
56
56
|
import { DuxDrawerPage as S } from "../drawer/drawerPage.js";
|
|
57
|
-
import { DuxTableTools as
|
|
57
|
+
import { DuxTableTools as me } from "./tools.js";
|
|
58
58
|
import "short-unique-id";
|
|
59
59
|
import "aieditor";
|
|
60
60
|
import "mime";
|
|
@@ -63,12 +63,12 @@ import "../posterEditor/elements/index.js";
|
|
|
63
63
|
import "fabric";
|
|
64
64
|
import "dayjs";
|
|
65
65
|
import "@tanstack/vue-query";
|
|
66
|
-
import { useTable as
|
|
66
|
+
import { useTable as de } from "../../hooks/table.js";
|
|
67
67
|
import "pinia";
|
|
68
|
-
function
|
|
69
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
68
|
+
function pe(t) {
|
|
69
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !X(t);
|
|
70
70
|
}
|
|
71
|
-
const
|
|
71
|
+
const Tt = /* @__PURE__ */ H({
|
|
72
72
|
name: "DuxTableLayout",
|
|
73
73
|
props: {
|
|
74
74
|
path: {
|
|
@@ -85,6 +85,9 @@ const St = /* @__PURE__ */ G({
|
|
|
85
85
|
type: Number,
|
|
86
86
|
default: 1
|
|
87
87
|
},
|
|
88
|
+
sorter: {
|
|
89
|
+
type: Object
|
|
90
|
+
},
|
|
88
91
|
columns: {
|
|
89
92
|
type: Array
|
|
90
93
|
},
|
|
@@ -117,42 +120,43 @@ const St = /* @__PURE__ */ G({
|
|
|
117
120
|
setup(t, {
|
|
118
121
|
slots: l
|
|
119
122
|
}) {
|
|
120
|
-
const f =
|
|
123
|
+
const f = v(t, "filter", {}), T = v(t, "sorter", {}), j = v(t, "columns", []), {
|
|
121
124
|
t: i
|
|
122
|
-
} =
|
|
123
|
-
renderAction:
|
|
124
|
-
} =
|
|
125
|
+
} = Y(), {
|
|
126
|
+
renderAction: L
|
|
127
|
+
} = re(), b = de({
|
|
128
|
+
...t.hookTableProps,
|
|
125
129
|
path: t.path,
|
|
126
130
|
filters: f.value,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
131
|
+
sorters: T.value,
|
|
132
|
+
columns: j,
|
|
133
|
+
pagination: t.pagination
|
|
130
134
|
}), {
|
|
131
|
-
columns:
|
|
132
|
-
tablePagination:
|
|
133
|
-
table:
|
|
134
|
-
onUpdateColumnSelected:
|
|
135
|
-
onUpdateChecked:
|
|
135
|
+
columns: x,
|
|
136
|
+
tablePagination: P,
|
|
137
|
+
table: z,
|
|
138
|
+
onUpdateColumnSelected: D,
|
|
139
|
+
onUpdateChecked: O,
|
|
136
140
|
columnSelected: A,
|
|
137
|
-
autoRefetch:
|
|
138
|
-
autoCountdown:
|
|
139
|
-
onAutoRefetch:
|
|
140
|
-
isExporting:
|
|
141
|
-
isExportingRows:
|
|
142
|
-
isImporting:
|
|
143
|
-
onExport:
|
|
144
|
-
onExportRows:
|
|
145
|
-
onImport:
|
|
146
|
-
} = b,
|
|
141
|
+
autoRefetch: U,
|
|
142
|
+
autoCountdown: y,
|
|
143
|
+
onAutoRefetch: E,
|
|
144
|
+
isExporting: F,
|
|
145
|
+
isExportingRows: I,
|
|
146
|
+
isImporting: V,
|
|
147
|
+
onExport: W,
|
|
148
|
+
onExportRows: B,
|
|
149
|
+
onImport: M
|
|
150
|
+
} = b, _ = s(() => x.value.filter((o) => "title" in o && "key" in o).map((o) => ({
|
|
147
151
|
label: o.title,
|
|
148
152
|
value: o.key
|
|
149
153
|
}))), {
|
|
150
154
|
width: n
|
|
151
|
-
} =
|
|
155
|
+
} = $(), q = s(() => x.value.reduce((a, d) => a + (Number(d?.width) || Number(d?.minWidth) || 110), 0)), u = w({
|
|
152
156
|
show: !1
|
|
153
|
-
}), c =
|
|
157
|
+
}), c = w({
|
|
154
158
|
show: !1
|
|
155
|
-
}), m =
|
|
159
|
+
}), m = w({
|
|
156
160
|
show: !1
|
|
157
161
|
}), h = s(() => (t.filterSchema || []).map((o) => {
|
|
158
162
|
const {
|
|
@@ -160,18 +164,18 @@ const St = /* @__PURE__ */ G({
|
|
|
160
164
|
...d
|
|
161
165
|
} = o;
|
|
162
166
|
return {
|
|
163
|
-
tag:
|
|
167
|
+
tag: se,
|
|
164
168
|
attrs: {
|
|
165
169
|
label: a
|
|
166
170
|
},
|
|
167
171
|
children: d
|
|
168
172
|
};
|
|
169
173
|
})), {
|
|
170
|
-
render:
|
|
174
|
+
render: J
|
|
171
175
|
} = N({
|
|
172
176
|
data: s(() => h.value?.slice(t.filterNumber))
|
|
173
177
|
}), {
|
|
174
|
-
render:
|
|
178
|
+
render: K
|
|
175
179
|
} = N({
|
|
176
180
|
data: s(() => h.value?.slice(0, t.filterNumber))
|
|
177
181
|
}), g = s(() => ({
|
|
@@ -179,8 +183,8 @@ const St = /* @__PURE__ */ G({
|
|
|
179
183
|
export: !0,
|
|
180
184
|
refresh: !0,
|
|
181
185
|
...t.tools
|
|
182
|
-
})),
|
|
183
|
-
return () => e(
|
|
186
|
+
})), k = Z(), G = k.tabs.find((o) => o.path === k.current);
|
|
187
|
+
return () => e(ce, {
|
|
184
188
|
actions: t.actions,
|
|
185
189
|
scrollbar: !1
|
|
186
190
|
}, {
|
|
@@ -192,7 +196,7 @@ const St = /* @__PURE__ */ G({
|
|
|
192
196
|
class: "flex gap-2 justify-between flex-col lg:flex-row"
|
|
193
197
|
}, [t.tabs && e("div", {
|
|
194
198
|
class: "flex flex-none"
|
|
195
|
-
}, [e(
|
|
199
|
+
}, [e(ee, {
|
|
196
200
|
type: "segment",
|
|
197
201
|
size: "small",
|
|
198
202
|
style: {
|
|
@@ -204,7 +208,7 @@ const St = /* @__PURE__ */ G({
|
|
|
204
208
|
f.value.tab = o;
|
|
205
209
|
}
|
|
206
210
|
}, {
|
|
207
|
-
default: () => [t.tabs?.map((o) => e(
|
|
211
|
+
default: () => [t.tabs?.map((o) => e(te, {
|
|
208
212
|
name: o.value,
|
|
209
213
|
tab: o.label
|
|
210
214
|
}, null))]
|
|
@@ -224,7 +228,7 @@ const St = /* @__PURE__ */ G({
|
|
|
224
228
|
class: ["flex-1 flex flex-col lg:flex-row gap-2 flex-wrap", t.tabs ? "justify-end" : "justify-start"]
|
|
225
229
|
}, [!t.tabs && !t.filterSchema?.length && e("div", {
|
|
226
230
|
class: "flex flex-none items-center text-base font-medium"
|
|
227
|
-
}, [
|
|
231
|
+
}, [G?.label]), C(K)]), l?.sideRight && n.value < 1024 && e(r, {
|
|
228
232
|
class: "flex-none",
|
|
229
233
|
secondary: !0,
|
|
230
234
|
onClick: () => {
|
|
@@ -248,11 +252,11 @@ const St = /* @__PURE__ */ G({
|
|
|
248
252
|
icon: () => e("div", {
|
|
249
253
|
class: ["i-tabler:chevrons-down size-4 transition-all"]
|
|
250
254
|
}, null)
|
|
251
|
-
}), l?.tools?.(), e(
|
|
252
|
-
options:
|
|
255
|
+
}), l?.tools?.(), e(oe, {
|
|
256
|
+
options: _.value,
|
|
253
257
|
value: A.value,
|
|
254
258
|
onUpdateValue: (o) => {
|
|
255
|
-
|
|
259
|
+
D(o);
|
|
256
260
|
},
|
|
257
261
|
multiple: !0,
|
|
258
262
|
placement: "bottom-start",
|
|
@@ -272,8 +276,8 @@ const St = /* @__PURE__ */ G({
|
|
|
272
276
|
}), g.value.export && e(p, null, {
|
|
273
277
|
trigger: () => e(r, {
|
|
274
278
|
secondary: !0,
|
|
275
|
-
loading:
|
|
276
|
-
onClick:
|
|
279
|
+
loading: F.value,
|
|
280
|
+
onClick: W
|
|
277
281
|
}, {
|
|
278
282
|
icon: () => e("div", {
|
|
279
283
|
class: "i-tabler:database-export size-4"
|
|
@@ -283,8 +287,8 @@ const St = /* @__PURE__ */ G({
|
|
|
283
287
|
}), g.value.import && e(p, null, {
|
|
284
288
|
trigger: () => e(r, {
|
|
285
289
|
secondary: !0,
|
|
286
|
-
loading:
|
|
287
|
-
onClick:
|
|
290
|
+
loading: V.value,
|
|
291
|
+
onClick: M
|
|
288
292
|
}, {
|
|
289
293
|
icon: () => e("div", {
|
|
290
294
|
class: "i-tabler:database-import size-4"
|
|
@@ -294,18 +298,18 @@ const St = /* @__PURE__ */ G({
|
|
|
294
298
|
}), g.value.refresh && e(p, null, {
|
|
295
299
|
trigger: () => e(r, {
|
|
296
300
|
secondary: !0,
|
|
297
|
-
onClick:
|
|
301
|
+
onClick: E
|
|
298
302
|
}, {
|
|
299
|
-
icon: () =>
|
|
303
|
+
icon: () => U.value ? e(le, {
|
|
300
304
|
class: "size-4",
|
|
301
305
|
type: "circle",
|
|
302
|
-
percentage:
|
|
306
|
+
percentage: y.value * 10,
|
|
303
307
|
strokeWidth: 20,
|
|
304
308
|
color: "rgba(var(--ui-color-primary))"
|
|
305
309
|
}, {
|
|
306
310
|
default: () => [e("span", {
|
|
307
311
|
class: "text-8px"
|
|
308
|
-
}, [
|
|
312
|
+
}, [y.value])]
|
|
309
313
|
}) : e("div", {
|
|
310
314
|
class: "i-tabler:refresh size-4"
|
|
311
315
|
}, null)
|
|
@@ -313,40 +317,40 @@ const St = /* @__PURE__ */ G({
|
|
|
313
317
|
default: () => i("components.button.autoRefresh")
|
|
314
318
|
})]), e("div", {
|
|
315
319
|
class: "flex gap-2 justify-end"
|
|
316
|
-
}, [l.actions?.(), t.actions?.length > 0 &&
|
|
320
|
+
}, [l.actions?.(), t.actions?.length > 0 && L({
|
|
317
321
|
type: n.value < 1024 ? "dropdown" : "button",
|
|
318
322
|
items: t.actions
|
|
319
323
|
})])])]), l?.header?.(), e("div", {
|
|
320
324
|
class: "flex-1 min-h-0"
|
|
321
325
|
}, [l?.default?.({
|
|
322
326
|
...b,
|
|
323
|
-
width:
|
|
327
|
+
width: q.value
|
|
324
328
|
})]), e("div", {
|
|
325
329
|
class: "flex justify-between"
|
|
326
|
-
}, [e("div", null, [l?.bottom?.()]), e("div", null, [t.pagination && e(
|
|
330
|
+
}, [e("div", null, [l?.bottom?.()]), e("div", null, [t.pagination && e(ie, Q(P.value, {
|
|
327
331
|
simple: n.value < 768
|
|
328
332
|
}), {
|
|
329
333
|
prefix: () => e("div", null, [i("components.list.total", {
|
|
330
334
|
total: b.total.value || 0
|
|
331
335
|
})])
|
|
332
|
-
})])]), e(
|
|
333
|
-
number:
|
|
336
|
+
})])]), e(me, {
|
|
337
|
+
number: z.value.checkedRowKeys?.length || 0 || 0,
|
|
334
338
|
group: [[{
|
|
335
339
|
icon: "i-tabler:x",
|
|
336
340
|
onClick: () => {
|
|
337
|
-
|
|
341
|
+
O?.([]);
|
|
338
342
|
}
|
|
339
343
|
}], [{
|
|
340
344
|
label: i("components.button.export"),
|
|
341
345
|
icon: "i-tabler:file-export",
|
|
342
|
-
loading:
|
|
343
|
-
onClick:
|
|
346
|
+
loading: I.value,
|
|
347
|
+
onClick: B
|
|
344
348
|
}, {
|
|
345
349
|
label: i("components.button.delete"),
|
|
346
350
|
type: "error",
|
|
347
351
|
icon: "i-tabler:trash"
|
|
348
352
|
}]]
|
|
349
|
-
}, null), e(
|
|
353
|
+
}, null), e(ae, {
|
|
350
354
|
draggable: !0,
|
|
351
355
|
class: "bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur min-w-110",
|
|
352
356
|
show: u.show,
|
|
@@ -356,15 +360,15 @@ const St = /* @__PURE__ */ G({
|
|
|
356
360
|
draggableClass: o
|
|
357
361
|
}) => {
|
|
358
362
|
let a;
|
|
359
|
-
return e(
|
|
363
|
+
return e(ne, {
|
|
360
364
|
title: i("components.button.filter"),
|
|
361
365
|
handle: o,
|
|
362
366
|
onClose: () => u.show = !1
|
|
363
367
|
}, {
|
|
364
|
-
default: () => [e(
|
|
368
|
+
default: () => [e(ue, {
|
|
365
369
|
showLabel: !0,
|
|
366
370
|
labelPlacement: "top"
|
|
367
|
-
},
|
|
371
|
+
}, pe(a = C(J)) ? a : {
|
|
368
372
|
default: () => [a]
|
|
369
373
|
})]
|
|
370
374
|
});
|
|
@@ -400,5 +404,5 @@ const St = /* @__PURE__ */ G({
|
|
|
400
404
|
}
|
|
401
405
|
});
|
|
402
406
|
export {
|
|
403
|
-
|
|
407
|
+
Tt as DuxTableLayout
|
|
404
408
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const r = `/* layer: properties */
|
|
2
|
-
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*, ::before, ::after, ::backdrop{--un-
|
|
2
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*, ::before, ::after, ::backdrop{--un-text-opacity:100%;--un-bg-opacity:100%;--un-from-opacity:100%;--un-divide-y-reverse:initial;--un-border-style:solid;--un-divide-x-reverse:initial;--un-divide-opacity:100%;--un-shadow-opacity:100%;--un-border-opacity:100%;--un-ease:initial;--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-to-opacity:100%;--un-fill-opacity:100%;--un-outline-style:solid;}}
|
|
3
3
|
@property --un-text-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}
|
|
4
4
|
@property --un-outline-style{syntax:"*";inherits:false;initial-value:solid;}
|
|
5
5
|
@property --un-border-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}
|
|
@@ -25,6 +25,9 @@ export declare const DuxTableLayout: import("vue").DefineComponent<import("vue")
|
|
|
25
25
|
type: NumberConstructor;
|
|
26
26
|
default: number;
|
|
27
27
|
};
|
|
28
|
+
sorter: {
|
|
29
|
+
type: PropType<Record<string, any>>;
|
|
30
|
+
};
|
|
28
31
|
columns: {
|
|
29
32
|
type: PropType<TableColumn[]>;
|
|
30
33
|
};
|
|
@@ -71,6 +74,9 @@ export declare const DuxTableLayout: import("vue").DefineComponent<import("vue")
|
|
|
71
74
|
type: NumberConstructor;
|
|
72
75
|
default: number;
|
|
73
76
|
};
|
|
77
|
+
sorter: {
|
|
78
|
+
type: PropType<Record<string, any>>;
|
|
79
|
+
};
|
|
74
80
|
columns: {
|
|
75
81
|
type: PropType<TableColumn[]>;
|
|
76
82
|
};
|
|
@@ -20,6 +20,9 @@ export declare const DuxTablePage: import("vue").DefineComponent<import("vue").E
|
|
|
20
20
|
type: NumberConstructor;
|
|
21
21
|
default: number;
|
|
22
22
|
};
|
|
23
|
+
sorter: {
|
|
24
|
+
type: PropType<Record<string, any>>;
|
|
25
|
+
};
|
|
23
26
|
columns: {
|
|
24
27
|
type: PropType<import("@duxweb/dvha-naiveui").TableColumn[]>;
|
|
25
28
|
};
|
|
@@ -66,6 +69,9 @@ export declare const DuxTablePage: import("vue").DefineComponent<import("vue").E
|
|
|
66
69
|
type: NumberConstructor;
|
|
67
70
|
default: number;
|
|
68
71
|
};
|
|
72
|
+
sorter: {
|
|
73
|
+
type: PropType<Record<string, any>>;
|
|
74
|
+
};
|
|
69
75
|
columns: {
|
|
70
76
|
type: PropType<import("@duxweb/dvha-naiveui").TableColumn[]>;
|
|
71
77
|
};
|
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.39",
|
|
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.39",
|
|
37
|
+
"@duxweb/dvha-naiveui": "^1.0.39",
|
|
38
38
|
"@iconify-json/tabler": "^1.2.18",
|
|
39
39
|
"@overlastic/vue": "^0.8.1",
|
|
40
40
|
"@tanstack/vue-query": "^5.80.7",
|