Vue iview implements Select remote search to select matching values, lose focus and do not clear input values (item records)

The first idea was to use v-model for two-way data binding, but found that the input value could not be deleted after doing so. .

After checking the iview api in detail, I saw the allow-create attribute. When inputting, create a new match and hide it with css. In theory, it is fine.

The following is the practical code, fortunately it can meet the demand

css department:

Guess you like

Origin blog.csdn.net/qq_39139322/article/details/107634100