@qin-ui/antd-vue-pro 1.0.6 → 1.0.8
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/component-provider/index.js +6 -1
- package/es/form/index.js +4 -13
- package/es/index.d.ts +13 -19
- package/es/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { defineComponent, provide, renderSlot } from "vue";
|
|
2
|
+
import "ant-design-vue";
|
|
3
|
+
import { INJECT_COMPONENT_PROPS_KEYS } from "../form/index.js";
|
|
2
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3
5
|
__name: "index",
|
|
4
6
|
props: {
|
|
@@ -8,8 +10,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8
10
|
const props = __props;
|
|
9
11
|
if (props.componentVars) {
|
|
10
12
|
Object.values(props.componentVars).forEach((item) => {
|
|
13
|
+
const injectKeys = { ...INJECT_COMPONENT_PROPS_KEYS };
|
|
11
14
|
Object.entries(item).forEach(([key, value]) => {
|
|
12
|
-
|
|
15
|
+
if (Object.hasOwn(injectKeys, key)) {
|
|
16
|
+
provide(injectKeys[key], value);
|
|
17
|
+
}
|
|
13
18
|
});
|
|
14
19
|
});
|
|
15
20
|
}
|
package/es/form/index.js
CHANGED
|
@@ -15884,7 +15884,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
15884
15884
|
return {
|
|
15885
15885
|
name,
|
|
15886
15886
|
fn: withCtx(() => [
|
|
15887
|
-
unref(FORM_ITEM_SLOT_KEYS).includes(name) ? (openBlock(), createBlock(unref(_sfc_main$1), mergeProps({ key: 0 }, { path:
|
|
15887
|
+
unref(FORM_ITEM_SLOT_KEYS).includes(name) ? (openBlock(), createBlock(unref(_sfc_main$1), mergeProps({ key: 0 }, { path: getPath(field.key) }, { component: slot }), null, 16, ["component"])) : createCommentVNode("", true)
|
|
15888
15888
|
])
|
|
15889
15889
|
};
|
|
15890
15890
|
})
|
|
@@ -16433,15 +16433,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
16433
16433
|
style: unref(attrs).componentStyle,
|
|
16434
16434
|
path: _ctx.path
|
|
16435
16435
|
}), createSlots({ _: 2 }, [
|
|
16436
|
-
!unref(COMPONENT_MAP).has(_ctx.component) ? {
|
|
16437
|
-
name: "default",
|
|
16438
|
-
fn: withCtx(() => [
|
|
16439
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.$slots, (slot, name) => {
|
|
16440
|
-
return renderSlot(_ctx.$slots, name, { key: name }, void 0, true);
|
|
16441
|
-
}), 128))
|
|
16442
|
-
]),
|
|
16443
|
-
key: "0"
|
|
16444
|
-
} : void 0,
|
|
16445
16436
|
renderList(unref(attrs).slots, (slot, name) => {
|
|
16446
16437
|
return {
|
|
16447
16438
|
name,
|
|
@@ -16455,12 +16446,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
16455
16446
|
})
|
|
16456
16447
|
]), 1040, ["value", "class", "style", "path"]))
|
|
16457
16448
|
]),
|
|
16458
|
-
_:
|
|
16449
|
+
_: 1
|
|
16459
16450
|
}, 8, ["component", "path"]);
|
|
16460
16451
|
};
|
|
16461
16452
|
}
|
|
16462
16453
|
});
|
|
16463
|
-
const
|
|
16454
|
+
const index_vue_vue_type_style_index_0_scoped_188e985a_lang = "";
|
|
16464
16455
|
const _export_sfc = (sfc, props) => {
|
|
16465
16456
|
const target = sfc.__vccOpts || sfc;
|
|
16466
16457
|
for (const [key, val] of props) {
|
|
@@ -16468,7 +16459,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
16468
16459
|
}
|
|
16469
16460
|
return target;
|
|
16470
16461
|
};
|
|
16471
|
-
const BaseField = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
16462
|
+
const BaseField = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-188e985a"]]);
|
|
16472
16463
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
16473
16464
|
...{
|
|
16474
16465
|
name: "ContainerFragment",
|
package/es/index.d.ts
CHANGED
|
@@ -69,12 +69,6 @@ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
71
|
|
|
72
|
-
declare type __VLS_WithTemplateSlots_3<T, S> = T & {
|
|
73
|
-
new (): {
|
|
74
|
-
$slots: S;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
|
|
78
72
|
export declare type AppendField = (path: string, field: Field) => void;
|
|
79
73
|
|
|
80
74
|
/**
|
|
@@ -89,7 +83,7 @@ export declare type AutoCommand = Record<CommandTrigger, Commands>;
|
|
|
89
83
|
|
|
90
84
|
export declare type BaseComponentStringName = Exclude<Field['component'], RenderComponentType | undefined>;
|
|
91
85
|
|
|
92
|
-
export declare const BaseField:
|
|
86
|
+
export declare const BaseField: DefineComponent<{
|
|
93
87
|
path: {
|
|
94
88
|
type: PropType<string>;
|
|
95
89
|
default: string;
|
|
@@ -125,7 +119,7 @@ export declare const BaseField: __VLS_WithTemplateSlots_2<DefineComponent<{
|
|
|
125
119
|
path: string;
|
|
126
120
|
label: SlotComponentType;
|
|
127
121
|
component: RenderComponentType | "input" | "textarea" | "input-password" | "input-search" | "input-number" | "select" | "cascader" | "date-picker" | "range-picker" | "time-picker" | "checkbox-group" | "radio-group" | "switch" | "slider" | "tree-select" | "transfer" | undefined;
|
|
128
|
-
}, {}
|
|
122
|
+
}, {}>;
|
|
129
123
|
|
|
130
124
|
export declare type BaseFieldAttrs = FieldAttrsType[keyof FieldAttrsType];
|
|
131
125
|
|
|
@@ -234,9 +228,9 @@ export declare type Condition = {
|
|
|
234
228
|
disabled?: boolean;
|
|
235
229
|
};
|
|
236
230
|
|
|
237
|
-
export declare type ContainerComponent = FunctionalComponent | DefineComponent
|
|
231
|
+
export declare type ContainerComponent = FunctionalComponent<Pick<RenderProps, 'path'>> | DefineComponent<Pick<RenderProps, 'path'>>;
|
|
238
232
|
|
|
239
|
-
export declare const ContainerFragment:
|
|
233
|
+
export declare const ContainerFragment: __VLS_WithTemplateSlots_2<DefineComponent<{
|
|
240
234
|
component: {
|
|
241
235
|
type: PropType<any>;
|
|
242
236
|
};
|
|
@@ -263,7 +257,7 @@ declare const _default_2: __VLS_WithTemplateSlots<DefineComponent<{
|
|
|
263
257
|
type: PropType<string>;
|
|
264
258
|
};
|
|
265
259
|
size: {
|
|
266
|
-
type: PropType<"
|
|
260
|
+
type: PropType<"small" | "middle" | "large">;
|
|
267
261
|
};
|
|
268
262
|
disabled: {
|
|
269
263
|
type: PropType<boolean>;
|
|
@@ -440,7 +434,7 @@ declare const _default_2: __VLS_WithTemplateSlots<DefineComponent<{
|
|
|
440
434
|
type: PropType<string>;
|
|
441
435
|
};
|
|
442
436
|
size: {
|
|
443
|
-
type: PropType<"
|
|
437
|
+
type: PropType<"small" | "middle" | "large">;
|
|
444
438
|
};
|
|
445
439
|
disabled: {
|
|
446
440
|
type: PropType<boolean>;
|
|
@@ -867,7 +861,6 @@ export declare const ProComponentProvider: SFCWithInstall<{
|
|
|
867
861
|
$props: {
|
|
868
862
|
key?: string | number | symbol | undefined;
|
|
869
863
|
style?: unknown;
|
|
870
|
-
readonly componentVars: ComponentVars;
|
|
871
864
|
ref?: VNodeRef | undefined;
|
|
872
865
|
ref_for?: boolean | undefined;
|
|
873
866
|
ref_key?: string | undefined;
|
|
@@ -910,6 +903,7 @@ export declare const ProComponentProvider: SFCWithInstall<{
|
|
|
910
903
|
[key: string]: any;
|
|
911
904
|
}>) => void)[] | undefined;
|
|
912
905
|
class?: unknown;
|
|
906
|
+
readonly componentVars: ComponentVars;
|
|
913
907
|
};
|
|
914
908
|
$attrs: {
|
|
915
909
|
[x: string]: unknown;
|
|
@@ -981,7 +975,7 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
981
975
|
autoCommandDisabled?: boolean | undefined;
|
|
982
976
|
readonly prefixCls?: string | undefined;
|
|
983
977
|
readonly name?: string | undefined;
|
|
984
|
-
readonly size?: "
|
|
978
|
+
readonly size?: "small" | "middle" | "large" | undefined;
|
|
985
979
|
readonly disabled?: boolean | undefined;
|
|
986
980
|
readonly labelCol?: (Partial<ExtractPropTypes<{
|
|
987
981
|
span: (StringConstructor | NumberConstructor)[];
|
|
@@ -1138,7 +1132,7 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
1138
1132
|
type: PropType<string>;
|
|
1139
1133
|
};
|
|
1140
1134
|
size: {
|
|
1141
|
-
type: PropType<"
|
|
1135
|
+
type: PropType<"small" | "middle" | "large">;
|
|
1142
1136
|
};
|
|
1143
1137
|
disabled: {
|
|
1144
1138
|
type: PropType<boolean>;
|
|
@@ -1343,7 +1337,7 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
1343
1337
|
type: PropType<string>;
|
|
1344
1338
|
};
|
|
1345
1339
|
size: {
|
|
1346
|
-
type: PropType<"
|
|
1340
|
+
type: PropType<"small" | "middle" | "large">;
|
|
1347
1341
|
};
|
|
1348
1342
|
disabled: {
|
|
1349
1343
|
type: PropType<boolean>;
|
|
@@ -1524,7 +1518,7 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
1524
1518
|
type: PropType<string>;
|
|
1525
1519
|
};
|
|
1526
1520
|
size: {
|
|
1527
|
-
type: PropType<"
|
|
1521
|
+
type: PropType<"small" | "middle" | "large">;
|
|
1528
1522
|
};
|
|
1529
1523
|
disabled: {
|
|
1530
1524
|
type: PropType<boolean>;
|
|
@@ -1720,7 +1714,7 @@ export declare type Refs = {
|
|
|
1720
1714
|
* @description 自定义组件
|
|
1721
1715
|
* @example (renderProps, ctx) => h('div', ctx.attrs)
|
|
1722
1716
|
*/
|
|
1723
|
-
export declare type RenderComponentType = FunctionalComponent<RenderProps>;
|
|
1717
|
+
export declare type RenderComponentType = FunctionalComponent<RenderProps> | DefineComponent<RenderProps>;
|
|
1724
1718
|
|
|
1725
1719
|
declare type RenderProps = {
|
|
1726
1720
|
path: string;
|
|
@@ -1784,7 +1778,7 @@ export declare const SlotComponent: DefineComponent<{
|
|
|
1784
1778
|
};
|
|
1785
1779
|
}>>, {}, {}>;
|
|
1786
1780
|
|
|
1787
|
-
export declare type SlotComponentType = string | VNode | FunctionalComponent
|
|
1781
|
+
export declare type SlotComponentType = string | VNode | FunctionalComponent<Pick<RenderProps, 'path'>>;
|
|
1788
1782
|
|
|
1789
1783
|
declare type SwitchSlots = FieldSlot<'checkedChildren' | 'unCheckedChildren'>;
|
|
1790
1784
|
|
package/es/style.css
CHANGED