@fecp/mobile 1.0.19 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/packages/mobile/index.mjs +2 -0
- package/es/packages/mobile/src/components/all.mjs +2 -0
- package/es/packages/mobile/src/components/form/checkboxGroup/CheckboxGroup.vue.mjs +1 -1
- package/es/packages/mobile/src/components/form/field/Field.vue.mjs +21 -31
- package/es/packages/mobile/src/components/form/field/index.mjs +2 -2
- package/es/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.mjs +3 -1
- package/es/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.mjs +3 -1
- package/es/packages/mobile/src/components/form/fieldCheckbox/FieldCheckbox.vue.mjs +9 -5
- package/es/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.mjs +3 -1
- package/es/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.mjs +10 -8
- package/es/packages/mobile/src/components/form/fieldTimePicker/FieldTimePicker.vue.mjs +3 -1
- package/es/packages/mobile/src/components/form/form/Form.vue.mjs +18 -2
- package/es/packages/mobile/src/components/form/formItem/FormItem.vue.mjs +70 -0
- package/es/packages/mobile/src/components/form/formItem/index.mjs +7 -0
- package/lib/packages/mobile/index.js +40 -38
- package/lib/packages/mobile/src/components/all.js +40 -38
- package/lib/packages/mobile/src/components/form/checkboxGroup/CheckboxGroup.vue.js +1 -1
- package/lib/packages/mobile/src/components/form/field/Field.vue.js +20 -30
- package/lib/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.js +3 -1
- package/lib/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.js +3 -1
- package/lib/packages/mobile/src/components/form/fieldCheckbox/FieldCheckbox.vue.js +9 -5
- package/lib/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.js +3 -1
- package/lib/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.js +10 -8
- package/lib/packages/mobile/src/components/form/fieldTimePicker/FieldTimePicker.vue.js +3 -1
- package/lib/packages/mobile/src/components/form/form/Form.vue.js +17 -1
- package/lib/packages/mobile/src/components/form/formItem/FormItem.vue.js +70 -0
- package/lib/packages/mobile/src/components/form/formItem/index.js +7 -0
- package/package.json +1 -1
|
@@ -35,6 +35,7 @@ import { MobileFieldCascaderPicker } from "./src/components/form/fieldCascaderPi
|
|
|
35
35
|
import { MobileFieldCheckbox } from "./src/components/form/fieldCheckbox/index.mjs";
|
|
36
36
|
import { MobileFieldRadio } from "./src/components/form/fieldRadio/index.mjs";
|
|
37
37
|
import { MobileForm } from "./src/components/form/form/index.mjs";
|
|
38
|
+
import { MobileFormItem } from "./src/components/form/formItem/index.mjs";
|
|
38
39
|
import { MobileRadioGroup } from "./src/components/form/radioGroup/index.mjs";
|
|
39
40
|
import { MobileSearch } from "./src/components/form/search/index.mjs";
|
|
40
41
|
import { MobileUploader } from "./src/components/form/uploader/index.mjs";
|
|
@@ -91,6 +92,7 @@ export {
|
|
|
91
92
|
MobileFloatingBubble,
|
|
92
93
|
MobileFloatingPanel,
|
|
93
94
|
MobileForm,
|
|
95
|
+
MobileFormItem,
|
|
94
96
|
MobileGrid,
|
|
95
97
|
MobileGridItem,
|
|
96
98
|
MobileHighlight,
|
|
@@ -33,6 +33,7 @@ import { MobileFieldCascaderPicker } from "./form/fieldCascaderPicker/index.mjs"
|
|
|
33
33
|
import { MobileFieldCheckbox } from "./form/fieldCheckbox/index.mjs";
|
|
34
34
|
import { MobileFieldRadio } from "./form/fieldRadio/index.mjs";
|
|
35
35
|
import { MobileForm } from "./form/form/index.mjs";
|
|
36
|
+
import { MobileFormItem } from "./form/formItem/index.mjs";
|
|
36
37
|
import { MobileRadioGroup } from "./form/radioGroup/index.mjs";
|
|
37
38
|
import { MobileSearch } from "./form/search/index.mjs";
|
|
38
39
|
import { MobileUploader } from "./form/uploader/index.mjs";
|
|
@@ -78,6 +79,7 @@ export {
|
|
|
78
79
|
MobileFloatingBubble,
|
|
79
80
|
MobileFloatingPanel,
|
|
80
81
|
MobileForm,
|
|
82
|
+
MobileFormItem,
|
|
81
83
|
MobileGrid,
|
|
82
84
|
MobileGridItem,
|
|
83
85
|
MobileHighlight,
|
|
@@ -34,7 +34,7 @@ const _sfc_main = {
|
|
|
34
34
|
disabled: item[__props.fieldNames.disabled]
|
|
35
35
|
}, {
|
|
36
36
|
default: withCtx(() => [
|
|
37
|
-
createTextVNode(toDisplayString(item[__props.fieldNames.
|
|
37
|
+
createTextVNode(toDisplayString(item[__props.fieldNames.text]), 1)
|
|
38
38
|
]),
|
|
39
39
|
_: 2
|
|
40
40
|
}, 1032, ["name", "disabled"]);
|
|
@@ -3,37 +3,27 @@
|
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
6
|
+
import { createElementBlock, openBlock, Fragment, createVNode, renderSlot, normalizeProps, guardReactiveProps, createSlots, renderList, withCtx } from "vue";
|
|
7
|
+
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
8
8
|
import { Field } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/field/index.mjs";
|
|
9
|
-
const _sfc_main = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
renderSlot(_ctx.$slots, key)
|
|
28
|
-
])
|
|
29
|
-
};
|
|
30
|
-
})
|
|
31
|
-
]), 1040, ["rules"]),
|
|
32
|
-
renderSlot(_ctx.$slots, "default")
|
|
33
|
-
], 64);
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
};
|
|
9
|
+
const _sfc_main = {};
|
|
10
|
+
function _sfc_render(_ctx, _cache) {
|
|
11
|
+
const _component_van_field = Field;
|
|
12
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
13
|
+
createVNode(_component_van_field, normalizeProps(guardReactiveProps(_ctx.$attrs)), createSlots({ _: 2 }, [
|
|
14
|
+
renderList(_ctx.$slots, (item, key) => {
|
|
15
|
+
return {
|
|
16
|
+
name: key,
|
|
17
|
+
fn: withCtx(() => [
|
|
18
|
+
renderSlot(_ctx.$slots, key)
|
|
19
|
+
])
|
|
20
|
+
};
|
|
21
|
+
})
|
|
22
|
+
]), 1040),
|
|
23
|
+
renderSlot(_ctx.$slots, "default")
|
|
24
|
+
], 64);
|
|
25
|
+
}
|
|
26
|
+
const _Field = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
37
27
|
export {
|
|
38
|
-
|
|
28
|
+
_Field as default
|
|
39
29
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _Field from "./Field.vue.mjs";
|
|
2
2
|
import install from "../../../utils/install.mjs";
|
|
3
|
-
const MobileField = install.withInstall("MobileField",
|
|
3
|
+
const MobileField = install.withInstall("MobileField", _Field);
|
|
4
4
|
export {
|
|
5
5
|
MobileField,
|
|
6
6
|
MobileField as default
|
|
@@ -5,8 +5,8 @@ const _sfc_main = {
|
|
|
5
5
|
__name: "FieldCheckbox",
|
|
6
6
|
props: {
|
|
7
7
|
modelValue: {
|
|
8
|
-
type:
|
|
9
|
-
default:
|
|
8
|
+
type: String,
|
|
9
|
+
default: ""
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
emits: ["update:modelValue"],
|
|
@@ -15,14 +15,18 @@ const _sfc_main = {
|
|
|
15
15
|
const emit = __emit;
|
|
16
16
|
const compValue = computed({
|
|
17
17
|
get: () => {
|
|
18
|
-
if (
|
|
19
|
-
|
|
18
|
+
if (props.modelValue) {
|
|
19
|
+
if (Array.isArray(props.modelValue)) {
|
|
20
|
+
return props.modelValue;
|
|
21
|
+
} else {
|
|
22
|
+
return props.modelValue.split(",");
|
|
23
|
+
}
|
|
20
24
|
} else {
|
|
21
25
|
return [];
|
|
22
26
|
}
|
|
23
27
|
},
|
|
24
28
|
set: (val) => {
|
|
25
|
-
emit("update:modelValue", val);
|
|
29
|
+
emit("update:modelValue", val.join(","));
|
|
26
30
|
}
|
|
27
31
|
});
|
|
28
32
|
return (_ctx, _cache) => {
|
|
@@ -18,11 +18,11 @@ import { Popup } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.
|
|
|
18
18
|
const _sfc_main = {
|
|
19
19
|
__name: "FieldPicker",
|
|
20
20
|
props: {
|
|
21
|
-
|
|
21
|
+
options: {
|
|
22
22
|
type: Array,
|
|
23
23
|
default: []
|
|
24
24
|
},
|
|
25
|
-
|
|
25
|
+
fieldNames: {
|
|
26
26
|
type: Object,
|
|
27
27
|
default: {
|
|
28
28
|
text: "text",
|
|
@@ -32,7 +32,9 @@ const _sfc_main = {
|
|
|
32
32
|
modelValue: {
|
|
33
33
|
type: String,
|
|
34
34
|
default: ""
|
|
35
|
-
}
|
|
35
|
+
},
|
|
36
|
+
readonly: false,
|
|
37
|
+
"is-link": false
|
|
36
38
|
},
|
|
37
39
|
emits: ["update:modelValue"],
|
|
38
40
|
setup(__props, { emit: __emit }) {
|
|
@@ -55,10 +57,10 @@ const _sfc_main = {
|
|
|
55
57
|
if (!value) {
|
|
56
58
|
return;
|
|
57
59
|
}
|
|
58
|
-
const optionItem = props.
|
|
59
|
-
(item) => item[props.
|
|
60
|
+
const optionItem = props.options.find(
|
|
61
|
+
(item) => item[props.fieldNames.value] == value
|
|
60
62
|
);
|
|
61
|
-
fieldTextValue.value = optionItem == null ? void 0 : optionItem[props.
|
|
63
|
+
fieldTextValue.value = optionItem == null ? void 0 : optionItem[props.fieldNames.text];
|
|
62
64
|
},
|
|
63
65
|
{ immediate: true }
|
|
64
66
|
);
|
|
@@ -85,8 +87,8 @@ const _sfc_main = {
|
|
|
85
87
|
}, {
|
|
86
88
|
default: withCtx(() => [
|
|
87
89
|
createVNode(_component_van_picker, mergeProps(_ctx.$attrs, {
|
|
88
|
-
columns: __props.
|
|
89
|
-
"columns-field-names": __props.
|
|
90
|
+
columns: __props.options,
|
|
91
|
+
"columns-field-names": __props.fieldNames,
|
|
90
92
|
"model-value": unref(pickerValue),
|
|
91
93
|
readonly: false,
|
|
92
94
|
onConfirm,
|
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { createBlock, openBlock, mergeProps, withCtx, createVNode, renderSlot } from "vue";
|
|
3
|
+
import { computed, provide, createBlock, openBlock, mergeProps, withCtx, createVNode, renderSlot } from "vue";
|
|
4
4
|
import { Form } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/form/index.mjs";
|
|
5
5
|
import { CellGroup } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/cell-group/index.mjs";
|
|
6
6
|
const _sfc_main = {
|
|
7
7
|
__name: "Form",
|
|
8
8
|
props: {
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: Object,
|
|
11
|
+
default: {}
|
|
12
|
+
},
|
|
9
13
|
isCard: {
|
|
10
14
|
//卡片风格
|
|
11
15
|
type: Boolean,
|
|
12
16
|
default: false
|
|
13
17
|
}
|
|
14
18
|
},
|
|
15
|
-
|
|
19
|
+
emits: ["update:modelValue"],
|
|
20
|
+
setup(__props, { emit: __emit }) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const emit = __emit;
|
|
23
|
+
const formData = computed({
|
|
24
|
+
get: () => {
|
|
25
|
+
return props.modelValue;
|
|
26
|
+
},
|
|
27
|
+
set: (val) => {
|
|
28
|
+
emit("update:modelValue", val);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
provide("formData", formData);
|
|
16
32
|
return (_ctx, _cache) => {
|
|
17
33
|
const _component_van_cell_group = CellGroup;
|
|
18
34
|
const _component_van_form = Form;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { computed, defineAsyncComponent, inject, useAttrs, createBlock, openBlock, resolveDynamicComponent, unref, mergeProps, isRef } from "vue";
|
|
2
|
+
import { parseRule } from "../../../utils/formRule.mjs";
|
|
3
|
+
const _sfc_main = {
|
|
4
|
+
__name: "FormItem",
|
|
5
|
+
props: {
|
|
6
|
+
fieldType: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: "text"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
emits: ["update:modelValue"],
|
|
12
|
+
setup(__props, { emit: __emit }) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const formItem = computed(() => {
|
|
15
|
+
return defineAsyncComponent(() => {
|
|
16
|
+
switch (props.fieldType) {
|
|
17
|
+
case "text":
|
|
18
|
+
return import("../field/index.mjs");
|
|
19
|
+
case "picker":
|
|
20
|
+
return import("../fieldPicker/index.mjs");
|
|
21
|
+
case "cascader":
|
|
22
|
+
return import("../fieldCascaderPicker/index.mjs");
|
|
23
|
+
case "calendar":
|
|
24
|
+
return import("../fieldCalendarPicker/index.mjs");
|
|
25
|
+
case "date":
|
|
26
|
+
return import("../fieldDatePicker/index.mjs");
|
|
27
|
+
case "time":
|
|
28
|
+
return import("../fieldTimePicker/index.mjs");
|
|
29
|
+
case "radio":
|
|
30
|
+
return import("../fieldRadio/index.mjs");
|
|
31
|
+
case "checkbox":
|
|
32
|
+
return import("../fieldCheckbox/index.mjs");
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
const formData = inject("formData");
|
|
37
|
+
const attrs = useAttrs();
|
|
38
|
+
const emit = __emit;
|
|
39
|
+
const compValue = computed({
|
|
40
|
+
get: () => {
|
|
41
|
+
var _a;
|
|
42
|
+
if (formData) {
|
|
43
|
+
return (_a = formData.value) == null ? void 0 : _a[attrs.name];
|
|
44
|
+
}
|
|
45
|
+
return props.modelValue;
|
|
46
|
+
},
|
|
47
|
+
set: (val) => {
|
|
48
|
+
if (formData) {
|
|
49
|
+
formData.value[attrs.name] = val;
|
|
50
|
+
} else {
|
|
51
|
+
emit("update:modelValue", val);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const rules = computed(() => {
|
|
56
|
+
return parseRule(attrs);
|
|
57
|
+
});
|
|
58
|
+
return (_ctx, _cache) => {
|
|
59
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(formItem)), mergeProps(_ctx.$attrs, {
|
|
60
|
+
modelValue: unref(compValue),
|
|
61
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(compValue) ? compValue.value = $event : null),
|
|
62
|
+
rules: unref(rules),
|
|
63
|
+
required: "auto"
|
|
64
|
+
}), null, 16, ["modelValue", "rules"]);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
_sfc_main as default
|
|
70
|
+
};
|
|
@@ -37,25 +37,26 @@ const index$w = require("./src/components/form/fieldCascaderPicker/index.js");
|
|
|
37
37
|
const index$x = require("./src/components/form/fieldCheckbox/index.js");
|
|
38
38
|
const index$y = require("./src/components/form/fieldRadio/index.js");
|
|
39
39
|
const index$z = require("./src/components/form/form/index.js");
|
|
40
|
-
const index$A = require("./src/components/form/
|
|
41
|
-
const index$B = require("./src/components/form/
|
|
42
|
-
const index$C = require("./src/components/form/
|
|
43
|
-
const index$D = require("./src/components/form/
|
|
44
|
-
const index$E = require("./src/components/
|
|
45
|
-
const index$F = require("./src/components/navigation/
|
|
46
|
-
const index$G = require("./src/components/navigation/
|
|
47
|
-
const index$H = require("./src/components/navigation/
|
|
48
|
-
const index$I = require("./src/components/navigation/
|
|
49
|
-
const index$J = require("./src/components/navigation/
|
|
50
|
-
const index$K = require("./src/components/navigation/
|
|
51
|
-
const index$L = require("./src/components/navigation/
|
|
52
|
-
const index$M = require("./src/components/navigation/
|
|
53
|
-
const index$N = require("./src/components/navigation/
|
|
54
|
-
const index$O = require("./src/components/navigation/
|
|
55
|
-
const index$P = require("./src/components/navigation/
|
|
56
|
-
const index$Q = require("./src/components/navigation/
|
|
57
|
-
const index$R = require("./src/components/navigation/
|
|
58
|
-
const index$S = require("./src/components/navigation/
|
|
40
|
+
const index$A = require("./src/components/form/formItem/index.js");
|
|
41
|
+
const index$B = require("./src/components/form/radioGroup/index.js");
|
|
42
|
+
const index$C = require("./src/components/form/search/index.js");
|
|
43
|
+
const index$D = require("./src/components/form/uploader/index.js");
|
|
44
|
+
const index$E = require("./src/components/form/submitButton/index.js");
|
|
45
|
+
const index$F = require("./src/components/navigation/actionBar/index.js");
|
|
46
|
+
const index$G = require("./src/components/navigation/backTop/index.js");
|
|
47
|
+
const index$H = require("./src/components/navigation/grid/index.js");
|
|
48
|
+
const index$I = require("./src/components/navigation/gridItem/index.js");
|
|
49
|
+
const index$J = require("./src/components/navigation/indexBar/index.js");
|
|
50
|
+
const index$K = require("./src/components/navigation/indexAnchor/index.js");
|
|
51
|
+
const index$L = require("./src/components/navigation/navBar/index.js");
|
|
52
|
+
const index$M = require("./src/components/navigation/pagination/index.js");
|
|
53
|
+
const index$N = require("./src/components/navigation/sidebar/index.js");
|
|
54
|
+
const index$O = require("./src/components/navigation/sidebarItem/index.js");
|
|
55
|
+
const index$P = require("./src/components/navigation/tab/index.js");
|
|
56
|
+
const index$Q = require("./src/components/navigation/tabs/index.js");
|
|
57
|
+
const index$R = require("./src/components/navigation/tabbar/index.js");
|
|
58
|
+
const index$S = require("./src/components/navigation/tabbarItem/index.js");
|
|
59
|
+
const index$T = require("./src/components/navigation/treeSelect/index.js");
|
|
59
60
|
const functionCall = require("../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/dialog/function-call.js");
|
|
60
61
|
const functionCall$1 = require("../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/image-preview/function-call.js");
|
|
61
62
|
const functionCall$2 = require("../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/notify/function-call.js");
|
|
@@ -102,25 +103,26 @@ exports.MobileFieldCascaderPicker = index$w.MobileFieldCascaderPicker;
|
|
|
102
103
|
exports.MobileFieldCheckbox = index$x.MobileFieldCheckbox;
|
|
103
104
|
exports.MobileFieldRadio = index$y.MobileFieldRadio;
|
|
104
105
|
exports.MobileForm = index$z.MobileForm;
|
|
105
|
-
exports.
|
|
106
|
-
exports.
|
|
107
|
-
exports.
|
|
108
|
-
exports.
|
|
109
|
-
exports.
|
|
110
|
-
exports.
|
|
111
|
-
exports.
|
|
112
|
-
exports.
|
|
113
|
-
exports.
|
|
114
|
-
exports.
|
|
115
|
-
exports.
|
|
116
|
-
exports.
|
|
117
|
-
exports.
|
|
118
|
-
exports.
|
|
119
|
-
exports.
|
|
120
|
-
exports.
|
|
121
|
-
exports.
|
|
122
|
-
exports.
|
|
123
|
-
exports.
|
|
106
|
+
exports.MobileFormItem = index$A.MobileFormItem;
|
|
107
|
+
exports.MobileRadioGroup = index$B.MobileRadioGroup;
|
|
108
|
+
exports.MobileSearch = index$C.MobileSearch;
|
|
109
|
+
exports.MobileUploader = index$D.MobileUploader;
|
|
110
|
+
exports.MobileSubmitButton = index$E.MobileSubmitButton;
|
|
111
|
+
exports.MobileActionBar = index$F.MobileActionBar;
|
|
112
|
+
exports.MobileBackTop = index$G.MobileBackTop;
|
|
113
|
+
exports.MobileGrid = index$H.MobileGrid;
|
|
114
|
+
exports.MobileGridItem = index$I.MobileGridItem;
|
|
115
|
+
exports.MobileIndexBar = index$J.MobileIndexBar;
|
|
116
|
+
exports.MobileIndexAnchor = index$K.MobileIndexAnchor;
|
|
117
|
+
exports.MobileNavBar = index$L.MobileNavBar;
|
|
118
|
+
exports.MobilePagination = index$M.MobilePagination;
|
|
119
|
+
exports.MobileSidebar = index$N.MobileSidebar;
|
|
120
|
+
exports.MobileSidebarItem = index$O.MobileSidebarItem;
|
|
121
|
+
exports.MobileTab = index$P.MobileTab;
|
|
122
|
+
exports.MobileTabs = index$Q.MobileTabs;
|
|
123
|
+
exports.MobileTabbar = index$R.MobileTabbar;
|
|
124
|
+
exports.MobileTabbarItem = index$S.MobileTabbarItem;
|
|
125
|
+
exports.MobileTreeSelect = index$T.MobileTreeSelect;
|
|
124
126
|
exports.closeDialog = functionCall.closeDialog;
|
|
125
127
|
exports.showConfirmDialog = functionCall.showConfirmDialog;
|
|
126
128
|
exports.showDialog = functionCall.showDialog;
|
|
@@ -35,25 +35,26 @@ const index$v = require("./form/fieldCascaderPicker/index.js");
|
|
|
35
35
|
const index$w = require("./form/fieldCheckbox/index.js");
|
|
36
36
|
const index$x = require("./form/fieldRadio/index.js");
|
|
37
37
|
const index$y = require("./form/form/index.js");
|
|
38
|
-
const index$z = require("./form/
|
|
39
|
-
const index$A = require("./form/
|
|
40
|
-
const index$B = require("./form/
|
|
41
|
-
const index$C = require("./form/
|
|
42
|
-
const index$D = require("./
|
|
43
|
-
const index$E = require("./navigation/
|
|
44
|
-
const index$F = require("./navigation/
|
|
45
|
-
const index$G = require("./navigation/
|
|
46
|
-
const index$H = require("./navigation/
|
|
47
|
-
const index$I = require("./navigation/
|
|
48
|
-
const index$J = require("./navigation/
|
|
49
|
-
const index$K = require("./navigation/
|
|
50
|
-
const index$L = require("./navigation/
|
|
51
|
-
const index$M = require("./navigation/
|
|
52
|
-
const index$N = require("./navigation/
|
|
53
|
-
const index$O = require("./navigation/
|
|
54
|
-
const index$P = require("./navigation/
|
|
55
|
-
const index$Q = require("./navigation/
|
|
56
|
-
const index$R = require("./navigation/
|
|
38
|
+
const index$z = require("./form/formItem/index.js");
|
|
39
|
+
const index$A = require("./form/radioGroup/index.js");
|
|
40
|
+
const index$B = require("./form/search/index.js");
|
|
41
|
+
const index$C = require("./form/uploader/index.js");
|
|
42
|
+
const index$D = require("./form/submitButton/index.js");
|
|
43
|
+
const index$E = require("./navigation/actionBar/index.js");
|
|
44
|
+
const index$F = require("./navigation/backTop/index.js");
|
|
45
|
+
const index$G = require("./navigation/grid/index.js");
|
|
46
|
+
const index$H = require("./navigation/gridItem/index.js");
|
|
47
|
+
const index$I = require("./navigation/indexBar/index.js");
|
|
48
|
+
const index$J = require("./navigation/indexAnchor/index.js");
|
|
49
|
+
const index$K = require("./navigation/navBar/index.js");
|
|
50
|
+
const index$L = require("./navigation/pagination/index.js");
|
|
51
|
+
const index$M = require("./navigation/sidebar/index.js");
|
|
52
|
+
const index$N = require("./navigation/sidebarItem/index.js");
|
|
53
|
+
const index$O = require("./navigation/tab/index.js");
|
|
54
|
+
const index$P = require("./navigation/tabs/index.js");
|
|
55
|
+
const index$Q = require("./navigation/tabbar/index.js");
|
|
56
|
+
const index$R = require("./navigation/tabbarItem/index.js");
|
|
57
|
+
const index$S = require("./navigation/treeSelect/index.js");
|
|
57
58
|
exports.MobileButton = index.MobileButton;
|
|
58
59
|
exports.MobileCell = index$1.MobileCell;
|
|
59
60
|
exports.MobileCellGroup = index$2.MobileCellGroup;
|
|
@@ -89,22 +90,23 @@ exports.MobileFieldCascaderPicker = index$v.MobileFieldCascaderPicker;
|
|
|
89
90
|
exports.MobileFieldCheckbox = index$w.MobileFieldCheckbox;
|
|
90
91
|
exports.MobileFieldRadio = index$x.MobileFieldRadio;
|
|
91
92
|
exports.MobileForm = index$y.MobileForm;
|
|
92
|
-
exports.
|
|
93
|
-
exports.
|
|
94
|
-
exports.
|
|
95
|
-
exports.
|
|
96
|
-
exports.
|
|
97
|
-
exports.
|
|
98
|
-
exports.
|
|
99
|
-
exports.
|
|
100
|
-
exports.
|
|
101
|
-
exports.
|
|
102
|
-
exports.
|
|
103
|
-
exports.
|
|
104
|
-
exports.
|
|
105
|
-
exports.
|
|
106
|
-
exports.
|
|
107
|
-
exports.
|
|
108
|
-
exports.
|
|
109
|
-
exports.
|
|
110
|
-
exports.
|
|
93
|
+
exports.MobileFormItem = index$z.MobileFormItem;
|
|
94
|
+
exports.MobileRadioGroup = index$A.MobileRadioGroup;
|
|
95
|
+
exports.MobileSearch = index$B.MobileSearch;
|
|
96
|
+
exports.MobileUploader = index$C.MobileUploader;
|
|
97
|
+
exports.MobileSubmitButton = index$D.MobileSubmitButton;
|
|
98
|
+
exports.MobileActionBar = index$E.MobileActionBar;
|
|
99
|
+
exports.MobileBackTop = index$F.MobileBackTop;
|
|
100
|
+
exports.MobileGrid = index$G.MobileGrid;
|
|
101
|
+
exports.MobileGridItem = index$H.MobileGridItem;
|
|
102
|
+
exports.MobileIndexBar = index$I.MobileIndexBar;
|
|
103
|
+
exports.MobileIndexAnchor = index$J.MobileIndexAnchor;
|
|
104
|
+
exports.MobileNavBar = index$K.MobileNavBar;
|
|
105
|
+
exports.MobilePagination = index$L.MobilePagination;
|
|
106
|
+
exports.MobileSidebar = index$M.MobileSidebar;
|
|
107
|
+
exports.MobileSidebarItem = index$N.MobileSidebarItem;
|
|
108
|
+
exports.MobileTab = index$O.MobileTab;
|
|
109
|
+
exports.MobileTabs = index$P.MobileTabs;
|
|
110
|
+
exports.MobileTabbar = index$Q.MobileTabbar;
|
|
111
|
+
exports.MobileTabbarItem = index$R.MobileTabbarItem;
|
|
112
|
+
exports.MobileTreeSelect = index$S.MobileTreeSelect;
|
|
@@ -36,7 +36,7 @@ const _sfc_main = {
|
|
|
36
36
|
disabled: item[__props.fieldNames.disabled]
|
|
37
37
|
}, {
|
|
38
38
|
default: vue.withCtx(() => [
|
|
39
|
-
vue.createTextVNode(vue.toDisplayString(item[__props.fieldNames.
|
|
39
|
+
vue.createTextVNode(vue.toDisplayString(item[__props.fieldNames.text]), 1)
|
|
40
40
|
]),
|
|
41
41
|
_: 2
|
|
42
42
|
}, 1032, ["name", "disabled"]);
|
|
@@ -6,34 +6,24 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
6
6
|
;/* empty css */
|
|
7
7
|
;/* empty css */
|
|
8
8
|
const vue = require("vue");
|
|
9
|
-
const
|
|
9
|
+
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
10
10
|
const index = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/field/index.js");
|
|
11
|
-
const _sfc_main = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
])
|
|
31
|
-
};
|
|
32
|
-
})
|
|
33
|
-
]), 1040, ["rules"]),
|
|
34
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
35
|
-
], 64);
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
exports.default = _sfc_main;
|
|
11
|
+
const _sfc_main = {};
|
|
12
|
+
function _sfc_render(_ctx, _cache) {
|
|
13
|
+
const _component_van_field = index.Field;
|
|
14
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
15
|
+
vue.createVNode(_component_van_field, vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)), vue.createSlots({ _: 2 }, [
|
|
16
|
+
vue.renderList(_ctx.$slots, (item, key) => {
|
|
17
|
+
return {
|
|
18
|
+
name: key,
|
|
19
|
+
fn: vue.withCtx(() => [
|
|
20
|
+
vue.renderSlot(_ctx.$slots, key)
|
|
21
|
+
])
|
|
22
|
+
};
|
|
23
|
+
})
|
|
24
|
+
]), 1040),
|
|
25
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
26
|
+
], 64);
|
|
27
|
+
}
|
|
28
|
+
const _Field = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]);
|
|
29
|
+
exports.default = _Field;
|
|
@@ -7,8 +7,8 @@ const _sfc_main = {
|
|
|
7
7
|
__name: "FieldCheckbox",
|
|
8
8
|
props: {
|
|
9
9
|
modelValue: {
|
|
10
|
-
type:
|
|
11
|
-
default:
|
|
10
|
+
type: String,
|
|
11
|
+
default: ""
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
emits: ["update:modelValue"],
|
|
@@ -17,14 +17,18 @@ const _sfc_main = {
|
|
|
17
17
|
const emit = __emit;
|
|
18
18
|
const compValue = vue.computed({
|
|
19
19
|
get: () => {
|
|
20
|
-
if (
|
|
21
|
-
|
|
20
|
+
if (props.modelValue) {
|
|
21
|
+
if (Array.isArray(props.modelValue)) {
|
|
22
|
+
return props.modelValue;
|
|
23
|
+
} else {
|
|
24
|
+
return props.modelValue.split(",");
|
|
25
|
+
}
|
|
22
26
|
} else {
|
|
23
27
|
return [];
|
|
24
28
|
}
|
|
25
29
|
},
|
|
26
30
|
set: (val) => {
|
|
27
|
-
emit("update:modelValue", val);
|
|
31
|
+
emit("update:modelValue", val.join(","));
|
|
28
32
|
}
|
|
29
33
|
});
|
|
30
34
|
return (_ctx, _cache) => {
|
|
@@ -20,11 +20,11 @@ const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.
|
|
|
20
20
|
const _sfc_main = {
|
|
21
21
|
__name: "FieldPicker",
|
|
22
22
|
props: {
|
|
23
|
-
|
|
23
|
+
options: {
|
|
24
24
|
type: Array,
|
|
25
25
|
default: []
|
|
26
26
|
},
|
|
27
|
-
|
|
27
|
+
fieldNames: {
|
|
28
28
|
type: Object,
|
|
29
29
|
default: {
|
|
30
30
|
text: "text",
|
|
@@ -34,7 +34,9 @@ const _sfc_main = {
|
|
|
34
34
|
modelValue: {
|
|
35
35
|
type: String,
|
|
36
36
|
default: ""
|
|
37
|
-
}
|
|
37
|
+
},
|
|
38
|
+
readonly: false,
|
|
39
|
+
"is-link": false
|
|
38
40
|
},
|
|
39
41
|
emits: ["update:modelValue"],
|
|
40
42
|
setup(__props, { emit: __emit }) {
|
|
@@ -57,10 +59,10 @@ const _sfc_main = {
|
|
|
57
59
|
if (!value) {
|
|
58
60
|
return;
|
|
59
61
|
}
|
|
60
|
-
const optionItem = props.
|
|
61
|
-
(item) => item[props.
|
|
62
|
+
const optionItem = props.options.find(
|
|
63
|
+
(item) => item[props.fieldNames.value] == value
|
|
62
64
|
);
|
|
63
|
-
fieldTextValue.value = optionItem == null ? void 0 : optionItem[props.
|
|
65
|
+
fieldTextValue.value = optionItem == null ? void 0 : optionItem[props.fieldNames.text];
|
|
64
66
|
},
|
|
65
67
|
{ immediate: true }
|
|
66
68
|
);
|
|
@@ -87,8 +89,8 @@ const _sfc_main = {
|
|
|
87
89
|
}, {
|
|
88
90
|
default: vue.withCtx(() => [
|
|
89
91
|
vue.createVNode(_component_van_picker, vue.mergeProps(_ctx.$attrs, {
|
|
90
|
-
columns: __props.
|
|
91
|
-
"columns-field-names": __props.
|
|
92
|
+
columns: __props.options,
|
|
93
|
+
"columns-field-names": __props.fieldNames,
|
|
92
94
|
"model-value": vue.unref(pickerValue),
|
|
93
95
|
readonly: false,
|
|
94
96
|
onConfirm,
|
|
@@ -8,13 +8,29 @@ const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.
|
|
|
8
8
|
const _sfc_main = {
|
|
9
9
|
__name: "Form",
|
|
10
10
|
props: {
|
|
11
|
+
modelValue: {
|
|
12
|
+
type: Object,
|
|
13
|
+
default: {}
|
|
14
|
+
},
|
|
11
15
|
isCard: {
|
|
12
16
|
//卡片风格
|
|
13
17
|
type: Boolean,
|
|
14
18
|
default: false
|
|
15
19
|
}
|
|
16
20
|
},
|
|
17
|
-
|
|
21
|
+
emits: ["update:modelValue"],
|
|
22
|
+
setup(__props, { emit: __emit }) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const emit = __emit;
|
|
25
|
+
const formData = vue.computed({
|
|
26
|
+
get: () => {
|
|
27
|
+
return props.modelValue;
|
|
28
|
+
},
|
|
29
|
+
set: (val) => {
|
|
30
|
+
emit("update:modelValue", val);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
vue.provide("formData", formData);
|
|
18
34
|
return (_ctx, _cache) => {
|
|
19
35
|
const _component_van_cell_group = index$1.CellGroup;
|
|
20
36
|
const _component_van_form = index.Form;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const formRule = require("../../../utils/formRule.js");
|
|
5
|
+
const _sfc_main = {
|
|
6
|
+
__name: "FormItem",
|
|
7
|
+
props: {
|
|
8
|
+
fieldType: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: "text"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(__props, { emit: __emit }) {
|
|
15
|
+
const props = __props;
|
|
16
|
+
const formItem = vue.computed(() => {
|
|
17
|
+
return vue.defineAsyncComponent(() => {
|
|
18
|
+
switch (props.fieldType) {
|
|
19
|
+
case "text":
|
|
20
|
+
return Promise.resolve().then(() => require("../field/index.js"));
|
|
21
|
+
case "picker":
|
|
22
|
+
return Promise.resolve().then(() => require("../fieldPicker/index.js"));
|
|
23
|
+
case "cascader":
|
|
24
|
+
return Promise.resolve().then(() => require("../fieldCascaderPicker/index.js"));
|
|
25
|
+
case "calendar":
|
|
26
|
+
return Promise.resolve().then(() => require("../fieldCalendarPicker/index.js"));
|
|
27
|
+
case "date":
|
|
28
|
+
return Promise.resolve().then(() => require("../fieldDatePicker/index.js"));
|
|
29
|
+
case "time":
|
|
30
|
+
return Promise.resolve().then(() => require("../fieldTimePicker/index.js"));
|
|
31
|
+
case "radio":
|
|
32
|
+
return Promise.resolve().then(() => require("../fieldRadio/index.js"));
|
|
33
|
+
case "checkbox":
|
|
34
|
+
return Promise.resolve().then(() => require("../fieldCheckbox/index.js"));
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
const formData = vue.inject("formData");
|
|
39
|
+
const attrs = vue.useAttrs();
|
|
40
|
+
const emit = __emit;
|
|
41
|
+
const compValue = vue.computed({
|
|
42
|
+
get: () => {
|
|
43
|
+
var _a;
|
|
44
|
+
if (formData) {
|
|
45
|
+
return (_a = formData.value) == null ? void 0 : _a[attrs.name];
|
|
46
|
+
}
|
|
47
|
+
return props.modelValue;
|
|
48
|
+
},
|
|
49
|
+
set: (val) => {
|
|
50
|
+
if (formData) {
|
|
51
|
+
formData.value[attrs.name] = val;
|
|
52
|
+
} else {
|
|
53
|
+
emit("update:modelValue", val);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
const rules = vue.computed(() => {
|
|
58
|
+
return formRule.parseRule(attrs);
|
|
59
|
+
});
|
|
60
|
+
return (_ctx, _cache) => {
|
|
61
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(formItem)), vue.mergeProps(_ctx.$attrs, {
|
|
62
|
+
modelValue: vue.unref(compValue),
|
|
63
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(compValue) ? compValue.value = $event : null),
|
|
64
|
+
rules: vue.unref(rules),
|
|
65
|
+
required: "auto"
|
|
66
|
+
}), null, 16, ["modelValue", "rules"]);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const FormItem = require("./FormItem.vue.js");
|
|
4
|
+
const install = require("../../../utils/install.js");
|
|
5
|
+
const MobileFormItem = install.default.withInstall("MobileFormItem", FormItem.default);
|
|
6
|
+
exports.MobileFormItem = MobileFormItem;
|
|
7
|
+
exports.default = MobileFormItem;
|