@aplus-frontend/ui 0.0.10 → 0.0.12
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/src/ap-action/item/index.vue2.mjs +21 -20
- package/es/src/ap-action/style/item.css +20 -5
- package/es/src/ap-field/checkbox/index.vue.mjs +1 -1
- package/es/src/ap-field/date/index.vue.mjs +1 -1
- package/es/src/ap-field/date-range/index.vue.mjs +1 -1
- package/es/src/ap-field/number/index.vue.mjs +1 -1
- package/es/src/ap-field/radio/index.vue.mjs +1 -1
- package/es/src/ap-field/select/index.vue.mjs +1 -1
- package/es/src/ap-field/slider/index.vue.d.ts +3 -0
- package/es/src/ap-field/slider/index.vue.mjs +4 -4
- package/es/src/ap-field/switch/index.vue.mjs +1 -1
- package/es/src/ap-field/text/index.vue2.mjs +1 -1
- package/es/src/ap-field/text/password.vue.mjs +1 -1
- package/es/src/ap-field/text-area/index.vue.mjs +1 -1
- package/es/src/ap-form/ap-form.vue2.mjs +27 -27
- package/es/src/ap-form/modal-form/index.vue.mjs +104 -104
- package/es/src/ap-form/style/modal-form.css +5 -1
- package/es/src/ap-table/ap-table.vue.d.ts +2 -3
- package/es/src/ap-table/ap-table.vue.mjs +95 -91
- package/es/src/ap-table/interface.d.ts +1 -1
- package/es/src/editable-table/interface.d.ts +73 -0
- package/es/src/editable-table/style/index.css +11 -0
- package/es/src/editable-table/utils.d.ts +8 -0
- package/es/src/pro-form/components/form-action.vue2.mjs +8 -8
- package/es/src/theme/ap-action/item.css +20 -5
- package/es/src/theme/ap-form/modal-form.css +5 -1
- package/es/src/theme/editable-table/index.css +11 -0
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/style/item.css +20 -5
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/slider/index.vue.d.ts +3 -0
- package/lib/src/ap-field/slider/index.vue.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/style/modal-form.css +5 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +2 -3
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/interface.d.ts +1 -1
- package/lib/src/editable-table/interface.d.ts +73 -0
- package/lib/src/editable-table/style/index.css +11 -0
- package/lib/src/editable-table/utils.d.ts +8 -0
- package/lib/src/pro-form/components/form-action.vue2.js +1 -1
- package/lib/src/theme/ap-action/item.css +20 -5
- package/lib/src/theme/ap-form/modal-form.css +5 -1
- package/lib/src/theme/editable-table/index.css +11 -0
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as C, ref as b, unref as n, computed as s, openBlock as t, createElementBlock as c, normalizeClass as v, createBlock as d, createCommentVNode as u, renderSlot as B, isVNode as A, resolveDynamicComponent as x, toDisplayString as h } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import
|
|
3
|
+
import I from "ant-design-vue/es/button/LoadingIcon";
|
|
4
4
|
import "../style/item.css";
|
|
5
|
-
import { useNamespace as
|
|
6
|
-
|
|
5
|
+
import { useNamespace as L } from "../../config-provider/hooks/use-namespace.mjs";
|
|
6
|
+
import { useGlobalConfig as N } from "../../config-provider/hooks/use-global-config.mjs";
|
|
7
|
+
const _ = { key: 1 }, G = /* @__PURE__ */ C({
|
|
7
8
|
name: "ApActionItem",
|
|
8
9
|
__name: "index",
|
|
9
10
|
props: {
|
|
@@ -15,35 +16,35 @@ const I = { key: 1 }, V = /* @__PURE__ */ y({
|
|
|
15
16
|
onClick: {},
|
|
16
17
|
loading: { type: Boolean, default: !1 }
|
|
17
18
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const e =
|
|
20
|
-
function
|
|
19
|
+
setup(m) {
|
|
20
|
+
const e = m, { b: f, m: r, bm: p } = L("action-item"), g = N("uiMode"), l = b(!1);
|
|
21
|
+
function k(o) {
|
|
21
22
|
var i;
|
|
22
|
-
|
|
23
|
+
n(a) || e.disabled || ((i = e.onClick) == null || i.call(e, o), e.onAction && (l.value = !0, e.onAction(o).finally(() => l.value = !1)));
|
|
23
24
|
}
|
|
24
|
-
const a = s(() => e.loading ||
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
e.disabled ?
|
|
28
|
-
a.value ?
|
|
25
|
+
const a = s(() => e.loading || n(l)), y = s(() => [
|
|
26
|
+
f(),
|
|
27
|
+
p(n(g), e.color),
|
|
28
|
+
e.disabled ? r("disabled") : null,
|
|
29
|
+
a.value ? r("loading") : null
|
|
29
30
|
].filter(Boolean));
|
|
30
|
-
return (o, i) => o.visible ? (
|
|
31
|
+
return (o, i) => o.visible ? (t(), c("span", {
|
|
31
32
|
key: 0,
|
|
32
|
-
onClick:
|
|
33
|
-
class:
|
|
33
|
+
onClick: k,
|
|
34
|
+
class: v(y.value)
|
|
34
35
|
}, [
|
|
35
|
-
a.value ? (
|
|
36
|
+
a.value ? (t(), d(n(I), {
|
|
36
37
|
key: 0,
|
|
37
38
|
prefixCls: "btn",
|
|
38
39
|
existIcon: !1,
|
|
39
40
|
loading: ""
|
|
40
41
|
})) : u("", !0),
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
B(o.$slots, "default", {}, () => [
|
|
43
|
+
A(o.text) ? (t(), d(x(o.text), { key: 0 })) : (t(), c("span", _, h(o.text || ""), 1))
|
|
43
44
|
])
|
|
44
45
|
], 2)) : u("", !0);
|
|
45
46
|
}
|
|
46
47
|
});
|
|
47
48
|
export {
|
|
48
|
-
|
|
49
|
+
G as default
|
|
49
50
|
};
|
|
@@ -4,21 +4,36 @@
|
|
|
4
4
|
line-height: 22px;
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
}
|
|
7
|
-
.aplus-action-item--primary {
|
|
7
|
+
.aplus-action-item-aplus--primary {
|
|
8
8
|
color: #0070ff;
|
|
9
9
|
}
|
|
10
|
-
.aplus-action-item--primary:not(.aplus-action-item--disabled):hover {
|
|
10
|
+
.aplus-action-item-aplus--primary:not(.aplus-action-item--disabled):hover {
|
|
11
11
|
color: #66a9ff;
|
|
12
12
|
}
|
|
13
|
-
.aplus-action-item--
|
|
13
|
+
.aplus-action-item-admin--primary {
|
|
14
|
+
color: #1890FF;
|
|
15
|
+
}
|
|
16
|
+
.aplus-action-item-admin--primary:not(.aplus-action-item--disabled):hover {
|
|
17
|
+
color: #5EB1FF;
|
|
18
|
+
}
|
|
19
|
+
.aplus-action-item-aplus--success {
|
|
14
20
|
color: #2ed1a3;
|
|
15
21
|
}
|
|
16
|
-
.aplus-action-item--error {
|
|
22
|
+
.aplus-action-item-aplus--error {
|
|
17
23
|
color: #FF4D4F;
|
|
18
24
|
}
|
|
19
|
-
.aplus-action-item--warn {
|
|
25
|
+
.aplus-action-item-aplus--warn {
|
|
20
26
|
color: #FFA940;
|
|
21
27
|
}
|
|
28
|
+
.aplus-action-item-admin--success {
|
|
29
|
+
color: #52C41A;
|
|
30
|
+
}
|
|
31
|
+
.aplus-action-item-admin--error {
|
|
32
|
+
color: #FF4D4F;
|
|
33
|
+
}
|
|
34
|
+
.aplus-action-item-admin--warn {
|
|
35
|
+
color: #FAAD14;
|
|
36
|
+
}
|
|
22
37
|
.aplus-action-item--loading {
|
|
23
38
|
opacity: 0.35;
|
|
24
39
|
transition: opacity 0.2s;
|
|
@@ -80,7 +80,7 @@ const G = { key: 0 }, oe = /* @__PURE__ */ P({
|
|
|
80
80
|
optionLabelProp: {},
|
|
81
81
|
defaultActiveFirstOption: { type: Boolean, default: void 0 },
|
|
82
82
|
labelInValue: { type: Boolean, default: void 0 },
|
|
83
|
-
emptyText: { default: "
|
|
83
|
+
emptyText: { default: "--" },
|
|
84
84
|
request: {},
|
|
85
85
|
multiple: { type: Boolean, default: void 0 },
|
|
86
86
|
value: {},
|
|
@@ -17,6 +17,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
17
17
|
step: number;
|
|
18
18
|
tooltipOpen: undefined;
|
|
19
19
|
tooltipVisible: undefined;
|
|
20
|
+
emptyText: string;
|
|
20
21
|
}>, {
|
|
21
22
|
focus: typeof focus;
|
|
22
23
|
blur: typeof blur;
|
|
@@ -29,6 +30,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
29
30
|
step: number;
|
|
30
31
|
tooltipOpen: undefined;
|
|
31
32
|
tooltipVisible: undefined;
|
|
33
|
+
emptyText: string;
|
|
32
34
|
}>>> & {
|
|
33
35
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
34
36
|
}, {
|
|
@@ -38,6 +40,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
38
40
|
included: boolean;
|
|
39
41
|
tooltipOpen: boolean;
|
|
40
42
|
tooltipVisible: boolean;
|
|
43
|
+
emptyText: string;
|
|
41
44
|
}, {}>, Readonly<ApFieldSliderSlots> & ApFieldSliderSlots>;
|
|
42
45
|
export default _default;
|
|
43
46
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -36,13 +36,13 @@ const I = /* @__PURE__ */ x({
|
|
|
36
36
|
onFocus: {},
|
|
37
37
|
onBlur: {},
|
|
38
38
|
"onUpdate:value": {},
|
|
39
|
-
emptyText: {}
|
|
39
|
+
emptyText: { default: "--" }
|
|
40
40
|
},
|
|
41
41
|
emits: ["update:value"],
|
|
42
42
|
setup(p, { expose: i, emit: s }) {
|
|
43
|
-
const d = g(), a = k(), l = p,
|
|
43
|
+
const d = g(), a = k(), l = p, f = s, { value: r, updateValue: m } = E(
|
|
44
44
|
l,
|
|
45
|
-
|
|
45
|
+
f
|
|
46
46
|
), c = C(() => {
|
|
47
47
|
const e = o(r);
|
|
48
48
|
return w(e) ? l.emptyText : z(e) ? `${e[0]}-${e[1]}` : e;
|
|
@@ -71,7 +71,7 @@ const I = /* @__PURE__ */ x({
|
|
|
71
71
|
]),
|
|
72
72
|
{
|
|
73
73
|
value: o(r),
|
|
74
|
-
"onUpdate:value": o(
|
|
74
|
+
"onUpdate:value": o(m),
|
|
75
75
|
ref_key: "sliderRef",
|
|
76
76
|
ref: a
|
|
77
77
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as b, ref as
|
|
2
|
-
import { Form as
|
|
3
|
-
import { useProvideForm as
|
|
1
|
+
import { defineComponent as b, ref as R, reactive as k, toRaw as x, computed as M, openBlock as T, createBlock as w, unref as W, mergeProps as q, withCtx as z, renderSlot as A } from "vue";
|
|
2
|
+
import { Form as E } from "ant-design-vue";
|
|
3
|
+
import { useProvideForm as O } from "./context.mjs";
|
|
4
4
|
import { isArray as y } from "lodash-unified";
|
|
5
|
-
const
|
|
5
|
+
const L = /* @__PURE__ */ b({
|
|
6
6
|
__name: "ap-form",
|
|
7
7
|
props: {
|
|
8
8
|
layout: { default: "horizontal" },
|
|
@@ -35,27 +35,27 @@ const I = /* @__PURE__ */ b({
|
|
|
35
35
|
function _(e, t) {
|
|
36
36
|
var V;
|
|
37
37
|
if (y(e)) {
|
|
38
|
-
let
|
|
39
|
-
for (let
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
let n = o;
|
|
39
|
+
for (let u = 0; u < e.length - 1; u++)
|
|
40
|
+
n = n[e[u]];
|
|
41
|
+
n[e[e.length - 1]] = t;
|
|
42
42
|
} else
|
|
43
43
|
o[e] = t;
|
|
44
44
|
let l = y(e) ? e[0] : e;
|
|
45
45
|
(V = r.onValuesChange) == null || V.call(r, { [l]: o[l] }, o), s();
|
|
46
46
|
}
|
|
47
|
-
const a =
|
|
47
|
+
const a = R(), o = k(r.initialValues || {});
|
|
48
48
|
let i = [];
|
|
49
|
-
const
|
|
49
|
+
const d = (e) => {
|
|
50
50
|
var t;
|
|
51
51
|
(t = a.value) == null || t.resetFields(e), s();
|
|
52
|
-
},
|
|
52
|
+
}, f = (e) => {
|
|
53
53
|
var t;
|
|
54
54
|
(t = a.value) == null || t.clearValidate(e);
|
|
55
|
-
},
|
|
55
|
+
}, c = (e, t) => {
|
|
56
56
|
var l;
|
|
57
57
|
return (l = a.value) == null ? void 0 : l.validateFields(e, t);
|
|
58
|
-
},
|
|
58
|
+
}, p = (e) => {
|
|
59
59
|
var t;
|
|
60
60
|
return (t = a.value) == null ? void 0 : t.getFieldsValue(e);
|
|
61
61
|
}, h = (e, t) => {
|
|
@@ -76,20 +76,20 @@ const I = /* @__PURE__ */ b({
|
|
|
76
76
|
}
|
|
77
77
|
function s() {
|
|
78
78
|
if (i.length) {
|
|
79
|
-
const e =
|
|
79
|
+
const e = x(o);
|
|
80
80
|
i.forEach((t) => {
|
|
81
81
|
t(e);
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
return
|
|
85
|
+
return O({
|
|
86
86
|
model: M(() => o),
|
|
87
87
|
updateModel: _,
|
|
88
88
|
formInstance: {
|
|
89
|
-
resetFields:
|
|
90
|
-
clearValidate:
|
|
91
|
-
validateFields:
|
|
92
|
-
getFieldsValue:
|
|
89
|
+
resetFields: d,
|
|
90
|
+
clearValidate: f,
|
|
91
|
+
validateFields: c,
|
|
92
|
+
getFieldsValue: p,
|
|
93
93
|
validate: h,
|
|
94
94
|
scrollToField: g,
|
|
95
95
|
setFieldsValue: F,
|
|
@@ -97,26 +97,26 @@ const I = /* @__PURE__ */ b({
|
|
|
97
97
|
registerWatch: v
|
|
98
98
|
}
|
|
99
99
|
}), B({
|
|
100
|
-
resetFields:
|
|
101
|
-
clearValidate:
|
|
102
|
-
validateFields:
|
|
103
|
-
getFieldsValue:
|
|
100
|
+
resetFields: d,
|
|
101
|
+
clearValidate: f,
|
|
102
|
+
validateFields: c,
|
|
103
|
+
getFieldsValue: p,
|
|
104
104
|
validate: h,
|
|
105
105
|
scrollToField: g,
|
|
106
106
|
setFieldsValue: F,
|
|
107
107
|
setFieldValue: m,
|
|
108
108
|
registerWatch: v
|
|
109
|
-
}), (e, t) => (
|
|
109
|
+
}), (e, t) => (T(), w(W(E), q({
|
|
110
110
|
ref_key: "formRef",
|
|
111
111
|
ref: a
|
|
112
112
|
}, r, { model: o }), {
|
|
113
|
-
default:
|
|
114
|
-
|
|
113
|
+
default: z(() => [
|
|
114
|
+
A(e.$slots, "default")
|
|
115
115
|
]),
|
|
116
116
|
_: 3
|
|
117
117
|
}, 16, ["model"]));
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
120
|
export {
|
|
121
|
-
|
|
121
|
+
L as default
|
|
122
122
|
};
|