The drop-down box in the vue project can be selected either single or multiple.

element-ui, is used in the vue project. There is a requirement that there is a drop-down box. The data in the drop-down box is obtained from the data dictionary in the background. Some of the data in the drop-down box are single selection and some are multiple selection. At the current level, we can only achieve the function of single selection or multiple selection. I don"t know how the two can exist at the same time. Please ask the boss for help. Thank you

.

the specific situation, as shown in the figure, is to allow users to choose in the inclusion level. Only one can be selected in SSCI or above (single selection), and multiple selections can be selected in the following five (multiple selections). Both single selection and multiple selection are required at the same time, and if you choose one of the single selections, the user is asked to fill in the impact factors, and multiple selections do not need to fill in the impact factors. How can this be realized? thank you very much

.
Jan.19,2022

Let's take a look at the topic again. This can be done as follows:
all you need is a drop-down box for multiple selections and groups, and you can limit the data by listening to change events.
the test example is as follows: https://jsfiddle.net/starrysk.

. < hr >

divides enumeration options with radio and enumeration options with multiple selections data into two arrays .
add a button to the right of the drop-down box and click to toggle the multiple property and option data of the drop-down box .


clipboard.png
is that so?

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-1e8c24f-10b4.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-1e8c24f-10b4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?