@aplus-frontend/ui 0.0.16 → 0.0.17
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 +42 -38
- package/es/src/ap-table/style/ap-table.css +6 -0
- package/es/src/check-card/checked.svg.mjs +4 -0
- package/es/src/check-card/context.d.ts +6 -0
- package/es/src/check-card/context.mjs +16 -0
- package/es/src/check-card/group.vue.d.ts +57 -0
- package/es/src/check-card/group.vue.mjs +57 -0
- package/es/src/check-card/group.vue2.mjs +4 -0
- package/es/src/check-card/index.d.ts +9 -0
- package/es/src/check-card/index.mjs +11 -0
- package/es/src/check-card/index.vue.d.ts +54 -0
- package/es/src/check-card/index.vue.mjs +4 -0
- package/es/src/check-card/index.vue2.mjs +133 -0
- package/es/src/check-card/interface.d.ts +100 -0
- package/es/src/check-card/interface.mjs +1 -0
- package/es/src/check-card/style/index.css +108 -0
- package/es/src/hooks/useControllableValue.mjs +15 -13
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +194 -190
- package/es/src/theme/ap-table/ap-table.css +6 -0
- package/es/src/theme/check-card/index.css +108 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-table/style/ap-table.css +6 -0
- package/lib/src/check-card/checked.svg.js +1 -0
- package/lib/src/check-card/context.d.ts +6 -0
- package/lib/src/check-card/context.js +1 -0
- package/lib/src/check-card/group.vue.d.ts +57 -0
- package/lib/src/check-card/group.vue.js +1 -0
- package/lib/src/check-card/group.vue2.js +1 -0
- package/lib/src/check-card/index.d.ts +9 -0
- package/lib/src/check-card/index.js +1 -0
- package/lib/src/check-card/index.vue.d.ts +54 -0
- package/lib/src/check-card/index.vue.js +1 -0
- package/lib/src/check-card/index.vue2.js +1 -0
- package/lib/src/check-card/interface.d.ts +100 -0
- package/lib/src/check-card/interface.js +1 -0
- package/lib/src/check-card/style/index.css +108 -0
- package/lib/src/hooks/useControllableValue.js +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/theme/ap-table/ap-table.css +6 -0
- package/lib/src/theme/check-card/index.css +108 -0
- package/package.json +2 -2
package/es/index.mjs
CHANGED
|
@@ -5,8 +5,8 @@ import { configProviderProps as x } from "./src/config-provider/config-provider-
|
|
|
5
5
|
import { configProviderContextKey as n, tableDefaultConfig as u } from "./src/config-provider/constants.mjs";
|
|
6
6
|
import { keysOf as c, provideGlobalConfig as F, useGlobalConfig as T } from "./src/config-provider/hooks/use-global-config.mjs";
|
|
7
7
|
import { buildLocaleContext as S, buildTranslator as I, localeContextKey as b, translate as g, useLocale as P } from "./src/config-provider/hooks/use-locale.mjs";
|
|
8
|
-
import { defaultNamespace as R, namespaceContextKey as
|
|
9
|
-
import { ConfigProvider as
|
|
8
|
+
import { defaultNamespace as R, namespaceContextKey as h, useGetDerivedNamespace as v, useNamespace as M } from "./src/config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
import { ConfigProvider as w } from "./src/config-provider/config-provider.mjs";
|
|
10
10
|
import { APConfigProvider as G } from "./src/config-provider/index.mjs";
|
|
11
11
|
import { Scrollbar as y } from "./src/scroll-bar/index.mjs";
|
|
12
12
|
import { CollapseContainer as L, ScrollContainer as X } from "./src/container/index.mjs";
|
|
@@ -23,9 +23,9 @@ import { useForm as Te } 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 ge } from "./src/pro-form/index.mjs";
|
|
25
25
|
import { default as De } from "./src/pro-form/components/api-cascader.vue.mjs";
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
26
|
+
import { default as he } from "./src/pro-form/components/api-radio-group.vue.mjs";
|
|
27
|
+
import { default as Me } from "./src/pro-form/components/api-select.vue.mjs";
|
|
28
|
+
import { default as we } from "./src/pro-form/components/api-transfer.vue.mjs";
|
|
29
29
|
import { default as Ge } from "./src/pro-form/components/api-tree.vue.mjs";
|
|
30
30
|
import { default as ye } from "./src/pro-form/components/radio-button-group.vue.mjs";
|
|
31
31
|
import { default as Le } from "./src/pro-form/pro-form.vue.mjs";
|
|
@@ -48,9 +48,9 @@ import { default as Co } 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 go } from "./src/pro-table/components/table-image.vue.mjs";
|
|
50
50
|
import { useTable as Do } from "./src/pro-table/hooks/use-table.mjs";
|
|
51
|
-
import { ApFormItemText as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
51
|
+
import { ApFormItemText as ho } from "./src/ap-form/items/text/index.mjs";
|
|
52
|
+
import { default as Mo } from "./src/ap-form/items/text-area/index.vue.mjs";
|
|
53
|
+
import { default as wo } from "./src/ap-form/items/number/index.vue.mjs";
|
|
54
54
|
import { default as Go } from "./src/ap-form/items/date/index.vue.mjs";
|
|
55
55
|
import { default as yo } from "./src/ap-form/items/date-range/index.vue.mjs";
|
|
56
56
|
import { default as Lo } from "./src/ap-form/items/radio/index.vue.mjs";
|
|
@@ -75,9 +75,9 @@ import { default as Cr } from "./src/ap-field/text-area/index.vue.mjs";
|
|
|
75
75
|
import { default as Ir } from "./src/ap-field/date-range/index.vue.mjs";
|
|
76
76
|
import { default as gr } from "./src/ap-field/select/index.vue.mjs";
|
|
77
77
|
import { default as Dr } from "./src/ap-field/text/password.vue.mjs";
|
|
78
|
-
import { default as
|
|
79
|
-
import { default as
|
|
80
|
-
import { default as
|
|
78
|
+
import { default as hr } from "./src/ap-field/slider/index.vue.mjs";
|
|
79
|
+
import { default as Mr } from "./src/ap-field/segmented/index.vue.mjs";
|
|
80
|
+
import { default as wr } from "./src/ap-field/rate/index.vue.mjs";
|
|
81
81
|
import { adminToken as Gr, aplusToken as Nr } from "./src/design-token/index.mjs";
|
|
82
82
|
import { ApActionItem as Er } from "./src/ap-action/index.mjs";
|
|
83
83
|
import { default as Xr } from "./src/ap-action/item-modal/index.vue.mjs";
|
|
@@ -97,13 +97,15 @@ import { default as dt } from "./src/ap-layout/ap-info-layout/ap-info-layout.vue
|
|
|
97
97
|
import { NeedNameKeyDefault as it } from "./src/ap-upload/apUploadTypes.mjs";
|
|
98
98
|
import { default as ut } from "./src/ap-upload/apUpload.vue.mjs";
|
|
99
99
|
import { default as ct } from "./src/ap-download/ap-download.vue.mjs";
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import { default as Rt } from "./src/
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
100
|
+
import { CheckCard as Tt } from "./src/check-card/index.mjs";
|
|
101
|
+
import { default as St } from "./src/check-card/group.vue.mjs";
|
|
102
|
+
import { ApTitle as bt } from "./src/business/index.mjs";
|
|
103
|
+
import { useTablePaging as Pt } from "./src/ap-table/hooks/use-table-paging.mjs";
|
|
104
|
+
import { default as Rt } from "./src/ap-table/ap-table.vue.mjs";
|
|
105
|
+
import { default as vt } from "./src/editable-table/index.vue.mjs";
|
|
106
|
+
import { default as kt } from "./src/editable-table/form-item.vue.mjs";
|
|
107
|
+
import { useMessage as Bt } from "./src/hooks/useMessage.mjs";
|
|
108
|
+
import { useControllableValue as Nt } from "./src/hooks/useControllableValue.mjs";
|
|
107
109
|
const p = {
|
|
108
110
|
install: (r) => {
|
|
109
111
|
for (const t in o) {
|
|
@@ -129,10 +131,10 @@ export {
|
|
|
129
131
|
nr as ApFieldNumber,
|
|
130
132
|
Dr as ApFieldPassword,
|
|
131
133
|
Ar as ApFieldRadio,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
wr as ApFieldRate,
|
|
135
|
+
Mr as ApFieldSegmented,
|
|
134
136
|
gr as ApFieldSelect,
|
|
135
|
-
|
|
137
|
+
hr as ApFieldSlider,
|
|
136
138
|
Fr as ApFieldSwitch,
|
|
137
139
|
mr as ApFieldText,
|
|
138
140
|
Cr as ApFieldTextArea,
|
|
@@ -142,26 +144,26 @@ export {
|
|
|
142
144
|
Go as ApFormItemDate,
|
|
143
145
|
yo as ApFormItemDateRange,
|
|
144
146
|
Qo as ApFormItemGroup,
|
|
145
|
-
|
|
147
|
+
wo as ApFormItemNumber,
|
|
146
148
|
Lo as ApFormItemRadio,
|
|
147
149
|
Ko as ApFormItemSelect,
|
|
148
150
|
Oo as ApFormItemSwitch,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
+
ho as ApFormItemText,
|
|
152
|
+
Mo as ApFormItemTextArea,
|
|
151
153
|
Uo as ApFormItemTextPassword,
|
|
152
154
|
_o as ApFormList,
|
|
153
155
|
tr as ApFormModalForm,
|
|
154
156
|
or as ApFormSearchForm,
|
|
155
157
|
dt as ApInfoLayout,
|
|
156
|
-
|
|
158
|
+
Rt as ApTable,
|
|
157
159
|
ft as ApTag,
|
|
158
160
|
lt as ApTagGroup,
|
|
159
|
-
|
|
161
|
+
bt as ApTitle,
|
|
160
162
|
ut as ApUpload,
|
|
161
163
|
De as ApiCascader,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
164
|
+
he as ApiRadioGroup,
|
|
165
|
+
Me as ApiSelect,
|
|
166
|
+
we as ApiTransfer,
|
|
165
167
|
Ge as ApiTree,
|
|
166
168
|
Ke as ApiTreeSelect,
|
|
167
169
|
qe as BaseButton,
|
|
@@ -169,9 +171,11 @@ export {
|
|
|
169
171
|
V as BasicArrow,
|
|
170
172
|
$ as BasicHelp,
|
|
171
173
|
j as BasicTitle,
|
|
174
|
+
Tt as CheckCard,
|
|
175
|
+
St as CheckCardGroup,
|
|
172
176
|
L as CollapseContainer,
|
|
173
177
|
J as CollapseTransition,
|
|
174
|
-
|
|
178
|
+
w as ConfigProvider,
|
|
175
179
|
so as CountdownButton,
|
|
176
180
|
xo as CountdownInput,
|
|
177
181
|
fo as CropperAvatar,
|
|
@@ -180,8 +184,8 @@ export {
|
|
|
180
184
|
et as DictCode,
|
|
181
185
|
Ao as Dropdown,
|
|
182
186
|
Io as EditTableHeaderIcon,
|
|
183
|
-
|
|
184
|
-
|
|
187
|
+
vt as EditableTable,
|
|
188
|
+
kt as EditableTableFormItem,
|
|
185
189
|
Z as ExpandTransition,
|
|
186
190
|
_ as ExpandXTransition,
|
|
187
191
|
ee as FadeTransition,
|
|
@@ -229,24 +233,24 @@ export {
|
|
|
229
233
|
Ie as isSlotFormSchema,
|
|
230
234
|
c as keysOf,
|
|
231
235
|
b as localeContextKey,
|
|
232
|
-
|
|
236
|
+
h as namespaceContextKey,
|
|
233
237
|
F as provideGlobalConfig,
|
|
234
238
|
u as tableDefaultConfig,
|
|
235
239
|
g as translate,
|
|
236
240
|
jr as useCacheColumnSetting,
|
|
237
241
|
ce as useComponentRegister,
|
|
238
|
-
|
|
242
|
+
Nt as useControllableValue,
|
|
239
243
|
ie as useDescription,
|
|
240
244
|
Te as useForm,
|
|
241
|
-
|
|
245
|
+
v as useGetDerivedNamespace,
|
|
242
246
|
T as useGlobalConfig,
|
|
243
247
|
P as useLocale,
|
|
244
|
-
|
|
248
|
+
Bt as useMessage,
|
|
245
249
|
oo as useModal,
|
|
246
250
|
_e as useModalContext,
|
|
247
251
|
ro as useModalInner,
|
|
248
|
-
|
|
252
|
+
M as useNamespace,
|
|
249
253
|
Do as useTable,
|
|
250
|
-
|
|
254
|
+
Pt as useTablePaging,
|
|
251
255
|
H as zhCn
|
|
252
256
|
};
|
|
@@ -78,3 +78,9 @@
|
|
|
78
78
|
.aplus-ap-table .ant-table-small .ant-table-cell {
|
|
79
79
|
padding: 9px 16px !important;
|
|
80
80
|
}
|
|
81
|
+
.aplus-ap-table .ant-table-middle .ant-table-placeholder .ant-table-cell {
|
|
82
|
+
padding: 0 !important;
|
|
83
|
+
}
|
|
84
|
+
.aplus-ap-table .ant-table-small .ant-table-placeholder .ant-table-cell {
|
|
85
|
+
padding: 0 !important;
|
|
86
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const M = "data:image/svg+xml;base64,PH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';
|
|
2
|
+
import { CheckCardGroupContextType } from './interface';
|
|
3
|
+
|
|
4
|
+
export declare const checkCardContextKey: InjectionKey<ComputedRef<CheckCardGroupContextType | null>>;
|
|
5
|
+
export declare function useProvideCheckCard(context: ComputedRef<CheckCardGroupContextType>): void;
|
|
6
|
+
export declare function useInjectCheckCard(): ComputedRef<CheckCardGroupContextType | null>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { provide as c, inject as o, computed as n } from "vue";
|
|
2
|
+
const e = Symbol("checkCardContextKey");
|
|
3
|
+
function C(t) {
|
|
4
|
+
c(e, t);
|
|
5
|
+
}
|
|
6
|
+
function d() {
|
|
7
|
+
return o(
|
|
8
|
+
e,
|
|
9
|
+
n(() => null)
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
e as checkCardContextKey,
|
|
14
|
+
d as useInjectCheckCard,
|
|
15
|
+
C as useProvideCheckCard
|
|
16
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { CheckCardGroupProps, CheckCardValueType } from './interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CheckCardGroupProps>, {
|
|
5
|
+
value: undefined;
|
|
6
|
+
multiple: boolean;
|
|
7
|
+
bordered: undefined;
|
|
8
|
+
disabled: undefined;
|
|
9
|
+
loading: undefined;
|
|
10
|
+
size: undefined;
|
|
11
|
+
stopPropagation: undefined;
|
|
12
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
13
|
+
"update:value": (...args: any[]) => void;
|
|
14
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CheckCardGroupProps>, {
|
|
15
|
+
value: undefined;
|
|
16
|
+
multiple: boolean;
|
|
17
|
+
bordered: undefined;
|
|
18
|
+
disabled: undefined;
|
|
19
|
+
loading: undefined;
|
|
20
|
+
size: undefined;
|
|
21
|
+
stopPropagation: undefined;
|
|
22
|
+
}>>> & {
|
|
23
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
loading: boolean;
|
|
27
|
+
multiple: boolean;
|
|
28
|
+
size: "small" | "middle";
|
|
29
|
+
value: CheckCardValueType | CheckCardValueType[];
|
|
30
|
+
bordered: boolean;
|
|
31
|
+
stopPropagation: boolean;
|
|
32
|
+
}, {}>, {
|
|
33
|
+
default?(_: {}): any;
|
|
34
|
+
}>;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
37
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
38
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
39
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
40
|
+
} : {
|
|
41
|
+
type: PropType<T[K]>;
|
|
42
|
+
required: true;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
type __VLS_WithDefaults<P, D> = {
|
|
46
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
47
|
+
default: D[K];
|
|
48
|
+
}> : P[K];
|
|
49
|
+
};
|
|
50
|
+
type __VLS_Prettify<T> = {
|
|
51
|
+
[K in keyof T]: T[K];
|
|
52
|
+
} & {};
|
|
53
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
54
|
+
new (): {
|
|
55
|
+
$slots: S;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { defineComponent as g, unref as r, computed as v, renderSlot as b } from "vue";
|
|
2
|
+
import "../hooks/index.mjs";
|
|
3
|
+
import { useProvideCheckCard as y } from "./context.mjs";
|
|
4
|
+
import { isUndefined as B } from "lodash-unified";
|
|
5
|
+
import { useControllableValue as C } from "../hooks/useControllableValue.mjs";
|
|
6
|
+
const z = /* @__PURE__ */ g({
|
|
7
|
+
name: "CheckCardGroup",
|
|
8
|
+
__name: "group",
|
|
9
|
+
props: {
|
|
10
|
+
bordered: { type: Boolean, default: void 0 },
|
|
11
|
+
disabled: { type: Boolean, default: void 0 },
|
|
12
|
+
loading: { type: Boolean, default: void 0 },
|
|
13
|
+
size: { default: void 0 },
|
|
14
|
+
stopPropagation: { type: Boolean, default: void 0 },
|
|
15
|
+
multiple: { type: Boolean, default: !1 },
|
|
16
|
+
defaultValue: { type: [String, Number, Boolean, Array] },
|
|
17
|
+
value: { type: [String, Number, Boolean, Array], default: void 0 },
|
|
18
|
+
"onUpdate:Value": {}
|
|
19
|
+
},
|
|
20
|
+
emits: ["update:value"],
|
|
21
|
+
setup(n, { emit: u }) {
|
|
22
|
+
const o = n, p = u, { value: l, updateValue: d } = C(o, p), i = /* @__PURE__ */ new Map();
|
|
23
|
+
function s(e) {
|
|
24
|
+
if (!o.multiple) {
|
|
25
|
+
let t = r(l);
|
|
26
|
+
t === e ? t = void 0 : t = e, d(t);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
let a = [...r(l) || []];
|
|
30
|
+
const c = a.find((t) => t === e);
|
|
31
|
+
B(c) ? a.push(e) : a = a.filter((t) => t !== e).filter((t) => i.has(t)), d(a);
|
|
32
|
+
}
|
|
33
|
+
function f(e) {
|
|
34
|
+
i.set(e, !0);
|
|
35
|
+
}
|
|
36
|
+
function m(e) {
|
|
37
|
+
i.delete(e);
|
|
38
|
+
}
|
|
39
|
+
return y(
|
|
40
|
+
v(() => ({
|
|
41
|
+
toggleOption: s,
|
|
42
|
+
registerValue: f,
|
|
43
|
+
cancelValue: m,
|
|
44
|
+
disabled: o.disabled,
|
|
45
|
+
size: o.size,
|
|
46
|
+
bordered: o.bordered,
|
|
47
|
+
loading: o.loading,
|
|
48
|
+
value: r(l),
|
|
49
|
+
multiple: o.multiple,
|
|
50
|
+
stopPropagation: o.stopPropagation
|
|
51
|
+
}))
|
|
52
|
+
), (e, a) => b(e.$slots, "default");
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
export {
|
|
56
|
+
z as default
|
|
57
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as _CheckCard } from './index.vue';
|
|
2
|
+
import { default as CheckCardGroup } from './group.vue';
|
|
3
|
+
|
|
4
|
+
type CheckCardType = typeof _CheckCard & {
|
|
5
|
+
Group: typeof CheckCardGroup;
|
|
6
|
+
};
|
|
7
|
+
declare const CheckCard: CheckCardType;
|
|
8
|
+
export * from './interface';
|
|
9
|
+
export { CheckCard, CheckCardGroup };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { CheckCardProps } from './interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, CSSProperties, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
type CheckCardSlots = {
|
|
5
|
+
default(config: {
|
|
6
|
+
checked: boolean;
|
|
7
|
+
}): void;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CheckCardProps>, {
|
|
10
|
+
bordered: boolean;
|
|
11
|
+
size: string;
|
|
12
|
+
checked: undefined;
|
|
13
|
+
style: () => {};
|
|
14
|
+
stopPropagation: boolean;
|
|
15
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
16
|
+
"update:checked": (...args: any[]) => void;
|
|
17
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CheckCardProps>, {
|
|
18
|
+
bordered: boolean;
|
|
19
|
+
size: string;
|
|
20
|
+
checked: undefined;
|
|
21
|
+
style: () => {};
|
|
22
|
+
stopPropagation: boolean;
|
|
23
|
+
}>>> & {
|
|
24
|
+
"onUpdate:checked"?: ((...args: any[]) => any) | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
style: CSSProperties;
|
|
27
|
+
size: "small" | "middle";
|
|
28
|
+
bordered: boolean;
|
|
29
|
+
checked: boolean;
|
|
30
|
+
stopPropagation: boolean;
|
|
31
|
+
}, {}>, Readonly<CheckCardSlots> & CheckCardSlots>;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
34
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
35
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
36
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
37
|
+
} : {
|
|
38
|
+
type: PropType<T[K]>;
|
|
39
|
+
required: true;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
type __VLS_WithDefaults<P, D> = {
|
|
43
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
44
|
+
default: D[K];
|
|
45
|
+
}> : P[K];
|
|
46
|
+
};
|
|
47
|
+
type __VLS_Prettify<T> = {
|
|
48
|
+
[K in keyof T]: T[K];
|
|
49
|
+
} & {};
|
|
50
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
51
|
+
new (): {
|
|
52
|
+
$slots: S;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { defineComponent as F, computed as i, unref as l, createVNode as m, watch as I, watchEffect as U, openBlock as c, createElementBlock as N, normalizeStyle as W, normalizeClass as P, withModifiers as j, createBlock as f, renderSlot as G, resolveDynamicComponent as V, createCommentVNode as v, createElementVNode as O } from "vue";
|
|
2
|
+
import { Skeleton as $ } from "ant-design-vue";
|
|
3
|
+
import "../config-provider/index.mjs";
|
|
4
|
+
import "../hooks/index.mjs";
|
|
5
|
+
import { isFunction as z } from "lodash-unified";
|
|
6
|
+
import { useInjectCheckCard as q } from "./context.mjs";
|
|
7
|
+
import "./style/index.css";
|
|
8
|
+
import A from "./checked.svg.mjs";
|
|
9
|
+
import { useNamespace as H } from "../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
import { useGlobalConfig as J } from "../config-provider/hooks/use-global-config.mjs";
|
|
11
|
+
import { useControllableValue as K } from "../hooks/useControllableValue.mjs";
|
|
12
|
+
const L = ["src"], ne = /* @__PURE__ */ F({
|
|
13
|
+
name: "CheckCard",
|
|
14
|
+
__name: "index",
|
|
15
|
+
props: {
|
|
16
|
+
bordered: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !0
|
|
19
|
+
},
|
|
20
|
+
disabled: {
|
|
21
|
+
type: Boolean
|
|
22
|
+
},
|
|
23
|
+
loading: {
|
|
24
|
+
type: Boolean
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
default: "middle"
|
|
28
|
+
},
|
|
29
|
+
stopPropagation: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
},
|
|
33
|
+
checked: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: void 0
|
|
36
|
+
},
|
|
37
|
+
"onUpdate:checked": {},
|
|
38
|
+
defaultChecked: {
|
|
39
|
+
type: Boolean
|
|
40
|
+
},
|
|
41
|
+
value: {
|
|
42
|
+
type: [String, Number, Boolean]
|
|
43
|
+
},
|
|
44
|
+
style: {
|
|
45
|
+
default: () => ({})
|
|
46
|
+
},
|
|
47
|
+
title: {},
|
|
48
|
+
content: {}
|
|
49
|
+
},
|
|
50
|
+
emits: ["update:checked"],
|
|
51
|
+
setup(_, {
|
|
52
|
+
emit: w
|
|
53
|
+
}) {
|
|
54
|
+
const o = _, {
|
|
55
|
+
b: g,
|
|
56
|
+
m: u,
|
|
57
|
+
e: p,
|
|
58
|
+
bm: D,
|
|
59
|
+
em: k
|
|
60
|
+
} = H("check-card"), b = J("uiMode", "aplus"), E = w, n = q(), {
|
|
61
|
+
value: r,
|
|
62
|
+
updateValue: h
|
|
63
|
+
} = K(o, E, {
|
|
64
|
+
valuePropName: "checked",
|
|
65
|
+
defaultValuePropName: "defaultChecked"
|
|
66
|
+
}), a = i(() => {
|
|
67
|
+
const e = {
|
|
68
|
+
...o
|
|
69
|
+
}, t = l(n);
|
|
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
|
+
}), S = i(() => {
|
|
72
|
+
const e = l(b), t = l(a);
|
|
73
|
+
return [g(), ...t.disabled ? [] : [g(e), l(r) ? D(e, "checked") : null], u(t.size), t.bordered ? u("bordered") : null, t.disabled ? u("disabled") : null];
|
|
74
|
+
}), M = i(() => ({
|
|
75
|
+
...o.style,
|
|
76
|
+
"--check-card-border-color": b.value === "admin" ? "#D9D9D9" : "#E9EDF3"
|
|
77
|
+
})), y = i(() => {
|
|
78
|
+
if (!o.title)
|
|
79
|
+
return;
|
|
80
|
+
const e = z(o.title) ? o.title(l(r)) : m("span", null, [o.title]);
|
|
81
|
+
return m("div", {
|
|
82
|
+
class: [p("title"), a.value.disabled ? k("title", "disabled") : null]
|
|
83
|
+
}, [e]);
|
|
84
|
+
}), C = i(() => {
|
|
85
|
+
if (!o.content)
|
|
86
|
+
return;
|
|
87
|
+
const e = z(o.content) ? o.content(l(r)) : o.content;
|
|
88
|
+
return m("div", {
|
|
89
|
+
class: [p("content"), a.value.disabled ? k("content", "disabled") : null]
|
|
90
|
+
}, [e]);
|
|
91
|
+
});
|
|
92
|
+
function T(e) {
|
|
93
|
+
var t, d;
|
|
94
|
+
a.value.stopPropagation && e.target !== e.currentTarget || a.value.loading || a.value.disabled || (n.value ? (d = (t = n.value) == null ? void 0 : t.toggleOption) == null || d.call(t, o.value) : h(!l(r)));
|
|
95
|
+
}
|
|
96
|
+
return I(() => n.value, (e) => {
|
|
97
|
+
if (!e)
|
|
98
|
+
return;
|
|
99
|
+
const t = e.multiple ? (e.value || []).includes(o.value) : e.value === o.value;
|
|
100
|
+
h(t);
|
|
101
|
+
}, {
|
|
102
|
+
immediate: !0
|
|
103
|
+
}), U((e) => {
|
|
104
|
+
var t, d;
|
|
105
|
+
(d = (t = n.value) == null ? void 0 : t.registerValue) == null || d.call(t, o.value), e(() => {
|
|
106
|
+
var s, B;
|
|
107
|
+
return (B = (s = n.value) == null ? void 0 : s.cancelValue) == null ? void 0 : B.call(s, o.value);
|
|
108
|
+
});
|
|
109
|
+
}), (e, t) => (c(), N("div", {
|
|
110
|
+
style: W(M.value),
|
|
111
|
+
class: P(S.value),
|
|
112
|
+
onClick: j(T, ["stop"])
|
|
113
|
+
}, [a.value.loading ? (c(), f(l($), {
|
|
114
|
+
key: 0,
|
|
115
|
+
active: ""
|
|
116
|
+
})) : G(e.$slots, "default", {
|
|
117
|
+
key: 1,
|
|
118
|
+
checked: l(r)
|
|
119
|
+
}, () => [y.value ? (c(), f(V(y.value), {
|
|
120
|
+
key: 0
|
|
121
|
+
})) : v("", !0), C.value ? (c(), f(V(C.value), {
|
|
122
|
+
key: 1
|
|
123
|
+
})) : v("", !0)]), l(r) ? (c(), N("div", {
|
|
124
|
+
key: 2,
|
|
125
|
+
class: P(l(p)("checked-icon"))
|
|
126
|
+
}, [O("img", {
|
|
127
|
+
src: l(A)
|
|
128
|
+
}, null, 8, L)], 2)) : v("", !0)], 6));
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
export {
|
|
132
|
+
ne as default
|
|
133
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { CSSProperties, VNode } from 'vue';
|
|
2
|
+
|
|
3
|
+
export type CheckCardValueType = string | number | boolean;
|
|
4
|
+
/**
|
|
5
|
+
* 可选卡片的通用配置,在Group中使用将会是整组CheckCard生效
|
|
6
|
+
*/
|
|
7
|
+
type CheckCardCommonType = {
|
|
8
|
+
/**
|
|
9
|
+
* 是否显示边框
|
|
10
|
+
*/
|
|
11
|
+
bordered?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* 是否禁用
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 是否显示加载中样式
|
|
18
|
+
*/
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 卡片的尺寸,目前内置中等/小尺寸两种
|
|
22
|
+
*/
|
|
23
|
+
size?: 'middle' | 'small';
|
|
24
|
+
/**
|
|
25
|
+
* 是否阻止点击事件冒泡(对于自定义内容包含输入控件时需要设置)
|
|
26
|
+
*/
|
|
27
|
+
stopPropagation?: boolean;
|
|
28
|
+
};
|
|
29
|
+
export type CheckCardProps = CheckCardCommonType & {
|
|
30
|
+
/**
|
|
31
|
+
* 当前选项卡是否选中(v-model)
|
|
32
|
+
*/
|
|
33
|
+
checked?: boolean;
|
|
34
|
+
'onUpdate:checked'?: (checked: boolean) => void;
|
|
35
|
+
/**
|
|
36
|
+
* 默认是否选中
|
|
37
|
+
*/
|
|
38
|
+
defaultChecked?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* 作为选项时的值
|
|
41
|
+
*/
|
|
42
|
+
value?: CheckCardValueType;
|
|
43
|
+
/**
|
|
44
|
+
* 容器自定义CSS样式
|
|
45
|
+
*/
|
|
46
|
+
style?: CSSProperties;
|
|
47
|
+
/**
|
|
48
|
+
* 标题
|
|
49
|
+
*/
|
|
50
|
+
title?: string | ((checked: boolean) => VNode);
|
|
51
|
+
/**
|
|
52
|
+
* 内容
|
|
53
|
+
*/
|
|
54
|
+
content?: string | ((checked: boolean) => VNode);
|
|
55
|
+
};
|
|
56
|
+
export type CheckCardGroupValueType = CheckCardValueType | CheckCardValueType[] | undefined;
|
|
57
|
+
export type CheckCardGroupProps = CheckCardCommonType & {
|
|
58
|
+
/**
|
|
59
|
+
* 是否多选
|
|
60
|
+
*/
|
|
61
|
+
multiple?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* 选中的默认值
|
|
64
|
+
*/
|
|
65
|
+
defaultValue?: CheckCardGroupValueType;
|
|
66
|
+
/**
|
|
67
|
+
* 选中的值(v-model)
|
|
68
|
+
*/
|
|
69
|
+
value?: CheckCardGroupValueType;
|
|
70
|
+
'onUpdate:Value'?: (nextValue: CheckCardGroupValueType) => void;
|
|
71
|
+
};
|
|
72
|
+
export type CheckCardGroupContextType = CheckCardCommonType & {
|
|
73
|
+
/**
|
|
74
|
+
* 是否是多选
|
|
75
|
+
*/
|
|
76
|
+
multiple?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* 切换单个可选卡片时触发
|
|
79
|
+
* @param value
|
|
80
|
+
* @returns
|
|
81
|
+
*/
|
|
82
|
+
toggleOption?: (value: any) => void;
|
|
83
|
+
/**
|
|
84
|
+
* 当前被选中的值
|
|
85
|
+
*/
|
|
86
|
+
value?: any;
|
|
87
|
+
/**
|
|
88
|
+
* 注册一个CheckCard的value
|
|
89
|
+
* @param value
|
|
90
|
+
* @returns
|
|
91
|
+
*/
|
|
92
|
+
registerValue?: (value: any) => void;
|
|
93
|
+
/**
|
|
94
|
+
* 取消注册
|
|
95
|
+
* @param value
|
|
96
|
+
* @returns
|
|
97
|
+
*/
|
|
98
|
+
cancelValue?: (value: any) => void;
|
|
99
|
+
};
|
|
100
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|