@carefrees/form-utils-vue 0.0.11 → 0.0.13
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 +104 -2
- package/assets/index.css +23 -12
- package/esm/component.js +3 -0
- package/esm/form/form.js +161 -0
- package/esm/form/form.vue.d.ts +10 -7
- package/esm/form/index.d.ts +12 -12
- package/esm/form/index.js +4 -0
- package/esm/formItem/form.Item.base.js +157 -0
- package/esm/formItem/form.Item.base.vue.d.ts +7 -8
- package/esm/formItem/form.hide.item.js +122 -0
- package/esm/formItem/form.hide.item.vue.d.ts +7 -8
- package/esm/formItem/formItem.js +151 -0
- package/esm/formItem/formItem.vue.d.ts +6 -9
- package/esm/formItem/index.d.ts +26 -37
- package/esm/formItem/index.js +8 -0
- package/esm/index.d.ts +2 -2
- package/esm/index.js +13 -0
- package/esm/interface/index.d.ts +6 -11
- package/esm/interface/index.js +0 -0
- package/esm/interface/layout.d.ts +1 -1
- package/esm/interface/layout.formItem.d.ts +1 -1
- package/esm/interface/layout.formItem.js +0 -0
- package/esm/interface/layout.js +0 -0
- package/esm/layout/index.d.ts +24 -33
- package/esm/layout/index.js +8 -0
- package/esm/layout/layout.form.rows.js +21 -0
- package/esm/layout/layout.form.rows.vue.d.ts +8 -5
- package/esm/layout/layout.formItem.js +195 -0
- package/esm/layout/layout.formItem.vue.d.ts +6 -9
- package/esm/layout/layout.js +160 -0
- package/esm/layout/layout.vue.d.ts +6 -8
- package/esm/utils/index.js +1 -0
- package/esm/utils/withInstall.d.ts +2 -2
- package/esm/utils/withInstall.js +15 -0
- package/package.json +7 -8
- package/src/form/form.vue +21 -7
- package/src/formItem/form.Item.base.vue +5 -5
- package/src/formItem/form.hide.item.vue +3 -1
- package/src/formItem/formItem.vue +2 -1
- package/src/index.ts +1 -1
- package/src/interface/index.ts +6 -13
- package/src/interface/layout.formItem.ts +1 -2
- package/src/interface/layout.ts +2 -1
- package/src/layout/layout.formItem.vue +2 -1
- package/src/layout/layout.vue +2 -1
- package/esm/component.mjs +0 -12
- package/esm/form/form.vue.mjs +0 -110
- package/esm/form/form.vue2.mjs +0 -4
- package/esm/form/index.mjs +0 -6
- package/esm/formItem/form.Item.base.vue.mjs +0 -114
- package/esm/formItem/form.Item.base.vue2.mjs +0 -4
- package/esm/formItem/form.hide.item.vue.mjs +0 -78
- package/esm/formItem/form.hide.item.vue2.mjs +0 -4
- package/esm/formItem/formItem.vue.mjs +0 -102
- package/esm/formItem/formItem.vue2.mjs +0 -4
- package/esm/formItem/index.mjs +0 -12
- package/esm/hooks/attr/attr.FormItem.d.ts +0 -97
- package/esm/hooks/attr/attr.FormItem.mjs +0 -120
- package/esm/hooks/index.d.ts +0 -13
- package/esm/hooks/register/register.FormHideItem.d.ts +0 -9
- package/esm/hooks/register/register.FormHideItem.mjs +0 -38
- package/esm/hooks/register/register.FormItem.d.ts +0 -23
- package/esm/hooks/register/register.FormItem.mjs +0 -55
- package/esm/hooks/register/register.FormList.d.ts +0 -9
- package/esm/hooks/register/register.FormList.mjs +0 -43
- package/esm/hooks/register/register.form.d.ts +0 -3
- package/esm/hooks/register/register.form.mjs +0 -12
- package/esm/hooks/useAttrs.d.ts +0 -24
- package/esm/hooks/useAttrs.mjs +0 -43
- package/esm/hooks/useEffect.d.ts +0 -2
- package/esm/hooks/useEffect.mjs +0 -14
- package/esm/hooks/useForm.d.ts +0 -8
- package/esm/hooks/useForm.mjs +0 -26
- package/esm/hooks/useFormItem.d.ts +0 -7
- package/esm/hooks/useFormItem.mjs +0 -26
- package/esm/hooks/useFormItemParentName.d.ts +0 -18
- package/esm/hooks/useFormItemParentName.mjs +0 -37
- package/esm/hooks/useFormList.d.ts +0 -7
- package/esm/hooks/useFormList.mjs +0 -26
- package/esm/hooks/useHtmlFor.d.ts +0 -2
- package/esm/hooks/useHtmlFor.mjs +0 -11
- package/esm/hooks/useMultipleForm.d.ts +0 -7
- package/esm/hooks/useMultipleForm.mjs +0 -27
- package/esm/index.mjs +0 -59
- package/esm/instance/ruleIntsnace.d.ts +0 -49
- package/esm/instance/ruleIntsnace.mjs +0 -73
- package/esm/layout/index.mjs +0 -12
- package/esm/layout/layout.form.rows.vue.mjs +0 -31
- package/esm/layout/layout.form.rows.vue2.mjs +0 -4
- package/esm/layout/layout.formItem.vue.mjs +0 -216
- package/esm/layout/layout.formItem.vue2.mjs +0 -4
- package/esm/layout/layout.vue.mjs +0 -166
- package/esm/layout/layout.vue2.mjs +0 -4
- package/esm/utils/withInstall.mjs +0 -22
- package/lib/component.d.ts +0 -3
- package/lib/component.js +0 -12
- package/lib/form/form.vue.d.ts +0 -19
- package/lib/form/form.vue.js +0 -110
- package/lib/form/form.vue2.js +0 -4
- package/lib/form/index.d.ts +0 -37
- package/lib/form/index.js +0 -6
- package/lib/formItem/form.Item.base.vue.d.ts +0 -16
- package/lib/formItem/form.Item.base.vue.js +0 -114
- package/lib/formItem/form.Item.base.vue2.js +0 -4
- package/lib/formItem/form.hide.item.vue.d.ts +0 -16
- package/lib/formItem/form.hide.item.vue.js +0 -78
- package/lib/formItem/form.hide.item.vue2.js +0 -4
- package/lib/formItem/formItem.vue.d.ts +0 -18
- package/lib/formItem/formItem.vue.js +0 -102
- package/lib/formItem/formItem.vue2.js +0 -4
- package/lib/formItem/index.d.ts +0 -71
- package/lib/formItem/index.js +0 -12
- package/lib/hooks/attr/attr.FormItem.d.ts +0 -97
- package/lib/hooks/attr/attr.FormItem.js +0 -120
- package/lib/hooks/index.d.ts +0 -13
- package/lib/hooks/register/register.FormHideItem.d.ts +0 -9
- package/lib/hooks/register/register.FormHideItem.js +0 -38
- package/lib/hooks/register/register.FormItem.d.ts +0 -23
- package/lib/hooks/register/register.FormItem.js +0 -55
- package/lib/hooks/register/register.FormList.d.ts +0 -9
- package/lib/hooks/register/register.FormList.js +0 -43
- package/lib/hooks/register/register.form.d.ts +0 -3
- package/lib/hooks/register/register.form.js +0 -12
- package/lib/hooks/useAttrs.d.ts +0 -24
- package/lib/hooks/useAttrs.js +0 -43
- package/lib/hooks/useEffect.d.ts +0 -2
- package/lib/hooks/useEffect.js +0 -14
- package/lib/hooks/useForm.d.ts +0 -8
- package/lib/hooks/useForm.js +0 -26
- package/lib/hooks/useFormItem.d.ts +0 -7
- package/lib/hooks/useFormItem.js +0 -26
- package/lib/hooks/useFormItemParentName.d.ts +0 -18
- package/lib/hooks/useFormItemParentName.js +0 -37
- package/lib/hooks/useFormList.d.ts +0 -7
- package/lib/hooks/useFormList.js +0 -26
- package/lib/hooks/useHtmlFor.d.ts +0 -2
- package/lib/hooks/useHtmlFor.js +0 -11
- package/lib/hooks/useMultipleForm.d.ts +0 -7
- package/lib/hooks/useMultipleForm.js +0 -27
- package/lib/index.d.ts +0 -11
- package/lib/index.js +0 -59
- package/lib/instance/ruleIntsnace.d.ts +0 -49
- package/lib/instance/ruleIntsnace.js +0 -73
- package/lib/interface/index.d.ts +0 -36
- package/lib/interface/layout.d.ts +0 -28
- package/lib/interface/layout.formItem.d.ts +0 -39
- package/lib/layout/index.d.ts +0 -65
- package/lib/layout/index.js +0 -12
- package/lib/layout/layout.form.rows.vue.d.ts +0 -10
- package/lib/layout/layout.form.rows.vue.js +0 -31
- package/lib/layout/layout.form.rows.vue2.js +0 -4
- package/lib/layout/layout.formItem.vue.d.ts +0 -18
- package/lib/layout/layout.formItem.vue.js +0 -216
- package/lib/layout/layout.formItem.vue2.js +0 -4
- package/lib/layout/layout.vue.d.ts +0 -16
- package/lib/layout/layout.vue.js +0 -166
- package/lib/layout/layout.vue2.js +0 -4
- package/lib/utils/index.d.ts +0 -1
- package/lib/utils/withInstall.d.ts +0 -3
- package/lib/utils/withInstall.js +0 -22
- package/src/hooks/attr/attr.FormItem.tsx +0 -174
- package/src/hooks/index.ts +0 -13
- package/src/hooks/register/register.FormHideItem.ts +0 -45
- package/src/hooks/register/register.FormItem.ts +0 -80
- package/src/hooks/register/register.FormList.ts +0 -49
- package/src/hooks/register/register.form.ts +0 -12
- package/src/hooks/useAttrs.ts +0 -64
- package/src/hooks/useEffect.ts +0 -13
- package/src/hooks/useForm.ts +0 -28
- package/src/hooks/useFormItem.ts +0 -28
- package/src/hooks/useFormItemParentName.ts +0 -49
- package/src/hooks/useFormList.ts +0 -28
- package/src/hooks/useHtmlFor.ts +0 -9
- package/src/hooks/useMultipleForm.ts +0 -29
- package/src/instance/ruleIntsnace.ts +0 -105
- package/src/vite-env.d.ts +0 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { createBlock, createCommentVNode, createSlots, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderList, renderSlot, unref, useSlots, withCtx } from "vue";
|
|
2
|
+
import form_Item_base from "./form.Item.base.js";
|
|
3
|
+
import { useRegisterFormHideItem } from "@carefrees/form-utils-vue-hooks";
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
name: "FormHideItem",
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
__name: "form.hide.item",
|
|
8
|
+
props: {
|
|
9
|
+
noStyle: {
|
|
10
|
+
type: Boolean
|
|
11
|
+
},
|
|
12
|
+
input: {},
|
|
13
|
+
dependencies: {},
|
|
14
|
+
noticeOnlyRuleDataField: {},
|
|
15
|
+
preserve: {
|
|
16
|
+
type: Boolean
|
|
17
|
+
},
|
|
18
|
+
useRules: {},
|
|
19
|
+
useAttrs: {},
|
|
20
|
+
inputAttrs: {},
|
|
21
|
+
valuePropName: {},
|
|
22
|
+
getValuePath: {},
|
|
23
|
+
getValueFromEvent: {},
|
|
24
|
+
formatValue: {},
|
|
25
|
+
onAfterUpdate: {},
|
|
26
|
+
trigger: {},
|
|
27
|
+
name: {},
|
|
28
|
+
rules: {},
|
|
29
|
+
sort: {},
|
|
30
|
+
isJoinParentField: {
|
|
31
|
+
type: Boolean
|
|
32
|
+
},
|
|
33
|
+
errorLayout: {},
|
|
34
|
+
required: {
|
|
35
|
+
type: Boolean
|
|
36
|
+
},
|
|
37
|
+
labelMode: {},
|
|
38
|
+
onlyRuleStyle: {
|
|
39
|
+
type: Boolean
|
|
40
|
+
},
|
|
41
|
+
label: {
|
|
42
|
+
type: [
|
|
43
|
+
Object,
|
|
44
|
+
String,
|
|
45
|
+
Number,
|
|
46
|
+
Boolean,
|
|
47
|
+
null,
|
|
48
|
+
Array
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
helpText: {
|
|
52
|
+
type: [
|
|
53
|
+
Object,
|
|
54
|
+
String,
|
|
55
|
+
Number,
|
|
56
|
+
Boolean,
|
|
57
|
+
null,
|
|
58
|
+
Array
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
extra: {
|
|
62
|
+
type: [
|
|
63
|
+
Object,
|
|
64
|
+
String,
|
|
65
|
+
Number,
|
|
66
|
+
Boolean,
|
|
67
|
+
null,
|
|
68
|
+
Array
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
showColon: {
|
|
72
|
+
type: Boolean
|
|
73
|
+
},
|
|
74
|
+
colSpan: {},
|
|
75
|
+
rowSpan: {},
|
|
76
|
+
htmlFor: {},
|
|
77
|
+
validateResult: {},
|
|
78
|
+
style: {
|
|
79
|
+
type: [
|
|
80
|
+
Boolean,
|
|
81
|
+
null,
|
|
82
|
+
String,
|
|
83
|
+
Object,
|
|
84
|
+
Array
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
class: {},
|
|
88
|
+
labelStyle: {
|
|
89
|
+
type: [
|
|
90
|
+
Boolean,
|
|
91
|
+
null,
|
|
92
|
+
String,
|
|
93
|
+
Object,
|
|
94
|
+
Array
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
labelClass: {}
|
|
98
|
+
},
|
|
99
|
+
setup (__props) {
|
|
100
|
+
const props = __props;
|
|
101
|
+
const slots = useSlots();
|
|
102
|
+
const { isHide } = useRegisterFormHideItem({
|
|
103
|
+
name: props.name,
|
|
104
|
+
sort: props.sort,
|
|
105
|
+
isJoinParentField: props.isJoinParentField
|
|
106
|
+
});
|
|
107
|
+
return (_ctx, _cache)=>unref(isHide) ? createCommentVNode("", true) : (openBlock(), createBlock(form_Item_base, normalizeProps(mergeProps({
|
|
108
|
+
key: 0
|
|
109
|
+
}, props)), createSlots({
|
|
110
|
+
_: 2
|
|
111
|
+
}, [
|
|
112
|
+
renderList(slots, (item, name)=>({
|
|
113
|
+
name,
|
|
114
|
+
fn: withCtx((slotProps)=>[
|
|
115
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))
|
|
116
|
+
])
|
|
117
|
+
}))
|
|
118
|
+
]), 1040));
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
const form_hide_item = _sfc_main;
|
|
122
|
+
export { form_hide_item as default };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { FormItemProps } from
|
|
2
|
-
|
|
1
|
+
import type { FormItemProps } from "../interface/index";
|
|
2
|
+
type __VLS_Slots = {
|
|
3
3
|
label: (params: any) => any;
|
|
4
|
+
default: (params: any) => any;
|
|
4
5
|
helpText: (params: any) => any;
|
|
5
6
|
extra: (params: any) => any;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
extra: (params: any) => any;
|
|
10
|
-
}>;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_component: import("vue").DefineComponent<FormItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FormItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
11
10
|
export default _default;
|
|
12
|
-
type
|
|
11
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
12
|
new (): {
|
|
14
13
|
$slots: S;
|
|
15
14
|
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { createBlock, createSlots, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, normalizeStyle, openBlock, renderList, renderSlot, useSlots, withCtx } from "vue";
|
|
2
|
+
import layout_formItem from "../layout/layout.formItem.js";
|
|
3
|
+
import form_Item_base from "./form.Item.base.js";
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
name: "FormItem",
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
__name: "formItem",
|
|
8
|
+
props: {
|
|
9
|
+
noStyle: {
|
|
10
|
+
type: Boolean
|
|
11
|
+
},
|
|
12
|
+
input: {},
|
|
13
|
+
dependencies: {},
|
|
14
|
+
noticeOnlyRuleDataField: {},
|
|
15
|
+
preserve: {
|
|
16
|
+
type: Boolean
|
|
17
|
+
},
|
|
18
|
+
useRules: {},
|
|
19
|
+
useAttrs: {},
|
|
20
|
+
inputAttrs: {},
|
|
21
|
+
valuePropName: {},
|
|
22
|
+
getValuePath: {},
|
|
23
|
+
getValueFromEvent: {},
|
|
24
|
+
formatValue: {},
|
|
25
|
+
onAfterUpdate: {},
|
|
26
|
+
trigger: {},
|
|
27
|
+
name: {},
|
|
28
|
+
rules: {},
|
|
29
|
+
sort: {},
|
|
30
|
+
isJoinParentField: {
|
|
31
|
+
type: Boolean
|
|
32
|
+
},
|
|
33
|
+
errorLayout: {},
|
|
34
|
+
required: {
|
|
35
|
+
type: Boolean
|
|
36
|
+
},
|
|
37
|
+
labelMode: {},
|
|
38
|
+
onlyRuleStyle: {
|
|
39
|
+
type: Boolean
|
|
40
|
+
},
|
|
41
|
+
label: {
|
|
42
|
+
type: [
|
|
43
|
+
Object,
|
|
44
|
+
String,
|
|
45
|
+
Number,
|
|
46
|
+
Boolean,
|
|
47
|
+
null,
|
|
48
|
+
Array
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
helpText: {
|
|
52
|
+
type: [
|
|
53
|
+
Object,
|
|
54
|
+
String,
|
|
55
|
+
Number,
|
|
56
|
+
Boolean,
|
|
57
|
+
null,
|
|
58
|
+
Array
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
extra: {
|
|
62
|
+
type: [
|
|
63
|
+
Object,
|
|
64
|
+
String,
|
|
65
|
+
Number,
|
|
66
|
+
Boolean,
|
|
67
|
+
null,
|
|
68
|
+
Array
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
showColon: {
|
|
72
|
+
type: Boolean
|
|
73
|
+
},
|
|
74
|
+
colSpan: {},
|
|
75
|
+
rowSpan: {},
|
|
76
|
+
htmlFor: {},
|
|
77
|
+
validateResult: {},
|
|
78
|
+
style: {
|
|
79
|
+
type: [
|
|
80
|
+
Boolean,
|
|
81
|
+
null,
|
|
82
|
+
String,
|
|
83
|
+
Object,
|
|
84
|
+
Array
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
class: {},
|
|
88
|
+
labelStyle: {
|
|
89
|
+
type: [
|
|
90
|
+
Boolean,
|
|
91
|
+
null,
|
|
92
|
+
String,
|
|
93
|
+
Object,
|
|
94
|
+
Array
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
labelClass: {}
|
|
98
|
+
},
|
|
99
|
+
setup (__props) {
|
|
100
|
+
const props = __props;
|
|
101
|
+
const slots = useSlots();
|
|
102
|
+
return (_ctx, _cache)=>props.name ? (openBlock(), createBlock(form_Item_base, normalizeProps(mergeProps({
|
|
103
|
+
key: 0
|
|
104
|
+
}, props)), createSlots({
|
|
105
|
+
_: 2
|
|
106
|
+
}, [
|
|
107
|
+
renderList(slots, (_, name)=>({
|
|
108
|
+
name,
|
|
109
|
+
fn: withCtx((slotProps)=>[
|
|
110
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))
|
|
111
|
+
])
|
|
112
|
+
}))
|
|
113
|
+
]), 1040)) : (openBlock(), createBlock(layout_formItem, {
|
|
114
|
+
key: 1,
|
|
115
|
+
label: props.label,
|
|
116
|
+
errorLayout: props.errorLayout,
|
|
117
|
+
labelMode: props.labelMode,
|
|
118
|
+
onlyRuleStyle: props.onlyRuleStyle,
|
|
119
|
+
showColon: props.showColon,
|
|
120
|
+
colSpan: props.colSpan,
|
|
121
|
+
rowSpan: props.rowSpan,
|
|
122
|
+
style: normalizeStyle(props.style),
|
|
123
|
+
class: normalizeClass(props.class),
|
|
124
|
+
labelStyle: props.labelStyle,
|
|
125
|
+
labelClass: props.labelClass
|
|
126
|
+
}, createSlots({
|
|
127
|
+
_: 2
|
|
128
|
+
}, [
|
|
129
|
+
renderList(slots, (_, name)=>({
|
|
130
|
+
name,
|
|
131
|
+
fn: withCtx((slotProps)=>[
|
|
132
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))
|
|
133
|
+
])
|
|
134
|
+
}))
|
|
135
|
+
]), 1032, [
|
|
136
|
+
"label",
|
|
137
|
+
"errorLayout",
|
|
138
|
+
"labelMode",
|
|
139
|
+
"onlyRuleStyle",
|
|
140
|
+
"showColon",
|
|
141
|
+
"colSpan",
|
|
142
|
+
"rowSpan",
|
|
143
|
+
"style",
|
|
144
|
+
"class",
|
|
145
|
+
"labelStyle",
|
|
146
|
+
"labelClass"
|
|
147
|
+
]));
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
const formItem = _sfc_main;
|
|
151
|
+
export { formItem as default };
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { FormItemProps } from
|
|
2
|
-
|
|
1
|
+
import type { FormItemProps } from "../interface/index";
|
|
2
|
+
type __VLS_Slots = {
|
|
3
3
|
default: (params: any) => any;
|
|
4
4
|
label: (params: any) => any;
|
|
5
5
|
helpText: (params: any) => any;
|
|
6
6
|
extra: (params: any) => any;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
helpText: (params: any) => any;
|
|
11
|
-
extra: (params: any) => any;
|
|
12
|
-
}>;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_component: import("vue").DefineComponent<Partial<FormItemProps>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Partial<FormItemProps>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
13
10
|
export default _default;
|
|
14
|
-
type
|
|
11
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
12
|
new (): {
|
|
16
13
|
$slots: S;
|
|
17
14
|
};
|
package/esm/formItem/index.d.ts
CHANGED
|
@@ -1,70 +1,59 @@
|
|
|
1
|
-
export declare const FormItemBase: import(
|
|
2
|
-
new (...args: any[]): import(
|
|
1
|
+
export declare const FormItemBase: import("../utils").SFCWithInstall<{
|
|
2
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").FormItemProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
3
3
|
P: {};
|
|
4
4
|
B: {};
|
|
5
5
|
D: {};
|
|
6
6
|
C: {};
|
|
7
7
|
M: {};
|
|
8
8
|
Defaults: {};
|
|
9
|
-
}, Readonly<import(
|
|
10
|
-
__isFragment?:
|
|
11
|
-
__isTeleport?:
|
|
12
|
-
__isSuspense?:
|
|
13
|
-
} & import(
|
|
14
|
-
$slots:
|
|
15
|
-
label: (params: any) => any;
|
|
16
|
-
helpText: (params: any) => any;
|
|
17
|
-
extra: (params: any) => any;
|
|
18
|
-
}> & {
|
|
9
|
+
}, Readonly<import("../index.js").FormItemProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
10
|
+
__isFragment?: never;
|
|
11
|
+
__isTeleport?: never;
|
|
12
|
+
__isSuspense?: never;
|
|
13
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").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: {
|
|
19
15
|
label: (params: any) => any;
|
|
16
|
+
default: (params: any) => any;
|
|
20
17
|
helpText: (params: any) => any;
|
|
21
18
|
extra: (params: any) => any;
|
|
22
19
|
};
|
|
23
20
|
})> & Record<string, any>;
|
|
24
|
-
export declare const FormItem: import(
|
|
25
|
-
new (...args: any[]): import(
|
|
21
|
+
export declare const FormItem: import("../utils").SFCWithInstall<{
|
|
22
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<Partial<import("../index.js").FormItemProps>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
26
23
|
P: {};
|
|
27
24
|
B: {};
|
|
28
25
|
D: {};
|
|
29
26
|
C: {};
|
|
30
27
|
M: {};
|
|
31
28
|
Defaults: {};
|
|
32
|
-
}, Readonly<Partial<import(
|
|
33
|
-
__isFragment?:
|
|
34
|
-
__isTeleport?:
|
|
35
|
-
__isSuspense?:
|
|
36
|
-
} & import(
|
|
37
|
-
$slots:
|
|
38
|
-
default: (params: any) => any;
|
|
39
|
-
label: (params: any) => any;
|
|
40
|
-
helpText: (params: any) => any;
|
|
41
|
-
extra: (params: any) => any;
|
|
42
|
-
}> & {
|
|
29
|
+
}, Readonly<Partial<import("../index.js").FormItemProps>> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
30
|
+
__isFragment?: never;
|
|
31
|
+
__isTeleport?: never;
|
|
32
|
+
__isSuspense?: never;
|
|
33
|
+
} & import("vue").ComponentOptionsBase<Readonly<Partial<import("../index.js").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 () => {
|
|
34
|
+
$slots: {
|
|
43
35
|
default: (params: any) => any;
|
|
44
36
|
label: (params: any) => any;
|
|
45
37
|
helpText: (params: any) => any;
|
|
46
38
|
extra: (params: any) => any;
|
|
47
39
|
};
|
|
48
40
|
})> & Record<string, any>;
|
|
49
|
-
export declare const FormHideItem: import(
|
|
50
|
-
new (...args: any[]): import(
|
|
41
|
+
export declare const FormHideItem: import("../utils").SFCWithInstall<{
|
|
42
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").FormItemProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
51
43
|
P: {};
|
|
52
44
|
B: {};
|
|
53
45
|
D: {};
|
|
54
46
|
C: {};
|
|
55
47
|
M: {};
|
|
56
48
|
Defaults: {};
|
|
57
|
-
}, Readonly<import(
|
|
58
|
-
__isFragment?:
|
|
59
|
-
__isTeleport?:
|
|
60
|
-
__isSuspense?:
|
|
61
|
-
} & import(
|
|
62
|
-
$slots:
|
|
63
|
-
label: (params: any) => any;
|
|
64
|
-
helpText: (params: any) => any;
|
|
65
|
-
extra: (params: any) => any;
|
|
66
|
-
}> & {
|
|
49
|
+
}, Readonly<import("../index.js").FormItemProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
50
|
+
__isFragment?: never;
|
|
51
|
+
__isTeleport?: never;
|
|
52
|
+
__isSuspense?: never;
|
|
53
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").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 () => {
|
|
54
|
+
$slots: {
|
|
67
55
|
label: (params: any) => any;
|
|
56
|
+
default: (params: any) => any;
|
|
68
57
|
helpText: (params: any) => any;
|
|
69
58
|
extra: (params: any) => any;
|
|
70
59
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import form_Item_base from "./form.Item.base.js";
|
|
2
|
+
import formItem from "./formItem.js";
|
|
3
|
+
import form_hide_item from "./form.hide.item.js";
|
|
4
|
+
import { withInstall } from "../utils/index.js";
|
|
5
|
+
const FormItemBase = withInstall(form_Item_base);
|
|
6
|
+
const FormItem = withInstall(formItem);
|
|
7
|
+
const FormHideItem = withInstall(form_hide_item);
|
|
8
|
+
export { FormHideItem, FormItem, FormItemBase };
|
package/esm/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './hooks';
|
|
1
|
+
export * from '@carefrees/form-utils-vue-hooks';
|
|
3
2
|
export * from './component';
|
|
4
3
|
export * from './utils';
|
|
5
4
|
export * from './interface';
|
|
6
5
|
export * from './interface/layout';
|
|
7
6
|
export * from './interface/layout.formItem';
|
|
7
|
+
import { App } from 'vue';
|
|
8
8
|
declare const _default: {
|
|
9
9
|
install: (app: App) => void;
|
|
10
10
|
};
|
package/esm/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "@carefrees/form-utils-vue-hooks";
|
|
2
|
+
export * from "./component.js";
|
|
3
|
+
export * from "./utils/index.js";
|
|
4
|
+
export * from "./interface/index.js";
|
|
5
|
+
export * from "./interface/layout.js";
|
|
6
|
+
export * from "./interface/layout.formItem.js";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__component_js_7f599402__ from "./component.js";
|
|
8
|
+
const src = {
|
|
9
|
+
install: (app)=>{
|
|
10
|
+
for(const c in __WEBPACK_EXTERNAL_MODULE__component_js_7f599402__)app.use(__WEBPACK_EXTERNAL_MODULE__component_js_7f599402__[c]);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export { src as default };
|
package/esm/interface/index.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FormItemAttrOptions } from '../hooks/attr/attr.FormItem';
|
|
1
|
+
import { Component, StyleValue, UnwrapNestedRefs } from 'vue';
|
|
3
2
|
import { LayoutFormItemProps } from './layout.formItem';
|
|
4
3
|
import { FormLayoutProps } from './layout';
|
|
5
|
-
import { FormInstanceBase, ValidateErrorEntity } from '@carefrees/form-utils';
|
|
6
|
-
export type ComputedRefBase<T> = ComputedRef<T> | Ref<T>;
|
|
7
|
-
export type PartialComputedRefs<T> = {
|
|
8
|
-
[K in keyof T]: ComputedRefBase<T[K]>;
|
|
9
|
-
};
|
|
4
|
+
import type { FormInstanceBase, ValidateErrorEntity, FormItemAttrOptions } from '@carefrees/form-utils-vue-hooks';
|
|
10
5
|
export interface FormItemProps extends FormItemAttrOptions, LayoutFormItemProps {
|
|
11
6
|
/**不进行样式渲染*/
|
|
12
7
|
noStyle?: boolean;
|
|
@@ -14,13 +9,13 @@ export interface FormItemProps extends FormItemAttrOptions, LayoutFormItemProps
|
|
|
14
9
|
input?: Component | string;
|
|
15
10
|
}
|
|
16
11
|
export interface FormProps<T = any> extends FormLayoutProps {
|
|
17
|
-
form?: FormInstanceBase
|
|
12
|
+
form?: FormInstanceBase<T>;
|
|
18
13
|
style?: StyleValue;
|
|
19
14
|
class?: string;
|
|
20
15
|
layoutClass?: string;
|
|
21
16
|
layoutStyle?: StyleValue;
|
|
22
17
|
/**表单数据*/
|
|
23
|
-
formData?:
|
|
18
|
+
formData?: Object;
|
|
24
19
|
/**值更新触发*/
|
|
25
20
|
onValuesChange?: (changedValues: Partial<T>, values: UnwrapNestedRefs<T>) => void;
|
|
26
21
|
/**提交保存 验证成功*/
|
|
@@ -31,6 +26,6 @@ export interface FormProps<T = any> extends FormLayoutProps {
|
|
|
31
26
|
hideData?: Record<string, boolean>;
|
|
32
27
|
/**表单名称*/
|
|
33
28
|
name?: string;
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
/**背景颜色*/
|
|
30
|
+
bgcolor?: string;
|
|
36
31
|
}
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VNodeChild, StyleValue } from 'vue';
|
|
2
|
-
import { ComputedRefBase } from '
|
|
2
|
+
import type { ComputedRefBase } from '@carefrees/form-utils-vue-hooks';
|
|
3
3
|
export interface LayoutFormItemProps {
|
|
4
4
|
/**规则校验失败错误提示位置*/
|
|
5
5
|
errorLayout?: 'left-bottom' | 'right-bottom' | 'top-right' | 'top-left';
|
|
File without changes
|
|
File without changes
|
package/esm/layout/index.d.ts
CHANGED
|
@@ -1,65 +1,56 @@
|
|
|
1
|
-
export declare const Layout: import(
|
|
2
|
-
new (...args: any[]): import(
|
|
1
|
+
export declare const Layout: import("../utils").SFCWithInstall<{
|
|
2
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").FormLayoutProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
3
3
|
P: {};
|
|
4
4
|
B: {};
|
|
5
5
|
D: {};
|
|
6
6
|
C: {};
|
|
7
7
|
M: {};
|
|
8
8
|
Defaults: {};
|
|
9
|
-
}, Readonly<import(
|
|
10
|
-
__isFragment?:
|
|
11
|
-
__isTeleport?:
|
|
12
|
-
__isSuspense?:
|
|
13
|
-
} & import(
|
|
14
|
-
$slots:
|
|
15
|
-
default: any;
|
|
16
|
-
title: any;
|
|
17
|
-
extra: any;
|
|
18
|
-
}> & {
|
|
9
|
+
}, Readonly<import("../index.js").FormLayoutProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
10
|
+
__isFragment?: never;
|
|
11
|
+
__isTeleport?: never;
|
|
12
|
+
__isSuspense?: never;
|
|
13
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").FormLayoutProps> & 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: {
|
|
19
15
|
default: any;
|
|
20
16
|
title: any;
|
|
21
17
|
extra: any;
|
|
22
18
|
};
|
|
23
19
|
})> & Record<string, any>;
|
|
24
|
-
export declare const LayoutFormItem: import(
|
|
25
|
-
new (...args: any[]): import(
|
|
20
|
+
export declare const LayoutFormItem: import("../utils").SFCWithInstall<{
|
|
21
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../index.js").LayoutFormItemProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
26
22
|
P: {};
|
|
27
23
|
B: {};
|
|
28
24
|
D: {};
|
|
29
25
|
C: {};
|
|
30
26
|
M: {};
|
|
31
27
|
Defaults: {};
|
|
32
|
-
}, Readonly<import(
|
|
33
|
-
__isFragment?:
|
|
34
|
-
__isTeleport?:
|
|
35
|
-
__isSuspense?:
|
|
36
|
-
} & import(
|
|
37
|
-
$slots:
|
|
38
|
-
default: any;
|
|
39
|
-
label: any;
|
|
40
|
-
helpText: any;
|
|
41
|
-
extra: any;
|
|
42
|
-
}> & {
|
|
28
|
+
}, Readonly<import("../index.js").LayoutFormItemProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
29
|
+
__isFragment?: never;
|
|
30
|
+
__isTeleport?: never;
|
|
31
|
+
__isSuspense?: never;
|
|
32
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("../index.js").LayoutFormItemProps> & 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 () => {
|
|
33
|
+
$slots: {
|
|
43
34
|
default: any;
|
|
44
35
|
label: any;
|
|
45
36
|
helpText: any;
|
|
46
37
|
extra: any;
|
|
47
38
|
};
|
|
48
39
|
})> & Record<string, any>;
|
|
49
|
-
export declare const FormLayoutRows: import(
|
|
50
|
-
new (...args: any[]): import(
|
|
40
|
+
export declare const FormLayoutRows: import("../utils").SFCWithInstall<{
|
|
41
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").HTMLAttributes> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
51
42
|
P: {};
|
|
52
43
|
B: {};
|
|
53
44
|
D: {};
|
|
54
45
|
C: {};
|
|
55
46
|
M: {};
|
|
56
47
|
Defaults: {};
|
|
57
|
-
}, Readonly<import(
|
|
58
|
-
__isFragment?:
|
|
59
|
-
__isTeleport?:
|
|
60
|
-
__isSuspense?:
|
|
61
|
-
} & import(
|
|
48
|
+
}, Readonly<import("vue").HTMLAttributes> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
49
|
+
__isFragment?: never;
|
|
50
|
+
__isTeleport?: never;
|
|
51
|
+
__isSuspense?: never;
|
|
52
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").HTMLAttributes> & 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
53
|
$slots: {
|
|
63
|
-
default
|
|
54
|
+
default?: (props: {}) => any;
|
|
64
55
|
};
|
|
65
56
|
})> & Record<string, any>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import layout from "./layout.js";
|
|
2
|
+
import layout_formItem from "./layout.formItem.js";
|
|
3
|
+
import layout_form_rows from "./layout.form.rows.js";
|
|
4
|
+
import { withInstall } from "../utils/index.js";
|
|
5
|
+
const Layout = withInstall(layout);
|
|
6
|
+
const LayoutFormItem = withInstall(layout_formItem);
|
|
7
|
+
const FormLayoutRows = withInstall(layout_form_rows);
|
|
8
|
+
export { FormLayoutRows, Layout, LayoutFormItem };
|