2018-06-27 14:38:27 +00:00
|
|
|
<script>
|
|
|
|
import Base from './Base';
|
|
|
|
export default {
|
2019-08-14 07:48:04 +00:00
|
|
|
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,
|
2019-08-28 08:54:11 +00:00
|
|
|
value: option,
|
|
|
|
disabled: option.indexOf('...') > -1,
|
|
|
|
selected: option.indexOf('...') > -1 || option === this.value
|
2019-08-14 07:48:04 +00:00
|
|
|
},
|
|
|
|
domProps: {
|
|
|
|
textContent: option
|
|
|
|
}
|
|
|
|
})
|
|
|
|
);
|
2018-06-27 14:38:27 +00:00
|
|
|
}
|
2019-08-14 07:48:04 +00:00
|
|
|
}
|
|
|
|
};
|
2018-06-27 14:38:27 +00:00
|
|
|
</script>
|