@qin-ui/antd-vue-pro 1.0.3 → 1.0.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/form/index.js +28 -48
- package/es/index.d.ts +13 -22
- package/es/style.css +1 -1
- package/package.json +1 -1
package/es/form/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inject, ref, h as h$1, getCurrentInstance, nextTick, reactive, defineComponent, createVNode, shallowRef, watch, unref, provide, watchEffect, onBeforeUnmount, computed, isRef, Fragment, Comment, Text, onMounted, cloneVNode, Transition, withDirectives, TransitionGroup, vShow, toRaw, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createElementBlock, renderList, resolveDynamicComponent, normalizeProps, createSlots, createTextVNode, createCommentVNode, useAttrs, isVNode, renderSlot, toDisplayString, shallowReactive } from "vue";
|
|
2
|
-
import { Input, Textarea, InputSearch, InputPassword, InputNumber, Select, Cascader, DatePicker as DatePicker$1, TimePicker as TimePicker$1, CheckboxGroup, RadioGroup, Switch, Slider, TreeSelect, Transfer, Row as Row$1, Col as Col$1, FormItem as FormItem$1, message, Form as Form$2 } from "ant-design-vue";
|
|
2
|
+
import { Input, Textarea, InputSearch, InputPassword, InputNumber, Select, Cascader, DatePicker as DatePicker$1, RangePicker, TimePicker as TimePicker$1, CheckboxGroup, RadioGroup, Switch, Slider, TreeSelect, Transfer, Row as Row$1, Col as Col$1, FormItem as FormItem$1, message, Form as Form$2 } from "ant-design-vue";
|
|
3
3
|
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
4
4
|
const freeGlobal$1 = freeGlobal;
|
|
5
5
|
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
@@ -10882,6 +10882,7 @@ const COMPONENT_MAP = /* @__PURE__ */ new Map([
|
|
|
10882
10882
|
["select", Select],
|
|
10883
10883
|
["cascader", Cascader],
|
|
10884
10884
|
["date-picker", DatePicker$1],
|
|
10885
|
+
["range-picker", RangePicker],
|
|
10885
10886
|
["time-picker", TimePicker$1],
|
|
10886
10887
|
["checkbox-group", CheckboxGroup],
|
|
10887
10888
|
["radio-group", RadioGroup],
|
|
@@ -11631,20 +11632,22 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11631
11632
|
class: [unref(attrs).componentClassName, "field-component"],
|
|
11632
11633
|
style: unref(attrs).componentStyle,
|
|
11633
11634
|
path: _ctx.path
|
|
11634
|
-
}), createSlots({
|
|
11635
|
-
|
|
11636
|
-
|
|
11637
|
-
name,
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
11641
|
-
|
|
11642
|
-
}),
|
|
11635
|
+
}), createSlots({
|
|
11636
|
+
default: withCtx(() => [
|
|
11637
|
+
unref(COMPONENT_MAP).has(_ctx.component) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.$slots, (slot, name) => {
|
|
11638
|
+
return renderSlot(_ctx.$slots, name, { key: name }, void 0, true);
|
|
11639
|
+
}), 128)) : createCommentVNode("", true)
|
|
11640
|
+
]),
|
|
11641
|
+
_: 2
|
|
11642
|
+
}, [
|
|
11643
11643
|
renderList(unref(attrs).slots, (slot, name) => {
|
|
11644
11644
|
return {
|
|
11645
11645
|
name,
|
|
11646
|
-
fn: withCtx(() => [
|
|
11647
|
-
!unref(FORM_ITEM_SLOT_KEYS).includes(name) ? (openBlock(), createBlock(unref(_sfc_main$1), mergeProps({
|
|
11646
|
+
fn: withCtx((scoped) => [
|
|
11647
|
+
!unref(FORM_ITEM_SLOT_KEYS).includes(name) ? (openBlock(), createBlock(unref(_sfc_main$1), mergeProps({
|
|
11648
|
+
key: 0,
|
|
11649
|
+
path: _ctx.path
|
|
11650
|
+
}, scoped, { component: slot }), null, 16, ["path", "component"])) : createCommentVNode("", true)
|
|
11648
11651
|
])
|
|
11649
11652
|
};
|
|
11650
11653
|
})
|
|
@@ -11655,7 +11658,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11655
11658
|
};
|
|
11656
11659
|
}
|
|
11657
11660
|
});
|
|
11658
|
-
const
|
|
11661
|
+
const index_vue_vue_type_style_index_0_scoped_02f40823_lang = "";
|
|
11659
11662
|
const _export_sfc = (sfc, props) => {
|
|
11660
11663
|
const target = sfc.__vccOpts || sfc;
|
|
11661
11664
|
for (const [key, val] of props) {
|
|
@@ -11663,38 +11666,39 @@ const _export_sfc = (sfc, props) => {
|
|
|
11663
11666
|
}
|
|
11664
11667
|
return target;
|
|
11665
11668
|
};
|
|
11666
|
-
const BaseField = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
11669
|
+
const BaseField = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-02f40823"]]);
|
|
11667
11670
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
11668
11671
|
...{
|
|
11669
|
-
name: "ContainerFragment"
|
|
11672
|
+
name: "ContainerFragment",
|
|
11673
|
+
inheritAttrs: false
|
|
11670
11674
|
},
|
|
11671
11675
|
__name: "index",
|
|
11672
11676
|
props: {
|
|
11673
|
-
component: {}
|
|
11674
|
-
path: {}
|
|
11677
|
+
component: {}
|
|
11675
11678
|
},
|
|
11676
11679
|
setup(__props) {
|
|
11677
11680
|
return (_ctx, _cache) => {
|
|
11678
|
-
return _ctx.component ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.component), {
|
|
11679
|
-
key: 0,
|
|
11680
|
-
path: _ctx.path
|
|
11681
|
-
}, {
|
|
11681
|
+
return _ctx.component ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.component), normalizeProps(mergeProps({ key: 0 }, _ctx.$attrs)), {
|
|
11682
11682
|
default: withCtx(() => [
|
|
11683
11683
|
renderSlot(_ctx.$slots, "default")
|
|
11684
11684
|
]),
|
|
11685
11685
|
_: 3
|
|
11686
|
-
},
|
|
11686
|
+
}, 16)) : renderSlot(_ctx.$slots, "default", { key: 1 });
|
|
11687
11687
|
};
|
|
11688
11688
|
}
|
|
11689
11689
|
});
|
|
11690
11690
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
11691
|
+
...{
|
|
11692
|
+
name: "SlotComponent",
|
|
11693
|
+
inheritAttrs: false
|
|
11694
|
+
},
|
|
11691
11695
|
__name: "index",
|
|
11692
11696
|
props: {
|
|
11693
11697
|
component: {}
|
|
11694
11698
|
},
|
|
11695
11699
|
setup(__props) {
|
|
11696
11700
|
return (_ctx, _cache) => {
|
|
11697
|
-
return isVNode(_ctx.component) || typeof _ctx.component === "function" ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.component), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
11701
|
+
return isVNode(_ctx.component) || typeof _ctx.component === "function" ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.component), normalizeProps(mergeProps({ key: 0 }, _ctx.$attrs)), null, 16)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
11698
11702
|
createTextVNode(toDisplayString(_ctx.component), 1)
|
|
11699
11703
|
], 64));
|
|
11700
11704
|
};
|
|
@@ -11710,31 +11714,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
11710
11714
|
formData: { default: () => ({}) },
|
|
11711
11715
|
fields: { default: () => [] },
|
|
11712
11716
|
grid: { type: [Boolean, Object], default: false },
|
|
11713
|
-
autoCommandDisabled: { type: Boolean, default: false }
|
|
11714
|
-
scrollToFirstError: { type: [Boolean, Object] },
|
|
11715
|
-
layout: {},
|
|
11716
|
-
labelCol: {},
|
|
11717
|
-
wrapperCol: {},
|
|
11718
|
-
colon: { type: Boolean },
|
|
11719
|
-
labelAlign: {},
|
|
11720
|
-
labelWrap: { type: Boolean },
|
|
11721
|
-
prefixCls: {},
|
|
11722
|
-
requiredMark: {},
|
|
11723
|
-
hideRequiredMark: { type: Boolean },
|
|
11724
|
-
model: {},
|
|
11725
|
-
rules: {},
|
|
11726
|
-
validateMessages: {},
|
|
11727
|
-
validateOnRuleChange: { type: Boolean },
|
|
11728
|
-
onSubmit: {},
|
|
11729
|
-
name: {},
|
|
11730
|
-
validateTrigger: {},
|
|
11731
|
-
size: {},
|
|
11732
|
-
disabled: { type: Boolean },
|
|
11733
|
-
onValuesChange: {},
|
|
11734
|
-
onFieldsChange: {},
|
|
11735
|
-
onFinish: {},
|
|
11736
|
-
onFinishFailed: {},
|
|
11737
|
-
onValidate: {}
|
|
11717
|
+
autoCommandDisabled: { type: Boolean, default: false }
|
|
11738
11718
|
},
|
|
11739
11719
|
emits: ["update:formData"],
|
|
11740
11720
|
setup(__props, { expose: __expose, emit }) {
|
package/es/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ import { nextTick } from 'vue';
|
|
|
31
31
|
import { Plugin as Plugin_2 } from 'vue';
|
|
32
32
|
import { PropType } from 'vue';
|
|
33
33
|
import type { RadioGroupProps } from 'ant-design-vue';
|
|
34
|
+
import { RangePickerProps } from 'ant-design-vue/es/date-picker';
|
|
34
35
|
import { Ref } from 'vue';
|
|
35
36
|
import { RendererElement } from 'vue';
|
|
36
37
|
import { RendererNode } from 'vue';
|
|
@@ -233,26 +234,16 @@ export declare type Condition = {
|
|
|
233
234
|
disabled?: boolean;
|
|
234
235
|
};
|
|
235
236
|
|
|
236
|
-
export declare type ContainerComponent = FunctionalComponent
|
|
237
|
-
path?: string;
|
|
238
|
-
}> | DefineComponent<{
|
|
239
|
-
path?: string;
|
|
240
|
-
}, object, any>;
|
|
237
|
+
export declare type ContainerComponent = FunctionalComponent | DefineComponent;
|
|
241
238
|
|
|
242
239
|
export declare const ContainerFragment: __VLS_WithTemplateSlots_3<DefineComponent<{
|
|
243
240
|
component: {
|
|
244
241
|
type: PropType<any>;
|
|
245
242
|
};
|
|
246
|
-
path: {
|
|
247
|
-
type: PropType<string>;
|
|
248
|
-
};
|
|
249
243
|
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
250
244
|
component: {
|
|
251
245
|
type: PropType<any>;
|
|
252
246
|
};
|
|
253
|
-
path: {
|
|
254
|
-
type: PropType<string>;
|
|
255
|
-
};
|
|
256
247
|
}>>, {}, {}>, {
|
|
257
248
|
default?(_: {}): any;
|
|
258
249
|
}>;
|
|
@@ -272,7 +263,7 @@ declare const _default_2: __VLS_WithTemplateSlots<DefineComponent<{
|
|
|
272
263
|
type: PropType<string>;
|
|
273
264
|
};
|
|
274
265
|
size: {
|
|
275
|
-
type: PropType<"
|
|
266
|
+
type: PropType<"middle" | "small" | "large">;
|
|
276
267
|
};
|
|
277
268
|
disabled: {
|
|
278
269
|
type: PropType<boolean>;
|
|
@@ -449,7 +440,7 @@ declare const _default_2: __VLS_WithTemplateSlots<DefineComponent<{
|
|
|
449
440
|
type: PropType<string>;
|
|
450
441
|
};
|
|
451
442
|
size: {
|
|
452
|
-
type: PropType<"
|
|
443
|
+
type: PropType<"middle" | "small" | "large">;
|
|
453
444
|
};
|
|
454
445
|
disabled: {
|
|
455
446
|
type: PropType<boolean>;
|
|
@@ -678,8 +669,8 @@ export declare type FieldType = {
|
|
|
678
669
|
/** 日期选择器-范围 */
|
|
679
670
|
'range-picker': {
|
|
680
671
|
component: 'range-picker';
|
|
681
|
-
slots?:
|
|
682
|
-
} &
|
|
672
|
+
slots?: RangePickerSlots;
|
|
673
|
+
} & RangePickerProps;
|
|
683
674
|
/** 时间选择器 */
|
|
684
675
|
'time-picker': {
|
|
685
676
|
component: 'time-picker';
|
|
@@ -990,7 +981,7 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
990
981
|
autoCommandDisabled?: boolean | undefined;
|
|
991
982
|
readonly prefixCls?: string | undefined;
|
|
992
983
|
readonly name?: string | undefined;
|
|
993
|
-
readonly size?: "
|
|
984
|
+
readonly size?: "middle" | "small" | "large" | undefined;
|
|
994
985
|
readonly disabled?: boolean | undefined;
|
|
995
986
|
readonly labelCol?: (Partial<ExtractPropTypes<{
|
|
996
987
|
span: (StringConstructor | NumberConstructor)[];
|
|
@@ -1147,7 +1138,7 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
1147
1138
|
type: PropType<string>;
|
|
1148
1139
|
};
|
|
1149
1140
|
size: {
|
|
1150
|
-
type: PropType<"
|
|
1141
|
+
type: PropType<"middle" | "small" | "large">;
|
|
1151
1142
|
};
|
|
1152
1143
|
disabled: {
|
|
1153
1144
|
type: PropType<boolean>;
|
|
@@ -1352,7 +1343,7 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
1352
1343
|
type: PropType<string>;
|
|
1353
1344
|
};
|
|
1354
1345
|
size: {
|
|
1355
|
-
type: PropType<"
|
|
1346
|
+
type: PropType<"middle" | "small" | "large">;
|
|
1356
1347
|
};
|
|
1357
1348
|
disabled: {
|
|
1358
1349
|
type: PropType<boolean>;
|
|
@@ -1533,7 +1524,7 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
1533
1524
|
type: PropType<string>;
|
|
1534
1525
|
};
|
|
1535
1526
|
size: {
|
|
1536
|
-
type: PropType<"
|
|
1527
|
+
type: PropType<"middle" | "small" | "large">;
|
|
1537
1528
|
};
|
|
1538
1529
|
disabled: {
|
|
1539
1530
|
type: PropType<boolean>;
|
|
@@ -1718,6 +1709,8 @@ export declare const ProForm: SFCWithInstall<{
|
|
|
1718
1709
|
|
|
1719
1710
|
export declare type ProFormInstance = InstanceType<typeof _default_2>;
|
|
1720
1711
|
|
|
1712
|
+
declare type RangePickerSlots = FieldSlot<'dateRender' | 'renderExtraFooter' | 'separator'>;
|
|
1713
|
+
|
|
1721
1714
|
export declare type Refs = {
|
|
1722
1715
|
formItemRefs: Record<string, any>;
|
|
1723
1716
|
fieldRefs: Record<string, any>;
|
|
@@ -1791,9 +1784,7 @@ export declare const SlotComponent: DefineComponent<{
|
|
|
1791
1784
|
};
|
|
1792
1785
|
}>>, {}, {}>;
|
|
1793
1786
|
|
|
1794
|
-
export declare type SlotComponentType = string | VNode | FunctionalComponent
|
|
1795
|
-
path?: string;
|
|
1796
|
-
}>;
|
|
1787
|
+
export declare type SlotComponentType = string | VNode | FunctionalComponent;
|
|
1797
1788
|
|
|
1798
1789
|
declare type SwitchSlots = FieldSlot<'checkedChildren' | 'unCheckedChildren'>;
|
|
1799
1790
|
|
package/es/style.css
CHANGED