修复列表的聚焦问题

pull/930/merge
lyswhut 2022-01-27 09:33:49 +08:00
parent f5ce46431b
commit 35be9739d4
2 changed files with 2 additions and 1 deletions

View File

@ -5,3 +5,4 @@
### 修复 ### 修复
- 修复快捷键与默认按键行为冲突的问题现在若将某些有默认行为的按键如在列表中上、下箭头、Home、End等键可以使列表滚动设置为快捷键时将禁用其默认行为 - 修复快捷键与默认按键行为冲突的问题现在若将某些有默认行为的按键如在列表中上、下箭头、Home、End等键可以使列表滚动设置为快捷键时将禁用其默认行为
- 修复列表的聚焦问题,现在在列表中使用上、下箭头、空格等键滚动列表时不会导致滚动到一定距离后丢失焦点的问题

View File

@ -1,5 +1,5 @@
<template> <template>
<component :is="containerEl" :class="containerClass" ref="dom_scrollContainer" style="height: 100%; overflow: auto; position: relative; display: block; contain: strict;"> <component :is="containerEl" :class="containerClass" tabindex="0" ref="dom_scrollContainer" style="outline: none; height: 100%; overflow: auto; position: relative; display: block; contain: strict;">
<component :is="contentEl" :class="contentClass" :style="contentStyle"> <component :is="contentEl" :class="contentClass" :style="contentStyle">
<div v-for="item in views" :key="item.key" :style="item.style"> <div v-for="item in views" :key="item.key" :style="item.style">
<slot name="default" v-bind="{ item: item.item, index: item.index }" /> <slot name="default" v-bind="{ item: item.item, index: item.index }" />