@carefrees/form-utils-vue 0.0.8 → 0.0.10
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/esm/form/form.vue2.mjs +4 -0
- package/esm/form/index.mjs +1 -1
- package/esm/formItem/form.Item.base.vue.mjs +1 -1
- package/esm/formItem/form.hide.item.vue.mjs +1 -1
- package/esm/formItem/formItem.vue.mjs +1 -1
- package/esm/hooks/attr/attr.FormItem.d.ts +5 -784
- package/esm/hooks/attr/attr.FormItem.mjs +7 -7
- package/esm/hooks/register/register.FormHideItem.mjs +5 -5
- package/esm/hooks/register/register.FormItem.d.ts +3 -782
- package/esm/hooks/register/register.FormItem.mjs +10 -10
- package/esm/hooks/register/register.FormList.d.ts +1 -781
- package/esm/hooks/register/register.FormList.mjs +5 -5
- package/esm/hooks/useAttrs.mjs +7 -9
- package/esm/interface/index.d.ts +2 -2
- package/lib/form/form.vue2.js +4 -0
- package/lib/form/index.js +2 -2
- package/lib/formItem/form.Item.base.vue.js +1 -1
- package/lib/formItem/form.hide.item.vue.js +1 -1
- package/lib/formItem/formItem.vue.js +1 -1
- package/lib/hooks/attr/attr.FormItem.d.ts +5 -784
- package/lib/hooks/attr/attr.FormItem.js +7 -7
- package/lib/hooks/register/register.FormHideItem.js +4 -4
- package/lib/hooks/register/register.FormItem.d.ts +3 -782
- package/lib/hooks/register/register.FormItem.js +10 -10
- package/lib/hooks/register/register.FormList.d.ts +1 -781
- package/lib/hooks/register/register.FormList.js +5 -5
- package/lib/hooks/useAttrs.js +6 -8
- package/lib/interface/index.d.ts +2 -2
- package/package.json +3 -3
- package/src/form/{index.vue → form.vue} +1 -1
- package/src/form/index.ts +1 -1
- package/src/hooks/attr/attr.FormItem.tsx +13 -9
- package/src/hooks/register/register.FormHideItem.ts +5 -5
- package/src/hooks/register/register.FormItem.ts +12 -12
- package/src/hooks/register/register.FormList.ts +5 -5
- package/src/hooks/useAttrs.ts +6 -8
- package/src/interface/index.ts +2 -2
- package/src/layout/layout.formItem.vue +1 -1
- package/esm/form/index.vue2.mjs +0 -4
- package/lib/form/index.vue2.js +0 -4
- /package/esm/form/{index.vue.d.ts → form.vue.d.ts} +0 -0
- /package/esm/form/{index.vue.mjs → form.vue.mjs} +0 -0
- /package/lib/form/{index.vue.d.ts → form.vue.d.ts} +0 -0
- /package/lib/form/{index.vue.js → form.vue.js} +0 -0
|
@@ -6,23 +6,23 @@ const useRegisterFormList = (options) => {
|
|
|
6
6
|
const { ruleInstance, formItemInstance, form, newName, parentItem } = useRegisterFormItem(options);
|
|
7
7
|
const formListInstance = useFormList();
|
|
8
8
|
watch(
|
|
9
|
-
[newName
|
|
9
|
+
() => [toValue(newName)],
|
|
10
10
|
() => {
|
|
11
|
-
formListInstance.ctor(newName
|
|
11
|
+
formListInstance.ctor(toValue(newName));
|
|
12
12
|
},
|
|
13
13
|
{ immediate: true }
|
|
14
14
|
);
|
|
15
15
|
watch(
|
|
16
|
-
[form, formItemInstance, ruleInstance
|
|
16
|
+
() => [form, formItemInstance, toValue(ruleInstance)],
|
|
17
17
|
() => {
|
|
18
18
|
formListInstance.instance = form;
|
|
19
19
|
formListInstance.formItemInstance = formItemInstance;
|
|
20
|
-
formListInstance.rule = ruleInstance
|
|
20
|
+
formListInstance.rule = toValue(ruleInstance);
|
|
21
21
|
},
|
|
22
22
|
{ immediate: true }
|
|
23
23
|
);
|
|
24
24
|
watch(
|
|
25
|
-
[options.sort, parentItem
|
|
25
|
+
() => [options.sort, toValue(parentItem)],
|
|
26
26
|
() => {
|
|
27
27
|
formListInstance.sort = toValue(parentItem.value.sort);
|
|
28
28
|
formListInstance.parentDataField = toValue(parentItem.value.name);
|
package/esm/hooks/useAttrs.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject, computed,
|
|
1
|
+
import { inject, computed, ref, provide, reactive } from "vue";
|
|
2
2
|
const attrsProvideSymbol = Symbol("carefrees-attrs");
|
|
3
3
|
function useAttrsProvide(options) {
|
|
4
4
|
const {
|
|
@@ -28,14 +28,12 @@ function useAttrsProvide(options) {
|
|
|
28
28
|
function useAttrsInject() {
|
|
29
29
|
const attrs = inject(
|
|
30
30
|
attrsProvideSymbol,
|
|
31
|
-
computed(
|
|
32
|
-
()
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
})
|
|
38
|
-
)
|
|
31
|
+
computed(() => ({
|
|
32
|
+
colCount: ref(4),
|
|
33
|
+
errorLayout: ref("left-bottom"),
|
|
34
|
+
labelMode: ref("top"),
|
|
35
|
+
showColon: ref(true)
|
|
36
|
+
}))
|
|
39
37
|
);
|
|
40
38
|
return attrs;
|
|
41
39
|
}
|
package/esm/interface/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComputedRef, Ref,
|
|
1
|
+
import { ComputedRef, Ref, Component, StyleValue, UnwrapNestedRefs } from 'vue';
|
|
2
2
|
import { FormItemAttrOptions } from '../hooks/attr/attr.FormItem';
|
|
3
3
|
import { LayoutFormItemProps } from './layout.formItem';
|
|
4
4
|
import { FormLayoutProps } from './layout';
|
|
@@ -11,7 +11,7 @@ export interface FormItemProps extends FormItemAttrOptions, LayoutFormItemProps
|
|
|
11
11
|
/**不进行样式渲染*/
|
|
12
12
|
noStyle?: boolean;
|
|
13
13
|
/**输入框组件*/
|
|
14
|
-
input?:
|
|
14
|
+
input?: Component | string;
|
|
15
15
|
}
|
|
16
16
|
export interface FormProps<T = any> extends FormLayoutProps {
|
|
17
17
|
form?: FormInstanceBase;
|
package/lib/form/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const form_vue_vue_type_script_setup_true_lang = require("./form.vue.js");
|
|
4
4
|
const withInstall = require("../utils/withInstall.js");
|
|
5
|
-
const Form = withInstall.withInstall(
|
|
5
|
+
const Form = withInstall.withInstall(form_vue_vue_type_script_setup_true_lang.default);
|
|
6
6
|
exports.Form = Form;
|
|
@@ -13,7 +13,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
13
13
|
...__default__,
|
|
14
14
|
props: {
|
|
15
15
|
noStyle: { type: Boolean },
|
|
16
|
-
input: {
|
|
16
|
+
input: {},
|
|
17
17
|
dependencies: {},
|
|
18
18
|
noticeOnlyRuleDataField: {},
|
|
19
19
|
isNoticeParentField: { type: Boolean },
|
|
@@ -12,7 +12,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
12
12
|
...__default__,
|
|
13
13
|
props: {
|
|
14
14
|
noStyle: { type: Boolean },
|
|
15
|
-
input: {
|
|
15
|
+
input: {},
|
|
16
16
|
dependencies: {},
|
|
17
17
|
noticeOnlyRuleDataField: {},
|
|
18
18
|
isNoticeParentField: { type: Boolean },
|
|
@@ -12,7 +12,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
12
12
|
...__default__,
|
|
13
13
|
props: {
|
|
14
14
|
noStyle: { type: Boolean },
|
|
15
|
-
input: {
|
|
15
|
+
input: {},
|
|
16
16
|
dependencies: {},
|
|
17
17
|
noticeOnlyRuleDataField: {},
|
|
18
18
|
isNoticeParentField: { type: Boolean },
|