cnhis-design-vue 3.1.8-beta.7 → 3.1.8-beta.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.
@@ -1,6 +1,6 @@
1
- import { BusinessCollector } from "../hooks";
2
- import { FormAsyncQueue } from "../types";
3
- import { Component, InjectionKey } from "vue";
1
+ import { BusinessCollector } from '../hooks';
2
+ import { FormAsyncQueue } from '../types';
3
+ import { Component, InjectionKey } from 'vue';
4
4
  export declare const InjectAsyncQueue: InjectionKey<FormAsyncQueue>;
5
5
  export declare const InjectionSchemaField: InjectionKey<Component>;
6
6
  export declare const InjectionBusinessCollector: InjectionKey<BusinessCollector>;
@@ -11,6 +11,8 @@ export declare enum FIELD_BUSINESS_TYPE {
11
11
  MOBILE = "mobile",
12
12
  TELEPHONE = "telephone",
13
13
  EMAIL = "email",
14
+ SEX = "sex",
15
+ BIRTHDAY = "birthday",
14
16
  BANK_CARD = "bank_card",
15
17
  WEBSITE = "website",
16
18
  GESTATIONAL_WEEKS = "gestational_weeks",
@@ -8,6 +8,8 @@ var FIELD_BUSINESS_TYPE = /* @__PURE__ */ ((FIELD_BUSINESS_TYPE2) => {
8
8
  FIELD_BUSINESS_TYPE2["MOBILE"] = "mobile";
9
9
  FIELD_BUSINESS_TYPE2["TELEPHONE"] = "telephone";
10
10
  FIELD_BUSINESS_TYPE2["EMAIL"] = "email";
11
+ FIELD_BUSINESS_TYPE2["SEX"] = "sex";
12
+ FIELD_BUSINESS_TYPE2["BIRTHDAY"] = "birthday";
11
13
  FIELD_BUSINESS_TYPE2["BANK_CARD"] = "bank_card";
12
14
  FIELD_BUSINESS_TYPE2["WEBSITE"] = "website";
13
15
  FIELD_BUSINESS_TYPE2["GESTATIONAL_WEEKS"] = "gestational_weeks";
@@ -1,5 +1,5 @@
1
- import { Form } from "@formily/core";
2
- import { FIELD_BUSINESS_TYPE } from "../constants";
1
+ import { Form } from '@formily/core';
2
+ import { FIELD_BUSINESS_TYPE } from '../constants';
3
3
  export declare class BusinessCollector {
4
4
  typeCollector: Map<FIELD_BUSINESS_TYPE, Set<string>>;
5
5
  fieldNameCollector: Map<string, FIELD_BUSINESS_TYPE>;
@@ -34,6 +34,18 @@ function useBusinessBinding() {
34
34
  state.value = info.age;
35
35
  });
36
36
  });
37
+ const sexFields = collector.getField(FIELD_BUSINESS_TYPE.SEX);
38
+ sexFields.forEach((field) => {
39
+ formModel.setFieldState(field, (state) => {
40
+ state.value = info.sex;
41
+ });
42
+ });
43
+ const birthdayFields = collector.getField(FIELD_BUSINESS_TYPE.BIRTHDAY);
44
+ birthdayFields.forEach((field) => {
45
+ formModel.setFieldState(field, (state) => {
46
+ state.value = info.birthday;
47
+ });
48
+ });
37
49
  }
38
50
  const handlerMap = /* @__PURE__ */ new Map([[FIELD_BUSINESS_TYPE.ID_CARD, handlerIdCardType]]);
39
51
  function trigger(collector, formModel, fieldName, value) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
3
  "private": false,
4
- "version": "3.1.8-beta.7",
4
+ "version": "3.1.8-beta.8",
5
5
  "license": "ISC",
6
6
  "module": "es/packages/index.mjs",
7
7
  "main": "es/packages/index.mjs",