I'm using BootstrapVue
.
I have a json with the following structure:
1 2 3 4 5 6 |
|
So at least, to be clear, each data - based on Name
and Age
together - is unique and has no ID
(!). This is just an example for easier understanding.
What I'm trying to do now is display Name
in <b-form-select>
and Age
in the following brackets. For example: Peter (20).
Now I have the following code:
1 |
|
I need to pass value
to my parent.vue
but want to display text in it. So I decided to do it.
The only thing I need now is attention. This example is just to show what I want:
:text-field="'Name' ' ' '(' 'Age' ')'"
But this doesn't work.
How to make it run?
Additional Information - I sort my json
before running it in compulated
.
1 2 3 4 5 6 7 8 |
|
Thanks in advance!
P粉6595169062024-03-27 15:07:28
You need to map the data so that the required text is formatted into a single property, or use options
property removal and then create manually using v-for
< option>
tag.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|