mirror of
https://github.com/frappe/books.git
synced 2024-11-10 15:50:56 +00:00
31 lines
722 B
Vue
31 lines
722 B
Vue
|
<script>
|
||
|
import Base from './Base';
|
||
|
export default {
|
||
|
extends: Base,
|
||
|
methods: {
|
||
|
getInputTag() {
|
||
|
return 'select';
|
||
|
},
|
||
|
getInputAttrs() {
|
||
|
return {
|
||
|
id: this.id,
|
||
|
required: this.docfield.required
|
||
|
};
|
||
|
},
|
||
|
getInputChildren(h) {
|
||
|
return this.docfield.options.map(option =>
|
||
|
h('option', {
|
||
|
attrs: {
|
||
|
key: option,
|
||
|
selected: option === this.value
|
||
|
},
|
||
|
domProps: {
|
||
|
textContent: option
|
||
|
}
|
||
|
})
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|