The pits encountered in Ant Design Vue (3) The placeholder properties of a-select and tree-select components do not work

One, the scene

When using Ant Design, the placeholder set when using a-select and tree-select components in the form has not been displayed.

Two, cause

The a-select and tree-select components use the v-model binding value because it is requested from the background and the initial value is set "", so the placeholder does not take effect.

Three, the solution

For a-select components, v-model binding initial value may be modified to undefinedtake effect.
For tree-select components, v-model binding can be modified to an initial value nullor undefinedmay take effect.

Guess you like

Origin blog.csdn.net/weixin_49299412/article/details/112647390