@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,19 @@
|
|
|
1
|
+
import { FormProps } from '../interface/index';
|
|
2
|
+
type __VLS_Props = FormProps;
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
4
|
+
finish: (...args: any[]) => void;
|
|
5
|
+
valuesChange: (...args: any[]) => void;
|
|
6
|
+
finishFailed: (...args: any[]) => void;
|
|
7
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onFinish?: ((...args: any[]) => any) | undefined;
|
|
9
|
+
onValuesChange?: ((...args: any[]) => any) | undefined;
|
|
10
|
+
onFinishFailed?: ((...args: any[]) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
12
|
+
default?(_: {}): any;
|
|
13
|
+
}>;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const register_form = require("../hooks/register/register.form.js");
|
|
5
|
+
const useForm = require("../hooks/useForm.js");
|
|
6
|
+
const layout_vue_vue_type_script_setup_true_lang = require("../layout/layout.vue.js");
|
|
7
|
+
const clx = require("classnames");
|
|
8
|
+
const __default__ = vue.defineComponent({
|
|
9
|
+
name: "Form",
|
|
10
|
+
inheritAttrs: false
|
|
11
|
+
// 可选,防止属性自动应用到根元素
|
|
12
|
+
});
|
|
13
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
14
|
+
...__default__,
|
|
15
|
+
props: {
|
|
16
|
+
form: {},
|
|
17
|
+
style: { type: [Boolean, null, String, Object, Array] },
|
|
18
|
+
class: {},
|
|
19
|
+
layoutClass: {},
|
|
20
|
+
layoutStyle: { type: [Boolean, null, String, Object, Array] },
|
|
21
|
+
formData: {},
|
|
22
|
+
onValuesChange: {},
|
|
23
|
+
onFinish: {},
|
|
24
|
+
onFinishFailed: {},
|
|
25
|
+
hideData: {},
|
|
26
|
+
name: {},
|
|
27
|
+
hideRuleData: {},
|
|
28
|
+
title: { type: [Object, String, Number, Boolean, null, Array] },
|
|
29
|
+
extra: { type: [Object, String, Number, Boolean, null, Array] },
|
|
30
|
+
isAllColSpan: { type: Boolean },
|
|
31
|
+
headerClass: {},
|
|
32
|
+
bodyClass: {},
|
|
33
|
+
headerStyle: { type: [Boolean, null, String, Object, Array] },
|
|
34
|
+
bodyStyle: { type: [Boolean, null, String, Object, Array] },
|
|
35
|
+
bordered: { type: Boolean },
|
|
36
|
+
colCount: {},
|
|
37
|
+
gap: {},
|
|
38
|
+
errorLayout: {},
|
|
39
|
+
labelMode: {},
|
|
40
|
+
showColon: {},
|
|
41
|
+
formItemClass: {},
|
|
42
|
+
formItemStyle: {},
|
|
43
|
+
formItemLabelClass: {},
|
|
44
|
+
formItemLabelStyle: {}
|
|
45
|
+
},
|
|
46
|
+
emits: ["finish", "valuesChange", "finishFailed"],
|
|
47
|
+
setup(__props, { emit: __emit }) {
|
|
48
|
+
const props = __props;
|
|
49
|
+
const {
|
|
50
|
+
form,
|
|
51
|
+
style,
|
|
52
|
+
formData,
|
|
53
|
+
hideData,
|
|
54
|
+
hideRuleData,
|
|
55
|
+
name,
|
|
56
|
+
onFinish,
|
|
57
|
+
onFinishFailed,
|
|
58
|
+
onValuesChange,
|
|
59
|
+
layoutStyle,
|
|
60
|
+
layoutClass,
|
|
61
|
+
...rest
|
|
62
|
+
} = props;
|
|
63
|
+
const cls = vue.computed(() => clx("carefrees-form", props.class));
|
|
64
|
+
const formInstance = useForm.useForm(props.form);
|
|
65
|
+
formInstance.value.ctor(vue.reactive(props.formData || {}), vue.reactive(props.hideData || {}), vue.reactive(props.hideRuleData || {}));
|
|
66
|
+
const emits = __emit;
|
|
67
|
+
formInstance.value.onFinish = (...rest2) => {
|
|
68
|
+
emits("finish", ...rest2);
|
|
69
|
+
};
|
|
70
|
+
formInstance.value.onValuesChange = (...rest2) => {
|
|
71
|
+
emits("valuesChange", ...rest2);
|
|
72
|
+
};
|
|
73
|
+
formInstance.value.onFinishFailed = (...rest2) => {
|
|
74
|
+
emits("finishFailed", ...rest2);
|
|
75
|
+
};
|
|
76
|
+
register_form.useRegisterForm(formInstance.value, props.name);
|
|
77
|
+
const onSubmit = (event) => {
|
|
78
|
+
var _a, _b, _c, _d;
|
|
79
|
+
(_a = event == null ? void 0 : event.preventDefault) == null ? void 0 : _a.call(event);
|
|
80
|
+
(_b = event == null ? void 0 : event.stopPropagation) == null ? void 0 : _b.call(event);
|
|
81
|
+
(_d = (_c = formInstance.value).submit) == null ? void 0 : _d.call(_c);
|
|
82
|
+
};
|
|
83
|
+
useForm.useFormProvide(formInstance.value);
|
|
84
|
+
return (_ctx, _cache) => {
|
|
85
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
86
|
+
"form",
|
|
87
|
+
{
|
|
88
|
+
class: vue.normalizeClass(cls.value),
|
|
89
|
+
style: vue.normalizeStyle(vue.unref(style)),
|
|
90
|
+
onSubmit
|
|
91
|
+
},
|
|
92
|
+
[
|
|
93
|
+
vue.createVNode(layout_vue_vue_type_script_setup_true_lang.default, vue.mergeProps(rest, {
|
|
94
|
+
class: vue.unref(layoutClass),
|
|
95
|
+
style: vue.unref(layoutStyle)
|
|
96
|
+
}), {
|
|
97
|
+
default: vue.withCtx(() => [
|
|
98
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
99
|
+
]),
|
|
100
|
+
_: 3
|
|
101
|
+
/* FORWARDED */
|
|
102
|
+
}, 16, ["class", "style"])
|
|
103
|
+
],
|
|
104
|
+
38
|
|
105
|
+
/* CLASS, STYLE, NEED_HYDRATION */
|
|
106
|
+
);
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const index_vue_vue_type_script_setup_true_lang = require("./index.vue.js");
|
|
4
|
+
exports.default = index_vue_vue_type_script_setup_true_lang.default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FormItemProps } from '../interface/index';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<FormItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FormItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, Readonly<{
|
|
3
|
+
label: (params: any) => any;
|
|
4
|
+
helpText: (params: any) => any;
|
|
5
|
+
extra: (params: any) => any;
|
|
6
|
+
}> & {
|
|
7
|
+
label: (params: any) => any;
|
|
8
|
+
helpText: (params: any) => any;
|
|
9
|
+
extra: (params: any) => any;
|
|
10
|
+
}>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const attr_FormItem = require("../hooks/attr/attr.FormItem.js");
|
|
5
|
+
const layout_formItem_vue_vue_type_script_setup_true_lang = require("../layout/layout.formItem.vue.js");
|
|
6
|
+
const useFormItemParentName = require("../hooks/useFormItemParentName.js");
|
|
7
|
+
const __default__ = vue.defineComponent({
|
|
8
|
+
name: "FormItemBase",
|
|
9
|
+
inheritAttrs: false
|
|
10
|
+
// 可选,防止属性自动应用到根元素
|
|
11
|
+
});
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
13
|
+
...__default__,
|
|
14
|
+
props: {
|
|
15
|
+
noStyle: { type: Boolean },
|
|
16
|
+
input: { type: [Object, String, Number, Boolean, null, Array] },
|
|
17
|
+
dependencies: {},
|
|
18
|
+
noticeOnlyRuleDataField: {},
|
|
19
|
+
isNoticeParentField: { type: Boolean },
|
|
20
|
+
noticeWatchField: {},
|
|
21
|
+
preserve: { type: Boolean },
|
|
22
|
+
useRules: {},
|
|
23
|
+
useAttrs: {},
|
|
24
|
+
inputAttrs: {},
|
|
25
|
+
valuePropName: {},
|
|
26
|
+
getValuePath: {},
|
|
27
|
+
getValueFromEvent: {},
|
|
28
|
+
formatValue: {},
|
|
29
|
+
onAfterUpdate: {},
|
|
30
|
+
trigger: {},
|
|
31
|
+
name: {},
|
|
32
|
+
rules: {},
|
|
33
|
+
sort: {},
|
|
34
|
+
isJoinParentField: { type: Boolean },
|
|
35
|
+
errorLayout: {},
|
|
36
|
+
required: { type: Boolean },
|
|
37
|
+
labelMode: {},
|
|
38
|
+
onlyRuleStyle: { type: Boolean },
|
|
39
|
+
label: { type: [Object, String, Number, Boolean, null, Array] },
|
|
40
|
+
helpText: { type: [Object, String, Number, Boolean, null, Array] },
|
|
41
|
+
extra: { type: [Object, String, Number, Boolean, null, Array] },
|
|
42
|
+
showColon: { type: Boolean },
|
|
43
|
+
colSpan: {},
|
|
44
|
+
rowSpan: {},
|
|
45
|
+
htmlFor: {},
|
|
46
|
+
validateResult: {},
|
|
47
|
+
style: { type: [Boolean, null, String, Object, Array] },
|
|
48
|
+
class: {},
|
|
49
|
+
labelStyle: { type: [Boolean, null, String, Object, Array] },
|
|
50
|
+
labelClass: {}
|
|
51
|
+
},
|
|
52
|
+
setup(__props) {
|
|
53
|
+
const props = __props;
|
|
54
|
+
const formAttrs = attr_FormItem.useFormItemAttr(props);
|
|
55
|
+
useFormItemParentName.useFormItemParentNameProvide({
|
|
56
|
+
name: formAttrs.newName,
|
|
57
|
+
sort: formAttrs.newSort
|
|
58
|
+
});
|
|
59
|
+
const slots = vue.useSlots();
|
|
60
|
+
const isRequired = vue.computed(() => {
|
|
61
|
+
var _a, _b, _c;
|
|
62
|
+
return !!props.required || !!((_c = vue.toValue((_b = (_a = formAttrs.ruleInstance) == null ? void 0 : _a.value) == null ? void 0 : _b.rules) || []) == null ? void 0 : _c.find((item) => {
|
|
63
|
+
return item.required;
|
|
64
|
+
}));
|
|
65
|
+
});
|
|
66
|
+
return (_ctx, _cache) => {
|
|
67
|
+
return props.noStyle ? (vue.openBlock(), vue.createBlock(
|
|
68
|
+
vue.resolveDynamicComponent(props.input),
|
|
69
|
+
vue.normalizeProps(vue.mergeProps({ key: 0 }, vue.toValue(vue.unref(formAttrs).attrsLastData))),
|
|
70
|
+
null,
|
|
71
|
+
16
|
|
72
|
+
/* FULL_PROPS */
|
|
73
|
+
)) : (vue.openBlock(), vue.createBlock(layout_formItem_vue_vue_type_script_setup_true_lang.default, {
|
|
74
|
+
key: 1,
|
|
75
|
+
label: props.label,
|
|
76
|
+
required: isRequired.value,
|
|
77
|
+
"error-layout": props.errorLayout,
|
|
78
|
+
"label-mode": props.labelMode,
|
|
79
|
+
"only-rule-style": props.onlyRuleStyle,
|
|
80
|
+
"show-colon": props.showColon,
|
|
81
|
+
"col-span": props.colSpan,
|
|
82
|
+
"row-span": props.rowSpan,
|
|
83
|
+
"html-for": vue.unref(formAttrs).htmlFor,
|
|
84
|
+
style: vue.normalizeStyle(props.style),
|
|
85
|
+
class: vue.normalizeClass(props.class),
|
|
86
|
+
"label-style": props.labelStyle,
|
|
87
|
+
"label-class": props.labelClass,
|
|
88
|
+
"validate-result": vue.unref(formAttrs).validateResult
|
|
89
|
+
}, vue.createSlots({
|
|
90
|
+
default: vue.withCtx(() => [
|
|
91
|
+
(vue.openBlock(), vue.createBlock(
|
|
92
|
+
vue.resolveDynamicComponent(props.input),
|
|
93
|
+
vue.normalizeProps(vue.guardReactiveProps(vue.toValue(vue.unref(formAttrs).attrsLastData))),
|
|
94
|
+
null,
|
|
95
|
+
16
|
|
96
|
+
/* FULL_PROPS */
|
|
97
|
+
))
|
|
98
|
+
]),
|
|
99
|
+
_: 2
|
|
100
|
+
/* DYNAMIC */
|
|
101
|
+
}, [
|
|
102
|
+
vue.renderList(slots, (item, name) => {
|
|
103
|
+
return {
|
|
104
|
+
name,
|
|
105
|
+
fn: vue.withCtx((slotProps) => [
|
|
106
|
+
vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(slotProps)))
|
|
107
|
+
])
|
|
108
|
+
};
|
|
109
|
+
})
|
|
110
|
+
]), 1032, ["label", "required", "error-layout", "label-mode", "only-rule-style", "show-colon", "col-span", "row-span", "html-for", "style", "class", "label-style", "label-class", "validate-result"]));
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const form_Item_base_vue_vue_type_script_setup_true_lang = require("./form.Item.base.vue.js");
|
|
4
|
+
exports.default = form_Item_base_vue_vue_type_script_setup_true_lang.default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FormItemProps } from '../interface/index';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<FormItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FormItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, Readonly<{
|
|
3
|
+
label: (params: any) => any;
|
|
4
|
+
helpText: (params: any) => any;
|
|
5
|
+
extra: (params: any) => any;
|
|
6
|
+
}> & {
|
|
7
|
+
label: (params: any) => any;
|
|
8
|
+
helpText: (params: any) => any;
|
|
9
|
+
extra: (params: any) => any;
|
|
10
|
+
}>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const form_Item_base_vue_vue_type_script_setup_true_lang = require("./form.Item.base.vue.js");
|
|
5
|
+
const register_FormHideItem = require("../hooks/register/register.FormHideItem.js");
|
|
6
|
+
const __default__ = vue.defineComponent({
|
|
7
|
+
name: "FormHideItem",
|
|
8
|
+
inheritAttrs: false
|
|
9
|
+
// 可选,防止属性自动应用到根元素
|
|
10
|
+
});
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
12
|
+
...__default__,
|
|
13
|
+
props: {
|
|
14
|
+
noStyle: { type: Boolean },
|
|
15
|
+
input: { type: [Object, String, Number, Boolean, null, Array] },
|
|
16
|
+
dependencies: {},
|
|
17
|
+
noticeOnlyRuleDataField: {},
|
|
18
|
+
isNoticeParentField: { type: Boolean },
|
|
19
|
+
noticeWatchField: {},
|
|
20
|
+
preserve: { type: Boolean },
|
|
21
|
+
useRules: {},
|
|
22
|
+
useAttrs: {},
|
|
23
|
+
inputAttrs: {},
|
|
24
|
+
valuePropName: {},
|
|
25
|
+
getValuePath: {},
|
|
26
|
+
getValueFromEvent: {},
|
|
27
|
+
formatValue: {},
|
|
28
|
+
onAfterUpdate: {},
|
|
29
|
+
trigger: {},
|
|
30
|
+
name: {},
|
|
31
|
+
rules: {},
|
|
32
|
+
sort: {},
|
|
33
|
+
isJoinParentField: { type: Boolean },
|
|
34
|
+
errorLayout: {},
|
|
35
|
+
required: { type: Boolean },
|
|
36
|
+
labelMode: {},
|
|
37
|
+
onlyRuleStyle: { type: Boolean },
|
|
38
|
+
label: { type: [Object, String, Number, Boolean, null, Array] },
|
|
39
|
+
helpText: { type: [Object, String, Number, Boolean, null, Array] },
|
|
40
|
+
extra: { type: [Object, String, Number, Boolean, null, Array] },
|
|
41
|
+
showColon: { type: Boolean },
|
|
42
|
+
colSpan: {},
|
|
43
|
+
rowSpan: {},
|
|
44
|
+
htmlFor: {},
|
|
45
|
+
validateResult: {},
|
|
46
|
+
style: { type: [Boolean, null, String, Object, Array] },
|
|
47
|
+
class: {},
|
|
48
|
+
labelStyle: { type: [Boolean, null, String, Object, Array] },
|
|
49
|
+
labelClass: {}
|
|
50
|
+
},
|
|
51
|
+
setup(__props) {
|
|
52
|
+
const props = __props;
|
|
53
|
+
const slots = vue.useSlots();
|
|
54
|
+
const { isHide } = register_FormHideItem.useRegisterFormHideItem({ name: props.name, sort: props.sort, isJoinParentField: props.isJoinParentField });
|
|
55
|
+
return (_ctx, _cache) => {
|
|
56
|
+
return !vue.unref(isHide) ? (vue.openBlock(), vue.createBlock(
|
|
57
|
+
form_Item_base_vue_vue_type_script_setup_true_lang.default,
|
|
58
|
+
vue.normalizeProps(vue.mergeProps({ key: 0 }, props)),
|
|
59
|
+
vue.createSlots({
|
|
60
|
+
_: 2
|
|
61
|
+
/* DYNAMIC */
|
|
62
|
+
}, [
|
|
63
|
+
vue.renderList(slots, (item, name) => {
|
|
64
|
+
return {
|
|
65
|
+
name,
|
|
66
|
+
fn: vue.withCtx((slotProps) => [
|
|
67
|
+
vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(slotProps)))
|
|
68
|
+
])
|
|
69
|
+
};
|
|
70
|
+
})
|
|
71
|
+
]),
|
|
72
|
+
1040
|
|
73
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
74
|
+
)) : vue.createCommentVNode("v-if", true);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const form_hide_item_vue_vue_type_script_setup_true_lang = require("./form.hide.item.vue.js");
|
|
4
|
+
exports.default = form_hide_item_vue_vue_type_script_setup_true_lang.default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormItemProps } from '../interface/index';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<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>, Readonly<{
|
|
3
|
+
default: (params: any) => any;
|
|
4
|
+
label: (params: any) => any;
|
|
5
|
+
helpText: (params: any) => any;
|
|
6
|
+
extra: (params: any) => any;
|
|
7
|
+
}> & {
|
|
8
|
+
default: (params: any) => any;
|
|
9
|
+
label: (params: any) => any;
|
|
10
|
+
helpText: (params: any) => any;
|
|
11
|
+
extra: (params: any) => any;
|
|
12
|
+
}>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const layout_formItem_vue_vue_type_script_setup_true_lang = require("../layout/layout.formItem.vue.js");
|
|
5
|
+
const form_Item_base_vue_vue_type_script_setup_true_lang = require("./form.Item.base.vue.js");
|
|
6
|
+
const __default__ = vue.defineComponent({
|
|
7
|
+
name: "FormItem",
|
|
8
|
+
inheritAttrs: false
|
|
9
|
+
// 可选,防止属性自动应用到根元素
|
|
10
|
+
});
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
12
|
+
...__default__,
|
|
13
|
+
props: {
|
|
14
|
+
noStyle: { type: Boolean },
|
|
15
|
+
input: { type: [Object, String, Number, Boolean, null, Array] },
|
|
16
|
+
dependencies: {},
|
|
17
|
+
noticeOnlyRuleDataField: {},
|
|
18
|
+
isNoticeParentField: { type: Boolean },
|
|
19
|
+
noticeWatchField: {},
|
|
20
|
+
preserve: { type: Boolean },
|
|
21
|
+
useRules: {},
|
|
22
|
+
useAttrs: {},
|
|
23
|
+
inputAttrs: {},
|
|
24
|
+
valuePropName: {},
|
|
25
|
+
getValuePath: {},
|
|
26
|
+
getValueFromEvent: {},
|
|
27
|
+
formatValue: {},
|
|
28
|
+
onAfterUpdate: {},
|
|
29
|
+
trigger: {},
|
|
30
|
+
name: {},
|
|
31
|
+
rules: {},
|
|
32
|
+
sort: {},
|
|
33
|
+
isJoinParentField: { type: Boolean },
|
|
34
|
+
errorLayout: {},
|
|
35
|
+
required: { type: Boolean },
|
|
36
|
+
labelMode: {},
|
|
37
|
+
onlyRuleStyle: { type: Boolean },
|
|
38
|
+
label: { type: [Object, String, Number, Boolean, null, Array] },
|
|
39
|
+
helpText: { type: [Object, String, Number, Boolean, null, Array] },
|
|
40
|
+
extra: { type: [Object, String, Number, Boolean, null, Array] },
|
|
41
|
+
showColon: { type: Boolean },
|
|
42
|
+
colSpan: {},
|
|
43
|
+
rowSpan: {},
|
|
44
|
+
htmlFor: {},
|
|
45
|
+
validateResult: {},
|
|
46
|
+
style: { type: [Boolean, null, String, Object, Array] },
|
|
47
|
+
class: {},
|
|
48
|
+
labelStyle: { type: [Boolean, null, String, Object, Array] },
|
|
49
|
+
labelClass: {}
|
|
50
|
+
},
|
|
51
|
+
setup(__props) {
|
|
52
|
+
const props = __props;
|
|
53
|
+
const slots = vue.useSlots();
|
|
54
|
+
return (_ctx, _cache) => {
|
|
55
|
+
return props.name ? (vue.openBlock(), vue.createBlock(
|
|
56
|
+
form_Item_base_vue_vue_type_script_setup_true_lang.default,
|
|
57
|
+
vue.normalizeProps(vue.mergeProps({ key: 0 }, props)),
|
|
58
|
+
vue.createSlots({
|
|
59
|
+
_: 2
|
|
60
|
+
/* DYNAMIC */
|
|
61
|
+
}, [
|
|
62
|
+
vue.renderList(slots, (_, name) => {
|
|
63
|
+
return {
|
|
64
|
+
name,
|
|
65
|
+
fn: vue.withCtx((slotProps) => [
|
|
66
|
+
vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(slotProps)))
|
|
67
|
+
])
|
|
68
|
+
};
|
|
69
|
+
})
|
|
70
|
+
]),
|
|
71
|
+
1040
|
|
72
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
73
|
+
)) : (vue.openBlock(), vue.createBlock(layout_formItem_vue_vue_type_script_setup_true_lang.default, {
|
|
74
|
+
key: 1,
|
|
75
|
+
label: props.label,
|
|
76
|
+
errorLayout: props.errorLayout,
|
|
77
|
+
labelMode: props.labelMode,
|
|
78
|
+
onlyRuleStyle: props.onlyRuleStyle,
|
|
79
|
+
showColon: props.showColon,
|
|
80
|
+
colSpan: props.colSpan,
|
|
81
|
+
rowSpan: props.rowSpan,
|
|
82
|
+
style: vue.normalizeStyle(props.style),
|
|
83
|
+
class: vue.normalizeClass(props.class),
|
|
84
|
+
labelStyle: props.labelStyle,
|
|
85
|
+
labelClass: props.labelClass
|
|
86
|
+
}, vue.createSlots({
|
|
87
|
+
_: 2
|
|
88
|
+
/* DYNAMIC */
|
|
89
|
+
}, [
|
|
90
|
+
vue.renderList(slots, (_, name) => {
|
|
91
|
+
return {
|
|
92
|
+
name,
|
|
93
|
+
fn: vue.withCtx((slotProps) => [
|
|
94
|
+
vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(slotProps)))
|
|
95
|
+
])
|
|
96
|
+
};
|
|
97
|
+
})
|
|
98
|
+
]), 1032, ["label", "errorLayout", "labelMode", "onlyRuleStyle", "showColon", "colSpan", "rowSpan", "style", "class", "labelStyle", "labelClass"]));
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const formItem_vue_vue_type_script_setup_true_lang = require("./formItem.vue.js");
|
|
4
|
+
exports.default = formItem_vue_vue_type_script_setup_true_lang.default;
|
|
@@ -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
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const form_Item_base_vue_vue_type_script_setup_true_lang = require("./form.Item.base.vue.js");
|
|
4
|
+
const formItem_vue_vue_type_script_setup_true_lang = require("./formItem.vue.js");
|
|
5
|
+
const form_hide_item_vue_vue_type_script_setup_true_lang = require("./form.hide.item.vue.js");
|
|
6
|
+
const withInstall = require("../utils/withInstall.js");
|
|
7
|
+
const FormItemBase = withInstall.withInstall(form_Item_base_vue_vue_type_script_setup_true_lang.default);
|
|
8
|
+
const FormItem = withInstall.withInstall(formItem_vue_vue_type_script_setup_true_lang.default);
|
|
9
|
+
const FormHideItem = withInstall.withInstall(form_hide_item_vue_vue_type_script_setup_true_lang.default);
|
|
10
|
+
exports.FormHideItem = FormHideItem;
|
|
11
|
+
exports.FormItem = FormItem;
|
|
12
|
+
exports.FormItemBase = FormItemBase;
|