@fecp/mobile 1.0.6 → 1.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/es/node_modules/.pnpm/moment@2.30.1/node_modules/moment/dist/moment.mjs +3997 -0
- package/es/packages/mobile/index.mjs +10 -0
- package/es/packages/mobile/src/components/all.mjs +8 -0
- package/es/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.mjs +156 -0
- package/es/packages/mobile/src/components/form/fieldCalendarPicker/index.mjs +10 -0
- package/es/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.mjs +142 -0
- package/es/packages/mobile/src/components/form/fieldCascaderPicker/index.mjs +10 -0
- package/es/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.mjs +110 -0
- package/es/packages/mobile/src/components/form/fieldDatePicker/index.mjs +10 -0
- package/es/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.mjs +24 -16
- package/es/packages/mobile/src/components/form/fieldTimePicker/FieldTimePicker.vue.mjs +110 -0
- package/es/packages/mobile/src/components/form/fieldTimePicker/index.mjs +10 -0
- package/lib/node_modules/.pnpm/moment@2.30.1/node_modules/moment/dist/moment.js +3997 -0
- package/lib/packages/mobile/index.js +66 -56
- package/lib/packages/mobile/src/components/all.js +54 -46
- package/lib/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.js +156 -0
- package/lib/packages/mobile/src/components/form/fieldCalendarPicker/index.js +10 -0
- package/lib/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.js +142 -0
- package/lib/packages/mobile/src/components/form/fieldCascaderPicker/index.js +10 -0
- package/lib/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.js +110 -0
- package/lib/packages/mobile/src/components/form/fieldDatePicker/index.js +10 -0
- package/lib/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.js +23 -15
- package/lib/packages/mobile/src/components/form/fieldTimePicker/FieldTimePicker.vue.js +110 -0
- package/lib/packages/mobile/src/components/form/fieldTimePicker/index.js +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
;/* empty css */
|
|
4
|
+
;/* empty css */
|
|
5
|
+
;/* empty css */
|
|
6
|
+
;/* empty css */
|
|
7
|
+
;/* empty css */
|
|
8
|
+
;/* empty css */
|
|
9
|
+
;/* empty css */
|
|
10
|
+
;/* empty css */
|
|
11
|
+
;/* empty css */
|
|
12
|
+
;/* empty css */
|
|
13
|
+
;/* empty css */
|
|
14
|
+
;/* empty css */
|
|
15
|
+
;/* empty css */
|
|
16
|
+
;/* empty css */
|
|
17
|
+
;/* empty css */
|
|
18
|
+
const vue = require("vue");
|
|
19
|
+
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
|
+
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");
|
|
23
|
+
const _sfc_main = {
|
|
24
|
+
__name: "FieldDatePicker",
|
|
25
|
+
props: {
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: ""
|
|
29
|
+
},
|
|
30
|
+
textFormat: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "YYYY-MM-DD"
|
|
33
|
+
},
|
|
34
|
+
valueFormat: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: "YYYYMMDD"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
emits: ["update:modelValue"],
|
|
40
|
+
setup(__props, { emit: __emit }) {
|
|
41
|
+
const props = __props;
|
|
42
|
+
const fieldTextValue = vue.ref("");
|
|
43
|
+
const showPicker = vue.ref(false);
|
|
44
|
+
const emit = __emit;
|
|
45
|
+
const pickerValue = vue.computed(() => {
|
|
46
|
+
const date = moment.default(props.modelValue, props.valueFormat);
|
|
47
|
+
const value = [date.year(), date.month() + 1, date.date()];
|
|
48
|
+
return value;
|
|
49
|
+
});
|
|
50
|
+
vue.watch(
|
|
51
|
+
() => props.modelValue,
|
|
52
|
+
(value) => {
|
|
53
|
+
fieldTextValue.value = moment.default(value, props.valueFormat).format(
|
|
54
|
+
props.textFormat
|
|
55
|
+
);
|
|
56
|
+
},
|
|
57
|
+
{ immediate: true }
|
|
58
|
+
);
|
|
59
|
+
const onConfirm = ({ selectedValues, selectedOptions, selectedIndexes }) => {
|
|
60
|
+
const val = moment.default(
|
|
61
|
+
`${selectedValues[0]}${selectedValues[1]}${selectedValues[2]}`,
|
|
62
|
+
"YYYYMMDD"
|
|
63
|
+
).format(props.valueFormat);
|
|
64
|
+
emit("update:modelValue", val);
|
|
65
|
+
showPicker.value = false;
|
|
66
|
+
};
|
|
67
|
+
return (_ctx, _cache) => {
|
|
68
|
+
const _component_van_field = index.Field;
|
|
69
|
+
const _component_van_date_picker = index$2.DatePicker;
|
|
70
|
+
const _component_van_popup = index$1.Popup;
|
|
71
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
72
|
+
vue.createVNode(_component_van_field, vue.mergeProps({
|
|
73
|
+
modelValue: vue.unref(fieldTextValue),
|
|
74
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
75
|
+
"is-link": "",
|
|
76
|
+
readonly: "",
|
|
77
|
+
name: "picker"
|
|
78
|
+
}, _ctx.$attrs, {
|
|
79
|
+
onClick: _cache[1] || (_cache[1] = ($event) => showPicker.value = true)
|
|
80
|
+
}), vue.createSlots({ _: 2 }, [
|
|
81
|
+
vue.renderList(_ctx.$slots, (item, key) => {
|
|
82
|
+
return {
|
|
83
|
+
name: key,
|
|
84
|
+
fn: vue.withCtx(() => [
|
|
85
|
+
vue.renderSlot(_ctx.$slots, key)
|
|
86
|
+
])
|
|
87
|
+
};
|
|
88
|
+
})
|
|
89
|
+
]), 1040, ["modelValue"]),
|
|
90
|
+
vue.createVNode(_component_van_popup, {
|
|
91
|
+
show: vue.unref(showPicker),
|
|
92
|
+
"onUpdate:show": _cache[4] || (_cache[4] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
|
|
93
|
+
"destroy-on-close": "",
|
|
94
|
+
position: "bottom"
|
|
95
|
+
}, {
|
|
96
|
+
default: vue.withCtx(() => [
|
|
97
|
+
vue.createVNode(_component_van_date_picker, vue.mergeProps(_ctx.$attrs, {
|
|
98
|
+
modelValue: vue.unref(pickerValue),
|
|
99
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
|
|
100
|
+
onConfirm,
|
|
101
|
+
onCancel: _cache[3] || (_cache[3] = ($event) => showPicker.value = false)
|
|
102
|
+
}), null, 16, ["modelValue"])
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
}, 8, ["show"])
|
|
106
|
+
], 64);
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const FieldDatePicker = require("./FieldDatePicker.vue.js");
|
|
4
|
+
const install = require("../../../utils/install.js");
|
|
5
|
+
const MobileFieldDatePicker = install.default.withInstall(
|
|
6
|
+
"MobileFieldDatePicker",
|
|
7
|
+
FieldDatePicker.default
|
|
8
|
+
);
|
|
9
|
+
exports.MobileFieldDatePicker = MobileFieldDatePicker;
|
|
10
|
+
exports.default = MobileFieldDatePicker;
|
|
@@ -34,29 +34,37 @@ const _sfc_main = {
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
modelValue: {
|
|
37
|
-
type:
|
|
38
|
-
default:
|
|
37
|
+
type: String,
|
|
38
|
+
default: ""
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
|
-
emits: ["update:modelValue"
|
|
41
|
+
emits: ["update:modelValue"],
|
|
42
42
|
setup(__props, { emit: __emit }) {
|
|
43
43
|
const props = __props;
|
|
44
|
+
const fieldTextValue = vue.ref("");
|
|
45
|
+
const showPicker = vue.ref(false);
|
|
44
46
|
const emit = __emit;
|
|
45
|
-
const
|
|
47
|
+
const pickerValue = vue.computed({
|
|
46
48
|
get: () => {
|
|
47
|
-
|
|
48
|
-
return value;
|
|
49
|
+
const value = props.modelValue;
|
|
50
|
+
return [value];
|
|
49
51
|
},
|
|
50
52
|
set: (val) => {
|
|
51
53
|
emit("update:modelValue", val);
|
|
52
54
|
}
|
|
53
55
|
});
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
vue.watch(
|
|
57
|
+
() => props.modelValue,
|
|
58
|
+
(value) => {
|
|
59
|
+
const optionItem = props.columns.find(
|
|
60
|
+
(item) => item[props.columnsFieldNames.value] == value
|
|
61
|
+
);
|
|
62
|
+
fieldTextValue.value = optionItem == null ? void 0 : optionItem[props.columnsFieldNames.text];
|
|
63
|
+
},
|
|
64
|
+
{ immediate: true }
|
|
65
|
+
);
|
|
56
66
|
const onConfirm = ({ selectedValues, selectedOptions }) => {
|
|
57
|
-
|
|
58
|
-
fieldValue.value = (_a = selectedOptions[0]) == null ? void 0 : _a.text;
|
|
59
|
-
pickerValue.value = selectedValues;
|
|
67
|
+
pickerValue.value = selectedValues[0];
|
|
60
68
|
showPicker.value = false;
|
|
61
69
|
};
|
|
62
70
|
return (_ctx, _cache) => {
|
|
@@ -65,8 +73,8 @@ const _sfc_main = {
|
|
|
65
73
|
const _component_van_popup = index$1.Popup;
|
|
66
74
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
67
75
|
vue.createVNode(_component_van_field, vue.mergeProps({
|
|
68
|
-
modelValue: vue.unref(
|
|
69
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(
|
|
76
|
+
modelValue: vue.unref(fieldTextValue),
|
|
77
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
70
78
|
"is-link": "",
|
|
71
79
|
readonly: "",
|
|
72
80
|
name: "picker"
|
|
@@ -89,13 +97,13 @@ const _sfc_main = {
|
|
|
89
97
|
position: "bottom"
|
|
90
98
|
}, {
|
|
91
99
|
default: vue.withCtx(() => [
|
|
92
|
-
vue.createVNode(_component_van_picker, {
|
|
100
|
+
vue.createVNode(_component_van_picker, vue.mergeProps(_ctx.$attrs, {
|
|
93
101
|
columns: __props.columns,
|
|
94
102
|
"columns-field-names": __props.columnsFieldNames,
|
|
95
103
|
"model-value": vue.unref(pickerValue),
|
|
96
104
|
onConfirm,
|
|
97
105
|
onCancel: _cache[2] || (_cache[2] = ($event) => showPicker.value = false)
|
|
98
|
-
}, null,
|
|
106
|
+
}), null, 16, ["columns", "columns-field-names", "model-value"])
|
|
99
107
|
]),
|
|
100
108
|
_: 1
|
|
101
109
|
}, 8, ["show"])
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
;/* empty css */
|
|
4
|
+
;/* empty css */
|
|
5
|
+
;/* empty css */
|
|
6
|
+
;/* empty css */
|
|
7
|
+
;/* empty css */
|
|
8
|
+
;/* empty css */
|
|
9
|
+
;/* empty css */
|
|
10
|
+
;/* empty css */
|
|
11
|
+
;/* empty css */
|
|
12
|
+
;/* empty css */
|
|
13
|
+
;/* empty css */
|
|
14
|
+
;/* empty css */
|
|
15
|
+
;/* empty css */
|
|
16
|
+
;/* empty css */
|
|
17
|
+
;/* empty css */
|
|
18
|
+
const vue = require("vue");
|
|
19
|
+
const moment = require("../../../../../../node_modules/.pnpm/moment@2.30.1/node_modules/moment/dist/moment.js");
|
|
20
|
+
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
|
+
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
|
+
const _sfc_main = {
|
|
24
|
+
__name: "FieldTimePicker",
|
|
25
|
+
props: {
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: ""
|
|
29
|
+
},
|
|
30
|
+
textFormat: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "HH:mm:ss"
|
|
33
|
+
},
|
|
34
|
+
valueFormat: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: "HH:mm:ss"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
emits: ["update:modelValue"],
|
|
40
|
+
setup(__props, { emit: __emit }) {
|
|
41
|
+
const props = __props;
|
|
42
|
+
const fieldTextValue = vue.ref("");
|
|
43
|
+
const showPicker = vue.ref(false);
|
|
44
|
+
const emit = __emit;
|
|
45
|
+
const pickerValue = vue.computed(() => {
|
|
46
|
+
const date = moment.default(props.modelValue, props.valueFormat);
|
|
47
|
+
const value = [date.hours(), date.minutes(), date.seconds()];
|
|
48
|
+
return value;
|
|
49
|
+
});
|
|
50
|
+
vue.watch(
|
|
51
|
+
() => props.modelValue,
|
|
52
|
+
(value) => {
|
|
53
|
+
fieldTextValue.value = moment.default(value, props.valueFormat).format(
|
|
54
|
+
props.textFormat
|
|
55
|
+
);
|
|
56
|
+
},
|
|
57
|
+
{ immediate: true }
|
|
58
|
+
);
|
|
59
|
+
const onConfirm = ({ selectedValues, selectedOptions, selectedIndexes }) => {
|
|
60
|
+
const val = moment.default(
|
|
61
|
+
`${selectedValues[0]}${selectedValues[1]}${selectedValues[2]}`,
|
|
62
|
+
"HH:mm:ss"
|
|
63
|
+
).format(props.valueFormat);
|
|
64
|
+
emit("update:modelValue", val);
|
|
65
|
+
showPicker.value = false;
|
|
66
|
+
};
|
|
67
|
+
return (_ctx, _cache) => {
|
|
68
|
+
const _component_van_field = index.Field;
|
|
69
|
+
const _component_van_time_picker = index$2.TimePicker;
|
|
70
|
+
const _component_van_popup = index$1.Popup;
|
|
71
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
72
|
+
vue.createVNode(_component_van_field, vue.mergeProps({
|
|
73
|
+
modelValue: vue.unref(fieldTextValue),
|
|
74
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(fieldTextValue) ? fieldTextValue.value = $event : null),
|
|
75
|
+
"is-link": "",
|
|
76
|
+
readonly: "",
|
|
77
|
+
name: "picker"
|
|
78
|
+
}, _ctx.$attrs, {
|
|
79
|
+
onClick: _cache[1] || (_cache[1] = ($event) => showPicker.value = true)
|
|
80
|
+
}), vue.createSlots({ _: 2 }, [
|
|
81
|
+
vue.renderList(_ctx.$slots, (item, key) => {
|
|
82
|
+
return {
|
|
83
|
+
name: key,
|
|
84
|
+
fn: vue.withCtx(() => [
|
|
85
|
+
vue.renderSlot(_ctx.$slots, key)
|
|
86
|
+
])
|
|
87
|
+
};
|
|
88
|
+
})
|
|
89
|
+
]), 1040, ["modelValue"]),
|
|
90
|
+
vue.createVNode(_component_van_popup, {
|
|
91
|
+
show: vue.unref(showPicker),
|
|
92
|
+
"onUpdate:show": _cache[4] || (_cache[4] = ($event) => vue.isRef(showPicker) ? showPicker.value = $event : null),
|
|
93
|
+
"destroy-on-close": "",
|
|
94
|
+
position: "bottom"
|
|
95
|
+
}, {
|
|
96
|
+
default: vue.withCtx(() => [
|
|
97
|
+
vue.createVNode(_component_van_time_picker, vue.mergeProps(_ctx.$attrs, {
|
|
98
|
+
modelValue: vue.unref(pickerValue),
|
|
99
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.isRef(pickerValue) ? pickerValue.value = $event : null),
|
|
100
|
+
onConfirm,
|
|
101
|
+
onCancel: _cache[3] || (_cache[3] = ($event) => showPicker.value = false)
|
|
102
|
+
}), null, 16, ["modelValue"])
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
}, 8, ["show"])
|
|
106
|
+
], 64);
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const FieldTimePicker = require("./FieldTimePicker.vue.js");
|
|
4
|
+
const install = require("../../../utils/install.js");
|
|
5
|
+
const MobileFieldTimePicker = install.default.withInstall(
|
|
6
|
+
"MobileFieldTimePicker",
|
|
7
|
+
FieldTimePicker.default
|
|
8
|
+
);
|
|
9
|
+
exports.MobileFieldTimePicker = MobileFieldTimePicker;
|
|
10
|
+
exports.default = MobileFieldTimePicker;
|