mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #3965 - For SelectButton
This commit is contained in:
parent
e562695287
commit
808b7625ac
3 changed files with 57 additions and 44 deletions
41
components/lib/selectbutton/BaseSelectButton.vue
Normal file
41
components/lib/selectbutton/BaseSelectButton.vue
Normal file
|
@ -0,0 +1,41 @@
|
|||
<script>
|
||||
import BaseComponent from 'primevue/basecomponent';
|
||||
|
||||
const classes = {
|
||||
root: ({ props }) => ['p-selectbutton p-buttonset p-component', { 'p-disabled': props.disabled }],
|
||||
button: ({ instance, option }) => [
|
||||
'p-button p-component',
|
||||
{
|
||||
'p-highlight': instance.isSelected(option),
|
||||
'p-disabled': instance.isOptionDisabled(option)
|
||||
}
|
||||
],
|
||||
label: 'p-button-label'
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'BaseSelectButton',
|
||||
extends: BaseComponent,
|
||||
props: {
|
||||
modelValue: null,
|
||||
options: Array,
|
||||
optionLabel: null,
|
||||
optionValue: null,
|
||||
optionDisabled: null,
|
||||
multiple: Boolean,
|
||||
unselectable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
disabled: Boolean,
|
||||
dataKey: null,
|
||||
'aria-labelledby': {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
css: {
|
||||
classes
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue