@duxweb/dvha-core 1.0.46 → 1.0.48
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/hooks/list.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("@vueuse/core"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("@vueuse/core"),o=require("vue"),E=require("./data.cjs"),C=require("./exportCsv.cjs"),Q=require("./importCsv.cjs");function W(t){const r=o.toRef(t,"filters",{}),c=o.toRef(t,"sorters",{}),n=o.toRef(typeof t.pagination=="object"?t.pagination:{page:1,pageSize:20}),d=[10,20,30,40,50,100],h=e=>d.includes(e)?d:Array.from({length:5},(l,N)=>e*(N+1)),g=o.ref(h(n.value.pageSize));o.watch(()=>n.value.pageSize,e=>{g.value.includes(e)||(g.value=h(e))});const P=e=>{n.value.pageSize=e,n.value.page=1},z=e=>{n.value.page=e},{data:s,isLoading:L,refetch:R}=E.useList({path:t.path,pagination:t.pagination?n.value:!1,filters:r.value,sorters:c.value}),b=o.computed(()=>s.value?.data||[]),m=o.computed(()=>s.value?.meta||{}),f=o.computed(()=>t.total?.(s.value)||m.value?.[t.totalField||"total"]||0),I=o.computed(()=>Math.ceil(f.value/n.value.pageSize)||0),k=e=>{r.value=e},w=e=>{c.value=e},a=o.ref([]),p=o.computed(()=>a.value.length>0&&a.value.length===s.value?.data?.length),y=o.computed(()=>a.value.length>0&&a.value.length<(s.value?.data?.length||0)),U=e=>{const l=a.value.indexOf(e);l>-1?a.value.splice(l,1):a.value.push(e)},q=e=>{a.value=e},F=e=>a.value.includes(e),M=()=>{p.value?a.value=[]:a.value=s.value?.data?.map(e=>e[t.key||"id"]).filter(e=>e!=null)||[]};o.watch(()=>s.value?.data,()=>{a.value=[]});const u=()=>{a.value=[],R()},v=o.ref({page:1,pageSize:100}),{trigger:A,isLoading:B}=C.useExportCsv({path:t.path,filters:r.value||{},sorters:c.value||{},maxPage:()=>t.exportMaxPage||0,pagination:v.value,filename:t.exportFilename||"data.csv",onSuccess:e=>{t.onExportSuccess?.(e),v.value.page=1},onProgress:e=>{t.onExportProgress?.(e)},onError:e=>{t.onExportError?.(e),v.value.page=1}}),O=S.reactiveComputed(()=>({ids:a.value})),{trigger:j,isLoading:T}=C.useExportCsv({path:t.path,filters:O,maxPage:1,filename:t.exportFilename||"rows.csv",onSuccess:e=>{t.onExportSuccess?.(e)},onError:e=>{t.onExportError?.(e)}}),{open:$,isLoading:V}=Q.useImportCsv({path:t.path,onComplete:e=>{t.onImportSuccess?.(e)},onProgress:e=>{t.onImportProgress?.(e)},onError:e=>{t.onImportError?.(e)}}),i=o.ref(!1),{remaining:_,start:x,stop:D}=S.useCountdown(10,{onComplete:()=>{u(),x()}}),G=()=>{i.value=!i.value,i.value?(u(),x()):D()},{mutate:H,isLoading:J}=E.useCustomMutation({path:t.batchPath||`${t.path}/batch`,method:"POST",onSuccess:e=>{t?.onBatchSuccess?.(e),a.value=[],u()},onError:e=>{t?.onBatchError?.(e),u()}}),K=(e,l)=>{H({payload:{type:e,ids:a.value,...l||{}}})};return{list:b,meta:m,isLoading:L,pagination:n,filters:r,sorters:c,onRefresh:u,onUpdateFilters:k,onUpdateSorters:w,checkeds:a,isAllChecked:p,isIndeterminate:y,toggleChecked:U,isChecked:F,toggleSelectAll:M,onUpdateChecked:q,total:f,page:o.computed(()=>n.value.page),pageSize:o.computed(()=>n.value.pageSize),pageSizes:g.value,pageCount:I,onUpdatePage:z,onUpdatePageSize:P,onExport:A,isExporting:B,onExportRows:j,isExportingRows:T,onImport:$,isImporting:V,autoRefetch:i,onAutoRefetch:G,autoCountdown:_,onBatch:K,isBatching:J}}exports.useExtendList=W;
|
package/dist/cjs/hooks/menu.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("lodash-es"),q=require("pinia"),t=require("vue"),L=require("vue-router"),S=require("../stores/route.cjs");require("../utils/bus.cjs");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("lodash-es"),q=require("pinia"),t=require("vue"),L=require("vue-router"),S=require("../stores/route.cjs");require("../utils/bus.cjs");const c=require("../utils/tree.cjs");function x(u){const p=S.useRouteStore(),{routes:M}=q.storeToRefs(p),v=(e=!0)=>y.cloneDeep(M.value)?.filter(n=>!!n?.name).filter(n=>!e||n.hidden===void 0||n.hidden===!1),d=t.computed(()=>{const e=v(!1);return c.arrayToTree(e,{idKey:"name",parentKey:"parent",childrenKey:"children",sortKey:"sort"},void 0)}),a=t.computed(()=>{const e=v();return c.arrayToTree(e,{idKey:"name",parentKey:"parent",childrenKey:"children",sortKey:"sort"},void 0)}),o=L.useRoute(),h=t.ref(o.name),r=t.ref(o.name),s=t.ref(o.name),K=t.computed(()=>u?.doubleMenu?y.cloneDeep(a.value)?.map(n=>(delete n.children,n)):a.value),f=t.computed(()=>u?.doubleMenu?a.value?.find(n=>n.name===r.value)?.children||[]:[]),g=t.computed(()=>c.searchTree(d.value,n=>n?.name===o.name));t.watch(()=>u?.doubleMenu,()=>{if(u?.doubleMenu){const e=c.searchTree(a.value,n=>n?.name===r.value);r.value=e?.[0]?.name,s.value=e?.[e.length-1]?.name}else{const e=c.searchTree(a.value,n=>n?.name===s.value);r.value=e?.[e.length-1]?.name,s.value=e?.[e.length-1]?.name}},{immediate:!0});const T=t.computed(()=>u?.doubleMenu?f.value.length>0:!0);return t.watch([o,d,()=>u?.doubleMenu],()=>{const e=c.searchTree(d.value,i=>i.name===o.name),m=(i=>{let b=-1;for(let l=i.length-1;l>=0;l--)if(i[l].hidden===!1||i[l].hidden===void 0){b=l;break}return b})(e);h.value=e?.[m]?.name,u?.doubleMenu?(r.value=e?.[0]?.name,s.value=e?.[m]?.name):(r.value=e?.[m]?.name,s.value=e?.[m]?.name)},{immediate:!0}),{data:a,originalData:d,getMenu:v,mainMenu:K,subMenu:f,isSubMenu:T,crumbs:g,active:h,appActive:r,subActive:s}}exports.useMenu=x;
|
package/dist/esm/hooks/list.js
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
import { reactiveComputed as
|
|
2
|
-
import { toRef as
|
|
3
|
-
import { useList as
|
|
4
|
-
import { useExportCsv as
|
|
5
|
-
import { useImportCsv as
|
|
6
|
-
function
|
|
7
|
-
const
|
|
1
|
+
import { reactiveComputed as W, useCountdown as X } from "@vueuse/core";
|
|
2
|
+
import { toRef as h, ref as g, watch as C, computed as n } from "vue";
|
|
3
|
+
import { useList as Y, useCustomMutation as Z } from "./data.js";
|
|
4
|
+
import { useExportCsv as P } from "./exportCsv.js";
|
|
5
|
+
import { useImportCsv as ee } from "./importCsv.js";
|
|
6
|
+
function se(t) {
|
|
7
|
+
const u = h(t, "filters", {}), i = h(t, "sorters", {}), o = h(typeof t.pagination == "object" ? t.pagination : {
|
|
8
8
|
page: 1,
|
|
9
9
|
pageSize: 20
|
|
10
|
-
}),
|
|
10
|
+
}), m = [10, 20, 30, 40, 50, 100], f = (e) => m.includes(e) ? m : Array.from({
|
|
11
11
|
length: 5
|
|
12
|
-
}, (
|
|
12
|
+
}, (r, V) => e * (V + 1)), v = g(f(o.value.pageSize));
|
|
13
13
|
C(() => o.value.pageSize, (e) => {
|
|
14
|
-
|
|
14
|
+
v.value.includes(e) || (v.value = f(e));
|
|
15
15
|
});
|
|
16
|
-
const
|
|
16
|
+
const z = (e) => {
|
|
17
17
|
o.value.pageSize = e, o.value.page = 1;
|
|
18
|
-
},
|
|
18
|
+
}, L = (e) => {
|
|
19
19
|
o.value.page = e;
|
|
20
20
|
}, {
|
|
21
21
|
data: l,
|
|
22
|
-
isLoading:
|
|
23
|
-
refetch:
|
|
24
|
-
} =
|
|
22
|
+
isLoading: I,
|
|
23
|
+
refetch: k
|
|
24
|
+
} = Y({
|
|
25
25
|
path: t.path,
|
|
26
26
|
pagination: t.pagination ? o.value : !1,
|
|
27
|
-
filters:
|
|
28
|
-
sorters:
|
|
29
|
-
}), R = n(() => l.value?.data || []),
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
}, a =
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
},
|
|
27
|
+
filters: u.value,
|
|
28
|
+
sorters: i.value
|
|
29
|
+
}), R = n(() => l.value?.data || []), p = n(() => l.value?.meta || {}), x = n(() => t.total?.(l.value) || p.value?.[t.totalField || "total"] || 0), b = n(() => Math.ceil(x.value / o.value.pageSize) || 0), w = (e) => {
|
|
30
|
+
u.value = e;
|
|
31
|
+
}, F = (e) => {
|
|
32
|
+
i.value = e;
|
|
33
|
+
}, a = g([]), S = n(() => a.value.length > 0 && a.value.length === l.value?.data?.length), U = n(() => a.value.length > 0 && a.value.length < (l.value?.data?.length || 0)), y = (e) => {
|
|
34
|
+
const r = a.value.indexOf(e);
|
|
35
|
+
r > -1 ? a.value.splice(r, 1) : a.value.push(e);
|
|
36
|
+
}, A = (e) => {
|
|
37
37
|
a.value = e;
|
|
38
|
-
},
|
|
38
|
+
}, B = (e) => a.value.includes(e), M = () => {
|
|
39
39
|
S.value ? a.value = [] : a.value = l.value?.data?.map((e) => e[t.key || "id"]).filter((e) => e != null) || [];
|
|
40
40
|
};
|
|
41
41
|
C(() => l.value?.data, () => {
|
|
42
42
|
a.value = [];
|
|
43
43
|
});
|
|
44
|
-
const
|
|
45
|
-
a.value = [],
|
|
46
|
-
},
|
|
44
|
+
const s = () => {
|
|
45
|
+
a.value = [], k();
|
|
46
|
+
}, d = g({
|
|
47
47
|
page: 1,
|
|
48
48
|
pageSize: 100
|
|
49
49
|
}), {
|
|
50
50
|
trigger: O,
|
|
51
|
-
isLoading:
|
|
52
|
-
} =
|
|
51
|
+
isLoading: j
|
|
52
|
+
} = P({
|
|
53
53
|
path: t.path,
|
|
54
|
-
filters:
|
|
55
|
-
sorters:
|
|
54
|
+
filters: u.value || {},
|
|
55
|
+
sorters: i.value || {},
|
|
56
56
|
maxPage: () => t.exportMaxPage || 0,
|
|
57
|
-
pagination:
|
|
57
|
+
pagination: d.value,
|
|
58
58
|
filename: t.exportFilename || "data.csv",
|
|
59
59
|
onSuccess: (e) => {
|
|
60
|
-
t.onExportSuccess?.(e),
|
|
60
|
+
t.onExportSuccess?.(e), d.value.page = 1;
|
|
61
61
|
},
|
|
62
62
|
onProgress: (e) => {
|
|
63
63
|
t.onExportProgress?.(e);
|
|
64
64
|
},
|
|
65
65
|
onError: (e) => {
|
|
66
|
-
t.onExportError?.(e),
|
|
66
|
+
t.onExportError?.(e), d.value.page = 1;
|
|
67
67
|
}
|
|
68
|
-
}),
|
|
68
|
+
}), T = W(() => ({
|
|
69
69
|
ids: a.value
|
|
70
70
|
})), {
|
|
71
|
-
trigger:
|
|
72
|
-
isLoading:
|
|
73
|
-
} =
|
|
71
|
+
trigger: _,
|
|
72
|
+
isLoading: $
|
|
73
|
+
} = P({
|
|
74
74
|
path: t.path,
|
|
75
|
-
filters:
|
|
75
|
+
filters: T,
|
|
76
76
|
maxPage: 1,
|
|
77
77
|
filename: t.exportFilename || "rows.csv",
|
|
78
78
|
onSuccess: (e) => {
|
|
@@ -82,9 +82,9 @@ function ae(t) {
|
|
|
82
82
|
t.onExportError?.(e);
|
|
83
83
|
}
|
|
84
84
|
}), {
|
|
85
|
-
open:
|
|
86
|
-
isLoading:
|
|
87
|
-
} =
|
|
85
|
+
open: q,
|
|
86
|
+
isLoading: D
|
|
87
|
+
} = ee({
|
|
88
88
|
path: t.path,
|
|
89
89
|
onComplete: (e) => {
|
|
90
90
|
t.onImportSuccess?.(e);
|
|
@@ -95,58 +95,81 @@ function ae(t) {
|
|
|
95
95
|
onError: (e) => {
|
|
96
96
|
t.onImportError?.(e);
|
|
97
97
|
}
|
|
98
|
-
}),
|
|
99
|
-
remaining:
|
|
98
|
+
}), c = g(!1), {
|
|
99
|
+
remaining: G,
|
|
100
100
|
start: E,
|
|
101
|
-
stop:
|
|
102
|
-
} =
|
|
101
|
+
stop: H
|
|
102
|
+
} = X(10, {
|
|
103
103
|
onComplete: () => {
|
|
104
|
-
|
|
104
|
+
s(), E();
|
|
105
|
+
}
|
|
106
|
+
}), J = () => {
|
|
107
|
+
c.value = !c.value, c.value ? (s(), E()) : H();
|
|
108
|
+
}, {
|
|
109
|
+
mutate: K,
|
|
110
|
+
isLoading: N
|
|
111
|
+
} = Z({
|
|
112
|
+
path: t.batchPath || `${t.path}/batch`,
|
|
113
|
+
method: "POST",
|
|
114
|
+
onSuccess: (e) => {
|
|
115
|
+
t?.onBatchSuccess?.(e), a.value = [], s();
|
|
116
|
+
},
|
|
117
|
+
onError: (e) => {
|
|
118
|
+
t?.onBatchError?.(e), s();
|
|
105
119
|
}
|
|
106
|
-
}),
|
|
107
|
-
|
|
120
|
+
}), Q = (e, r) => {
|
|
121
|
+
K({
|
|
122
|
+
payload: {
|
|
123
|
+
type: e,
|
|
124
|
+
ids: a.value,
|
|
125
|
+
...r || {}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
108
128
|
};
|
|
109
129
|
return {
|
|
110
130
|
// 数据
|
|
111
131
|
list: R,
|
|
112
|
-
meta:
|
|
113
|
-
isLoading:
|
|
132
|
+
meta: p,
|
|
133
|
+
isLoading: I,
|
|
114
134
|
pagination: o,
|
|
115
|
-
filters:
|
|
116
|
-
sorters:
|
|
117
|
-
onRefresh:
|
|
118
|
-
onUpdateFilters:
|
|
119
|
-
onUpdateSorters:
|
|
135
|
+
filters: u,
|
|
136
|
+
sorters: i,
|
|
137
|
+
onRefresh: s,
|
|
138
|
+
onUpdateFilters: w,
|
|
139
|
+
onUpdateSorters: F,
|
|
120
140
|
// 选中
|
|
121
141
|
checkeds: a,
|
|
122
142
|
isAllChecked: S,
|
|
123
|
-
isIndeterminate:
|
|
143
|
+
isIndeterminate: U,
|
|
124
144
|
toggleChecked: y,
|
|
125
|
-
isChecked:
|
|
126
|
-
toggleSelectAll:
|
|
127
|
-
onUpdateChecked:
|
|
145
|
+
isChecked: B,
|
|
146
|
+
toggleSelectAll: M,
|
|
147
|
+
onUpdateChecked: A,
|
|
128
148
|
// 分页
|
|
129
149
|
total: x,
|
|
130
150
|
page: n(() => o.value.page),
|
|
131
151
|
pageSize: n(() => o.value.pageSize),
|
|
132
|
-
pageSizes:
|
|
133
|
-
pageCount:
|
|
134
|
-
onUpdatePage:
|
|
135
|
-
onUpdatePageSize:
|
|
152
|
+
pageSizes: v.value,
|
|
153
|
+
pageCount: b,
|
|
154
|
+
onUpdatePage: L,
|
|
155
|
+
onUpdatePageSize: z,
|
|
136
156
|
// 导出
|
|
137
157
|
onExport: O,
|
|
138
|
-
isExporting:
|
|
139
|
-
onExportRows:
|
|
140
|
-
isExportingRows:
|
|
158
|
+
isExporting: j,
|
|
159
|
+
onExportRows: _,
|
|
160
|
+
isExportingRows: $,
|
|
141
161
|
// 导入
|
|
142
|
-
onImport:
|
|
143
|
-
isImporting:
|
|
162
|
+
onImport: q,
|
|
163
|
+
isImporting: D,
|
|
144
164
|
// 自动刷新
|
|
145
|
-
autoRefetch:
|
|
146
|
-
onAutoRefetch:
|
|
147
|
-
autoCountdown:
|
|
165
|
+
autoRefetch: c,
|
|
166
|
+
onAutoRefetch: J,
|
|
167
|
+
autoCountdown: G,
|
|
168
|
+
// 批量操作
|
|
169
|
+
onBatch: Q,
|
|
170
|
+
isBatching: N
|
|
148
171
|
};
|
|
149
172
|
}
|
|
150
173
|
export {
|
|
151
|
-
|
|
174
|
+
se as useExtendList
|
|
152
175
|
};
|
package/dist/esm/hooks/menu.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { cloneDeep as
|
|
1
|
+
import { cloneDeep as y } from "lodash-es";
|
|
2
2
|
import { storeToRefs as R } from "pinia";
|
|
3
|
-
import { computed as l, ref as f, watch as
|
|
3
|
+
import { computed as l, ref as f, watch as M } from "vue";
|
|
4
4
|
import { useRoute as S } from "vue-router";
|
|
5
5
|
import { useRouteStore as A } from "../stores/route.js";
|
|
6
6
|
import "../utils/bus.js";
|
|
7
7
|
import { arrayToTree as K, searchTree as c } from "../utils/tree.js";
|
|
8
8
|
function C(t) {
|
|
9
|
-
const g = A(), { routes: x } = R(g), v = (e = !0) =>
|
|
9
|
+
const g = A(), { routes: x } = R(g), v = (e = !0) => y(x.value)?.filter((n) => !!n?.name).filter((n) => !e || n.hidden === void 0 || n.hidden === !1), d = l(() => {
|
|
10
10
|
const e = v(!1);
|
|
11
11
|
return K(e, {
|
|
12
12
|
idKey: "name",
|
|
@@ -14,7 +14,7 @@ function C(t) {
|
|
|
14
14
|
childrenKey: "children",
|
|
15
15
|
sortKey: "sort"
|
|
16
16
|
}, void 0);
|
|
17
|
-
}),
|
|
17
|
+
}), u = l(() => {
|
|
18
18
|
const e = v();
|
|
19
19
|
return K(e, {
|
|
20
20
|
idKey: "name",
|
|
@@ -22,30 +22,30 @@ function C(t) {
|
|
|
22
22
|
childrenKey: "children",
|
|
23
23
|
sortKey: "sort"
|
|
24
24
|
}, void 0);
|
|
25
|
-
}), r = S(), h = f(r.name),
|
|
26
|
-
|
|
25
|
+
}), r = S(), h = f(r.name), a = f(r.name), o = f(r.name), L = l(() => t?.doubleMenu ? y(u.value)?.map((n) => (delete n.children, n)) : u.value), b = l(() => t?.doubleMenu ? u.value?.find((n) => n.name === a.value)?.children || [] : []), T = l(() => c(d.value, (n) => n?.name === r.name));
|
|
26
|
+
M(() => t?.doubleMenu, () => {
|
|
27
27
|
if (t?.doubleMenu) {
|
|
28
|
-
const e = c(
|
|
29
|
-
|
|
28
|
+
const e = c(u.value, (n) => n?.name === a.value);
|
|
29
|
+
a.value = e?.[0]?.name, o.value = e?.[e.length - 1]?.name;
|
|
30
30
|
} else {
|
|
31
|
-
const e = c(
|
|
32
|
-
|
|
31
|
+
const e = c(u.value, (n) => n?.name === o.value);
|
|
32
|
+
a.value = e?.[e.length - 1]?.name, o.value = e?.[e.length - 1]?.name;
|
|
33
33
|
}
|
|
34
34
|
}, { immediate: !0 });
|
|
35
|
-
const I = l(() => t?.doubleMenu ?
|
|
36
|
-
return
|
|
35
|
+
const I = l(() => t?.doubleMenu ? b.value.length > 0 : !0);
|
|
36
|
+
return M([r, d, () => t?.doubleMenu], () => {
|
|
37
37
|
const e = c(d.value, (i) => i.name === r.name), m = ((i) => {
|
|
38
|
-
let
|
|
38
|
+
let p = -1;
|
|
39
39
|
for (let s = i.length - 1; s >= 0; s--)
|
|
40
40
|
if (i[s].hidden === !1 || i[s].hidden === void 0) {
|
|
41
|
-
|
|
41
|
+
p = s;
|
|
42
42
|
break;
|
|
43
43
|
}
|
|
44
|
-
return
|
|
44
|
+
return p;
|
|
45
45
|
})(e);
|
|
46
|
-
h.value = e?.[m]?.name, t?.doubleMenu ? (
|
|
46
|
+
h.value = e?.[m]?.name, t?.doubleMenu ? (a.value = e?.[0]?.name, o.value = e?.[m]?.name) : (a.value = e?.[m]?.name, o.value = e?.[m]?.name);
|
|
47
47
|
}, { immediate: !0 }), {
|
|
48
|
-
data:
|
|
48
|
+
data: u,
|
|
49
49
|
originalData: d,
|
|
50
50
|
getMenu: v,
|
|
51
51
|
mainMenu: L,
|
|
@@ -53,7 +53,7 @@ function C(t) {
|
|
|
53
53
|
isSubMenu: I,
|
|
54
54
|
crumbs: T,
|
|
55
55
|
active: h,
|
|
56
|
-
appActive:
|
|
56
|
+
appActive: a,
|
|
57
57
|
subActive: o
|
|
58
58
|
};
|
|
59
59
|
}
|
|
@@ -14,6 +14,7 @@ export interface UseExtendListProps {
|
|
|
14
14
|
pagination?: boolean | IListPagination;
|
|
15
15
|
exportFilename?: string;
|
|
16
16
|
exportMaxPage?: number;
|
|
17
|
+
batchPath?: string;
|
|
17
18
|
total?: (data?: IDataProviderResponse) => number;
|
|
18
19
|
onExportSuccess?: (data?: IDataProviderResponse) => void;
|
|
19
20
|
onExportProgress?: (data?: IDataProviderPagination) => void;
|
|
@@ -21,6 +22,8 @@ export interface UseExtendListProps {
|
|
|
21
22
|
onImportSuccess?: (progress?: IImportProgress) => void;
|
|
22
23
|
onImportProgress?: (progress?: IImportProgress) => void;
|
|
23
24
|
onImportError?: (error?: IDataProviderError) => void;
|
|
25
|
+
onBatchSuccess?: (data?: IDataProviderResponse) => void;
|
|
26
|
+
onBatchError?: (error?: IDataProviderError) => void;
|
|
24
27
|
}
|
|
25
28
|
export declare function useExtendList(props: UseExtendListProps): {
|
|
26
29
|
list: import("vue").ComputedRef<Record<string, any>[]>;
|
|
@@ -61,5 +64,7 @@ export declare function useExtendList(props: UseExtendListProps): {
|
|
|
61
64
|
autoRefetch: import("vue").Ref<boolean, boolean>;
|
|
62
65
|
onAutoRefetch: () => void;
|
|
63
66
|
autoCountdown: import("vue").ShallowRef<number>;
|
|
67
|
+
onBatch: (type: string, data?: Record<string, any>) => void;
|
|
68
|
+
isBatching: import("vue").ComputedRef<boolean>;
|
|
64
69
|
};
|
|
65
70
|
export {};
|
|
@@ -8,7 +8,7 @@ export declare function useMenu(props?: UseMenuProps): {
|
|
|
8
8
|
getMenu: (hidden?: boolean) => IMenu[];
|
|
9
9
|
mainMenu: import("vue").ComputedRef<any>;
|
|
10
10
|
subMenu: import("vue").ComputedRef<any>;
|
|
11
|
-
isSubMenu: import("vue").ComputedRef<
|
|
11
|
+
isSubMenu: import("vue").ComputedRef<boolean>;
|
|
12
12
|
crumbs: import("vue").ComputedRef<any>;
|
|
13
13
|
active: import("vue").Ref<import("vue-router").RouteRecordNameGeneric, import("vue-router").RouteRecordNameGeneric>;
|
|
14
14
|
appActive: import("vue").Ref<import("vue-router").RouteRecordNameGeneric, import("vue-router").RouteRecordNameGeneric>;
|