@aplus-frontend/ui 0.4.3 → 0.4.5
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 +170 -162
- package/es/src/business/ap-select-layout/select-layout.vue2.mjs +52 -56
- package/es/src/business/ap-summary/ap-summary.vue.d.ts +0 -1
- package/es/src/business/ap-summary/ap-summary.vue2.mjs +36 -35
- package/es/src/business/ap-summary/index.d.ts +0 -3
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +8 -4
- package/es/src/business/batch-input-group/form-item.vue.d.ts +9 -1
- package/es/src/business/batch-input-group/form-item.vue.mjs +48 -44
- package/es/src/config-provider/hooks/use-namespace.d.ts +1 -1
- package/es/src/config-provider/hooks/use-namespace.mjs +3 -3
- package/es/src/hooks/index.d.ts +2 -0
- package/es/src/hooks/index.mjs +7 -3
- package/es/src/hooks/useManualRef.d.ts +6 -0
- package/es/src/hooks/useManualRef.mjs +27 -0
- package/es/src/hooks/useThrottleRef.d.ts +2 -0
- package/es/src/hooks/useThrottleRef.mjs +31 -0
- package/es/src/index.d.ts +1 -1
- package/es/src/index.mjs +227 -222
- package/es/src/locale/lang/en.mjs +3 -0
- package/es/src/locale/lang/zh-cn.mjs +3 -0
- package/es/src/path-map.mjs +1 -1
- package/es/src/scroll-bar/hooks/use-track.d.ts +30 -0
- package/es/src/scroll-bar/hooks/use-track.mjs +76 -0
- package/es/src/scroll-bar/index.d.ts +5 -0
- package/es/src/scroll-bar/index.mjs +7 -0
- package/es/src/scroll-bar/index.vue.d.ts +53 -0
- package/es/src/scroll-bar/index.vue.mjs +90 -0
- package/es/src/scroll-bar/index.vue2.mjs +4 -0
- package/es/src/scroll-bar/interface.d.ts +66 -0
- package/es/src/scroll-bar/internal.vue.d.ts +22 -0
- package/es/src/scroll-bar/internal.vue.mjs +132 -0
- package/es/src/scroll-bar/internal.vue2.mjs +4 -0
- package/es/src/scroll-bar/style/css.js +1 -0
- package/es/src/scroll-bar/style/index.js +1 -0
- package/es/src/scroll-bar/utils/index.d.ts +29 -0
- package/es/src/scroll-bar/utils/index.mjs +22 -0
- package/lib/index.js +1 -1
- package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -1
- package/lib/src/business/ap-summary/ap-summary.vue.d.ts +0 -1
- package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
- package/lib/src/business/ap-summary/index.d.ts +0 -3
- package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
- package/lib/src/business/batch-input-group/form-item.vue.d.ts +9 -1
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/config-provider/hooks/use-namespace.d.ts +1 -1
- package/lib/src/config-provider/hooks/use-namespace.js +1 -1
- package/lib/src/hooks/index.d.ts +2 -0
- package/lib/src/hooks/index.js +1 -1
- package/lib/src/hooks/useManualRef.d.ts +6 -0
- package/lib/src/hooks/useManualRef.js +1 -0
- package/lib/src/hooks/useThrottleRef.d.ts +2 -0
- package/lib/src/hooks/useThrottleRef.js +1 -0
- package/lib/src/index.d.ts +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/lib/src/scroll-bar/hooks/use-track.d.ts +30 -0
- package/lib/src/scroll-bar/hooks/use-track.js +1 -0
- package/lib/src/scroll-bar/index.d.ts +5 -0
- package/lib/src/scroll-bar/index.js +1 -0
- package/lib/src/scroll-bar/index.vue.d.ts +53 -0
- package/lib/src/scroll-bar/index.vue.js +1 -0
- package/lib/src/scroll-bar/index.vue2.js +1 -0
- package/lib/src/scroll-bar/interface.d.ts +66 -0
- package/lib/src/scroll-bar/internal.vue.d.ts +22 -0
- package/lib/src/scroll-bar/internal.vue.js +1 -0
- package/lib/src/scroll-bar/internal.vue2.js +1 -0
- package/lib/src/scroll-bar/style/css.cjs +1 -0
- package/lib/src/scroll-bar/style/index.cjs +1 -0
- package/lib/src/scroll-bar/utils/index.d.ts +29 -0
- package/lib/src/scroll-bar/utils/index.js +1 -0
- package/package.json +1 -1
- package/theme/index.css +36 -21
- package/theme/index.less +1 -1
- package/theme/scroll-bar/index.css +46 -0
- package/theme/scroll-bar/index.less +62 -0
- package/es/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +0 -8
- package/es/src/ap-scroll-bar/ap-scroll-bar.vue.mjs +0 -4
- package/es/src/ap-scroll-bar/ap-scroll-bar.vue2.mjs +0 -116
- package/es/src/ap-scroll-bar/index.d.ts +0 -29
- package/es/src/ap-scroll-bar/index.mjs +0 -8
- package/es/src/ap-scroll-bar/interface.d.ts +0 -4
- package/es/src/ap-scroll-bar/style/css.js +0 -1
- package/es/src/ap-scroll-bar/style/index.js +0 -1
- package/lib/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +0 -8
- package/lib/src/ap-scroll-bar/ap-scroll-bar.vue.js +0 -1
- package/lib/src/ap-scroll-bar/ap-scroll-bar.vue2.js +0 -1
- package/lib/src/ap-scroll-bar/index.d.ts +0 -29
- package/lib/src/ap-scroll-bar/index.js +0 -1
- package/lib/src/ap-scroll-bar/interface.d.ts +0 -4
- package/lib/src/ap-scroll-bar/style/css.cjs +0 -1
- package/lib/src/ap-scroll-bar/style/index.cjs +0 -1
- /package/es/src/{ap-scroll-bar → scroll-bar}/interface.mjs +0 -0
- /package/es/src/{ap-scroll-bar → scroll-bar}/style/css.d.ts +0 -0
- /package/es/src/{ap-scroll-bar → scroll-bar}/style/index.d.ts +0 -0
- /package/lib/src/{ap-scroll-bar → scroll-bar}/interface.js +0 -0
- /package/lib/src/{ap-scroll-bar → scroll-bar}/style/css.d.ts +0 -0
- /package/lib/src/{ap-scroll-bar → scroll-bar}/style/index.d.ts +0 -0
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isNil as
|
|
3
|
-
import { TableSummaryRow as
|
|
4
|
-
import { flattenColumns as
|
|
1
|
+
import { defineComponent as w, computed as y, createVNode as z, Fragment as f, openBlock as m, createBlock as i, unref as r, normalizeClass as x, withCtx as k, createElementBlock as B, renderList as R, normalizeStyle as A, resolveDynamicComponent as D } from "vue";
|
|
2
|
+
import { isNil as F, get as c } from "lodash-unified";
|
|
3
|
+
import { TableSummaryRow as V, TableSummaryCell as E } from "@aplus-frontend/antdv";
|
|
4
|
+
import { flattenColumns as P, formatDataIndex as u } from "./utils.mjs";
|
|
5
5
|
import "../../config-provider/index.mjs";
|
|
6
|
-
import { isNumeric as
|
|
7
|
-
import {
|
|
8
|
-
|
|
6
|
+
import { isNumeric as $, toThousand as j, toFixed as q } from "@aplus-frontend/utils";
|
|
7
|
+
import { useLocale as G } from "../../config-provider/hooks/use-locale.mjs";
|
|
8
|
+
import { useNamespace as H } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
const Y = /* @__PURE__ */ w({
|
|
9
10
|
name: "ApSummary",
|
|
10
11
|
__name: "ap-summary",
|
|
11
12
|
props: {
|
|
12
13
|
data: {},
|
|
13
14
|
columns: {},
|
|
14
|
-
summaryTitle: {
|
|
15
|
-
default: "合计"
|
|
16
|
-
},
|
|
15
|
+
summaryTitle: {},
|
|
17
16
|
hasSelect: {
|
|
18
17
|
type: Boolean,
|
|
19
18
|
default: !0
|
|
@@ -22,14 +21,16 @@ const Q = /* @__PURE__ */ I({
|
|
|
22
21
|
default: "middle"
|
|
23
22
|
}
|
|
24
23
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const n =
|
|
24
|
+
setup(h) {
|
|
25
|
+
const n = h, {
|
|
26
|
+
t: T
|
|
27
|
+
} = G(), S = y(() => n.summaryTitle ?? T("ap.apSummary.total")), C = (a) => a === 0, _ = (a, o) => {
|
|
27
28
|
var s;
|
|
28
|
-
if (
|
|
29
|
+
if (!$(a) || o.valueType !== "number")
|
|
29
30
|
return a;
|
|
30
31
|
const e = (s = o.fieldProps) == null ? void 0 : s.field, t = (e == null ? void 0 : e.precision) || 0;
|
|
31
|
-
return (
|
|
32
|
-
},
|
|
32
|
+
return (F(e == null ? void 0 : e.thousands) ? !0 : e == null ? void 0 : e.thousands) ? j(a, t) : q(a, t);
|
|
33
|
+
}, g = y(() => {
|
|
33
34
|
let a = [];
|
|
34
35
|
n.hasSelect && a.push({
|
|
35
36
|
key: "select",
|
|
@@ -37,17 +38,17 @@ const Q = /* @__PURE__ */ I({
|
|
|
37
38
|
align: "left",
|
|
38
39
|
value: ""
|
|
39
40
|
});
|
|
40
|
-
const e =
|
|
41
|
+
const e = P(n.columns).map((t, d) => {
|
|
41
42
|
let s;
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
s =
|
|
45
|
-
else if (
|
|
46
|
-
const p = c(n.data, u(t.dataIndex || t.key)),
|
|
43
|
+
const L = c(n.data, u(t.dataIndex || t.key));
|
|
44
|
+
if (C(d))
|
|
45
|
+
s = S.value;
|
|
46
|
+
else if (L && (t.customRender || t.renderText)) {
|
|
47
|
+
const p = c(n.data, u(t.dataIndex || t.key)), N = u(t.dataIndex || t.key), l = t.customRender || t.renderText;
|
|
47
48
|
s = l == null ? void 0 : l({
|
|
48
49
|
value: p,
|
|
49
50
|
record: {
|
|
50
|
-
[
|
|
51
|
+
[N]: p
|
|
51
52
|
},
|
|
52
53
|
text: void 0,
|
|
53
54
|
index: 0,
|
|
@@ -55,32 +56,32 @@ const Q = /* @__PURE__ */ I({
|
|
|
55
56
|
column: {}
|
|
56
57
|
});
|
|
57
58
|
} else
|
|
58
|
-
s =
|
|
59
|
+
s = _(c(n.data, u(t.dataIndex || t.key)), t);
|
|
59
60
|
return {
|
|
60
61
|
key: t.key,
|
|
61
62
|
rowSpan: 1,
|
|
62
63
|
align: t.align,
|
|
63
|
-
value:
|
|
64
|
+
value: z(f, null, [s])
|
|
64
65
|
};
|
|
65
66
|
});
|
|
66
67
|
return a.concat(e);
|
|
67
68
|
}), {
|
|
68
|
-
b:
|
|
69
|
-
e:
|
|
70
|
-
em:
|
|
71
|
-
} =
|
|
72
|
-
return (a, o) => (m(), i(r(
|
|
73
|
-
class:
|
|
69
|
+
b: v,
|
|
70
|
+
e: b,
|
|
71
|
+
em: I
|
|
72
|
+
} = H("ap-summary");
|
|
73
|
+
return (a, o) => (m(), i(r(V), {
|
|
74
|
+
class: x(r(v)())
|
|
74
75
|
}, {
|
|
75
|
-
default:
|
|
76
|
+
default: k(() => [(m(!0), B(f, null, R(g.value, (e, t) => (m(), i(r(E), {
|
|
76
77
|
key: e.key,
|
|
77
|
-
class:
|
|
78
|
+
class: x(`${n.size === "small" ? r(I)("item", "small") : r(b)("item")}`),
|
|
78
79
|
index: t,
|
|
79
|
-
style:
|
|
80
|
+
style: A({
|
|
80
81
|
textAlign: e.align
|
|
81
82
|
})
|
|
82
83
|
}, {
|
|
83
|
-
default:
|
|
84
|
+
default: k(() => [(m(), i(D(e.value)))]),
|
|
84
85
|
_: 2
|
|
85
86
|
}, 1032, ["class", "index", "style"]))), 128))]),
|
|
86
87
|
_: 1
|
|
@@ -88,5 +89,5 @@ const Q = /* @__PURE__ */ I({
|
|
|
88
89
|
}
|
|
89
90
|
});
|
|
90
91
|
export {
|
|
91
|
-
|
|
92
|
+
Y as default
|
|
92
93
|
};
|
|
@@ -5,7 +5,6 @@ export * from './utils';
|
|
|
5
5
|
declare const ApSummary: {
|
|
6
6
|
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApSummaryProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
7
7
|
size: "middle" | "small";
|
|
8
|
-
summaryTitle: string;
|
|
9
8
|
hasSelect: boolean;
|
|
10
9
|
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
11
10
|
P: {};
|
|
@@ -16,7 +15,6 @@ declare const ApSummary: {
|
|
|
16
15
|
Defaults: {};
|
|
17
16
|
}, Readonly< ApSummaryProps> & Readonly<{}>, {}, {}, {}, {}, {
|
|
18
17
|
size: "middle" | "small";
|
|
19
|
-
summaryTitle: string;
|
|
20
18
|
hasSelect: boolean;
|
|
21
19
|
}>;
|
|
22
20
|
__isFragment?: never;
|
|
@@ -24,7 +22,6 @@ declare const ApSummary: {
|
|
|
24
22
|
__isSuspense?: never;
|
|
25
23
|
} & ComponentOptionsBase<Readonly< ApSummaryProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
26
24
|
size: "middle" | "small";
|
|
27
|
-
summaryTitle: string;
|
|
28
25
|
hasSelect: boolean;
|
|
29
26
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
|
|
30
27
|
$props: {
|
|
@@ -117,7 +117,9 @@ const pe = /* @__PURE__ */ U({
|
|
|
117
117
|
var u, p;
|
|
118
118
|
if (l.length > e.maxCount) {
|
|
119
119
|
B.warning(
|
|
120
|
-
g("ap.apTableModal.messageMaxCount", {
|
|
120
|
+
g("ap.apTableModal.messageMaxCount", {
|
|
121
|
+
maxCount: e.maxCount
|
|
122
|
+
})
|
|
121
123
|
);
|
|
122
124
|
return;
|
|
123
125
|
}
|
|
@@ -132,7 +134,9 @@ const pe = /* @__PURE__ */ U({
|
|
|
132
134
|
if (l) {
|
|
133
135
|
if (a.value.length >= e.maxCount) {
|
|
134
136
|
B.warning(
|
|
135
|
-
g("ap.apTableModal.messageMaxCount", {
|
|
137
|
+
g("ap.apTableModal.messageMaxCount", {
|
|
138
|
+
maxCount: e.maxCount
|
|
139
|
+
})
|
|
136
140
|
);
|
|
137
141
|
return;
|
|
138
142
|
}
|
|
@@ -209,7 +213,7 @@ const pe = /* @__PURE__ */ U({
|
|
|
209
213
|
onDeleteItem: E
|
|
210
214
|
}), {
|
|
211
215
|
default: h(() => [
|
|
212
|
-
S(s(ee), y(
|
|
216
|
+
S(s(ee), y({
|
|
213
217
|
ref_key: "apTableRef",
|
|
214
218
|
ref: d,
|
|
215
219
|
scroll: { y: "100%" },
|
|
@@ -220,7 +224,7 @@ const pe = /* @__PURE__ */ U({
|
|
|
220
224
|
"row-selection": A.value,
|
|
221
225
|
bordered: s(I) === "admin",
|
|
222
226
|
"data-source": C.value
|
|
223
|
-
}), null, 16, ["columns", "row-key", "row-selection", "bordered", "data-source"])
|
|
227
|
+
}, s(R)(e.apTableProps, "dataSource")), null, 16, ["columns", "row-key", "row-selection", "bordered", "data-source"])
|
|
224
228
|
]),
|
|
225
229
|
_: 1
|
|
226
230
|
}, 16, ["selected-list"])
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { ApFormItemBatchInputProps } from './interface';
|
|
1
|
+
import { ApFormItemBatchInputProps, BatchInputGroupProps } from './interface';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
declare const _default: DefineComponent<ApFormItemBatchInputProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFormItemBatchInputProps> & Readonly<{}>, {
|
|
4
4
|
trim: boolean;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
bordered: boolean;
|
|
7
|
+
field: Omit< BatchInputGroupProps, "value" | "onUpdate:value">;
|
|
8
|
+
colon: boolean;
|
|
9
|
+
required: boolean;
|
|
10
|
+
hasFeedback: boolean;
|
|
11
|
+
autoLink: boolean;
|
|
12
|
+
validateFirst: boolean;
|
|
5
13
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
6
14
|
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as b, computed as r, openBlock as B, createBlock as g, mergeProps as u, unref as m, withCtx as _, createVNode as V } from "vue";
|
|
2
2
|
import "./index.vue2.mjs";
|
|
3
3
|
import "../../ap-form/item/index.vue2.mjs";
|
|
4
|
-
import { isValid as
|
|
4
|
+
import { isValid as s } from "@aplus-frontend/utils";
|
|
5
5
|
import { omit as p } from "lodash-unified";
|
|
6
|
-
import
|
|
6
|
+
import x from "../../ap-form/item/index.vue.mjs";
|
|
7
7
|
import k from "./index.vue.mjs";
|
|
8
|
-
const A = /* @__PURE__ */
|
|
8
|
+
const A = /* @__PURE__ */ b({
|
|
9
9
|
__name: "form-item",
|
|
10
10
|
props: {
|
|
11
11
|
htmlFor: {},
|
|
@@ -15,15 +15,15 @@ const A = /* @__PURE__ */ B({
|
|
|
15
15
|
extra: {},
|
|
16
16
|
labelCol: {},
|
|
17
17
|
wrapperCol: {},
|
|
18
|
-
hasFeedback: { type: Boolean },
|
|
19
|
-
colon: { type: Boolean },
|
|
18
|
+
hasFeedback: { type: Boolean, default: !1 },
|
|
19
|
+
colon: { type: Boolean, default: void 0 },
|
|
20
20
|
labelAlign: {},
|
|
21
21
|
prop: {},
|
|
22
22
|
name: {},
|
|
23
23
|
rules: {},
|
|
24
|
-
autoLink: { type: Boolean },
|
|
25
|
-
required: { type: Boolean },
|
|
26
|
-
validateFirst: { type: Boolean },
|
|
24
|
+
autoLink: { type: Boolean, default: !0 },
|
|
25
|
+
required: { type: Boolean, default: void 0 },
|
|
26
|
+
validateFirst: { type: Boolean, default: void 0 },
|
|
27
27
|
validateStatus: {},
|
|
28
28
|
validateTrigger: {},
|
|
29
29
|
messageVariables: {},
|
|
@@ -42,58 +42,62 @@ const A = /* @__PURE__ */ B({
|
|
|
42
42
|
xl: {},
|
|
43
43
|
xxl: {},
|
|
44
44
|
flex: {},
|
|
45
|
-
bordered: { type: Boolean },
|
|
45
|
+
bordered: { type: Boolean, default: !1 },
|
|
46
46
|
valuePropName: {},
|
|
47
47
|
initialValue: {},
|
|
48
48
|
_signal: {},
|
|
49
49
|
transform: {},
|
|
50
|
-
field: {},
|
|
51
|
-
disabled: { type: Boolean },
|
|
50
|
+
field: { default: () => ({}) },
|
|
51
|
+
disabled: { type: Boolean, default: void 0 },
|
|
52
52
|
placeholer: {},
|
|
53
53
|
trim: { type: Boolean, default: !0 }
|
|
54
54
|
},
|
|
55
|
-
setup(
|
|
56
|
-
const l =
|
|
55
|
+
setup(v) {
|
|
56
|
+
const l = v, c = r(() => (l == null ? void 0 : l.transform) || {
|
|
57
57
|
flat: !1,
|
|
58
58
|
transformer: (e) => {
|
|
59
|
-
var
|
|
59
|
+
var a, o, i, n, d, f;
|
|
60
60
|
if (e)
|
|
61
|
-
return !(e != null && e.value) || ((
|
|
61
|
+
return !(e != null && e.value) || ((a = e == null ? void 0 : e.value) == null ? void 0 : a.length) < 1 ? void 0 : (o = l == null ? void 0 : l.field) != null && o.options ? {
|
|
62
62
|
...e,
|
|
63
|
-
value: (
|
|
64
|
-
} : (
|
|
63
|
+
value: (n = (i = e == null ? void 0 : e.value) == null ? void 0 : i.filter((t) => s(t == null ? void 0 : t.trim()))) == null ? void 0 : n.map((t) => l.trim ? t == null ? void 0 : t.trim() : t)
|
|
64
|
+
} : (f = (d = e == null ? void 0 : e.value) == null ? void 0 : d.filter((t) => s(t == null ? void 0 : t.trim()))) == null ? void 0 : f.map((t) => l.trim ? t == null ? void 0 : t.trim() : t);
|
|
65
65
|
}
|
|
66
|
-
}),
|
|
66
|
+
}), y = r(() => {
|
|
67
67
|
var e;
|
|
68
68
|
return ((e = l.field) == null ? void 0 : e.style) || "width:auto";
|
|
69
|
-
}), h =
|
|
70
|
-
var e,
|
|
69
|
+
}), h = r(() => {
|
|
70
|
+
var e, a;
|
|
71
71
|
return (l == null ? void 0 : l.initialValue) || {
|
|
72
|
-
key: (
|
|
72
|
+
key: (a = (e = l == null ? void 0 : l.field) == null ? void 0 : e.options) == null ? void 0 : a.map((o) => o.value)
|
|
73
73
|
};
|
|
74
74
|
});
|
|
75
|
-
return (e,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
75
|
+
return (e, a) => {
|
|
76
|
+
var o, i;
|
|
77
|
+
return B(), g(x, u(
|
|
78
|
+
m(p)(l, [
|
|
79
|
+
"field",
|
|
80
|
+
"initialValue",
|
|
81
|
+
"transform",
|
|
82
|
+
"placeholder",
|
|
83
|
+
"disabled"
|
|
84
|
+
]),
|
|
85
|
+
{
|
|
86
|
+
"initial-value": h.value,
|
|
87
|
+
transform: c.value,
|
|
88
|
+
bordered: (i = (o = e.field) == null ? void 0 : o.options) != null && i.length ? !1 : e.bordered
|
|
89
|
+
}
|
|
90
|
+
), {
|
|
91
|
+
default: _(() => [
|
|
92
|
+
V(k, u(m(p)(l.field, ["style"]), {
|
|
93
|
+
style: y.value,
|
|
94
|
+
disabled: e.disabled,
|
|
95
|
+
placeholer: e.placeholer
|
|
96
|
+
}), null, 16, ["style", "disabled", "placeholer"])
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
}, 16, ["initial-value", "transform", "bordered"]);
|
|
100
|
+
};
|
|
97
101
|
}
|
|
98
102
|
});
|
|
99
103
|
export {
|
|
@@ -15,7 +15,7 @@ export declare const useNamespace: (block: string, namespaceOverrides?: Ref<stri
|
|
|
15
15
|
(name: string, state: boolean | undefined): string;
|
|
16
16
|
(name: string): string;
|
|
17
17
|
};
|
|
18
|
-
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
18
|
+
cssVar: (object: Record<string, string | undefined | null>) => Record<string, string>;
|
|
19
19
|
cssVarName: (name: string) => string;
|
|
20
20
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
21
21
|
cssVarBlockName: (name: string) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCurrentInstance as v, inject as N, ref as p, computed as V, unref as y } from "vue";
|
|
2
|
-
const m = "aplus", l = "is-", c = (a, r, t, o
|
|
2
|
+
const m = "aplus", l = "is-", c = (a, r, t, $, o) => {
|
|
3
3
|
let u = `${a}-${r}`;
|
|
4
|
-
return t && (u += `-${t}`),
|
|
4
|
+
return t && (u += `-${t}`), $ && (u += `__${$}`), o && (u += `--${o}`), u;
|
|
5
5
|
}, B = Symbol("namespaceContextKey"), C = (a) => {
|
|
6
6
|
const r = a || (v() ? N(B, p(m)) : p(m));
|
|
7
7
|
return V(() => y(r) || m);
|
|
@@ -23,7 +23,7 @@ const m = "aplus", l = "is-", c = (a, r, t, o, $) => {
|
|
|
23
23
|
cssVar: (s) => {
|
|
24
24
|
const e = {};
|
|
25
25
|
for (const n in s)
|
|
26
|
-
s[n] && (e[`--${t.value}-${n}`] = s[n]);
|
|
26
|
+
s[n] && (e[`--${t.value}-${a}-${n}`] = s[n]);
|
|
27
27
|
return e;
|
|
28
28
|
},
|
|
29
29
|
cssVarName: (s) => `--${t.value}-${s}`,
|
package/es/src/hooks/index.d.ts
CHANGED
package/es/src/hooks/index.mjs
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { useMessage as r } from "./useMessage.mjs";
|
|
2
|
-
import { useControllableValue as
|
|
2
|
+
import { useControllableValue as f } from "./useControllableValue.mjs";
|
|
3
|
+
import { useManualRef as s } from "./useManualRef.mjs";
|
|
4
|
+
import { useThrottleRef as a } from "./useThrottleRef.mjs";
|
|
3
5
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
f as useControllableValue,
|
|
7
|
+
s as useManualRef,
|
|
8
|
+
r as useMessage,
|
|
9
|
+
a as useThrottleRef
|
|
6
10
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { customRef as g } from "vue";
|
|
2
|
+
function d() {
|
|
3
|
+
const r = /* @__PURE__ */ new Set();
|
|
4
|
+
function o(t) {
|
|
5
|
+
return g((i, c) => {
|
|
6
|
+
let n = t;
|
|
7
|
+
const u = () => {
|
|
8
|
+
t !== n && (n = t, c());
|
|
9
|
+
};
|
|
10
|
+
return {
|
|
11
|
+
get: () => (i(), t),
|
|
12
|
+
set: (e) => {
|
|
13
|
+
e !== t && (t = e, r.add(u));
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function f() {
|
|
19
|
+
for (const t of r)
|
|
20
|
+
t();
|
|
21
|
+
r.clear();
|
|
22
|
+
}
|
|
23
|
+
return { updateSet: r, manualRef: o, triggerUpdate: f };
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
d as useManualRef
|
|
27
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { customRef as a } from "vue";
|
|
2
|
+
function m(n, o = 16.67) {
|
|
3
|
+
let l = n, r = !1, e = null;
|
|
4
|
+
return a((s, f) => {
|
|
5
|
+
const u = (t) => {
|
|
6
|
+
if (t !== l) {
|
|
7
|
+
if (r) {
|
|
8
|
+
e = t;
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
l = t, f(), r = !0, setTimeout(() => {
|
|
12
|
+
if (r = !1, e !== null) {
|
|
13
|
+
const i = e;
|
|
14
|
+
e = null, u(i);
|
|
15
|
+
}
|
|
16
|
+
}, o);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
return {
|
|
20
|
+
get() {
|
|
21
|
+
return s(), l;
|
|
22
|
+
},
|
|
23
|
+
set(t) {
|
|
24
|
+
u(t);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
m as useThrottleRef
|
|
31
|
+
};
|
package/es/src/index.d.ts
CHANGED