Harald Wolff 2 years ago
parent
commit
de0219f509
  1. 20
      js/lib/ln.vue.components.js

20
js/lib/ln.vue.components.js

@ -488,6 +488,18 @@ Vue.component('ln-select',{
type: Boolean,
default: true,
},
render: {
type: Function,
default: function(value){
return value;
}
},
key: {
type: Function,
default: function(key,value){
return key;
}
}
},
computed: {
prepared: {
@ -513,10 +525,10 @@ Vue.component('ln-select',{
value=""
></option>
<option
v-for="(item,key) in prepared"
:value="key"
:selected="key == value"
>{{ item }}</option>
v-for="(item,_key) in prepared"
v-bind:value="key(_key,item)"
:selected="_key == value"
>{{ render(item) }}</option>
</select>
</div>
`,

Loading…
Cancel
Save