Skip to content

FormCreate v3.1 Version Update Log

3.1.35 (2024-06-13)

  • Added extendApi method, supports extending api
  • Added getData method to api
  • Optimized options.beforeFetch method to support async return
  • Optimized form disable logic
  • Optimized sub-form disable logic
  • Optimized changed appendValue default value to true
  • Fixed api extension

3.1.33 (2024-05-24)

  • Added empty, notEmpty, and pattern comparison methods to control.condition
  • Optimized reset default value logic
  • Optimized validate injection method
  • Fixed avoid fetch request triggering twice

3.1.33 (2024-05-24)

  • Added empty, notEmpty, and pattern comparison methods to control.condition
  • Optimized reset default value logic
  • Optimized validate injection method
  • Fixed avoid fetch request triggering twice

3.1.32 (2024-05-14)

  • Added options.style configuration to set global styles

3.1.31 (2024-05-09)

3.1.30 (2024-05-09)

Features🌟

  • Optimized rendering logic, improved form performance
  • Added getRenderRule method to api, get component's final rendering rule
  • Added getRefRule method to api, can get rule through name field
  • Added bus property to api, can listen and trigger custom events
  • Added fetch method to api, can manually load remote data
  • Added linkField field to upload callback parameters, can determine which associated field triggered
  • Added automatic injection of inject field to validate, can get rule and api in custom validation function
  • Added onChange callback to component's options configuration, triggered when form is modified
  • Optimized required property
  • Optimized component's disabled configuration implementation logic

3.1.29 (2024-03-29)

  • Added Top field to api, get top-level form's api
  • Added disabled configuration to components, globally disable form components
  • Optimized component hide logic
  • Optimized element-plus compatibility
  • Optimized sub-form basic form configuration
  • Optimized computed properties
  • Fixed options.beforeFetch configuration not taking effect issue

3.1.28 (2024-02-21)

  • Added title slot to components, supports customizing form label area
  • Fixed options.title configuration not taking effect issue
  • Fixed options.beforeFetch configuration not taking effect issue

3.1.27 (2024-01-03)

  • Optimized rendering
  • Optimized arco-design's datePicker component
  • Fixed group component expand not working issue

3.1.26 (2023-11-01)

Features🌟

  • Adapted to ant-design-vue 4.0 version
  • Added disabled state styles to frame component
  • Optimized Promise exception handling

3.1.25 (2023-09-13)

  • Added beforeFetch configuration to options for handling parameters when fetch requests
  • select component supports rendering optionGroup component
  • action in fetch supports configuring as promise, directly load data

3.1.24 (2023-08-23)

Features🌟

  • Refactored group component, rewrote styles, and added sequence number and up/down move functionality, added sortBtn and parse parameters
  • Added wrapEl and formEl methods to api for getting corresponding vue component instances
  • Added setData and removeData methods to formCreate
ts
type setData = (name:string,value:any) =>void;
type removeData = (name:string)=>void;
  • Added loadData custom property
js
//Set data
formCreate.setData('address',[]);
js
//Generation rule
{
    type:'select',
    options: [],
    effect: {
        loadData:{
            attr:'address',
            to:'options'
        }
    }
}
  • Optimized fetch.parse configuration, supports configuring strings, specify path, e.g., props.options

3.1.23 (2023-07-14)

  • Optimized replaced eval method in code
  • Fixed parameter loss issue when event injection
  • Fixed sub-form configuration inheritance not working issue

3.1.22 (2023-06-22)

  • Added an origin parameter to update configuration item in rule, can be used to determine trigger method
ts
type Origin = 'init' | 'link' | 'change';
type update = (value:any, api:Api, origin:Origin) => boolean|undefined;
  • Added slot setting for field, format is 'field-'+field
ts
//Generation rule
{
  field:'name'
}
html
<form-create>
  <slot #field-name="slot">
    //render
  </slot>
</form-create>
  • Added custom property componentValidate, can validate through component methods
ts
//Generation rule
{
  effect: {
    componentValidate: true
    // componentValidate: 'check'
  }
}
ts
//Custom component
{
  methods:{
    //check(){//todo}
    formCreateValidate(val,call) {
      //todo
      call();
    }
  }
}
  • Added prefix and suffix components support injecting formCreateInject

  • Added validate-fail form validation failure and validate-field-fail field validation failure events

  • Optimized tdesign compatibility with new version field validation

  • Optimized component mounting

3.1.21 (2023-04-27)

  • Optimized component rendering
  • Fixed rich text component default selection issue

3.1.19 (2023-04-17)

  • Added enhanced control configuration item, added method, condition configuration
ts
type method=  'display' | 'disabled' | 'hidden' | 'required';
type condition = '==' | '!=' | '<>' | '>' | '>=' | '<' | '<=' | 'in' | 'notIn' | 'on' | 'notOn' | 'between' | 'notBetween';
  • Added support for configuring whether component only renders once through rule.cache
  • Optimized component mounting functionality
  • Optimized custom property required
  • Fixed group component button display issue
  • Fixed validation rule not working issue after setting custom property required

3.1.18 (2023-01-31)

  • Fixed issue where upload component returns incorrect data structure when limit is 1
  • Fixed sub-form validation issue

3.1.17 (2022-12-11)

  • Added TypeScript description file for auto-import.js
  • Optimized upload component in ElementUI added onPreview parameter
  • Fixed FcRow component not existing issue

3.1.16 (2022-10-23)

  • Optimized upload component functionality

3.1.15 (2022-10-05)

  • Optimized uniqueId method generation rule, default starts with F
  • Optimized FormItem generation

3.1.14 (2022-09-12)

  • Optimized group component add event triggering
  • Removed value default conversion functionality
  • Fixed auto-import.js file missing in tdesignUI

3.1.13 (2022-08-21)

  • Added clearEffectData method to api, supports clearing effect data
  • Added forceCoverValue configuration item to options, can set whether modelValue overwrites updates, default is false
  • Added support for overriding fetch request method
js
formCreate.fetch = (options) =>{
  //todo
}
  • Optimized coverValue method in api
  • Optimized group component display in elementUI
  • Optimized type in rule is not required, default is input
  • Optimized resetFields method in api
  • Fixed issue where modifying options might not take effect

3.1.12 (2022-07-24)

  • Adapted to TDesign UI framework (Thanks to developer daiwenyong for contribution )
  • Optimized custom property required prompt message
  • Optimized ts

3.1.11 (2022-07-03)

  • Fixed control might not work issue
  • Modified custom property required prompt message
  • Optimized ts

3.1.10 (2022-06-19)

  • Optimized control configuration item #506
  • Optimized value value synchronization
  • Optimized built-in components' key
  • Adapted to ant-design-vue latest version upload component

3.1.9 (2022-06-05)

  • Fixed modelField might not work issue #500
  • Optimized display configuration
  • Optimized group component, supports automatic update after modifying rule

3.1.8 (2022-05-11)

  • Fixed issue where errors might occur during rendering #496
  • Optimized ts

3.1.7 (2022-05-02)

  • Fixed form's options configuration not working issue

3.1.6 (2022-05-02)

  • Added component configuration item to rule, quickly define custom components for rule rendering. Previously needed to mount custom components first

Example:

js
  //Set custom component through component
  const rule = {
      type:'test',
      component: {
          render(h){
              return h('span','test')
          }
      }
  }
  • Added computed configuration item to rule for dynamically calculating value
  • Added inputPassword component to ant-design-vue
  • Optimized group component, automatically synchronizes modifications to generated sub-form rules after modifying sub-form rules
  • Removed appendData

3.1.4 (2022-03-20)

  • Added setEffect method to api, set component's custom properties

Example:

js
  const rule = {
    type:'input',
    field:'input',
    effect:{
      required: true
    }
  }


api.setEffect('input','required', false);
  • Optimized reimplemented subForm, automatically binds sub-forms, no need to manually bind
  • Optimized required custom property

3.1.3 (2022-03-14)

  • Added required custom property, can implement required for form components with different value types

Example:

js
  //Set component as required
  const rule = {
    type:'input',
    effect:{
      required: true
    }
  }
  //Custom error message
  const rule = {
    type:'input',
    effect:{
      required: 'Custom error message'
    }
  }
  //Disable component required
  const rule = {
    type:'input',
    effect:{
      required: false
    }
  }
  • Added support for setting custom properties through $[attr]

Example:

js
  //Custom error message
  const rule = {
    type:'input',
    $required: 'Custom error message'
  }
  • Updated frame component, can operate form through form_create_helper.api
  • Updated group component props added defaultValue configuration item
  • Optimized auto-import
  • Fixed AsyncFunction method not executing issue #466

3.1.2 (2022-03-02)

  • Optimized auto-import
  • Optimized component mounting
  • Optimized default values

3.1.0 (2022-02-20)

  • Added on-demand component loading
  • Added adaptation to naive-ui
  • Added adaptation to arco-design
  • Added adaptation to element-plus 2.0
  • Refactored element-plus radio, checkbox components
  • Added html component
  • Added options, children fields support async loading
  • Added getApi method

Incompatibilities

  • Refactored element-plus upload component, some configuration items no longer work
  • Reimplemented formCreateInject, changed to receive through props

3.0.1 (2022-02-13)

  • Added sub-form supports slot extension
  • Added ant-design-vue supports TypeScript
  • Optimized select, radio, frame component modelValue types
  • Optimized form validation error when form not rendered
  • Fixed api.clearValidateState method error

3.0.0.alpha.4 (2022-01-07)

  • Added sub-form supports slot extension
  • Added ant-design-vue supports TypeScript
  • Optimized group component
  • Optimized json parsing
  • Synchronized 2.5.17 version functionality

3.0.0.alpha.3 (2021-12-28)

  • Synchronized 2.5.16 version functionality
  • Fixed option not displaying issue

3.0.0.alpha.2 (2021-11-19)

  • Adapted to vue3 version
  • Functionality consistent with 2.5.12 version

FormCreate is an open-source project released under the MIT License. Free for personal and commercial use.