mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #5130
This commit is contained in:
parent
88bb7e6980
commit
c138ef5aa2
8 changed files with 40 additions and 24 deletions
|
@ -71,6 +71,7 @@
|
|||
@dblclick="onItemDblClick($event, item, 0)"
|
||||
@touchend="onItemTouchEnd"
|
||||
@mousedown="onOptionMouseDown(i, 'sourceList')"
|
||||
@mousemove="onOptionMouseMove(i, 'sourceList')"
|
||||
role="option"
|
||||
:aria-selected="isSelected(item, 0)"
|
||||
v-bind="getPTOptions(item, 'item', `${idSource}_${i}`, 0)"
|
||||
|
@ -162,6 +163,7 @@
|
|||
@dblclick="onItemDblClick($event, item, 1)"
|
||||
@keydown="onItemKeyDown($event, 'targetList')"
|
||||
@mousedown="onOptionMouseDown(i, 'targetList')"
|
||||
@mousemove="onOptionMouseMove(i, 'targetList')"
|
||||
@touchend="onItemTouchEnd"
|
||||
role="option"
|
||||
:aria-selected="isSelected(item, 1)"
|
||||
|
@ -313,6 +315,11 @@ export default {
|
|||
this.focused[listType] = true;
|
||||
this.focusedOptionIndex = index;
|
||||
},
|
||||
onOptionMouseMove(index, listType) {
|
||||
if (this.focusOnHover && this.focused[listType]) {
|
||||
this.changeFocusedOptionIndex(index, listType);
|
||||
}
|
||||
},
|
||||
moveUp(event, listIndex) {
|
||||
if (this.d_selection && this.d_selection[listIndex]) {
|
||||
let valueList = [...this.modelValue[listIndex]];
|
||||
|
@ -902,7 +909,7 @@ export default {
|
|||
return ObjectUtils.isEmpty(this[list]);
|
||||
},
|
||||
hasSelectedOption(listType) {
|
||||
return listType === 'sourceList' ? ObjectUtils.isNotEmpty(this.d_selection[0]) : ObjectUtils.isNotEmpty(this.d_selection[0]);
|
||||
return listType === 'sourceList' ? ObjectUtils.isNotEmpty(this.d_selection[0]) : ObjectUtils.isNotEmpty(this.d_selection[1]);
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue