@fecp/mobile 1.0.16 → 1.0.18

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.
Files changed (30) hide show
  1. package/es/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/radio-group/RadioGroup.mjs +1 -1
  2. package/es/packages/mobile/index.mjs +0 -2
  3. package/es/packages/mobile/src/components/all.mjs +0 -2
  4. package/es/packages/mobile/src/components/form/checkbox/Checkbox.vue.mjs +22 -18
  5. package/es/packages/mobile/src/components/form/checkbox/index.mjs +2 -2
  6. package/es/packages/mobile/src/components/form/checkboxGroup/CheckboxGroup.vue.mjs +45 -18
  7. package/es/packages/mobile/src/components/form/checkboxGroup/index.mjs +2 -2
  8. package/es/packages/mobile/src/components/form/field/Field.vue.mjs +4 -1
  9. package/es/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.mjs +1 -0
  10. package/es/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.mjs +1 -0
  11. package/es/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.mjs +1 -0
  12. package/es/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.mjs +1 -0
  13. package/es/packages/mobile/src/components/form/fieldTimePicker/FieldTimePicker.vue.mjs +1 -0
  14. package/es/packages/mobile/src/components/form/radioGroup/RadioGroup.vue.mjs +46 -18
  15. package/es/packages/mobile/src/components/form/radioGroup/index.mjs +2 -2
  16. package/es/packages/mobile/src/utils/formRule.mjs +12 -4
  17. package/lib/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/radio-group/RadioGroup.js +1 -1
  18. package/lib/packages/mobile/index.js +40 -42
  19. package/lib/packages/mobile/src/components/all.js +40 -42
  20. package/lib/packages/mobile/src/components/form/checkbox/Checkbox.vue.js +21 -17
  21. package/lib/packages/mobile/src/components/form/checkboxGroup/CheckboxGroup.vue.js +44 -17
  22. package/lib/packages/mobile/src/components/form/field/Field.vue.js +4 -1
  23. package/lib/packages/mobile/src/components/form/fieldCalendarPicker/FieldCalendarPicker.vue.js +1 -0
  24. package/lib/packages/mobile/src/components/form/fieldCascaderPicker/fieldCascaderPicker.vue.js +1 -0
  25. package/lib/packages/mobile/src/components/form/fieldDatePicker/FieldDatePicker.vue.js +1 -0
  26. package/lib/packages/mobile/src/components/form/fieldPicker/FieldPicker.vue.js +1 -0
  27. package/lib/packages/mobile/src/components/form/fieldTimePicker/FieldTimePicker.vue.js +1 -0
  28. package/lib/packages/mobile/src/components/form/radioGroup/RadioGroup.vue.js +45 -17
  29. package/lib/packages/mobile/src/utils/formRule.js +12 -4
  30. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, watch, createVNode } from "vue";
2
2
  import { useChildren, useCustomFieldValue } from "../../../../../@vant_use@1.6.0_vue@3.5.13_typescript@5.7.3_/node_modules/@vant/use/dist/index.esm.mjs";
3
- import { createNamespace } from "../utils/create.mjs";
4
3
  import { unknownProp, numericProp } from "../utils/props.mjs";
4
+ import { createNamespace } from "../utils/create.mjs";
5
5
  const [name, bem] = createNamespace("radio-group");
6
6
  const radioGroupProps = {
7
7
  shape: String,
@@ -38,7 +38,6 @@ import { MobileFieldCascaderPicker } from "./src/components/form/fieldCascaderPi
38
38
  import { MobileForm } from "./src/components/form/form/index.mjs";
39
39
  import { MobilePicker } from "./src/components/form/picker/index.mjs";
40
40
  import { MobilePickerGroup } from "./src/components/form/pickerGroup/index.mjs";
41
- import { MobileRadio } from "./src/components/form/radio/index.mjs";
42
41
  import { MobileRadioGroup } from "./src/components/form/radioGroup/index.mjs";
43
42
  import { MobileSearch } from "./src/components/form/search/index.mjs";
44
43
  import { MobileTimePicker } from "./src/components/form/timePicker/index.mjs";
@@ -111,7 +110,6 @@ export {
111
110
  MobilePickerGroup,
112
111
  MobilePopup,
113
112
  MobilePullRefresh,
114
- MobileRadio,
115
113
  MobileRadioGroup,
116
114
  MobileSearch,
117
115
  MobileSidebar,
@@ -36,7 +36,6 @@ import { MobileFieldCascaderPicker } from "./form/fieldCascaderPicker/index.mjs"
36
36
  import { MobileForm } from "./form/form/index.mjs";
37
37
  import { MobilePicker } from "./form/picker/index.mjs";
38
38
  import { MobilePickerGroup } from "./form/pickerGroup/index.mjs";
39
- import { MobileRadio } from "./form/radio/index.mjs";
40
39
  import { MobileRadioGroup } from "./form/radioGroup/index.mjs";
41
40
  import { MobileSearch } from "./form/search/index.mjs";
42
41
  import { MobileTimePicker } from "./form/timePicker/index.mjs";
@@ -98,7 +97,6 @@ export {
98
97
  MobilePickerGroup,
99
98
  MobilePopup,
100
99
  MobilePullRefresh,
101
- MobileRadio,
102
100
  MobileRadioGroup,
103
101
  MobileSearch,
104
102
  MobileSidebar,
@@ -3,24 +3,28 @@
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
6
- import { createBlock, openBlock, normalizeProps, guardReactiveProps, createSlots, renderList, withCtx, renderSlot } from "vue";
7
- import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
6
+ import { createBlock, openBlock, normalizeProps, guardReactiveProps, withCtx, createTextVNode, toDisplayString } from "vue";
8
7
  import { Checkbox } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/checkbox/index.mjs";
9
- const _sfc_main = {};
10
- function _sfc_render(_ctx, _cache) {
11
- const _component_van_checkbox = Checkbox;
12
- return openBlock(), createBlock(_component_van_checkbox, normalizeProps(guardReactiveProps(_ctx.$attrs)), createSlots({ _: 2 }, [
13
- renderList(_ctx.$slots, (item, key) => {
14
- return {
15
- name: key,
16
- fn: withCtx(() => [
17
- renderSlot(_ctx.$slots, key)
18
- ])
19
- };
20
- })
21
- ]), 1040);
22
- }
23
- const _Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
8
+ const _sfc_main = {
9
+ __name: "Checkbox",
10
+ props: {
11
+ label: {
12
+ type: String,
13
+ default: "复选项"
14
+ }
15
+ },
16
+ setup(__props) {
17
+ return (_ctx, _cache) => {
18
+ const _component_van_checkbox = Checkbox;
19
+ return openBlock(), createBlock(_component_van_checkbox, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
20
+ default: withCtx(() => [
21
+ createTextVNode(toDisplayString(__props.label), 1)
22
+ ]),
23
+ _: 1
24
+ }, 16);
25
+ };
26
+ }
27
+ };
24
28
  export {
25
- _Checkbox as default
29
+ _sfc_main as default
26
30
  };
@@ -1,6 +1,6 @@
1
- import _Checkbox from "./Checkbox.vue.mjs";
1
+ import _sfc_main from "./Checkbox.vue.mjs";
2
2
  import install from "../../../utils/install.mjs";
3
- const MobileCheckbox = install.withInstall("MobileCheckbox", _Checkbox);
3
+ const MobileCheckbox = install.withInstall("MobileCheckbox", _sfc_main);
4
4
  export {
5
5
  MobileCheckbox,
6
6
  MobileCheckbox as default
@@ -1,23 +1,50 @@
1
1
  /* empty css */
2
2
  /* empty css */
3
- import { createBlock, openBlock, normalizeProps, guardReactiveProps, createSlots, renderList, withCtx, renderSlot } from "vue";
4
- import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ import { createBlock, openBlock, normalizeProps, guardReactiveProps, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
5
7
  import { CheckboxGroup } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/checkbox-group/index.mjs";
6
- const _sfc_main = {};
7
- function _sfc_render(_ctx, _cache) {
8
- const _component_van_checkbox_group = CheckboxGroup;
9
- return openBlock(), createBlock(_component_van_checkbox_group, normalizeProps(guardReactiveProps(_ctx.$attrs)), createSlots({ _: 2 }, [
10
- renderList(_ctx.$slots, (item, key) => {
11
- return {
12
- name: key,
13
- fn: withCtx(() => [
14
- renderSlot(_ctx.$slots, key)
15
- ])
16
- };
17
- })
18
- ]), 1040);
19
- }
20
- const _CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
8
+ import { Checkbox } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/checkbox/index.mjs";
9
+ const _sfc_main = {
10
+ __name: "CheckboxGroup",
11
+ props: {
12
+ options: {
13
+ type: Array,
14
+ default: []
15
+ },
16
+ fieldNames: {
17
+ type: Object,
18
+ default: {
19
+ text: "text",
20
+ value: "value",
21
+ disabled: "disabled"
22
+ }
23
+ }
24
+ },
25
+ setup(__props) {
26
+ return (_ctx, _cache) => {
27
+ const _component_van_checkbox = Checkbox;
28
+ const _component_van_checkbox_group = CheckboxGroup;
29
+ return openBlock(), createBlock(_component_van_checkbox_group, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
30
+ default: withCtx(() => [
31
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item) => {
32
+ return openBlock(), createBlock(_component_van_checkbox, {
33
+ name: item[__props.fieldNames.value],
34
+ disabled: item[__props.fieldNames.disabled]
35
+ }, {
36
+ default: withCtx(() => [
37
+ createTextVNode(toDisplayString(item[__props.fieldNames.text]), 1)
38
+ ]),
39
+ _: 2
40
+ }, 1032, ["name", "disabled"]);
41
+ }), 256))
42
+ ]),
43
+ _: 1
44
+ }, 16);
45
+ };
46
+ }
47
+ };
21
48
  export {
22
- _CheckboxGroup as default
49
+ _sfc_main as default
23
50
  };
@@ -1,8 +1,8 @@
1
- import _CheckboxGroup from "./CheckboxGroup.vue.mjs";
1
+ import _sfc_main from "./CheckboxGroup.vue.mjs";
2
2
  import install from "../../../utils/install.mjs";
3
3
  const MobileCheckboxGroup = install.withInstall(
4
4
  "MobileCheckboxGroup",
5
- _CheckboxGroup
5
+ _sfc_main
6
6
  );
7
7
  export {
8
8
  MobileCheckboxGroup,
@@ -15,7 +15,10 @@ const _sfc_main = {
15
15
  });
16
16
  return (_ctx, _cache) => {
17
17
  const _component_van_field = Field;
18
- return openBlock(), createBlock(_component_van_field, mergeProps(_ctx.$attrs, { rules: rules.value }), createSlots({ _: 2 }, [
18
+ return openBlock(), createBlock(_component_van_field, mergeProps(_ctx.$attrs, {
19
+ rules: rules.value,
20
+ required: "auto"
21
+ }), createSlots({ _: 2 }, [
19
22
  renderList(_ctx.$slots, (item, key) => {
20
23
  return {
21
24
  name: key,
@@ -132,6 +132,7 @@ const _sfc_main = {
132
132
  "is-link": "",
133
133
  readonly: "",
134
134
  name: "picker",
135
+ required: "auto",
135
136
  onClick: _cache[1] || (_cache[1] = ($event) => showCalendar.value = true)
136
137
  }), createSlots({ _: 2 }, [
137
138
  renderList(_ctx.$slots, (item, key) => {
@@ -102,6 +102,7 @@ const _sfc_main = {
102
102
  "is-link": "",
103
103
  readonly: "",
104
104
  name: "picker",
105
+ required: "auto",
105
106
  onClick: _cache[1] || (_cache[1] = ($event) => showPicker.value = true)
106
107
  }), createSlots({ _: 2 }, [
107
108
  renderList(_ctx.$slots, (item, key) => {
@@ -80,6 +80,7 @@ const _sfc_main = {
80
80
  "is-link": "",
81
81
  readonly: "",
82
82
  name: "picker",
83
+ required: "auto",
83
84
  onClick: _cache[1] || (_cache[1] = ($event) => showPicker.value = true)
84
85
  }), createSlots({ _: 2 }, [
85
86
  renderList(_ctx.$slots, (item, key) => {
@@ -79,6 +79,7 @@ const _sfc_main = {
79
79
  "is-link": "",
80
80
  readonly: "",
81
81
  name: "picker",
82
+ required: "auto",
82
83
  onClick: _cache[1] || (_cache[1] = ($event) => showPicker.value = true)
83
84
  }), createSlots({ _: 2 }, [
84
85
  renderList(_ctx.$slots, (item, key) => {
@@ -80,6 +80,7 @@ const _sfc_main = {
80
80
  "is-link": "",
81
81
  readonly: "",
82
82
  name: "picker",
83
+ required: "auto",
83
84
  onClick: _cache[1] || (_cache[1] = ($event) => showPicker.value = true)
84
85
  }), createSlots({ _: 2 }, [
85
86
  renderList(_ctx.$slots, (item, key) => {
@@ -1,23 +1,51 @@
1
1
  /* empty css */
2
2
  /* empty css */
3
- import { createBlock, openBlock, normalizeProps, guardReactiveProps, createSlots, renderList, withCtx, renderSlot } from "vue";
4
- import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ /* empty css */
7
+ import { createBlock, openBlock, normalizeProps, guardReactiveProps, withCtx, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
5
8
  import { RadioGroup } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/radio-group/index.mjs";
6
- const _sfc_main = {};
7
- function _sfc_render(_ctx, _cache) {
8
- const _component_van_radio_group = RadioGroup;
9
- return openBlock(), createBlock(_component_van_radio_group, normalizeProps(guardReactiveProps(_ctx.$attrs)), createSlots({ _: 2 }, [
10
- renderList(_ctx.$slots, (item, key) => {
11
- return {
12
- name: key,
13
- fn: withCtx(() => [
14
- renderSlot(_ctx.$slots, key)
15
- ])
16
- };
17
- })
18
- ]), 1040);
19
- }
20
- const _RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
9
+ import { Radio } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/radio/index.mjs";
10
+ const _sfc_main = {
11
+ __name: "RadioGroup",
12
+ props: {
13
+ options: {
14
+ type: Array,
15
+ default: []
16
+ },
17
+ fieldNames: {
18
+ type: Object,
19
+ default: {
20
+ text: "text",
21
+ value: "value",
22
+ disabled: "disabled"
23
+ }
24
+ }
25
+ },
26
+ setup(__props) {
27
+ return (_ctx, _cache) => {
28
+ const _component_van_radio = Radio;
29
+ const _component_van_radio_group = RadioGroup;
30
+ return openBlock(), createBlock(_component_van_radio_group, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
31
+ default: withCtx(() => [
32
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item) => {
33
+ return openBlock(), createBlock(_component_van_radio, {
34
+ name: item[__props.fieldNames.value],
35
+ disabled: item[__props.fieldNames.disabled]
36
+ }, {
37
+ default: withCtx(() => [
38
+ createTextVNode(toDisplayString(item[__props.fieldNames.text]), 1)
39
+ ]),
40
+ _: 2
41
+ }, 1032, ["name", "disabled"]);
42
+ }), 256))
43
+ ]),
44
+ _: 1
45
+ }, 16);
46
+ };
47
+ }
48
+ };
21
49
  export {
22
- _RadioGroup as default
50
+ _sfc_main as default
23
51
  };
@@ -1,8 +1,8 @@
1
- import _RadioGroup from "./RadioGroup.vue.mjs";
1
+ import _sfc_main from "./RadioGroup.vue.mjs";
2
2
  import install from "../../../utils/install.mjs";
3
3
  const MobileRadioGroup = install.withInstall(
4
4
  "MobileRadioGroup",
5
- _RadioGroup
5
+ _sfc_main
6
6
  );
7
7
  export {
8
8
  MobileRadioGroup,
@@ -17,7 +17,7 @@ const parseRule = ({ label, isRequired, ruleType }) => {
17
17
  ruleList.push({ pattern, message: `请填写正确的${label}` });
18
18
  break;
19
19
  case "mobilephone":
20
- let validator = function(value) {
20
+ let validatorMobilephone = function(value) {
21
21
  var isPhone = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
22
22
  var isMob = /^((\+?86)|(\(\+86\)))?(1[3-9]\d{9})$/;
23
23
  if (isMob.test(value) || isPhone.test(value)) {
@@ -26,11 +26,19 @@ const parseRule = ({ label, isRequired, ruleType }) => {
26
26
  return `请填写正确的${label}`;
27
27
  }
28
28
  };
29
- ruleList.push({ validator });
29
+ ruleList.push({ validator: validatorMobilephone });
30
30
  break;
31
31
  case "idNo":
32
- var pattern = /^(1[1-5]|2[1-3]|3[1-7]|4[1-6]|5[0-4]|6[1-5]|7[1-8]|8[1-3])\d{4}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
33
- ruleList.push({ pattern, message: `请填写正确的${label}` });
32
+ let validatorIdNo = function(value) {
33
+ const reg15 = /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$/;
34
+ const reg18 = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
35
+ if (reg15.test(value) || reg18.test(value)) {
36
+ return true;
37
+ } else {
38
+ return `请填写正确的${label}`;
39
+ }
40
+ };
41
+ ruleList.push({ validator: validatorIdNo });
34
42
  break;
35
43
  case "usci":
36
44
  var pattern = /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const index_esm = require("../../../../../@vant_use@1.6.0_vue@3.5.13_typescript@5.7.3_/node_modules/@vant/use/dist/index.esm.js");
5
- const create = require("../utils/create.js");
6
5
  const props = require("../utils/props.js");
6
+ const create = require("../utils/create.js");
7
7
  const [name, bem] = create.createNamespace("radio-group");
8
8
  const radioGroupProps = {
9
9
  shape: String,
@@ -40,27 +40,26 @@ const index$z = require("./src/components/form/fieldCascaderPicker/index.js");
40
40
  const index$A = require("./src/components/form/form/index.js");
41
41
  const index$B = require("./src/components/form/picker/index.js");
42
42
  const index$C = require("./src/components/form/pickerGroup/index.js");
43
- const index$D = require("./src/components/form/radio/index.js");
44
- const index$E = require("./src/components/form/radioGroup/index.js");
45
- const index$F = require("./src/components/form/search/index.js");
46
- const index$G = require("./src/components/form/timePicker/index.js");
47
- const index$H = require("./src/components/form/uploader/index.js");
48
- const index$I = require("./src/components/form/submitButton/index.js");
49
- const index$J = require("./src/components/navigation/actionBar/index.js");
50
- const index$K = require("./src/components/navigation/backTop/index.js");
51
- const index$L = require("./src/components/navigation/grid/index.js");
52
- const index$M = require("./src/components/navigation/gridItem/index.js");
53
- const index$N = require("./src/components/navigation/indexBar/index.js");
54
- const index$O = require("./src/components/navigation/indexAnchor/index.js");
55
- const index$P = require("./src/components/navigation/navBar/index.js");
56
- const index$Q = require("./src/components/navigation/pagination/index.js");
57
- const index$R = require("./src/components/navigation/sidebar/index.js");
58
- const index$S = require("./src/components/navigation/sidebarItem/index.js");
59
- const index$T = require("./src/components/navigation/tab/index.js");
60
- const index$U = require("./src/components/navigation/tabs/index.js");
61
- const index$V = require("./src/components/navigation/tabbar/index.js");
62
- const index$W = require("./src/components/navigation/tabbarItem/index.js");
63
- const index$X = require("./src/components/navigation/treeSelect/index.js");
43
+ const index$D = require("./src/components/form/radioGroup/index.js");
44
+ const index$E = require("./src/components/form/search/index.js");
45
+ const index$F = require("./src/components/form/timePicker/index.js");
46
+ const index$G = require("./src/components/form/uploader/index.js");
47
+ const index$H = require("./src/components/form/submitButton/index.js");
48
+ const index$I = require("./src/components/navigation/actionBar/index.js");
49
+ const index$J = require("./src/components/navigation/backTop/index.js");
50
+ const index$K = require("./src/components/navigation/grid/index.js");
51
+ const index$L = require("./src/components/navigation/gridItem/index.js");
52
+ const index$M = require("./src/components/navigation/indexBar/index.js");
53
+ const index$N = require("./src/components/navigation/indexAnchor/index.js");
54
+ const index$O = require("./src/components/navigation/navBar/index.js");
55
+ const index$P = require("./src/components/navigation/pagination/index.js");
56
+ const index$Q = require("./src/components/navigation/sidebar/index.js");
57
+ const index$R = require("./src/components/navigation/sidebarItem/index.js");
58
+ const index$S = require("./src/components/navigation/tab/index.js");
59
+ const index$T = require("./src/components/navigation/tabs/index.js");
60
+ const index$U = require("./src/components/navigation/tabbar/index.js");
61
+ const index$V = require("./src/components/navigation/tabbarItem/index.js");
62
+ const index$W = require("./src/components/navigation/treeSelect/index.js");
64
63
  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");
65
64
  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");
66
65
  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");
@@ -110,27 +109,26 @@ exports.MobileFieldCascaderPicker = index$z.MobileFieldCascaderPicker;
110
109
  exports.MobileForm = index$A.MobileForm;
111
110
  exports.MobilePicker = index$B.MobilePicker;
112
111
  exports.MobilePickerGroup = index$C.MobilePickerGroup;
113
- exports.MobileRadio = index$D.MobileRadio;
114
- exports.MobileRadioGroup = index$E.MobileRadioGroup;
115
- exports.MobileSearch = index$F.MobileSearch;
116
- exports.MobileTimePicker = index$G.MobileTimePicker;
117
- exports.MobileUploader = index$H.MobileUploader;
118
- exports.MobileSubmitButton = index$I.MobileSubmitButton;
119
- exports.MobileActionBar = index$J.MobileActionBar;
120
- exports.MobileBackTop = index$K.MobileBackTop;
121
- exports.MobileGrid = index$L.MobileGrid;
122
- exports.MobileGridItem = index$M.MobileGridItem;
123
- exports.MobileIndexBar = index$N.MobileIndexBar;
124
- exports.MobileIndexAnchor = index$O.MobileIndexAnchor;
125
- exports.MobileNavBar = index$P.MobileNavBar;
126
- exports.MobilePagination = index$Q.MobilePagination;
127
- exports.MobileSidebar = index$R.MobileSidebar;
128
- exports.MobileSidebarItem = index$S.MobileSidebarItem;
129
- exports.MobileTab = index$T.MobileTab;
130
- exports.MobileTabs = index$U.MobileTabs;
131
- exports.MobileTabbar = index$V.MobileTabbar;
132
- exports.MobileTabbarItem = index$W.MobileTabbarItem;
133
- exports.MobileTreeSelect = index$X.MobileTreeSelect;
112
+ exports.MobileRadioGroup = index$D.MobileRadioGroup;
113
+ exports.MobileSearch = index$E.MobileSearch;
114
+ exports.MobileTimePicker = index$F.MobileTimePicker;
115
+ exports.MobileUploader = index$G.MobileUploader;
116
+ exports.MobileSubmitButton = index$H.MobileSubmitButton;
117
+ exports.MobileActionBar = index$I.MobileActionBar;
118
+ exports.MobileBackTop = index$J.MobileBackTop;
119
+ exports.MobileGrid = index$K.MobileGrid;
120
+ exports.MobileGridItem = index$L.MobileGridItem;
121
+ exports.MobileIndexBar = index$M.MobileIndexBar;
122
+ exports.MobileIndexAnchor = index$N.MobileIndexAnchor;
123
+ exports.MobileNavBar = index$O.MobileNavBar;
124
+ exports.MobilePagination = index$P.MobilePagination;
125
+ exports.MobileSidebar = index$Q.MobileSidebar;
126
+ exports.MobileSidebarItem = index$R.MobileSidebarItem;
127
+ exports.MobileTab = index$S.MobileTab;
128
+ exports.MobileTabs = index$T.MobileTabs;
129
+ exports.MobileTabbar = index$U.MobileTabbar;
130
+ exports.MobileTabbarItem = index$V.MobileTabbarItem;
131
+ exports.MobileTreeSelect = index$W.MobileTreeSelect;
134
132
  exports.closeDialog = functionCall.closeDialog;
135
133
  exports.showConfirmDialog = functionCall.showConfirmDialog;
136
134
  exports.showDialog = functionCall.showDialog;
@@ -38,27 +38,26 @@ const index$y = require("./form/fieldCascaderPicker/index.js");
38
38
  const index$z = require("./form/form/index.js");
39
39
  const index$A = require("./form/picker/index.js");
40
40
  const index$B = require("./form/pickerGroup/index.js");
41
- const index$C = require("./form/radio/index.js");
42
- const index$D = require("./form/radioGroup/index.js");
43
- const index$E = require("./form/search/index.js");
44
- const index$F = require("./form/timePicker/index.js");
45
- const index$G = require("./form/uploader/index.js");
46
- const index$H = require("./form/submitButton/index.js");
47
- const index$I = require("./navigation/actionBar/index.js");
48
- const index$J = require("./navigation/backTop/index.js");
49
- const index$K = require("./navigation/grid/index.js");
50
- const index$L = require("./navigation/gridItem/index.js");
51
- const index$M = require("./navigation/indexBar/index.js");
52
- const index$N = require("./navigation/indexAnchor/index.js");
53
- const index$O = require("./navigation/navBar/index.js");
54
- const index$P = require("./navigation/pagination/index.js");
55
- const index$Q = require("./navigation/sidebar/index.js");
56
- const index$R = require("./navigation/sidebarItem/index.js");
57
- const index$S = require("./navigation/tab/index.js");
58
- const index$T = require("./navigation/tabs/index.js");
59
- const index$U = require("./navigation/tabbar/index.js");
60
- const index$V = require("./navigation/tabbarItem/index.js");
61
- const index$W = require("./navigation/treeSelect/index.js");
41
+ const index$C = require("./form/radioGroup/index.js");
42
+ const index$D = require("./form/search/index.js");
43
+ const index$E = require("./form/timePicker/index.js");
44
+ const index$F = require("./form/uploader/index.js");
45
+ const index$G = require("./form/submitButton/index.js");
46
+ const index$H = require("./navigation/actionBar/index.js");
47
+ const index$I = require("./navigation/backTop/index.js");
48
+ const index$J = require("./navigation/grid/index.js");
49
+ const index$K = require("./navigation/gridItem/index.js");
50
+ const index$L = require("./navigation/indexBar/index.js");
51
+ const index$M = require("./navigation/indexAnchor/index.js");
52
+ const index$N = require("./navigation/navBar/index.js");
53
+ const index$O = require("./navigation/pagination/index.js");
54
+ const index$P = require("./navigation/sidebar/index.js");
55
+ const index$Q = require("./navigation/sidebarItem/index.js");
56
+ const index$R = require("./navigation/tab/index.js");
57
+ const index$S = require("./navigation/tabs/index.js");
58
+ const index$T = require("./navigation/tabbar/index.js");
59
+ const index$U = require("./navigation/tabbarItem/index.js");
60
+ const index$V = require("./navigation/treeSelect/index.js");
62
61
  exports.MobileButton = index.MobileButton;
63
62
  exports.MobileCell = index$1.MobileCell;
64
63
  exports.MobileCellGroup = index$2.MobileCellGroup;
@@ -97,24 +96,23 @@ exports.MobileFieldCascaderPicker = index$y.MobileFieldCascaderPicker;
97
96
  exports.MobileForm = index$z.MobileForm;
98
97
  exports.MobilePicker = index$A.MobilePicker;
99
98
  exports.MobilePickerGroup = index$B.MobilePickerGroup;
100
- exports.MobileRadio = index$C.MobileRadio;
101
- exports.MobileRadioGroup = index$D.MobileRadioGroup;
102
- exports.MobileSearch = index$E.MobileSearch;
103
- exports.MobileTimePicker = index$F.MobileTimePicker;
104
- exports.MobileUploader = index$G.MobileUploader;
105
- exports.MobileSubmitButton = index$H.MobileSubmitButton;
106
- exports.MobileActionBar = index$I.MobileActionBar;
107
- exports.MobileBackTop = index$J.MobileBackTop;
108
- exports.MobileGrid = index$K.MobileGrid;
109
- exports.MobileGridItem = index$L.MobileGridItem;
110
- exports.MobileIndexBar = index$M.MobileIndexBar;
111
- exports.MobileIndexAnchor = index$N.MobileIndexAnchor;
112
- exports.MobileNavBar = index$O.MobileNavBar;
113
- exports.MobilePagination = index$P.MobilePagination;
114
- exports.MobileSidebar = index$Q.MobileSidebar;
115
- exports.MobileSidebarItem = index$R.MobileSidebarItem;
116
- exports.MobileTab = index$S.MobileTab;
117
- exports.MobileTabs = index$T.MobileTabs;
118
- exports.MobileTabbar = index$U.MobileTabbar;
119
- exports.MobileTabbarItem = index$V.MobileTabbarItem;
120
- exports.MobileTreeSelect = index$W.MobileTreeSelect;
99
+ exports.MobileRadioGroup = index$C.MobileRadioGroup;
100
+ exports.MobileSearch = index$D.MobileSearch;
101
+ exports.MobileTimePicker = index$E.MobileTimePicker;
102
+ exports.MobileUploader = index$F.MobileUploader;
103
+ exports.MobileSubmitButton = index$G.MobileSubmitButton;
104
+ exports.MobileActionBar = index$H.MobileActionBar;
105
+ exports.MobileBackTop = index$I.MobileBackTop;
106
+ exports.MobileGrid = index$J.MobileGrid;
107
+ exports.MobileGridItem = index$K.MobileGridItem;
108
+ exports.MobileIndexBar = index$L.MobileIndexBar;
109
+ exports.MobileIndexAnchor = index$M.MobileIndexAnchor;
110
+ exports.MobileNavBar = index$N.MobileNavBar;
111
+ exports.MobilePagination = index$O.MobilePagination;
112
+ exports.MobileSidebar = index$P.MobileSidebar;
113
+ exports.MobileSidebarItem = index$Q.MobileSidebarItem;
114
+ exports.MobileTab = index$R.MobileTab;
115
+ exports.MobileTabs = index$S.MobileTabs;
116
+ exports.MobileTabbar = index$T.MobileTabbar;
117
+ exports.MobileTabbarItem = index$U.MobileTabbarItem;
118
+ exports.MobileTreeSelect = index$V.MobileTreeSelect;
@@ -6,21 +6,25 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
6
6
  ;/* empty css */
7
7
  ;/* empty css */
8
8
  const vue = require("vue");
9
- const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
10
9
  const index = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/checkbox/index.js");
11
- const _sfc_main = {};
12
- function _sfc_render(_ctx, _cache) {
13
- const _component_van_checkbox = index.Checkbox;
14
- return vue.openBlock(), vue.createBlock(_component_van_checkbox, vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)), vue.createSlots({ _: 2 }, [
15
- vue.renderList(_ctx.$slots, (item, key) => {
16
- return {
17
- name: key,
18
- fn: vue.withCtx(() => [
19
- vue.renderSlot(_ctx.$slots, key)
20
- ])
21
- };
22
- })
23
- ]), 1040);
24
- }
25
- const _Checkbox = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]);
26
- exports.default = _Checkbox;
10
+ const _sfc_main = {
11
+ __name: "Checkbox",
12
+ props: {
13
+ label: {
14
+ type: String,
15
+ default: "复选项"
16
+ }
17
+ },
18
+ setup(__props) {
19
+ return (_ctx, _cache) => {
20
+ const _component_van_checkbox = index.Checkbox;
21
+ return vue.openBlock(), vue.createBlock(_component_van_checkbox, vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)), {
22
+ default: vue.withCtx(() => [
23
+ vue.createTextVNode(vue.toDisplayString(__props.label), 1)
24
+ ]),
25
+ _: 1
26
+ }, 16);
27
+ };
28
+ }
29
+ };
30
+ exports.default = _sfc_main;
@@ -2,22 +2,49 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  ;/* empty css */
4
4
  ;/* empty css */
5
+ ;/* empty css */
6
+ ;/* empty css */
7
+ ;/* empty css */
5
8
  const vue = require("vue");
6
- const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
7
9
  const index = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/checkbox-group/index.js");
8
- const _sfc_main = {};
9
- function _sfc_render(_ctx, _cache) {
10
- const _component_van_checkbox_group = index.CheckboxGroup;
11
- return vue.openBlock(), vue.createBlock(_component_van_checkbox_group, vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)), vue.createSlots({ _: 2 }, [
12
- vue.renderList(_ctx.$slots, (item, key) => {
13
- return {
14
- name: key,
15
- fn: vue.withCtx(() => [
16
- vue.renderSlot(_ctx.$slots, key)
17
- ])
18
- };
19
- })
20
- ]), 1040);
21
- }
22
- const _CheckboxGroup = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]);
23
- exports.default = _CheckboxGroup;
10
+ const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/checkbox/index.js");
11
+ const _sfc_main = {
12
+ __name: "CheckboxGroup",
13
+ props: {
14
+ options: {
15
+ type: Array,
16
+ default: []
17
+ },
18
+ fieldNames: {
19
+ type: Object,
20
+ default: {
21
+ text: "text",
22
+ value: "value",
23
+ disabled: "disabled"
24
+ }
25
+ }
26
+ },
27
+ setup(__props) {
28
+ return (_ctx, _cache) => {
29
+ const _component_van_checkbox = index$1.Checkbox;
30
+ const _component_van_checkbox_group = index.CheckboxGroup;
31
+ return vue.openBlock(), vue.createBlock(_component_van_checkbox_group, vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)), {
32
+ default: vue.withCtx(() => [
33
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.options, (item) => {
34
+ return vue.openBlock(), vue.createBlock(_component_van_checkbox, {
35
+ name: item[__props.fieldNames.value],
36
+ disabled: item[__props.fieldNames.disabled]
37
+ }, {
38
+ default: vue.withCtx(() => [
39
+ vue.createTextVNode(vue.toDisplayString(item[__props.fieldNames.text]), 1)
40
+ ]),
41
+ _: 2
42
+ }, 1032, ["name", "disabled"]);
43
+ }), 256))
44
+ ]),
45
+ _: 1
46
+ }, 16);
47
+ };
48
+ }
49
+ };
50
+ exports.default = _sfc_main;
@@ -17,7 +17,10 @@ const _sfc_main = {
17
17
  });
18
18
  return (_ctx, _cache) => {
19
19
  const _component_van_field = index.Field;
20
- return vue.openBlock(), vue.createBlock(_component_van_field, vue.mergeProps(_ctx.$attrs, { rules: rules.value }), vue.createSlots({ _: 2 }, [
20
+ return vue.openBlock(), vue.createBlock(_component_van_field, vue.mergeProps(_ctx.$attrs, {
21
+ rules: rules.value,
22
+ required: "auto"
23
+ }), vue.createSlots({ _: 2 }, [
21
24
  vue.renderList(_ctx.$slots, (item, key) => {
22
25
  return {
23
26
  name: key,
@@ -134,6 +134,7 @@ const _sfc_main = {
134
134
  "is-link": "",
135
135
  readonly: "",
136
136
  name: "picker",
137
+ required: "auto",
137
138
  onClick: _cache[1] || (_cache[1] = ($event) => showCalendar.value = true)
138
139
  }), vue.createSlots({ _: 2 }, [
139
140
  vue.renderList(_ctx.$slots, (item, key) => {
@@ -104,6 +104,7 @@ const _sfc_main = {
104
104
  "is-link": "",
105
105
  readonly: "",
106
106
  name: "picker",
107
+ required: "auto",
107
108
  onClick: _cache[1] || (_cache[1] = ($event) => showPicker.value = true)
108
109
  }), vue.createSlots({ _: 2 }, [
109
110
  vue.renderList(_ctx.$slots, (item, key) => {
@@ -82,6 +82,7 @@ const _sfc_main = {
82
82
  "is-link": "",
83
83
  readonly: "",
84
84
  name: "picker",
85
+ required: "auto",
85
86
  onClick: _cache[1] || (_cache[1] = ($event) => showPicker.value = true)
86
87
  }), vue.createSlots({ _: 2 }, [
87
88
  vue.renderList(_ctx.$slots, (item, key) => {
@@ -81,6 +81,7 @@ const _sfc_main = {
81
81
  "is-link": "",
82
82
  readonly: "",
83
83
  name: "picker",
84
+ required: "auto",
84
85
  onClick: _cache[1] || (_cache[1] = ($event) => showPicker.value = true)
85
86
  }), vue.createSlots({ _: 2 }, [
86
87
  vue.renderList(_ctx.$slots, (item, key) => {
@@ -82,6 +82,7 @@ const _sfc_main = {
82
82
  "is-link": "",
83
83
  readonly: "",
84
84
  name: "picker",
85
+ required: "auto",
85
86
  onClick: _cache[1] || (_cache[1] = ($event) => showPicker.value = true)
86
87
  }), vue.createSlots({ _: 2 }, [
87
88
  vue.renderList(_ctx.$slots, (item, key) => {
@@ -2,22 +2,50 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  ;/* empty css */
4
4
  ;/* empty css */
5
+ ;/* empty css */
6
+ ;/* empty css */
7
+ ;/* empty css */
8
+ ;/* empty css */
5
9
  const vue = require("vue");
6
- const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
7
10
  const index = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/radio-group/index.js");
8
- const _sfc_main = {};
9
- function _sfc_render(_ctx, _cache) {
10
- const _component_van_radio_group = index.RadioGroup;
11
- return vue.openBlock(), vue.createBlock(_component_van_radio_group, vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)), vue.createSlots({ _: 2 }, [
12
- vue.renderList(_ctx.$slots, (item, key) => {
13
- return {
14
- name: key,
15
- fn: vue.withCtx(() => [
16
- vue.renderSlot(_ctx.$slots, key)
17
- ])
18
- };
19
- })
20
- ]), 1040);
21
- }
22
- const _RadioGroup = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["render", _sfc_render]]);
23
- exports.default = _RadioGroup;
11
+ const index$1 = require("../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/radio/index.js");
12
+ const _sfc_main = {
13
+ __name: "RadioGroup",
14
+ props: {
15
+ options: {
16
+ type: Array,
17
+ default: []
18
+ },
19
+ fieldNames: {
20
+ type: Object,
21
+ default: {
22
+ text: "text",
23
+ value: "value",
24
+ disabled: "disabled"
25
+ }
26
+ }
27
+ },
28
+ setup(__props) {
29
+ return (_ctx, _cache) => {
30
+ const _component_van_radio = index$1.Radio;
31
+ const _component_van_radio_group = index.RadioGroup;
32
+ return vue.openBlock(), vue.createBlock(_component_van_radio_group, vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)), {
33
+ default: vue.withCtx(() => [
34
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.options, (item) => {
35
+ return vue.openBlock(), vue.createBlock(_component_van_radio, {
36
+ name: item[__props.fieldNames.value],
37
+ disabled: item[__props.fieldNames.disabled]
38
+ }, {
39
+ default: vue.withCtx(() => [
40
+ vue.createTextVNode(vue.toDisplayString(item[__props.fieldNames.text]), 1)
41
+ ]),
42
+ _: 2
43
+ }, 1032, ["name", "disabled"]);
44
+ }), 256))
45
+ ]),
46
+ _: 1
47
+ }, 16);
48
+ };
49
+ }
50
+ };
51
+ exports.default = _sfc_main;
@@ -19,7 +19,7 @@ const parseRule = ({ label, isRequired, ruleType }) => {
19
19
  ruleList.push({ pattern, message: `请填写正确的${label}` });
20
20
  break;
21
21
  case "mobilephone":
22
- let validator = function(value) {
22
+ let validatorMobilephone = function(value) {
23
23
  var isPhone = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
24
24
  var isMob = /^((\+?86)|(\(\+86\)))?(1[3-9]\d{9})$/;
25
25
  if (isMob.test(value) || isPhone.test(value)) {
@@ -28,11 +28,19 @@ const parseRule = ({ label, isRequired, ruleType }) => {
28
28
  return `请填写正确的${label}`;
29
29
  }
30
30
  };
31
- ruleList.push({ validator });
31
+ ruleList.push({ validator: validatorMobilephone });
32
32
  break;
33
33
  case "idNo":
34
- var pattern = /^(1[1-5]|2[1-3]|3[1-7]|4[1-6]|5[0-4]|6[1-5]|7[1-8]|8[1-3])\d{4}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
35
- ruleList.push({ pattern, message: `请填写正确的${label}` });
34
+ let validatorIdNo = function(value) {
35
+ const reg15 = /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$/;
36
+ const reg18 = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
37
+ if (reg15.test(value) || reg18.test(value)) {
38
+ return true;
39
+ } else {
40
+ return `请填写正确的${label}`;
41
+ }
42
+ };
43
+ ruleList.push({ validator: validatorIdNo });
36
44
  break;
37
45
  case "usci":
38
46
  var pattern = /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fecp/mobile",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "main": "lib/packages/mobile/index.js",
5
5
  "module": "es/packages/mobile/index.mjs",
6
6
  "files": [