@fecp/mobile 1.0.18 → 1.0.20
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/mobile.css +5 -5
- package/es/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/picker/Picker.mjs +2 -2
- package/es/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/picker-group/PickerGroup.mjs +3 -4
- package/es/packages/mobile/index.mjs +6 -12
- package/es/packages/mobile/src/components/all.mjs +6 -12
- package/es/packages/mobile/src/components/form/field/Field.vue.mjs +21 -28
- package/es/packages/mobile/src/components/form/field/index.mjs +2 -2
- package/es/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.mjs +26 -36
- package/es/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.mjs +36 -46
- package/es/packages/mobile/src/components/form/fieldCheckbox/FieldCheckbox.vue.mjs +47 -0
- package/es/packages/mobile/src/components/form/fieldCheckbox/index.mjs +10 -0
- package/es/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.mjs +34 -44
- package/es/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.mjs +34 -44
- package/es/packages/mobile/src/components/form/fieldRadio/FieldRadio.vue.mjs +19 -0
- package/es/packages/mobile/src/components/form/fieldRadio/index.mjs +10 -0
- package/es/packages/mobile/src/components/form/fieldTimePicker/FieldTimePicker.vue.mjs +33 -43
- 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/es/packages/mobile/src/utils/formRule.mjs +49 -11
- package/lib/mobile.css +5 -5
- package/lib/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/picker-group/PickerGroup.js +2 -3
- package/lib/packages/mobile/index.js +62 -68
- package/lib/packages/mobile/src/components/all.js +62 -68
- package/lib/packages/mobile/src/components/form/field/Field.vue.js +20 -27
- package/lib/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.js +25 -35
- package/lib/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.js +35 -45
- package/lib/packages/mobile/src/components/form/fieldCheckbox/FieldCheckbox.vue.js +47 -0
- package/lib/packages/mobile/src/components/form/fieldCheckbox/index.js +10 -0
- package/lib/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.js +33 -43
- package/lib/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.js +33 -43
- package/lib/packages/mobile/src/components/form/fieldRadio/FieldRadio.vue.js +19 -0
- package/lib/packages/mobile/src/components/form/fieldRadio/index.js +10 -0
- package/lib/packages/mobile/src/components/form/fieldTimePicker/FieldTimePicker.vue.js +32 -42
- 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/lib/packages/mobile/src/utils/formRule.js +49 -11
- package/package.json +1 -1
package/lib/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.js
CHANGED
|
@@ -11,12 +11,10 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
11
11
|
;/* empty css */
|
|
12
12
|
;/* empty css */
|
|
13
13
|
;/* empty css */
|
|
14
|
-
;/* empty css */
|
|
15
|
-
;/* empty css */
|
|
16
14
|
const vue = require("vue");
|
|
17
|
-
const index = require("
|
|
18
|
-
const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.js");
|
|
15
|
+
const index = require("../field/index.js");
|
|
19
16
|
const index$2 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/cascader/index.js");
|
|
17
|
+
const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.js");
|
|
20
18
|
const _sfc_main = {
|
|
21
19
|
__name: "fieldCascaderPicker",
|
|
22
20
|
props: {
|
|
@@ -35,7 +33,9 @@ const _sfc_main = {
|
|
|
35
33
|
modelValue: {
|
|
36
34
|
type: String,
|
|
37
35
|
default: ""
|
|
38
|
-
}
|
|
36
|
+
},
|
|
37
|
+
readonly: false,
|
|
38
|
+
"is-link": false
|
|
39
39
|
},
|
|
40
40
|
emits: ["update:modelValue"],
|
|
41
41
|
setup(__props, { emit: __emit }) {
|
|
@@ -94,48 +94,38 @@ const _sfc_main = {
|
|
|
94
94
|
showPicker.value = false;
|
|
95
95
|
};
|
|
96
96
|
return (_ctx, _cache) => {
|
|
97
|
-
const _component_van_field = index.Field;
|
|
98
97
|
const _component_van_cascader = index$2.Cascader;
|
|
99
98
|
const _component_van_popup = index$1.Popup;
|
|
100
|
-
return vue.openBlock(), vue.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"field-names": _ctx.columnsFieldNames,
|
|
131
|
-
placeholder: "请选择",
|
|
132
|
-
onFinish,
|
|
133
|
-
onClose: _cache[3] || (_cache[3] = ($event) => showPicker.value = false)
|
|
134
|
-
}), null, 16, ["modelValue", "options", "field-names"])
|
|
135
|
-
]),
|
|
136
|
-
_: 1
|
|
137
|
-
}, 8, ["show"])
|
|
138
|
-
], 64);
|
|
99
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.mergeProps(_ctx.$attrs, {
|
|
100
|
+
modelValue: vue.unref(fieldTextValue),
|
|
101
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
102
|
+
"is-link": "",
|
|
103
|
+
readonly: "",
|
|
104
|
+
onClick: _cache[4] || (_cache[4] = ($event) => showPicker.value = true)
|
|
105
|
+
}), {
|
|
106
|
+
default: vue.withCtx(() => [
|
|
107
|
+
vue.createVNode(_component_van_popup, {
|
|
108
|
+
show: vue.unref(showPicker),
|
|
109
|
+
"onUpdate:show": _cache[2] || (_cache[2] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
|
|
110
|
+
"destroy-on-close": "",
|
|
111
|
+
position: "bottom"
|
|
112
|
+
}, {
|
|
113
|
+
default: vue.withCtx(() => [
|
|
114
|
+
vue.createVNode(_component_van_cascader, vue.mergeProps(_ctx.$attrs, {
|
|
115
|
+
modelValue: vue.unref(pickerValue),
|
|
116
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
|
|
117
|
+
options: __props.options,
|
|
118
|
+
"field-names": _ctx.columnsFieldNames,
|
|
119
|
+
placeholder: "请选择",
|
|
120
|
+
onFinish,
|
|
121
|
+
onClose: _cache[1] || (_cache[1] = ($event) => showPicker.value = false)
|
|
122
|
+
}), null, 16, ["modelValue", "options", "field-names"])
|
|
123
|
+
]),
|
|
124
|
+
_: 1
|
|
125
|
+
}, 8, ["show"])
|
|
126
|
+
]),
|
|
127
|
+
_: 1
|
|
128
|
+
}, 16, ["modelValue"]);
|
|
139
129
|
};
|
|
140
130
|
}
|
|
141
131
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const index = require("../field/index.js");
|
|
5
|
+
const index$1 = require("../checkboxGroup/index.js");
|
|
6
|
+
const _sfc_main = {
|
|
7
|
+
__name: "FieldCheckbox",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ""
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
emits: ["update:modelValue"],
|
|
15
|
+
setup(__props, { emit: __emit }) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const emit = __emit;
|
|
18
|
+
const compValue = vue.computed({
|
|
19
|
+
get: () => {
|
|
20
|
+
if (props.modelValue) {
|
|
21
|
+
if (Array.isArray(props.modelValue)) {
|
|
22
|
+
return props.modelValue;
|
|
23
|
+
} else {
|
|
24
|
+
return props.modelValue.split(",");
|
|
25
|
+
}
|
|
26
|
+
} else {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
set: (val) => {
|
|
31
|
+
emit("update:modelValue", val.join(","));
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return (_ctx, _cache) => {
|
|
35
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.mergeProps(_ctx.$attrs, { modelValue: "" }), {
|
|
36
|
+
input: vue.withCtx(() => [
|
|
37
|
+
vue.createVNode(vue.unref(index$1.MobileCheckboxGroup), vue.mergeProps(_ctx.$attrs, {
|
|
38
|
+
modelValue: vue.unref(compValue),
|
|
39
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(compValue) ? compValue.value = $event : null)
|
|
40
|
+
}), null, 16, ["modelValue"])
|
|
41
|
+
]),
|
|
42
|
+
_: 1
|
|
43
|
+
}, 16);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const FieldCheckbox = require("./FieldCheckbox.vue.js");
|
|
4
|
+
const install = require("../../../utils/install.js");
|
|
5
|
+
const MobileFieldCheckbox = install.default.withInstall(
|
|
6
|
+
"MobileFieldCheckbox",
|
|
7
|
+
FieldCheckbox.default
|
|
8
|
+
);
|
|
9
|
+
exports.MobileFieldCheckbox = MobileFieldCheckbox;
|
|
10
|
+
exports.default = MobileFieldCheckbox;
|
|
@@ -13,13 +13,11 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
13
13
|
;/* empty css */
|
|
14
14
|
;/* empty css */
|
|
15
15
|
;/* empty css */
|
|
16
|
-
;/* empty css */
|
|
17
|
-
;/* empty css */
|
|
18
16
|
const vue = require("vue");
|
|
17
|
+
const index = require("../field/index.js");
|
|
19
18
|
const moment = require("../../../../../../node_modules/.pnpm/moment@2.30.1/node_modules/moment/dist/moment.js");
|
|
20
|
-
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");
|
|
21
|
-
const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.js");
|
|
22
19
|
const index$2 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/date-picker/index.js");
|
|
20
|
+
const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.js");
|
|
23
21
|
const _sfc_main = {
|
|
24
22
|
__name: "FieldDatePicker",
|
|
25
23
|
props: {
|
|
@@ -34,7 +32,9 @@ const _sfc_main = {
|
|
|
34
32
|
valueFormat: {
|
|
35
33
|
type: String,
|
|
36
34
|
default: "YYYYMMDD"
|
|
37
|
-
}
|
|
35
|
+
},
|
|
36
|
+
readonly: false,
|
|
37
|
+
"is-link": false
|
|
38
38
|
},
|
|
39
39
|
emits: ["update:modelValue"],
|
|
40
40
|
setup(__props, { emit: __emit }) {
|
|
@@ -72,46 +72,36 @@ const _sfc_main = {
|
|
|
72
72
|
showPicker.value = false;
|
|
73
73
|
};
|
|
74
74
|
return (_ctx, _cache) => {
|
|
75
|
-
const _component_van_field = index.Field;
|
|
76
75
|
const _component_van_date_picker = index$2.DatePicker;
|
|
77
76
|
const _component_van_popup = index$1.Popup;
|
|
78
|
-
return vue.openBlock(), vue.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
|
|
107
|
-
readonly: false,
|
|
108
|
-
onConfirm,
|
|
109
|
-
onCancel: _cache[3] || (_cache[3] = ($event) => showPicker.value = false)
|
|
110
|
-
}), null, 16, ["modelValue"])
|
|
111
|
-
]),
|
|
112
|
-
_: 1
|
|
113
|
-
}, 8, ["show"])
|
|
114
|
-
], 64);
|
|
77
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.mergeProps(_ctx.$attrs, {
|
|
78
|
+
modelValue: vue.unref(fieldTextValue),
|
|
79
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
80
|
+
"is-link": "",
|
|
81
|
+
readonly: "",
|
|
82
|
+
onClick: _cache[4] || (_cache[4] = ($event) => showPicker.value = true)
|
|
83
|
+
}), {
|
|
84
|
+
default: vue.withCtx(() => [
|
|
85
|
+
vue.createVNode(_component_van_popup, {
|
|
86
|
+
show: vue.unref(showPicker),
|
|
87
|
+
"onUpdate:show": _cache[2] || (_cache[2] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
|
|
88
|
+
"destroy-on-close": "",
|
|
89
|
+
position: "bottom"
|
|
90
|
+
}, {
|
|
91
|
+
default: vue.withCtx(() => [
|
|
92
|
+
vue.createVNode(_component_van_date_picker, vue.mergeProps(_ctx.$attrs, {
|
|
93
|
+
modelValue: vue.unref(pickerValue),
|
|
94
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
|
|
95
|
+
readonly: false,
|
|
96
|
+
onConfirm,
|
|
97
|
+
onCancel: _cache[1] || (_cache[1] = ($event) => showPicker.value = false)
|
|
98
|
+
}), null, 16, ["modelValue"])
|
|
99
|
+
]),
|
|
100
|
+
_: 1
|
|
101
|
+
}, 8, ["show"])
|
|
102
|
+
]),
|
|
103
|
+
_: 1
|
|
104
|
+
}, 16, ["modelValue"]);
|
|
115
105
|
};
|
|
116
106
|
}
|
|
117
107
|
};
|
|
@@ -13,11 +13,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
13
13
|
;/* empty css */
|
|
14
14
|
;/* empty css */
|
|
15
15
|
;/* empty css */
|
|
16
|
-
;/* empty css */
|
|
17
|
-
;/* empty css */
|
|
18
16
|
const vue = require("vue");
|
|
17
|
+
const index = require("../field/index.js");
|
|
19
18
|
const index$2 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/picker/index.js");
|
|
20
|
-
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");
|
|
21
19
|
const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.js");
|
|
22
20
|
const _sfc_main = {
|
|
23
21
|
__name: "FieldPicker",
|
|
@@ -36,7 +34,9 @@ const _sfc_main = {
|
|
|
36
34
|
modelValue: {
|
|
37
35
|
type: String,
|
|
38
36
|
default: ""
|
|
39
|
-
}
|
|
37
|
+
},
|
|
38
|
+
readonly: false,
|
|
39
|
+
"is-link": false
|
|
40
40
|
},
|
|
41
41
|
emits: ["update:modelValue"],
|
|
42
42
|
setup(__props, { emit: __emit }) {
|
|
@@ -71,47 +71,37 @@ const _sfc_main = {
|
|
|
71
71
|
showPicker.value = false;
|
|
72
72
|
};
|
|
73
73
|
return (_ctx, _cache) => {
|
|
74
|
-
const _component_van_field = index.Field;
|
|
75
74
|
const _component_van_picker = index$2.Picker;
|
|
76
75
|
const _component_van_popup = index$1.Popup;
|
|
77
|
-
return vue.openBlock(), vue.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"model-value": vue.unref(pickerValue),
|
|
107
|
-
readonly: false,
|
|
108
|
-
onConfirm,
|
|
109
|
-
onCancel: _cache[2] || (_cache[2] = ($event) => showPicker.value = false)
|
|
110
|
-
}), null, 16, ["columns", "columns-field-names", "model-value"])
|
|
111
|
-
]),
|
|
112
|
-
_: 1
|
|
113
|
-
}, 8, ["show"])
|
|
114
|
-
], 64);
|
|
76
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.mergeProps(_ctx.$attrs, {
|
|
77
|
+
modelValue: vue.unref(fieldTextValue),
|
|
78
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
79
|
+
"is-link": "",
|
|
80
|
+
readonly: "",
|
|
81
|
+
onClick: _cache[3] || (_cache[3] = ($event) => showPicker.value = true)
|
|
82
|
+
}), {
|
|
83
|
+
default: vue.withCtx(() => [
|
|
84
|
+
vue.createVNode(_component_van_popup, {
|
|
85
|
+
show: vue.unref(showPicker),
|
|
86
|
+
"onUpdate:show": _cache[1] || (_cache[1] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
|
|
87
|
+
"destroy-on-close": "",
|
|
88
|
+
position: "bottom"
|
|
89
|
+
}, {
|
|
90
|
+
default: vue.withCtx(() => [
|
|
91
|
+
vue.createVNode(_component_van_picker, vue.mergeProps(_ctx.$attrs, {
|
|
92
|
+
columns: __props.columns,
|
|
93
|
+
"columns-field-names": __props.columnsFieldNames,
|
|
94
|
+
"model-value": vue.unref(pickerValue),
|
|
95
|
+
readonly: false,
|
|
96
|
+
onConfirm,
|
|
97
|
+
onCancel: _cache[0] || (_cache[0] = ($event) => showPicker.value = false)
|
|
98
|
+
}), null, 16, ["columns", "columns-field-names", "model-value"])
|
|
99
|
+
]),
|
|
100
|
+
_: 1
|
|
101
|
+
}, 8, ["show"])
|
|
102
|
+
]),
|
|
103
|
+
_: 1
|
|
104
|
+
}, 16, ["modelValue"]);
|
|
115
105
|
};
|
|
116
106
|
}
|
|
117
107
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const index = require("../field/index.js");
|
|
5
|
+
const index$1 = require("../radioGroup/index.js");
|
|
6
|
+
const _sfc_main = {
|
|
7
|
+
__name: "FieldRadio",
|
|
8
|
+
setup(__props) {
|
|
9
|
+
return (_ctx, _cache) => {
|
|
10
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)), {
|
|
11
|
+
input: vue.withCtx(() => [
|
|
12
|
+
vue.createVNode(vue.unref(index$1.MobileRadioGroup), vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)), null, 16)
|
|
13
|
+
]),
|
|
14
|
+
_: 1
|
|
15
|
+
}, 16);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const FieldRadio = require("./FieldRadio.vue.js");
|
|
4
|
+
const install = require("../../../utils/install.js");
|
|
5
|
+
const MobileFieldRadio = install.default.withInstall(
|
|
6
|
+
"MobileFieldRadio",
|
|
7
|
+
FieldRadio.default
|
|
8
|
+
);
|
|
9
|
+
exports.MobileFieldRadio = MobileFieldRadio;
|
|
10
|
+
exports.default = MobileFieldRadio;
|
|
@@ -13,12 +13,10 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
13
13
|
;/* empty css */
|
|
14
14
|
;/* empty css */
|
|
15
15
|
;/* empty css */
|
|
16
|
-
;/* empty css */
|
|
17
|
-
;/* empty css */
|
|
18
16
|
const vue = require("vue");
|
|
17
|
+
const index = require("../field/index.js");
|
|
19
18
|
const moment = require("../../../../../../node_modules/.pnpm/moment@2.30.1/node_modules/moment/dist/moment.js");
|
|
20
19
|
const index$2 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/time-picker/index.js");
|
|
21
|
-
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");
|
|
22
20
|
const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/popup/index.js");
|
|
23
21
|
const _sfc_main = {
|
|
24
22
|
__name: "FieldTimePicker",
|
|
@@ -34,7 +32,9 @@ const _sfc_main = {
|
|
|
34
32
|
valueFormat: {
|
|
35
33
|
type: String,
|
|
36
34
|
default: "HH:mm:ss"
|
|
37
|
-
}
|
|
35
|
+
},
|
|
36
|
+
readonly: false,
|
|
37
|
+
"is-link": false
|
|
38
38
|
},
|
|
39
39
|
emits: ["update:modelValue"],
|
|
40
40
|
setup(__props, { emit: __emit }) {
|
|
@@ -72,46 +72,36 @@ const _sfc_main = {
|
|
|
72
72
|
showPicker.value = false;
|
|
73
73
|
};
|
|
74
74
|
return (_ctx, _cache) => {
|
|
75
|
-
const _component_van_field = index.Field;
|
|
76
75
|
const _component_van_time_picker = index$2.TimePicker;
|
|
77
76
|
const _component_van_popup = index$1.Popup;
|
|
78
|
-
return vue.openBlock(), vue.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
|
|
107
|
-
readonly: false,
|
|
108
|
-
onConfirm,
|
|
109
|
-
onCancel: _cache[3] || (_cache[3] = ($event) => showPicker.value = false)
|
|
110
|
-
}), null, 16, ["modelValue"])
|
|
111
|
-
]),
|
|
112
|
-
_: 1
|
|
113
|
-
}, 8, ["show"])
|
|
114
|
-
], 64);
|
|
77
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index.MobileField), vue.mergeProps(_ctx.$attrs, {
|
|
78
|
+
modelValue: vue.unref(fieldTextValue),
|
|
79
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
80
|
+
"is-link": "",
|
|
81
|
+
readonly: "",
|
|
82
|
+
onClick: _cache[4] || (_cache[4] = ($event) => showPicker.value = true)
|
|
83
|
+
}), {
|
|
84
|
+
default: vue.withCtx(() => [
|
|
85
|
+
vue.createVNode(_component_van_popup, {
|
|
86
|
+
show: vue.unref(showPicker),
|
|
87
|
+
"onUpdate:show": _cache[2] || (_cache[2] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
|
|
88
|
+
"destroy-on-close": "",
|
|
89
|
+
position: "bottom"
|
|
90
|
+
}, {
|
|
91
|
+
default: vue.withCtx(() => [
|
|
92
|
+
vue.createVNode(_component_van_time_picker, vue.mergeProps(_ctx.$attrs, {
|
|
93
|
+
modelValue: vue.unref(pickerValue),
|
|
94
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
|
|
95
|
+
readonly: false,
|
|
96
|
+
onConfirm,
|
|
97
|
+
onCancel: _cache[1] || (_cache[1] = ($event) => showPicker.value = false)
|
|
98
|
+
}), null, 16, ["modelValue"])
|
|
99
|
+
]),
|
|
100
|
+
_: 1
|
|
101
|
+
}, 8, ["show"])
|
|
102
|
+
]),
|
|
103
|
+
_: 1
|
|
104
|
+
}, 16, ["modelValue"]);
|
|
115
105
|
};
|
|
116
106
|
}
|
|
117
107
|
};
|
|
@@ -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;
|