mirror of
https://github.com/frappe/books.git
synced 2024-12-26 20:30:25 +00:00
32 lines
763 B
Vue
32 lines
763 B
Vue
<script>
|
|
import Base from './Base';
|
|
export default {
|
|
extends: Base,
|
|
methods: {
|
|
getInputTag() {
|
|
return 'select';
|
|
},
|
|
getInputAttrs() {
|
|
return {
|
|
id: this.id,
|
|
required: this.docfield.required,
|
|
disabled: this.disabled
|
|
};
|
|
},
|
|
getInputChildren(h) {
|
|
return this.docfield.options.map(option =>
|
|
h('option', {
|
|
attrs: {
|
|
key: option,
|
|
selected: option === this.value
|
|
},
|
|
domProps: {
|
|
textContent: option
|
|
}
|
|
})
|
|
);
|
|
}
|
|
}
|
|
}
|
|
</script>
|