@aplus-frontend/ui 0.1.35 → 0.1.37
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 +136 -133
- package/es/src/ap-button/ap-action-button.vue.d.ts +5 -0
- package/es/src/ap-button/ap-action-button.vue.mjs +8 -8
- package/es/src/ap-form/ap-form.vue2.mjs +93 -93
- package/es/src/ap-form/index.d.ts +3 -1
- package/es/src/ap-form/index.mjs +5 -1
- package/es/src/ap-form/interface.d.ts +4 -0
- package/es/src/ap-form/set/index.vue.d.ts +43 -0
- package/es/src/ap-form/set/index.vue.mjs +35 -0
- package/es/src/ap-form/set/index.vue2.mjs +4 -0
- package/es/src/ap-table/ap-table.vue.d.ts +1 -0
- package/es/src/ap-table/ap-table.vue.mjs +109 -107
- package/es/src/ap-table/components/setting/utils.d.ts +1 -1
- package/es/src/ap-table/components/setting/utils.mjs +12 -21
- package/es/src/ap-table/components/style/setting/modal.css +15 -3
- package/es/src/ap-table/interface.d.ts +5 -0
- package/es/src/ap-table/utils.mjs +14 -13
- package/es/src/ap-upload/apUpload.vue.mjs +40 -39
- 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-table-modal/hooks/use-create-table-modal.d.ts +1 -1
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.mjs +11 -11
- package/es/src/business/hooks/usePageListApTable.d.ts +1 -0
- package/es/src/business/index.d.ts +607 -4
- package/es/src/business/index.mjs +27 -23
- package/es/src/editable-table/form-item.vue.mjs +76 -97
- package/es/src/editable-table/hooks/use-get-columns.mjs +41 -35
- package/es/src/editable-table/index.vue.mjs +79 -100
- package/es/src/editable-table/style/index.css +12 -0
- package/es/src/editable-table/utils.d.ts +8 -1
- package/es/src/editable-table/utils.mjs +103 -69
- package/es/src/index.mjs +220 -217
- package/es/src/theme/ap-table/setting/modal.css +15 -3
- package/es/src/theme/editable-table/index.css +12 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-button/ap-action-button.vue.d.ts +5 -0
- package/lib/src/ap-button/ap-action-button.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/index.d.ts +3 -1
- package/lib/src/ap-form/index.js +1 -1
- package/lib/src/ap-form/interface.d.ts +4 -0
- package/lib/src/ap-form/set/index.vue.d.ts +43 -0
- package/lib/src/ap-form/set/index.vue.js +1 -0
- package/lib/src/ap-form/set/index.vue2.js +1 -0
- package/lib/src/ap-table/ap-table.vue.d.ts +1 -0
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/components/setting/utils.d.ts +1 -1
- package/lib/src/ap-table/components/setting/utils.js +1 -1
- package/lib/src/ap-table/components/style/setting/modal.css +15 -3
- package/lib/src/ap-table/interface.d.ts +5 -0
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/ap-upload/apUpload.vue.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-table-modal/hooks/use-create-table-modal.d.ts +1 -1
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.js +1 -1
- package/lib/src/business/hooks/usePageListApTable.d.ts +1 -0
- package/lib/src/business/index.d.ts +607 -4
- package/lib/src/business/index.js +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/editable-table/style/index.css +12 -0
- package/lib/src/editable-table/utils.d.ts +8 -1
- package/lib/src/editable-table/utils.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/theme/ap-table/setting/modal.css +15 -3
- package/lib/src/theme/editable-table/index.css +12 -0
- package/package.json +5 -5
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as U, computed as
|
|
1
|
+
import { defineComponent as U, computed as d, provide as t, ref as f, openBlock as g, createElementBlock as j, normalizeClass as T, unref as z, createBlock as k, resolveDynamicComponent as B, normalizeProps as $, mergeProps as q, createCommentVNode as L } from "vue";
|
|
2
2
|
import "../config-provider/index.mjs";
|
|
3
3
|
import "./components/SingleFile.vue.mjs";
|
|
4
4
|
import "./components/MultipleFile.vue.mjs";
|
|
5
5
|
import "./components/Picture.vue.mjs";
|
|
6
6
|
import "./styles/upload.css";
|
|
7
|
-
import { injectLocaleToAccept as
|
|
8
|
-
import { injectLocaleToOss as
|
|
9
|
-
import { Form as
|
|
10
|
-
import { useLocale as
|
|
11
|
-
import { useNamespace as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { useGlobalConfig as
|
|
16
|
-
const
|
|
7
|
+
import { injectLocaleToAccept as R } from "./utils/accept.mjs";
|
|
8
|
+
import { injectLocaleToOss as M } from "./hooks/useOss.mjs";
|
|
9
|
+
import { Form as P } from "ant-design-vue";
|
|
10
|
+
import { useLocale as w } from "../config-provider/hooks/use-locale.mjs";
|
|
11
|
+
import { useNamespace as D } from "../config-provider/hooks/use-namespace.mjs";
|
|
12
|
+
import E from "./components/SingleFile.vue2.mjs";
|
|
13
|
+
import G from "./components/MultipleFile.vue2.mjs";
|
|
14
|
+
import I from "./components/Picture.vue2.mjs";
|
|
15
|
+
import { useGlobalConfig as v } from "../config-provider/hooks/use-global-config.mjs";
|
|
16
|
+
const me = /* @__PURE__ */ U({
|
|
17
17
|
name: "AplusFileUpload",
|
|
18
18
|
__name: "apUpload",
|
|
19
19
|
props: {
|
|
@@ -60,47 +60,48 @@ const se = /* @__PURE__ */ U({
|
|
|
60
60
|
onChange: Function
|
|
61
61
|
},
|
|
62
62
|
emits: ["update:value"],
|
|
63
|
-
setup(
|
|
64
|
-
var
|
|
65
|
-
const { t:
|
|
66
|
-
|
|
67
|
-
const { b:
|
|
68
|
-
singleFile:
|
|
69
|
-
multipleFile:
|
|
70
|
-
picture:
|
|
71
|
-
},
|
|
63
|
+
setup(y, { expose: C, emit: b }) {
|
|
64
|
+
var c, l, p, u;
|
|
65
|
+
const { t: r, lang: N } = w();
|
|
66
|
+
R(r), M(r, N);
|
|
67
|
+
const { b: _ } = D("ap-upload"), e = y, F = b, S = {
|
|
68
|
+
singleFile: E,
|
|
69
|
+
multipleFile: G,
|
|
70
|
+
picture: I
|
|
71
|
+
}, n = P.useInjectFormItemContext(), x = d({
|
|
72
72
|
get() {
|
|
73
|
-
return
|
|
73
|
+
return e.value;
|
|
74
74
|
},
|
|
75
|
-
set(
|
|
76
|
-
|
|
75
|
+
set(a) {
|
|
76
|
+
var m;
|
|
77
|
+
F("update:value", a), n == null || n.onFieldChange(), (m = e.onChange) == null || m.call(e, a);
|
|
77
78
|
}
|
|
78
|
-
}),
|
|
79
|
-
|
|
79
|
+
}), O = v("uiMode"), o = v("apUpload");
|
|
80
|
+
t("theme", O.value), t("value", x), t("dirName", e.dirName ?? ((c = o.value) == null ? void 0 : c.dirName)), t(
|
|
80
81
|
"needName",
|
|
81
|
-
|
|
82
|
-
),
|
|
82
|
+
e.needName ?? ((l = o.value) == null ? void 0 : l.needName) ?? !1
|
|
83
|
+
), t("accept", e.accept ?? ((p = o.value) == null ? void 0 : p.accept) ?? ""), t("maxSize", e.maxSize), t("title", e.title), t("subTitle", e.subTitle), t("maxCount", e.maxCount), t("beforeUpload", e.beforeUpload), t("customRequest", e.customRequest), t(
|
|
83
84
|
"getOssAccess",
|
|
84
|
-
|
|
85
|
+
e.getOssAccess ?? ((u = o.value) == null ? void 0 : u.getOssAccess)
|
|
85
86
|
);
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
const
|
|
87
|
+
const h = d(() => s.value === 0), s = f(0);
|
|
88
|
+
t("uploadingCount", s);
|
|
89
|
+
const i = f(!0);
|
|
89
90
|
function A() {
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
i.value = !1, setTimeout(() => {
|
|
92
|
+
i.value = !0;
|
|
92
93
|
});
|
|
93
94
|
}
|
|
94
|
-
return
|
|
95
|
-
done:
|
|
95
|
+
return C({
|
|
96
|
+
done: h,
|
|
96
97
|
clear: A
|
|
97
|
-
}), (
|
|
98
|
-
class:
|
|
98
|
+
}), (a, m) => (g(), j("div", {
|
|
99
|
+
class: T(z(_)())
|
|
99
100
|
}, [
|
|
100
|
-
|
|
101
|
+
i.value ? (g(), k(B(S[e.type]), $(q({ key: 0 }, a.$attrs)), null, 16)) : L("", !0)
|
|
101
102
|
], 2));
|
|
102
103
|
}
|
|
103
104
|
});
|
|
104
105
|
export {
|
|
105
|
-
|
|
106
|
+
me as default
|
|
106
107
|
};
|
|
@@ -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
|
+
|
|
@@ -3,5 +3,5 @@ export declare function useCreateTableModal(props: UseCreateTableModalProps): {
|
|
|
3
3
|
readonly openModal: <T>(selected?: any[], options?: OpenOptions) => Promise< OpenReturnType<T> | undefined>;
|
|
4
4
|
readonly closeModal: () => void;
|
|
5
5
|
readonly destroy: () => void;
|
|
6
|
-
readonly isDestroyed:
|
|
6
|
+
readonly isDestroyed: true;
|
|
7
7
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ref as v, defineComponent as C, h as r, render as
|
|
1
|
+
import { ref as v, defineComponent as C, h as r, render as a, onUnmounted as y } from "vue";
|
|
2
2
|
import "../table-modal.vue.mjs";
|
|
3
3
|
import "../../../index.mjs";
|
|
4
4
|
import { omit as h } from "lodash-unified";
|
|
5
5
|
import { ConfigProvider as M, globalConfigCached as b } from "../../../config-provider/config-provider.mjs";
|
|
6
6
|
import g from "../table-modal.vue2.mjs";
|
|
7
7
|
function E(d) {
|
|
8
|
-
let o = !
|
|
9
|
-
const
|
|
8
|
+
let o = !0;
|
|
9
|
+
const i = document.body, t = v(), { destroyOnUnmounted: s = !0 } = d, n = document.createElement("div"), u = () => {
|
|
10
10
|
const e = C({
|
|
11
11
|
setup() {
|
|
12
12
|
return () => r(
|
|
@@ -19,22 +19,22 @@ function E(d) {
|
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
|
|
23
|
-
},
|
|
22
|
+
i.appendChild(n), a(r(e), n), o = !1;
|
|
23
|
+
}, l = () => {
|
|
24
24
|
var e;
|
|
25
25
|
(e = t.value) == null || e.close(), o || setTimeout(() => {
|
|
26
|
-
|
|
26
|
+
a(null, n), i.removeChild(n), o = !0;
|
|
27
27
|
}, 400);
|
|
28
|
-
},
|
|
29
|
-
var
|
|
30
|
-
return t.value ||
|
|
28
|
+
}, c = async (e = [], p = {}) => {
|
|
29
|
+
var m;
|
|
30
|
+
return t.value || u(), (m = t.value) == null ? void 0 : m.open(e, p);
|
|
31
31
|
}, f = () => {
|
|
32
32
|
var e;
|
|
33
33
|
o || (e = t.value) == null || e.close();
|
|
34
34
|
};
|
|
35
35
|
return y(() => {
|
|
36
|
-
s &&
|
|
37
|
-
}), { openModal:
|
|
36
|
+
s && l();
|
|
37
|
+
}), { openModal: c, closeModal: f, destroy: l, isDestroyed: o };
|
|
38
38
|
}
|
|
39
39
|
export {
|
|
40
40
|
E as useCreateTableModal
|
|
@@ -34,6 +34,7 @@ export declare function usePageListApTable(props?: UsePageListApTable): [ApTable
|
|
|
34
34
|
getApTableInstance: () => {
|
|
35
35
|
submit: () => void;
|
|
36
36
|
reset: () => void;
|
|
37
|
+
refresh: () => void;
|
|
37
38
|
setSearchFormValues: (fields: Partial< Recordable>) => void;
|
|
38
39
|
getSearchFormValues: () => Partial< Recordable>;
|
|
39
40
|
dataSource: any;
|