as shown in the question
options2: [{
value: "1",
label: "",
level:3
}, {
value: "2",
label: "",
disabled: true,
level:2
}, {
value: "3",
label: "",
level:5
}, {
value: "4",
label: "",
level:2
}, {
value: "5",
label: "",
level:5
}],
value2: ""
}
}
the above is the data in select. How to judge how to add a few spaces before the data displayed in option according to the level field, for example, if level is 5, then there will be five spaces before the words of Beijing Roast Duck. The drop-down box made in this way is similar to the tree chart for guidance.