@carefrees/form-utils-vue 0.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/README.md +3 -0
- package/assets/index.css +207 -0
- package/esm/component.d.ts +3 -0
- package/esm/component.mjs +12 -0
- package/esm/form/index.d.ts +37 -0
- package/esm/form/index.mjs +6 -0
- package/esm/form/index.vue.d.ts +19 -0
- package/esm/form/index.vue.mjs +110 -0
- package/esm/form/index.vue2.mjs +4 -0
- package/esm/formItem/form.Item.base.vue.d.ts +16 -0
- package/esm/formItem/form.Item.base.vue.mjs +114 -0
- package/esm/formItem/form.Item.base.vue2.mjs +4 -0
- package/esm/formItem/form.hide.item.vue.d.ts +16 -0
- package/esm/formItem/form.hide.item.vue.mjs +78 -0
- package/esm/formItem/form.hide.item.vue2.mjs +4 -0
- package/esm/formItem/formItem.vue.d.ts +18 -0
- package/esm/formItem/formItem.vue.mjs +102 -0
- package/esm/formItem/formItem.vue2.mjs +4 -0
- package/esm/formItem/index.d.ts +71 -0
- package/esm/formItem/index.mjs +12 -0
- package/esm/hooks/attr/attr.FormItem.d.ts +876 -0
- package/esm/hooks/attr/attr.FormItem.mjs +120 -0
- package/esm/hooks/index.d.ts +13 -0
- package/esm/hooks/register/register.FormHideItem.d.ts +9 -0
- package/esm/hooks/register/register.FormHideItem.mjs +38 -0
- package/esm/hooks/register/register.FormItem.d.ts +802 -0
- package/esm/hooks/register/register.FormItem.mjs +55 -0
- package/esm/hooks/register/register.FormList.d.ts +789 -0
- package/esm/hooks/register/register.FormList.mjs +43 -0
- package/esm/hooks/register/register.form.d.ts +3 -0
- package/esm/hooks/register/register.form.mjs +12 -0
- package/esm/hooks/useAttrs.d.ts +24 -0
- package/esm/hooks/useAttrs.mjs +45 -0
- package/esm/hooks/useEffect.d.ts +2 -0
- package/esm/hooks/useEffect.mjs +14 -0
- package/esm/hooks/useForm.d.ts +8 -0
- package/esm/hooks/useForm.mjs +26 -0
- package/esm/hooks/useFormItem.d.ts +7 -0
- package/esm/hooks/useFormItem.mjs +26 -0
- package/esm/hooks/useFormItemParentName.d.ts +18 -0
- package/esm/hooks/useFormItemParentName.mjs +37 -0
- package/esm/hooks/useFormList.d.ts +7 -0
- package/esm/hooks/useFormList.mjs +26 -0
- package/esm/hooks/useHtmlFor.d.ts +2 -0
- package/esm/hooks/useHtmlFor.mjs +11 -0
- package/esm/hooks/useMultipleForm.d.ts +7 -0
- package/esm/hooks/useMultipleForm.mjs +27 -0
- package/esm/index.d.ts +11 -0
- package/esm/index.mjs +59 -0
- package/esm/instance/ruleIntsnace.d.ts +49 -0
- package/esm/instance/ruleIntsnace.mjs +73 -0
- package/esm/interface/index.d.ts +36 -0
- package/esm/interface/layout.d.ts +28 -0
- package/esm/interface/layout.formItem.d.ts +39 -0
- package/esm/layout/index.d.ts +65 -0
- package/esm/layout/index.mjs +12 -0
- package/esm/layout/layout.form.rows.vue.d.ts +10 -0
- package/esm/layout/layout.form.rows.vue.mjs +31 -0
- package/esm/layout/layout.form.rows.vue2.mjs +4 -0
- package/esm/layout/layout.formItem.vue.d.ts +18 -0
- package/esm/layout/layout.formItem.vue.mjs +216 -0
- package/esm/layout/layout.formItem.vue2.mjs +4 -0
- package/esm/layout/layout.vue.d.ts +16 -0
- package/esm/layout/layout.vue.mjs +166 -0
- package/esm/layout/layout.vue2.mjs +4 -0
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/withInstall.d.ts +3 -0
- package/esm/utils/withInstall.mjs +22 -0
- package/lib/component.d.ts +3 -0
- package/lib/component.js +12 -0
- package/lib/form/index.d.ts +37 -0
- package/lib/form/index.js +6 -0
- package/lib/form/index.vue.d.ts +19 -0
- package/lib/form/index.vue.js +110 -0
- package/lib/form/index.vue2.js +4 -0
- package/lib/formItem/form.Item.base.vue.d.ts +16 -0
- package/lib/formItem/form.Item.base.vue.js +114 -0
- package/lib/formItem/form.Item.base.vue2.js +4 -0
- package/lib/formItem/form.hide.item.vue.d.ts +16 -0
- package/lib/formItem/form.hide.item.vue.js +78 -0
- package/lib/formItem/form.hide.item.vue2.js +4 -0
- package/lib/formItem/formItem.vue.d.ts +18 -0
- package/lib/formItem/formItem.vue.js +102 -0
- package/lib/formItem/formItem.vue2.js +4 -0
- package/lib/formItem/index.d.ts +71 -0
- package/lib/formItem/index.js +12 -0
- package/lib/hooks/attr/attr.FormItem.d.ts +876 -0
- package/lib/hooks/attr/attr.FormItem.js +120 -0
- package/lib/hooks/index.d.ts +13 -0
- package/lib/hooks/register/register.FormHideItem.d.ts +9 -0
- package/lib/hooks/register/register.FormHideItem.js +38 -0
- package/lib/hooks/register/register.FormItem.d.ts +802 -0
- package/lib/hooks/register/register.FormItem.js +55 -0
- package/lib/hooks/register/register.FormList.d.ts +789 -0
- package/lib/hooks/register/register.FormList.js +43 -0
- package/lib/hooks/register/register.form.d.ts +3 -0
- package/lib/hooks/register/register.form.js +12 -0
- package/lib/hooks/useAttrs.d.ts +24 -0
- package/lib/hooks/useAttrs.js +45 -0
- package/lib/hooks/useEffect.d.ts +2 -0
- package/lib/hooks/useEffect.js +14 -0
- package/lib/hooks/useForm.d.ts +8 -0
- package/lib/hooks/useForm.js +26 -0
- package/lib/hooks/useFormItem.d.ts +7 -0
- package/lib/hooks/useFormItem.js +26 -0
- package/lib/hooks/useFormItemParentName.d.ts +18 -0
- package/lib/hooks/useFormItemParentName.js +37 -0
- package/lib/hooks/useFormList.d.ts +7 -0
- package/lib/hooks/useFormList.js +26 -0
- package/lib/hooks/useHtmlFor.d.ts +2 -0
- package/lib/hooks/useHtmlFor.js +11 -0
- package/lib/hooks/useMultipleForm.d.ts +7 -0
- package/lib/hooks/useMultipleForm.js +27 -0
- package/lib/index.d.ts +11 -0
- package/lib/index.js +59 -0
- package/lib/instance/ruleIntsnace.d.ts +49 -0
- package/lib/instance/ruleIntsnace.js +73 -0
- package/lib/interface/index.d.ts +36 -0
- package/lib/interface/layout.d.ts +28 -0
- package/lib/interface/layout.formItem.d.ts +39 -0
- package/lib/layout/index.d.ts +65 -0
- package/lib/layout/index.js +12 -0
- package/lib/layout/layout.form.rows.vue.d.ts +10 -0
- package/lib/layout/layout.form.rows.vue.js +31 -0
- package/lib/layout/layout.form.rows.vue2.js +4 -0
- package/lib/layout/layout.formItem.vue.d.ts +18 -0
- package/lib/layout/layout.formItem.vue.js +216 -0
- package/lib/layout/layout.formItem.vue2.js +4 -0
- package/lib/layout/layout.vue.d.ts +16 -0
- package/lib/layout/layout.vue.js +166 -0
- package/lib/layout/layout.vue2.js +4 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/withInstall.d.ts +3 -0
- package/lib/utils/withInstall.js +22 -0
- package/package.json +33 -0
- package/src/component.ts +3 -0
- package/src/form/index.ts +3 -0
- package/src/form/index.vue +66 -0
- package/src/formItem/form.Item.base.vue +54 -0
- package/src/formItem/form.hide.item.vue +28 -0
- package/src/formItem/formItem.vue +38 -0
- package/src/formItem/index.ts +7 -0
- package/src/hooks/attr/attr.FormItem.tsx +170 -0
- package/src/hooks/index.ts +13 -0
- package/src/hooks/register/register.FormHideItem.ts +45 -0
- package/src/hooks/register/register.FormItem.ts +80 -0
- package/src/hooks/register/register.FormList.ts +49 -0
- package/src/hooks/register/register.form.ts +12 -0
- package/src/hooks/useAttrs.ts +66 -0
- package/src/hooks/useEffect.ts +13 -0
- package/src/hooks/useForm.ts +28 -0
- package/src/hooks/useFormItem.ts +28 -0
- package/src/hooks/useFormItemParentName.ts +49 -0
- package/src/hooks/useFormList.ts +28 -0
- package/src/hooks/useHtmlFor.ts +9 -0
- package/src/hooks/useMultipleForm.ts +29 -0
- package/src/index.ts +16 -0
- package/src/instance/ruleIntsnace.ts +105 -0
- package/src/interface/index.ts +40 -0
- package/src/interface/layout.formItem.ts +42 -0
- package/src/interface/layout.ts +29 -0
- package/src/layout/index.ts +8 -0
- package/src/layout/layout.form.rows.vue +19 -0
- package/src/layout/layout.formItem.vue +119 -0
- package/src/layout/layout.vue +97 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/withInstall.ts +28 -0
- package/src/vite-env.d.ts +1 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { defineComponent, useSlots, createBlock, openBlock, normalizeProps, mergeProps, createSlots, renderList, withCtx, renderSlot, guardReactiveProps, normalizeClass, normalizeStyle } from "vue";
|
|
2
|
+
import _sfc_main$2 from "../layout/layout.formItem.vue.mjs";
|
|
3
|
+
import _sfc_main$1 from "./form.Item.base.vue.mjs";
|
|
4
|
+
const __default__ = defineComponent({
|
|
5
|
+
name: "FormItem",
|
|
6
|
+
inheritAttrs: false
|
|
7
|
+
// 可选,防止属性自动应用到根元素
|
|
8
|
+
});
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
...__default__,
|
|
11
|
+
props: {
|
|
12
|
+
noStyle: { type: Boolean },
|
|
13
|
+
input: { type: [Object, String, Number, Boolean, null, Array] },
|
|
14
|
+
dependencies: {},
|
|
15
|
+
noticeOnlyRuleDataField: {},
|
|
16
|
+
isNoticeParentField: { type: Boolean },
|
|
17
|
+
noticeWatchField: {},
|
|
18
|
+
preserve: { type: Boolean },
|
|
19
|
+
useRules: {},
|
|
20
|
+
useAttrs: {},
|
|
21
|
+
inputAttrs: {},
|
|
22
|
+
valuePropName: {},
|
|
23
|
+
getValuePath: {},
|
|
24
|
+
getValueFromEvent: {},
|
|
25
|
+
formatValue: {},
|
|
26
|
+
onAfterUpdate: {},
|
|
27
|
+
trigger: {},
|
|
28
|
+
name: {},
|
|
29
|
+
rules: {},
|
|
30
|
+
sort: {},
|
|
31
|
+
isJoinParentField: { type: Boolean },
|
|
32
|
+
errorLayout: {},
|
|
33
|
+
required: { type: Boolean },
|
|
34
|
+
labelMode: {},
|
|
35
|
+
onlyRuleStyle: { type: Boolean },
|
|
36
|
+
label: { type: [Object, String, Number, Boolean, null, Array] },
|
|
37
|
+
helpText: { type: [Object, String, Number, Boolean, null, Array] },
|
|
38
|
+
extra: { type: [Object, String, Number, Boolean, null, Array] },
|
|
39
|
+
showColon: { type: Boolean },
|
|
40
|
+
colSpan: {},
|
|
41
|
+
rowSpan: {},
|
|
42
|
+
htmlFor: {},
|
|
43
|
+
validateResult: {},
|
|
44
|
+
style: { type: [Boolean, null, String, Object, Array] },
|
|
45
|
+
class: {},
|
|
46
|
+
labelStyle: { type: [Boolean, null, String, Object, Array] },
|
|
47
|
+
labelClass: {}
|
|
48
|
+
},
|
|
49
|
+
setup(__props) {
|
|
50
|
+
const props = __props;
|
|
51
|
+
const slots = useSlots();
|
|
52
|
+
return (_ctx, _cache) => {
|
|
53
|
+
return props.name ? (openBlock(), createBlock(
|
|
54
|
+
_sfc_main$1,
|
|
55
|
+
normalizeProps(mergeProps({ key: 0 }, props)),
|
|
56
|
+
createSlots({
|
|
57
|
+
_: 2
|
|
58
|
+
/* DYNAMIC */
|
|
59
|
+
}, [
|
|
60
|
+
renderList(slots, (_, name) => {
|
|
61
|
+
return {
|
|
62
|
+
name,
|
|
63
|
+
fn: withCtx((slotProps) => [
|
|
64
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))
|
|
65
|
+
])
|
|
66
|
+
};
|
|
67
|
+
})
|
|
68
|
+
]),
|
|
69
|
+
1040
|
|
70
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
71
|
+
)) : (openBlock(), createBlock(_sfc_main$2, {
|
|
72
|
+
key: 1,
|
|
73
|
+
label: props.label,
|
|
74
|
+
errorLayout: props.errorLayout,
|
|
75
|
+
labelMode: props.labelMode,
|
|
76
|
+
onlyRuleStyle: props.onlyRuleStyle,
|
|
77
|
+
showColon: props.showColon,
|
|
78
|
+
colSpan: props.colSpan,
|
|
79
|
+
rowSpan: props.rowSpan,
|
|
80
|
+
style: normalizeStyle(props.style),
|
|
81
|
+
class: normalizeClass(props.class),
|
|
82
|
+
labelStyle: props.labelStyle,
|
|
83
|
+
labelClass: props.labelClass
|
|
84
|
+
}, createSlots({
|
|
85
|
+
_: 2
|
|
86
|
+
/* DYNAMIC */
|
|
87
|
+
}, [
|
|
88
|
+
renderList(slots, (_, name) => {
|
|
89
|
+
return {
|
|
90
|
+
name,
|
|
91
|
+
fn: withCtx((slotProps) => [
|
|
92
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))
|
|
93
|
+
])
|
|
94
|
+
};
|
|
95
|
+
})
|
|
96
|
+
]), 1032, ["label", "errorLayout", "labelMode", "onlyRuleStyle", "showColon", "colSpan", "rowSpan", "style", "class", "labelStyle", "labelClass"]));
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
export {
|
|
101
|
+
_sfc_main as default
|
|
102
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export declare const FormItemBase: import('../utils').SFCWithInstall<{
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('..').FormItemProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
3
|
+
P: {};
|
|
4
|
+
B: {};
|
|
5
|
+
D: {};
|
|
6
|
+
C: {};
|
|
7
|
+
M: {};
|
|
8
|
+
Defaults: {};
|
|
9
|
+
}, Readonly<import('..').FormItemProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
10
|
+
__isFragment?: undefined;
|
|
11
|
+
__isTeleport?: undefined;
|
|
12
|
+
__isSuspense?: undefined;
|
|
13
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('..').FormItemProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
14
|
+
$slots: Readonly<{
|
|
15
|
+
label: (params: any) => any;
|
|
16
|
+
helpText: (params: any) => any;
|
|
17
|
+
extra: (params: any) => any;
|
|
18
|
+
}> & {
|
|
19
|
+
label: (params: any) => any;
|
|
20
|
+
helpText: (params: any) => any;
|
|
21
|
+
extra: (params: any) => any;
|
|
22
|
+
};
|
|
23
|
+
})> & Record<string, any>;
|
|
24
|
+
export declare const FormItem: import('../utils').SFCWithInstall<{
|
|
25
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<Partial<import('..').FormItemProps>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
26
|
+
P: {};
|
|
27
|
+
B: {};
|
|
28
|
+
D: {};
|
|
29
|
+
C: {};
|
|
30
|
+
M: {};
|
|
31
|
+
Defaults: {};
|
|
32
|
+
}, Readonly<Partial<import('..').FormItemProps>> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
33
|
+
__isFragment?: undefined;
|
|
34
|
+
__isTeleport?: undefined;
|
|
35
|
+
__isSuspense?: undefined;
|
|
36
|
+
} & import('vue').ComponentOptionsBase<Readonly<Partial<import('..').FormItemProps>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
37
|
+
$slots: Readonly<{
|
|
38
|
+
default: (params: any) => any;
|
|
39
|
+
label: (params: any) => any;
|
|
40
|
+
helpText: (params: any) => any;
|
|
41
|
+
extra: (params: any) => any;
|
|
42
|
+
}> & {
|
|
43
|
+
default: (params: any) => any;
|
|
44
|
+
label: (params: any) => any;
|
|
45
|
+
helpText: (params: any) => any;
|
|
46
|
+
extra: (params: any) => any;
|
|
47
|
+
};
|
|
48
|
+
})> & Record<string, any>;
|
|
49
|
+
export declare const FormHideItem: import('../utils').SFCWithInstall<{
|
|
50
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('..').FormItemProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
51
|
+
P: {};
|
|
52
|
+
B: {};
|
|
53
|
+
D: {};
|
|
54
|
+
C: {};
|
|
55
|
+
M: {};
|
|
56
|
+
Defaults: {};
|
|
57
|
+
}, Readonly<import('..').FormItemProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
58
|
+
__isFragment?: undefined;
|
|
59
|
+
__isTeleport?: undefined;
|
|
60
|
+
__isSuspense?: undefined;
|
|
61
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('..').FormItemProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
62
|
+
$slots: Readonly<{
|
|
63
|
+
label: (params: any) => any;
|
|
64
|
+
helpText: (params: any) => any;
|
|
65
|
+
extra: (params: any) => any;
|
|
66
|
+
}> & {
|
|
67
|
+
label: (params: any) => any;
|
|
68
|
+
helpText: (params: any) => any;
|
|
69
|
+
extra: (params: any) => any;
|
|
70
|
+
};
|
|
71
|
+
})> & Record<string, any>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _sfc_main from "./form.Item.base.vue.mjs";
|
|
2
|
+
import _sfc_main$1 from "./formItem.vue.mjs";
|
|
3
|
+
import _sfc_main$2 from "./form.hide.item.vue.mjs";
|
|
4
|
+
import { withInstall } from "../utils/withInstall.mjs";
|
|
5
|
+
const FormItemBase = withInstall(_sfc_main);
|
|
6
|
+
const FormItem = withInstall(_sfc_main$1);
|
|
7
|
+
const FormHideItem = withInstall(_sfc_main$2);
|
|
8
|
+
export {
|
|
9
|
+
FormHideItem,
|
|
10
|
+
FormItem,
|
|
11
|
+
FormItemBase
|
|
12
|
+
};
|