@aplus-frontend/ui 0.1.36 → 0.1.38
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/es/index.mjs +41 -40
- package/es/src/ap-table/utils.mjs +11 -11
- package/es/src/business/ap-button-group/ApButtonGroup.vue.d.ts +21 -0
- package/es/src/business/ap-button-group/ApButtonGroup.vue.mjs +4 -0
- package/es/src/business/ap-button-group/ApButtonGroup.vue2.mjs +71 -0
- package/es/src/business/ap-button-group/interface.d.ts +29 -0
- package/es/src/business/ap-button-group/interface.mjs +1 -0
- package/es/src/business/ap-select-layout/interface.d.ts +1 -0
- package/es/src/business/ap-select-layout/select-layout.vue2.mjs +66 -62
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +23 -0
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.mjs +41 -24
- package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +24 -0
- package/es/src/business/ap-table-modal/hooks/use-table-modal.mjs +12 -11
- package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +24 -0
- package/es/src/business/ap-table-modal/hooks/use-table-select-modal.mjs +11 -10
- package/es/src/business/ap-table-modal/index.d.ts +21 -0
- package/es/src/business/ap-table-modal/table-modal.vue.d.ts +21 -0
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +31 -30
- package/es/src/business/index.d.ts +608 -4
- package/es/src/business/index.mjs +27 -23
- package/es/src/editable-table/utils.mjs +12 -12
- package/es/src/index.mjs +216 -215
- package/lib/index.js +1 -1
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-button-group/ApButtonGroup.vue.d.ts +21 -0
- package/lib/src/business/ap-button-group/ApButtonGroup.vue.js +1 -0
- package/lib/src/business/ap-button-group/ApButtonGroup.vue2.js +1 -0
- package/lib/src/business/ap-button-group/interface.d.ts +29 -0
- package/lib/src/business/ap-button-group/interface.js +1 -0
- package/lib/src/business/ap-select-layout/interface.d.ts +1 -0
- package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -1
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +23 -0
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.js +1 -1
- package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +24 -0
- package/lib/src/business/ap-table-modal/hooks/use-table-modal.js +1 -1
- package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +24 -0
- package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.js +1 -1
- package/lib/src/business/ap-table-modal/index.d.ts +21 -0
- package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +21 -0
- package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
- package/lib/src/business/index.d.ts +608 -4
- package/lib/src/business/index.js +1 -1
- package/lib/src/editable-table/utils.js +1 -1
- package/lib/src/index.js +1 -1
- package/package.json +3 -3
package/es/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { configProviderProps as x } from "./src/config-provider/config-provider-
|
|
|
5
5
|
import { configProviderContextKey as n, tableDefaultConfig as i } from "./src/config-provider/constants.mjs";
|
|
6
6
|
import { keysOf as c, provideGlobalConfig as T, useGlobalConfig as F } from "./src/config-provider/hooks/use-global-config.mjs";
|
|
7
7
|
import { buildLocaleContext as b, buildTranslator as S, localeContextKey as I, translate as g, useLocale as D } from "./src/config-provider/hooks/use-locale.mjs";
|
|
8
|
-
import { defaultNamespace as P, namespaceContextKey as M, useGetDerivedNamespace as
|
|
8
|
+
import { defaultNamespace as P, namespaceContextKey as M, useGetDerivedNamespace as B, useNamespace as R } from "./src/config-provider/hooks/use-namespace.mjs";
|
|
9
9
|
import { ConfigProvider as v, globalConfigCached as w } from "./src/config-provider/config-provider.mjs";
|
|
10
10
|
import { APConfigProvider as k } from "./src/config-provider/index.mjs";
|
|
11
11
|
import { Scrollbar as N } from "./src/scroll-bar/index.mjs";
|
|
@@ -23,7 +23,7 @@ import { useForm as Ce } from "./src/pro-form/hooks/use-form.mjs";
|
|
|
23
23
|
import { isComponentFormSchema as Se, isSlotFormSchema as Ie } from "./src/pro-form/types/form.mjs";
|
|
24
24
|
import { Field as De } from "./src/pro-form/index.mjs";
|
|
25
25
|
import { default as Pe } from "./src/pro-form/components/api-cascader.vue.mjs";
|
|
26
|
-
import { default as
|
|
26
|
+
import { default as Be } from "./src/pro-form/components/api-radio-group.vue.mjs";
|
|
27
27
|
import { default as Ge } from "./src/pro-form/components/api-select.vue.mjs";
|
|
28
28
|
import { default as we } from "./src/pro-form/components/api-transfer.vue.mjs";
|
|
29
29
|
import { default as ke } from "./src/pro-form/components/api-tree.vue.mjs";
|
|
@@ -48,7 +48,7 @@ import { default as bo } from "./src/pro-table/components/table-action.vue.mjs";
|
|
|
48
48
|
import { default as Io } from "./src/pro-table/components/edit-table-header-icon.vue.mjs";
|
|
49
49
|
import { default as Do } from "./src/pro-table/components/table-image.vue.mjs";
|
|
50
50
|
import { useTable as Po } from "./src/pro-table/hooks/use-table.mjs";
|
|
51
|
-
import { ApFormItemText as
|
|
51
|
+
import { ApFormItemText as Bo } from "./src/ap-form/items/text/index.mjs";
|
|
52
52
|
import { default as Go } from "./src/ap-form/items/text-area/index.vue.mjs";
|
|
53
53
|
import { default as wo } from "./src/ap-form/items/number/index.vue.mjs";
|
|
54
54
|
import { default as ko } from "./src/ap-form/items/date/index.vue.mjs";
|
|
@@ -75,7 +75,7 @@ import { default as br } from "./src/ap-field/radio/index.vue.mjs";
|
|
|
75
75
|
import { default as Ir } from "./src/ap-field/switch/index.vue.mjs";
|
|
76
76
|
import { default as Dr } from "./src/ap-field/text-area/index.vue.mjs";
|
|
77
77
|
import { default as Pr } from "./src/ap-field/date-range/index.vue.mjs";
|
|
78
|
-
import { default as
|
|
78
|
+
import { default as Br } from "./src/ap-field/select/index.vue.mjs";
|
|
79
79
|
import { default as Gr } from "./src/ap-field/text/password.vue.mjs";
|
|
80
80
|
import { default as wr } from "./src/ap-field/slider/index.vue.mjs";
|
|
81
81
|
import { default as kr } from "./src/ap-field/segmented/index.vue.mjs";
|
|
@@ -101,7 +101,7 @@ import { default as bt } from "./src/ap-upload/apUpload.vue.mjs";
|
|
|
101
101
|
import { ApDownLoadNeedNameKeyDefault as It } from "./src/ap-download/interface.mjs";
|
|
102
102
|
import { default as Dt } from "./src/ap-download/ap-download.vue.mjs";
|
|
103
103
|
import { CheckCard as Pt } from "./src/check-card/index.mjs";
|
|
104
|
-
import { default as
|
|
104
|
+
import { default as Bt } from "./src/check-card/group.vue.mjs";
|
|
105
105
|
import { ApModal as Gt } from "./src/ap-modal/index.mjs";
|
|
106
106
|
import { default as wt } from "./src/ap-list/index.vue.mjs";
|
|
107
107
|
import { default as kt } from "./src/ap-button/ap-button.vue.mjs";
|
|
@@ -112,15 +112,15 @@ import { handleExportDownload as Ot } from "./src/business/ap-export-group/handl
|
|
|
112
112
|
import { default as zt } from "./src/business/ap-table-modal/index.mjs";
|
|
113
113
|
import { useTableModal as Vt } from "./src/business/ap-table-modal/hooks/use-table-modal.mjs";
|
|
114
114
|
import { useTableSelectModal as jt } from "./src/business/ap-table-modal/hooks/use-table-select-modal.mjs";
|
|
115
|
-
import { ApAttachment as Jt, ApBatchAction as Qt, ApBatchActionGroup as Zt,
|
|
116
|
-
import { ApTransformDataHelper as
|
|
117
|
-
import { useTablePaging as
|
|
118
|
-
import { default as
|
|
119
|
-
import { default as
|
|
120
|
-
import { default as
|
|
121
|
-
import { default as
|
|
122
|
-
import { useMessage as
|
|
123
|
-
import { useControllableValue as
|
|
115
|
+
import { ApAttachment as Jt, ApBatchAction as Qt, ApBatchActionGroup as Zt, ApButtonGroup as _t, ApCard as ea, ApExpandAlert as oa, ApExportGroup as ra, ApImage as ta, ApInputRadio as aa, ApLabel as pa, ApLabelGroup as fa, ApLadder as ma, ApSelectLayout as la, ApStatus as sa, ApStatusGroup as da, ApTitle as xa } from "./src/business/index.mjs";
|
|
116
|
+
import { ApTransformDataHelper as na } from "./src/utils/ap-trans-data/index.mjs";
|
|
117
|
+
import { useTablePaging as Aa } from "./src/ap-table/hooks/use-table-paging.mjs";
|
|
118
|
+
import { default as Ta } from "./src/ap-table/ap-table.vue.mjs";
|
|
119
|
+
import { default as Ca } from "./src/editable-table/index.vue.mjs";
|
|
120
|
+
import { default as Sa } from "./src/editable-table/form-item.vue.mjs";
|
|
121
|
+
import { default as ga } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
|
|
122
|
+
import { useMessage as ha } from "./src/hooks/useMessage.mjs";
|
|
123
|
+
import { useControllableValue as Ma } from "./src/hooks/useControllableValue.mjs";
|
|
124
124
|
const p = {
|
|
125
125
|
install: (r) => {
|
|
126
126
|
for (const t in o) {
|
|
@@ -141,14 +141,15 @@ export {
|
|
|
141
141
|
Qt as ApBatchAction,
|
|
142
142
|
Zt as ApBatchActionGroup,
|
|
143
143
|
kt as ApButton,
|
|
144
|
-
_t as
|
|
144
|
+
_t as ApButtonGroup,
|
|
145
|
+
ea as ApCard,
|
|
145
146
|
ot as ApCustomColumn,
|
|
146
147
|
tt as ApCustomSelect,
|
|
147
|
-
|
|
148
|
+
ga as ApDescriptions,
|
|
148
149
|
It as ApDownLoadNeedNameKeyDefault,
|
|
149
150
|
Dt as ApDownload,
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
oa as ApExpandAlert,
|
|
152
|
+
ra as ApExportGroup,
|
|
152
153
|
dr as ApField,
|
|
153
154
|
ir as ApFieldCheckbox,
|
|
154
155
|
cr as ApFieldDate,
|
|
@@ -158,7 +159,7 @@ export {
|
|
|
158
159
|
br as ApFieldRadio,
|
|
159
160
|
Nr as ApFieldRate,
|
|
160
161
|
kr as ApFieldSegmented,
|
|
161
|
-
|
|
162
|
+
Br as ApFieldSelect,
|
|
162
163
|
wr as ApFieldSlider,
|
|
163
164
|
Ir as ApFieldSwitch,
|
|
164
165
|
ur as ApFieldText,
|
|
@@ -174,33 +175,33 @@ export {
|
|
|
174
175
|
Ko as ApFormItemRadio,
|
|
175
176
|
Yo as ApFormItemSelect,
|
|
176
177
|
Oo as ApFormItemSwitch,
|
|
177
|
-
|
|
178
|
+
Bo as ApFormItemText,
|
|
178
179
|
Go as ApFormItemTextArea,
|
|
179
180
|
Vo as ApFormItemTextPassword,
|
|
180
181
|
er as ApFormList,
|
|
181
182
|
ar as ApFormModalForm,
|
|
182
183
|
rr as ApFormSearchForm,
|
|
183
184
|
lr as ApFormSet,
|
|
184
|
-
|
|
185
|
+
ta as ApImage,
|
|
185
186
|
ct as ApInfoLayout,
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
aa as ApInputRadio,
|
|
188
|
+
pa as ApLabel,
|
|
189
|
+
fa as ApLabelGroup,
|
|
190
|
+
ma as ApLadder,
|
|
190
191
|
wt as ApList,
|
|
191
192
|
Gt as ApModal,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
193
|
+
la as ApSelectLayout,
|
|
194
|
+
sa as ApStatus,
|
|
195
|
+
da as ApStatusGroup,
|
|
196
|
+
Ta as ApTable,
|
|
196
197
|
zt as ApTableModal,
|
|
197
198
|
ut as ApTag,
|
|
198
199
|
it as ApTagGroup,
|
|
199
|
-
|
|
200
|
-
|
|
200
|
+
xa as ApTitle,
|
|
201
|
+
na as ApTransformDataHelper,
|
|
201
202
|
bt as ApUpload,
|
|
202
203
|
Pe as ApiCascader,
|
|
203
|
-
|
|
204
|
+
Be as ApiRadioGroup,
|
|
204
205
|
Ge as ApiSelect,
|
|
205
206
|
we as ApiTransfer,
|
|
206
207
|
ke as ApiTree,
|
|
@@ -211,7 +212,7 @@ export {
|
|
|
211
212
|
j as BasicHelp,
|
|
212
213
|
q as BasicTitle,
|
|
213
214
|
Pt as CheckCard,
|
|
214
|
-
|
|
215
|
+
Bt as CheckCardGroup,
|
|
215
216
|
K as CollapseContainer,
|
|
216
217
|
Q as CollapseTransition,
|
|
217
218
|
v as ConfigProvider,
|
|
@@ -223,8 +224,8 @@ export {
|
|
|
223
224
|
pt as DictCode,
|
|
224
225
|
co as Dropdown,
|
|
225
226
|
Io as EditTableHeaderIcon,
|
|
226
|
-
|
|
227
|
-
|
|
227
|
+
Ca as EditableTable,
|
|
228
|
+
Sa as EditableTableFormItem,
|
|
228
229
|
_ as ExpandTransition,
|
|
229
230
|
ee as ExpandXTransition,
|
|
230
231
|
oe as FadeTransition,
|
|
@@ -281,21 +282,21 @@ export {
|
|
|
281
282
|
g as translate,
|
|
282
283
|
_r as useCacheColumnSetting,
|
|
283
284
|
Te as useComponentRegister,
|
|
284
|
-
|
|
285
|
+
Ma as useControllableValue,
|
|
285
286
|
ne as useDescription,
|
|
286
287
|
Ce as useForm,
|
|
287
|
-
|
|
288
|
+
B as useGetDerivedNamespace,
|
|
288
289
|
F as useGlobalConfig,
|
|
289
290
|
D as useLocale,
|
|
290
|
-
|
|
291
|
+
ha as useMessage,
|
|
291
292
|
ro as useModal,
|
|
292
293
|
eo as useModalContext,
|
|
293
294
|
to as useModalInner,
|
|
294
|
-
|
|
295
|
+
R as useNamespace,
|
|
295
296
|
Kt as usePageListApTable,
|
|
296
297
|
Po as useTable,
|
|
297
298
|
Vt as useTableModal,
|
|
298
|
-
|
|
299
|
+
Aa as useTablePaging,
|
|
299
300
|
Yt as useTableRefresh,
|
|
300
301
|
jt as useTableSelectModal,
|
|
301
302
|
W as zhCn
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isVNode as m, createVNode as u, mergeProps as
|
|
2
|
-
import { isObject as c, isArray as
|
|
1
|
+
import { isVNode as m, createVNode as u, mergeProps as a, cloneVNode as T, Fragment as b } from "vue";
|
|
2
|
+
import { isObject as c, isArray as f, isUndefined as h, isFunction as p, omit as y, isBoolean as g, isString as j } from "lodash-unified";
|
|
3
3
|
import { apTableRenderItemMap as F, apTableFormItemMap as O } from "./constants.mjs";
|
|
4
4
|
import { isType as E } from "@fruits-chain/utils";
|
|
5
5
|
import "../ap-form/index.mjs";
|
|
@@ -26,7 +26,7 @@ const v = (t, e, n) => {
|
|
|
26
26
|
}
|
|
27
27
|
case "multiple":
|
|
28
28
|
case "multipleNumber":
|
|
29
|
-
return
|
|
29
|
+
return f(e) ? e : [e];
|
|
30
30
|
case "boolean":
|
|
31
31
|
return e;
|
|
32
32
|
case "object":
|
|
@@ -36,7 +36,7 @@ const v = (t, e, n) => {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
function J(t) {
|
|
39
|
-
return
|
|
39
|
+
return f(t) ? t.join(".") : t;
|
|
40
40
|
}
|
|
41
41
|
function P(t) {
|
|
42
42
|
const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
|
|
@@ -75,7 +75,7 @@ const V = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), d = (t)
|
|
|
75
75
|
return t("ap.common.inputText");
|
|
76
76
|
};
|
|
77
77
|
function w(t, e) {
|
|
78
|
-
return !t || !
|
|
78
|
+
return !t || !p(t) ? t : t(e);
|
|
79
79
|
}
|
|
80
80
|
function U(t) {
|
|
81
81
|
let e = t.valueType || "text";
|
|
@@ -85,7 +85,7 @@ function z(t, e, n, r) {
|
|
|
85
85
|
var s;
|
|
86
86
|
const o = F[t];
|
|
87
87
|
if (o)
|
|
88
|
-
return u(o,
|
|
88
|
+
return u(o, a(e, {
|
|
89
89
|
mode: "read"
|
|
90
90
|
}), null);
|
|
91
91
|
const i = r == null ? void 0 : r[t];
|
|
@@ -108,7 +108,7 @@ function G(t, e) {
|
|
|
108
108
|
return () => {
|
|
109
109
|
var i;
|
|
110
110
|
const o = (i = r == null ? void 0 : r.renderFormItem) == null ? void 0 : i.call(r, t.fieldProps.field);
|
|
111
|
-
return o ? u(S,
|
|
111
|
+
return o ? u(S, a(t.fieldProps, {
|
|
112
112
|
span: t.span
|
|
113
113
|
}), I(o) ? o : {
|
|
114
114
|
default: () => [o]
|
|
@@ -122,7 +122,7 @@ function K(t, e) {
|
|
|
122
122
|
value: i ? e.index + 1 : e.value
|
|
123
123
|
};
|
|
124
124
|
return t.valueEnum && (r.valueEnum = t.valueEnum), {
|
|
125
|
-
...
|
|
125
|
+
...y(r, ["request"]),
|
|
126
126
|
...s
|
|
127
127
|
};
|
|
128
128
|
}
|
|
@@ -130,7 +130,7 @@ function X(t) {
|
|
|
130
130
|
const e = {
|
|
131
131
|
...t
|
|
132
132
|
};
|
|
133
|
-
return
|
|
133
|
+
return g(t.filters) && t.filters && t.valueEnum && (e.filters = d(t.valueEnum)), e;
|
|
134
134
|
}
|
|
135
135
|
function Y(t, e) {
|
|
136
136
|
var r;
|
|
@@ -156,10 +156,10 @@ function k(t, e, n, r) {
|
|
|
156
156
|
});
|
|
157
157
|
if (o && (o.length > 1 || o[0].children && o[0].children !== "v-if"))
|
|
158
158
|
return o;
|
|
159
|
-
const s =
|
|
159
|
+
const s = j(t.title) ? u("span", {
|
|
160
160
|
class: e,
|
|
161
161
|
title: t.title
|
|
162
|
-
}, [t.title]) : t.title, l = t.tooltip ?
|
|
162
|
+
}, [t.title]) : t.title, l = t.tooltip ? p(t.tooltip) ? t.tooltip(t) : u(b, null, [t.tooltip]) : null;
|
|
163
163
|
return l ? u("span", {
|
|
164
164
|
style: {
|
|
165
165
|
display: "inline-flex",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ApButtonGroupProps } from './interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApButtonGroupProps>, {}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApButtonGroupProps>, {}>>>, {}, {}>;
|
|
4
|
+
export default _default;
|
|
5
|
+
type __VLS_WithDefaults<P, D> = {
|
|
6
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
7
|
+
default: D[K];
|
|
8
|
+
}> : P[K];
|
|
9
|
+
};
|
|
10
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
11
|
+
type __VLS_TypePropsToOption<T> = {
|
|
12
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
13
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
14
|
+
} : {
|
|
15
|
+
type: PropType<T[K]>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
type __VLS_PrettifyLocal<T> = {
|
|
20
|
+
[K in keyof T]: T[K];
|
|
21
|
+
} & {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { defineComponent as k, computed as T, openBlock as t, createBlock as u, unref as s, normalizeProps as P, guardReactiveProps as R, withCtx as c, createElementBlock as m, Fragment as p, renderList as i, mergeProps as l, resolveDynamicComponent as f, h as y, createCommentVNode as B } from "vue";
|
|
2
|
+
import { Space as x } from "ant-design-vue";
|
|
3
|
+
import "../../ap-button/ap-button.vue2.mjs";
|
|
4
|
+
import "../../ap-button/ap-action-button.vue2.mjs";
|
|
5
|
+
import "../ap-batch-action-group/ApBatchActionGroup.vue.mjs";
|
|
6
|
+
import "../ap-export-group/ApExportGroup.vue.mjs";
|
|
7
|
+
import { omit as n } from "lodash-unified";
|
|
8
|
+
import { usePermission as C } from "@aplus-frontend/hooks";
|
|
9
|
+
import L from "../../ap-button/ap-button.vue.mjs";
|
|
10
|
+
import S from "../../ap-button/ap-action-button.vue.mjs";
|
|
11
|
+
import $ from "../ap-batch-action-group/ApBatchActionGroup.vue2.mjs";
|
|
12
|
+
import b from "../ap-export-group/ApExportGroup.vue2.mjs";
|
|
13
|
+
const I = /* @__PURE__ */ k({
|
|
14
|
+
__name: "ApButtonGroup",
|
|
15
|
+
props: {
|
|
16
|
+
spaceProps: {},
|
|
17
|
+
selectedRows: {},
|
|
18
|
+
selectedRowKeys: {},
|
|
19
|
+
groupList: {}
|
|
20
|
+
},
|
|
21
|
+
setup(d) {
|
|
22
|
+
const { hasPermission: h } = C(), o = d, v = T(() => o.groupList);
|
|
23
|
+
function _(r) {
|
|
24
|
+
let a = r == null ? void 0 : r.ifShow;
|
|
25
|
+
return !(r != null && r.ifShow) && (r != null && r.auth) && (a = () => h(r.auth)), (a == null ? void 0 : a()) ?? !0;
|
|
26
|
+
}
|
|
27
|
+
return (r, a) => (t(), u(s(x), P(R(o.spaceProps ?? {})), {
|
|
28
|
+
default: c(() => [
|
|
29
|
+
(t(!0), m(p, null, i(v.value, (e, w) => (t(), m(p, { key: w }, [
|
|
30
|
+
e.valueType === "button" && _(e) ? (t(), u(L, l({
|
|
31
|
+
key: 0,
|
|
32
|
+
ref_for: !0
|
|
33
|
+
}, {
|
|
34
|
+
...s(n)(e, ["valueType", "ifShow", "auth"])
|
|
35
|
+
}), {
|
|
36
|
+
default: c(() => [
|
|
37
|
+
(t(), u(f(y(p, [e == null ? void 0 : e.content]))))
|
|
38
|
+
]),
|
|
39
|
+
_: 2
|
|
40
|
+
}, 1040)) : e.valueType === "actionButton" && _(e) ? (t(), u(S, l({
|
|
41
|
+
key: 1,
|
|
42
|
+
ref_for: !0
|
|
43
|
+
}, {
|
|
44
|
+
...s(n)(e, ["valueType", "ifShow", "auth"])
|
|
45
|
+
}), {
|
|
46
|
+
default: c(() => [
|
|
47
|
+
(t(), u(f(y(p, [e == null ? void 0 : e.content]))))
|
|
48
|
+
]),
|
|
49
|
+
_: 2
|
|
50
|
+
}, 1040)) : e.valueType === "batchActionGroup" ? (t(), u($, l({
|
|
51
|
+
key: 2,
|
|
52
|
+
ref_for: !0
|
|
53
|
+
}, {
|
|
54
|
+
...s(n)(e, ["valueType"]),
|
|
55
|
+
selectedRows: o == null ? void 0 : o.selectedRows
|
|
56
|
+
}), null, 16)) : e.valueType === "exportGroup" ? (t(), u(b, l({
|
|
57
|
+
key: 3,
|
|
58
|
+
ref_for: !0
|
|
59
|
+
}, {
|
|
60
|
+
...s(n)(e, ["valueType"]),
|
|
61
|
+
selectedRowKeys: o == null ? void 0 : o.selectedRowKeys
|
|
62
|
+
}), null, 16)) : B("", !0)
|
|
63
|
+
], 64))), 128))
|
|
64
|
+
]),
|
|
65
|
+
_: 1
|
|
66
|
+
}, 16));
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
export {
|
|
70
|
+
I as default
|
|
71
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SpaceProps } from 'ant-design-vue';
|
|
2
|
+
import { ApButtonProps } from '../../ap-button';
|
|
3
|
+
import { ApBatchActionGroupProps } from '../ap-batch-action-group/interface';
|
|
4
|
+
import { ApExportGroupProps } from '../ap-export-group/interface';
|
|
5
|
+
import { VNodeChild } from 'vue';
|
|
6
|
+
export type ApButtonGroupType = {
|
|
7
|
+
button: ApButtonProps & {
|
|
8
|
+
content?: VNodeChild;
|
|
9
|
+
ifShow?: () => boolean;
|
|
10
|
+
auth?: string;
|
|
11
|
+
};
|
|
12
|
+
actionButton: ApButtonProps & {
|
|
13
|
+
content?: VNodeChild;
|
|
14
|
+
ifShow?: () => boolean;
|
|
15
|
+
auth?: string;
|
|
16
|
+
};
|
|
17
|
+
batchActionGroup: Omit<ApBatchActionGroupProps, 'selectedRows'>;
|
|
18
|
+
exportGroup: Omit<ApExportGroupProps, 'selectedRowKeys'>;
|
|
19
|
+
};
|
|
20
|
+
export type ApButtonGroupTypeKey = keyof ApButtonGroupType & {};
|
|
21
|
+
export type ApButtonGroupListProps<ButtonType extends ApButtonGroupTypeKey = ApButtonGroupTypeKey> = ButtonType extends ApButtonGroupTypeKey ? {
|
|
22
|
+
valueType: ButtonType;
|
|
23
|
+
} & ApButtonGroupType[ButtonType] : never;
|
|
24
|
+
export type ApButtonGroupProps = {
|
|
25
|
+
spaceProps?: Partial<SpaceProps>;
|
|
26
|
+
selectedRows?: any[];
|
|
27
|
+
selectedRowKeys?: any[];
|
|
28
|
+
groupList?: ApButtonGroupListProps[];
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as M, ref as
|
|
1
|
+
import { defineComponent as M, ref as r, computed as O, onMounted as U, openBlock as p, createElementBlock as f, normalizeClass as o, unref as e, createVNode as d, Transition as W, withCtx as u, withDirectives as E, createElementVNode as s, toDisplayString as $, createTextVNode as x, Fragment as z, renderList as R, renderSlot as A, vShow as N, createCommentVNode as j } from "vue";
|
|
2
2
|
import "../../ap-field/index.mjs";
|
|
3
3
|
import { IconApLeftarrow as G, IconApMenu as H } from "@aplus-frontend/icon";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
@@ -12,127 +12,131 @@ const X = ["onClick"], de = /* @__PURE__ */ M({
|
|
|
12
12
|
props: {
|
|
13
13
|
title: {},
|
|
14
14
|
request: {},
|
|
15
|
+
onSearch: {},
|
|
15
16
|
defaultFold: { type: Boolean, default: !1 }
|
|
16
17
|
},
|
|
17
18
|
emits: ["onSelect", "afterEnter", "afterLeave"],
|
|
18
19
|
setup(_, { emit: w }) {
|
|
19
|
-
const { b: m, be:
|
|
20
|
-
|
|
20
|
+
const { b: m, be: h, bem: i } = P("ap-select-layout"), a = _, y = w, C = r(), v = r(a.defaultFold), g = r(!a.defaultFold), S = r(), T = r(), b = r(), k = r(""), L = () => {
|
|
21
|
+
v.value = !v.value, S.value = !1, T.value = !1;
|
|
21
22
|
}, F = (t) => {
|
|
22
|
-
b.value = t,
|
|
23
|
+
b.value = t, y("onSelect", t);
|
|
23
24
|
}, B = K((t) => {
|
|
24
|
-
var
|
|
25
|
-
k.value = (
|
|
25
|
+
var n;
|
|
26
|
+
k.value = (n = t.target) == null ? void 0 : n.value;
|
|
26
27
|
}, 500), q = O(() => {
|
|
27
28
|
var t;
|
|
28
|
-
return (t =
|
|
29
|
+
return (t = C.value) == null ? void 0 : t.filter((n) => {
|
|
30
|
+
var c, l;
|
|
31
|
+
return a != null && a.onSearch ? (c = a.onSearch) == null ? void 0 : c.call(a, n, k.value) : (l = n == null ? void 0 : n.name) == null ? void 0 : l.includes(k.value);
|
|
32
|
+
});
|
|
29
33
|
}), D = (t) => {
|
|
30
|
-
|
|
34
|
+
g.value = !0, y("afterEnter", t);
|
|
31
35
|
}, I = (t) => {
|
|
32
|
-
|
|
36
|
+
g.value = !1, y("afterLeave", t);
|
|
33
37
|
};
|
|
34
38
|
return U(() => {
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
|
|
39
|
+
a.request().then((t) => {
|
|
40
|
+
var n;
|
|
41
|
+
C.value = t, F((n = C.value) == null ? void 0 : n[0]);
|
|
38
42
|
});
|
|
39
|
-
}), (t,
|
|
40
|
-
var
|
|
41
|
-
return p(),
|
|
42
|
-
class:
|
|
43
|
+
}), (t, n) => {
|
|
44
|
+
var c;
|
|
45
|
+
return p(), f("div", {
|
|
46
|
+
class: o(e(m)())
|
|
43
47
|
}, [
|
|
44
|
-
|
|
48
|
+
d(W, {
|
|
45
49
|
mode: "out-in",
|
|
46
50
|
onAfterEnter: D,
|
|
47
51
|
onAfterLeave: I
|
|
48
52
|
}, {
|
|
49
|
-
default:
|
|
50
|
-
|
|
51
|
-
class:
|
|
53
|
+
default: u(() => [
|
|
54
|
+
E(s("div", {
|
|
55
|
+
class: o(e(m)("side"))
|
|
52
56
|
}, [
|
|
53
|
-
|
|
54
|
-
class:
|
|
57
|
+
s("div", {
|
|
58
|
+
class: o(e(h)("side", "header"))
|
|
55
59
|
}, [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
class:
|
|
60
|
+
s("h3", null, $(a.title), 1),
|
|
61
|
+
s("div", {
|
|
62
|
+
class: o(e(i)("side", "header", "imgWrap"))
|
|
59
63
|
}, [
|
|
60
|
-
|
|
61
|
-
open:
|
|
62
|
-
"onUpdate:open":
|
|
64
|
+
d(e(V), {
|
|
65
|
+
open: S.value,
|
|
66
|
+
"onUpdate:open": n[0] || (n[0] = (l) => S.value = l)
|
|
63
67
|
}, {
|
|
64
|
-
title:
|
|
68
|
+
title: u(() => [
|
|
65
69
|
x("收起")
|
|
66
70
|
]),
|
|
67
|
-
default:
|
|
68
|
-
|
|
71
|
+
default: u(() => [
|
|
72
|
+
d(e(G), { onClick: L })
|
|
69
73
|
]),
|
|
70
74
|
_: 1
|
|
71
75
|
}, 8, ["open"])
|
|
72
76
|
], 2)
|
|
73
77
|
], 2),
|
|
74
|
-
|
|
75
|
-
class:
|
|
78
|
+
s("div", {
|
|
79
|
+
class: o(e(h)("side", "body"))
|
|
76
80
|
}, [
|
|
77
|
-
|
|
78
|
-
class:
|
|
81
|
+
s("div", {
|
|
82
|
+
class: o(e(i)("side", "body", "search"))
|
|
79
83
|
}, [
|
|
80
|
-
|
|
84
|
+
d(e(Q), {
|
|
81
85
|
placeholder: "请输入",
|
|
82
86
|
onChange: e(B)
|
|
83
87
|
}, null, 8, ["onChange"])
|
|
84
88
|
], 2),
|
|
85
|
-
|
|
86
|
-
class:
|
|
89
|
+
s("div", {
|
|
90
|
+
class: o(e(i)("side", "body", "scroll"))
|
|
87
91
|
}, [
|
|
88
|
-
(p(!0),
|
|
89
|
-
key:
|
|
90
|
-
class:
|
|
91
|
-
onClick: (Y) => F(
|
|
92
|
+
(p(!0), f(z, null, R(q.value, (l) => E((p(), f("div", {
|
|
93
|
+
key: l.value,
|
|
94
|
+
class: o(`${e(i)("side", "body", "scroll-item")} ${b.value === l ? "active" : ""}`),
|
|
95
|
+
onClick: (Y) => F(l)
|
|
92
96
|
}, [
|
|
93
|
-
A(t.$slots, "itemRender", { item:
|
|
94
|
-
|
|
95
|
-
ellipsis: { tooltip:
|
|
96
|
-
content: `${
|
|
97
|
+
A(t.$slots, "itemRender", { item: l }, () => [
|
|
98
|
+
d(e(J), {
|
|
99
|
+
ellipsis: { tooltip: l.name },
|
|
100
|
+
content: `${l.name}`
|
|
97
101
|
}, null, 8, ["ellipsis", "content"])
|
|
98
102
|
])
|
|
99
103
|
], 10, X)), [
|
|
100
|
-
[N,
|
|
104
|
+
[N, g.value]
|
|
101
105
|
])), 128))
|
|
102
106
|
], 2)
|
|
103
107
|
], 2)
|
|
104
108
|
], 2), [
|
|
105
|
-
[N, !
|
|
109
|
+
[N, !v.value]
|
|
106
110
|
])
|
|
107
111
|
]),
|
|
108
112
|
_: 3
|
|
109
113
|
}),
|
|
110
|
-
|
|
111
|
-
class:
|
|
114
|
+
s("div", {
|
|
115
|
+
class: o(e(m)("content"))
|
|
112
116
|
}, [
|
|
113
|
-
|
|
114
|
-
class:
|
|
117
|
+
s("div", {
|
|
118
|
+
class: o(e(h)("content", "header"))
|
|
115
119
|
}, [
|
|
116
|
-
|
|
120
|
+
v.value ? (p(), f("div", {
|
|
117
121
|
key: 0,
|
|
118
|
-
class:
|
|
122
|
+
class: o(e(i)("content", "header", "imgWrap"))
|
|
119
123
|
}, [
|
|
120
|
-
|
|
124
|
+
d(e(V), {
|
|
121
125
|
open: T.value,
|
|
122
|
-
"onUpdate:open":
|
|
126
|
+
"onUpdate:open": n[1] || (n[1] = (l) => T.value = l)
|
|
123
127
|
}, {
|
|
124
|
-
title:
|
|
128
|
+
title: u(() => [
|
|
125
129
|
x("展开")
|
|
126
130
|
]),
|
|
127
|
-
default:
|
|
128
|
-
|
|
131
|
+
default: u(() => [
|
|
132
|
+
d(e(H), { onClick: L })
|
|
129
133
|
]),
|
|
130
134
|
_: 1
|
|
131
135
|
}, 8, ["open"])
|
|
132
136
|
], 2)) : j("", !0),
|
|
133
|
-
|
|
134
|
-
class:
|
|
135
|
-
}, $((
|
|
137
|
+
s("div", {
|
|
138
|
+
class: o(e(i)("content", "header", "title"))
|
|
139
|
+
}, $((c = b.value) == null ? void 0 : c.name), 3)
|
|
136
140
|
], 2),
|
|
137
141
|
A(t.$slots, "default")
|
|
138
142
|
], 2)
|
|
@@ -1,7 +1,30 @@
|
|
|
1
1
|
import { OpenOptions, UseCreateTableModalProps, OpenReturnType } from '../interface';
|
|
2
|
+
import { Recordable } from '../../../type';
|
|
3
|
+
import { TableColumnsType } from 'ant-design-vue';
|
|
2
4
|
export declare function useCreateTableModal(props: UseCreateTableModalProps): {
|
|
3
5
|
readonly openModal: <T>(selected?: any[], options?: OpenOptions) => Promise< OpenReturnType<T> | undefined>;
|
|
4
6
|
readonly closeModal: () => void;
|
|
5
7
|
readonly destroy: () => void;
|
|
8
|
+
readonly reloadApTableData: () => void;
|
|
9
|
+
readonly resetApTableData: () => void;
|
|
10
|
+
readonly getApTableInstance: () => {
|
|
11
|
+
submit: () => void;
|
|
12
|
+
reset: () => void;
|
|
13
|
+
refresh: () => void;
|
|
14
|
+
setSearchFormValues: (fields: Partial< Recordable>) => void;
|
|
15
|
+
getSearchFormValues: () => Partial< Recordable>;
|
|
16
|
+
dataSource: any;
|
|
17
|
+
rowSelection?: {
|
|
18
|
+
select: (item: any) => void;
|
|
19
|
+
selectAll: () => void;
|
|
20
|
+
unSelectAll: () => void;
|
|
21
|
+
selectedRows: any[];
|
|
22
|
+
unSelect: (item: any) => void;
|
|
23
|
+
isSelected: (item: any) => boolean;
|
|
24
|
+
clearAll: () => void;
|
|
25
|
+
toggleSelect: (item: any) => void;
|
|
26
|
+
} | undefined;
|
|
27
|
+
getShownColumns: () => TableColumnsType<any>;
|
|
28
|
+
} | null | undefined;
|
|
6
29
|
readonly isDestroyed: true;
|
|
7
30
|
};
|