mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 14:34:13 +08:00
去除 item 动画
This commit is contained in:
parent
f784e695c0
commit
dab334c471
@ -16,7 +16,9 @@
|
|||||||
@mousemove="currentIndex = index"
|
@mousemove="currentIndex = index"
|
||||||
@click="clickOK"
|
@click="clickOK"
|
||||||
manual-focus
|
manual-focus
|
||||||
:focused="index === currentIndex"
|
:class="{
|
||||||
|
'item-selected': index === currentIndex,
|
||||||
|
}"
|
||||||
:style="{
|
:style="{
|
||||||
height: itemHeight + 'px',
|
height: itemHeight + 'px',
|
||||||
paddingRight: shortCutWidth + 'px',
|
paddingRight: shortCutWidth + 'px',
|
||||||
@ -158,7 +160,9 @@ export default {
|
|||||||
case 13: // 回车
|
case 13: // 回车
|
||||||
return this.clickOK();
|
return this.clickOK();
|
||||||
}
|
}
|
||||||
this.$refs.scrollBar.scrollTo(this.currentIndex);
|
this.$nextTick(() => {
|
||||||
|
document.querySelector(".item-selected").scrollIntoViewIfNeeded(0);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
scrollHandler(e) {
|
scrollHandler(e) {
|
||||||
@ -217,5 +221,12 @@ export default {
|
|||||||
.q-item,
|
.q-item,
|
||||||
.shortcut {
|
.shortcut {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
transition: 0s;
|
||||||
|
}
|
||||||
|
.item-selected {
|
||||||
|
background: #dfe2e6;
|
||||||
|
}
|
||||||
|
.item-selected.q-item--dark {
|
||||||
|
background: #515151;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user