Iview assigns an asynchronous value to the data bound to the select component, how to avoid triggering rules verification of Form?

topic description

using the select component of iview, the data in the component needs to be obtained asynchronously. After obtaining the assignment, rules verification in Form is triggered, resulting in an error message as soon as the page is opened

sources of topics and their own ideas

using created to get the data and return the assignment, removing the trigger: "change", in rules will still trigger the verification of rules, with an error prompt

rulestriggerblurblurrules

.

related codes

select components

<FormItem label="" prop="fundsCategory">
    <Select v-model="formValidate.fundsCategory">
        <Option v-for="item in initData.fundsCategory" :value="item.value" :key="item.value" :label="item.label"></Option>
    </Select>
</FormItem>

Form components

<Form ref="projectAddForm" :model="formValidate" :rules="ruleValidate" :label-width="180">

get select data asynchronously

this.initData.fundsCategory = (await Ajax.get("/api/xxxxxxxxx")).data.result.map((item:any) => {
    return {
        label: item.displayName,
        value: item.id
    }
})
rules in rules validation
fundsCategory: [{ required: true, type: "number", message: "" }], 

how can you avoid triggering rules validation when assigning values asynchronously? Or how to get iview to validate rules after all asynchronous requests come back? Please give us your advice

Apr.05,2021

has not had this problem since it was upgraded to iview 3.0.0.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea66fc-1dd8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea66fc-1dd8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?