@aplus-frontend/ui 0.0.22 → 0.0.23
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/check-card/group.vue.d.ts +1 -1
- package/es/src/check-card/group.vue.mjs +1 -1
- package/es/src/check-card/index.vue.d.ts +1 -1
- package/es/src/check-card/index.vue2.mjs +40 -36
- package/es/src/check-card/interface.d.ts +1 -1
- package/es/src/editable-table/form-item.vue.d.ts +755 -105
- package/es/src/editable-table/form-item.vue.mjs +81 -64
- package/es/src/editable-table/index.vue.d.ts +527 -112
- package/es/src/editable-table/index.vue.mjs +93 -76
- package/es/src/editable-table/interface.d.ts +11 -5
- package/lib/src/check-card/group.vue.d.ts +1 -1
- package/lib/src/check-card/group.vue.js +1 -1
- package/lib/src/check-card/index.vue.d.ts +1 -1
- package/lib/src/check-card/index.vue2.js +1 -1
- package/lib/src/check-card/interface.d.ts +1 -1
- package/lib/src/editable-table/form-item.vue.d.ts +755 -105
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.d.ts +527 -112
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/editable-table/interface.d.ts +11 -5
- package/package.json +3 -3
|
@@ -28,7 +28,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
28
28
|
size: "small" | "middle";
|
|
29
29
|
value: CheckCardValueType | CheckCardValueType[];
|
|
30
30
|
bordered: boolean;
|
|
31
|
-
stopPropagation: boolean;
|
|
31
|
+
stopPropagation: boolean | ((event: MouseEvent) => boolean);
|
|
32
32
|
}, {}>, {
|
|
33
33
|
default?(_: {}): any;
|
|
34
34
|
}>;
|
|
@@ -11,7 +11,7 @@ const z = /* @__PURE__ */ g({
|
|
|
11
11
|
disabled: { type: Boolean, default: void 0 },
|
|
12
12
|
loading: { type: Boolean, default: void 0 },
|
|
13
13
|
size: { default: void 0 },
|
|
14
|
-
stopPropagation: { type: Boolean, default: void 0 },
|
|
14
|
+
stopPropagation: { type: [Boolean, Function], default: void 0 },
|
|
15
15
|
multiple: { type: Boolean, default: !1 },
|
|
16
16
|
defaultValue: { type: [String, Number, Boolean, Array] },
|
|
17
17
|
value: { type: [String, Number, Boolean, Array], default: void 0 },
|
|
@@ -27,7 +27,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefau
|
|
|
27
27
|
size: "small" | "middle";
|
|
28
28
|
bordered: boolean;
|
|
29
29
|
checked: boolean;
|
|
30
|
-
stopPropagation: boolean;
|
|
30
|
+
stopPropagation: boolean | ((event: MouseEvent) => boolean);
|
|
31
31
|
}, {}>, Readonly<CheckCardSlots> & CheckCardSlots>;
|
|
32
32
|
export default _default;
|
|
33
33
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Skeleton as
|
|
1
|
+
import { defineComponent as I, computed as i, unref as l, createVNode as m, watch as U, watchEffect as W, openBlock as c, createElementBlock as N, normalizeStyle as j, normalizeClass as P, withModifiers as G, createBlock as f, renderSlot as O, resolveDynamicComponent as V, createCommentVNode as v, createElementVNode as $ } from "vue";
|
|
2
|
+
import { Skeleton as q } from "ant-design-vue";
|
|
3
3
|
import "../config-provider/index.mjs";
|
|
4
4
|
import "../hooks/index.mjs";
|
|
5
5
|
import { isFunction as z } from "lodash-unified";
|
|
6
|
-
import { useInjectCheckCard as
|
|
6
|
+
import { useInjectCheckCard as A } from "./context.mjs";
|
|
7
7
|
import "./style/index.css";
|
|
8
|
-
import
|
|
9
|
-
import { useNamespace as
|
|
10
|
-
import { useGlobalConfig as
|
|
11
|
-
import { useControllableValue as
|
|
12
|
-
const
|
|
8
|
+
import H from "./checked.svg.mjs";
|
|
9
|
+
import { useNamespace as J } from "../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
import { useGlobalConfig as K } from "../config-provider/hooks/use-global-config.mjs";
|
|
11
|
+
import { useControllableValue as L } from "../hooks/useControllableValue.mjs";
|
|
12
|
+
const Q = ["src"], re = /* @__PURE__ */ I({
|
|
13
13
|
name: "CheckCard",
|
|
14
14
|
__name: "index",
|
|
15
15
|
props: {
|
|
@@ -27,7 +27,7 @@ const L = ["src"], ne = /* @__PURE__ */ F({
|
|
|
27
27
|
default: "middle"
|
|
28
28
|
},
|
|
29
29
|
stopPropagation: {
|
|
30
|
-
type: Boolean,
|
|
30
|
+
type: [Boolean, Function],
|
|
31
31
|
default: !1
|
|
32
32
|
},
|
|
33
33
|
checked: {
|
|
@@ -48,19 +48,19 @@ const L = ["src"], ne = /* @__PURE__ */ F({
|
|
|
48
48
|
content: {}
|
|
49
49
|
},
|
|
50
50
|
emits: ["update:checked"],
|
|
51
|
-
setup(
|
|
52
|
-
emit:
|
|
51
|
+
setup(S, {
|
|
52
|
+
emit: _
|
|
53
53
|
}) {
|
|
54
|
-
const o =
|
|
54
|
+
const o = S, {
|
|
55
55
|
b: g,
|
|
56
|
-
m:
|
|
56
|
+
m: s,
|
|
57
57
|
e: p,
|
|
58
|
-
bm:
|
|
58
|
+
bm: w,
|
|
59
59
|
em: k
|
|
60
|
-
} =
|
|
60
|
+
} = J("check-card"), h = K("uiMode", "aplus"), D = _, n = A(), {
|
|
61
61
|
value: r,
|
|
62
|
-
updateValue:
|
|
63
|
-
} =
|
|
62
|
+
updateValue: b
|
|
63
|
+
} = L(o, D, {
|
|
64
64
|
valuePropName: "checked",
|
|
65
65
|
defaultValuePropName: "defaultChecked"
|
|
66
66
|
}), a = i(() => {
|
|
@@ -68,12 +68,12 @@ const L = ["src"], ne = /* @__PURE__ */ F({
|
|
|
68
68
|
...o
|
|
69
69
|
}, t = l(n);
|
|
70
70
|
return t && (e.disabled = e.disabled || t.disabled, e.bordered = e.bordered || t.bordered, e.loading = e.loading || t.loading, e.size = e.size || t.size, e.stopPropagation = e.stopPropagation || t.stopPropagation), e;
|
|
71
|
-
}),
|
|
72
|
-
const e = l(
|
|
73
|
-
return [g(), ...t.disabled ? [] : [g(e), l(r) ?
|
|
71
|
+
}), E = i(() => {
|
|
72
|
+
const e = l(h), t = l(a);
|
|
73
|
+
return [g(), ...t.disabled ? [] : [g(e), l(r) ? w(e, "checked") : null], s(t.size), t.bordered ? s("bordered") : null, t.disabled ? s("disabled") : null];
|
|
74
74
|
}), M = i(() => ({
|
|
75
75
|
...o.style,
|
|
76
|
-
"--check-card-border-color":
|
|
76
|
+
"--check-card-border-color": h.value === "admin" ? "#D9D9D9" : "#E9EDF3"
|
|
77
77
|
})), y = i(() => {
|
|
78
78
|
if (!o.title)
|
|
79
79
|
return;
|
|
@@ -90,30 +90,34 @@ const L = ["src"], ne = /* @__PURE__ */ F({
|
|
|
90
90
|
}, [e]);
|
|
91
91
|
});
|
|
92
92
|
function T(e) {
|
|
93
|
+
const t = l(a).stopPropagation;
|
|
94
|
+
return t ? t === !0 ? e.target !== e.currentTarget : t(e) : !1;
|
|
95
|
+
}
|
|
96
|
+
function F(e) {
|
|
93
97
|
var t, d;
|
|
94
|
-
|
|
98
|
+
T(e) || a.value.loading || a.value.disabled || (n.value ? (d = (t = n.value) == null ? void 0 : t.toggleOption) == null || d.call(t, o.value) : b(!l(r)));
|
|
95
99
|
}
|
|
96
|
-
return
|
|
100
|
+
return U(() => n.value, (e) => {
|
|
97
101
|
if (!e)
|
|
98
102
|
return;
|
|
99
103
|
const t = e.multiple ? (e.value || []).includes(o.value) : e.value === o.value;
|
|
100
|
-
|
|
104
|
+
b(t);
|
|
101
105
|
}, {
|
|
102
106
|
immediate: !0
|
|
103
|
-
}),
|
|
107
|
+
}), W((e) => {
|
|
104
108
|
var t, d;
|
|
105
109
|
(d = (t = n.value) == null ? void 0 : t.registerValue) == null || d.call(t, o.value), e(() => {
|
|
106
|
-
var
|
|
107
|
-
return (B = (
|
|
110
|
+
var u, B;
|
|
111
|
+
return (B = (u = n.value) == null ? void 0 : u.cancelValue) == null ? void 0 : B.call(u, o.value);
|
|
108
112
|
});
|
|
109
113
|
}), (e, t) => (c(), N("div", {
|
|
110
|
-
style:
|
|
111
|
-
class: P(
|
|
112
|
-
onClick:
|
|
113
|
-
}, [a.value.loading ? (c(), f(l(
|
|
114
|
+
style: j(M.value),
|
|
115
|
+
class: P(E.value),
|
|
116
|
+
onClick: G(F, ["stop"])
|
|
117
|
+
}, [a.value.loading ? (c(), f(l(q), {
|
|
114
118
|
key: 0,
|
|
115
119
|
active: ""
|
|
116
|
-
})) :
|
|
120
|
+
})) : O(e.$slots, "default", {
|
|
117
121
|
key: 1,
|
|
118
122
|
checked: l(r)
|
|
119
123
|
}, () => [y.value ? (c(), f(V(y.value), {
|
|
@@ -123,11 +127,11 @@ const L = ["src"], ne = /* @__PURE__ */ F({
|
|
|
123
127
|
})) : v("", !0)]), l(r) ? (c(), N("div", {
|
|
124
128
|
key: 2,
|
|
125
129
|
class: P(l(p)("checked-icon"))
|
|
126
|
-
}, [
|
|
127
|
-
src: l(
|
|
128
|
-
}, null, 8,
|
|
130
|
+
}, [$("img", {
|
|
131
|
+
src: l(H)
|
|
132
|
+
}, null, 8, Q)], 2)) : v("", !0)], 6));
|
|
129
133
|
}
|
|
130
134
|
});
|
|
131
135
|
export {
|
|
132
|
-
|
|
136
|
+
re as default
|
|
133
137
|
};
|