Comments (11)
Do you mean that when el-slider
changes, the home
end
event you customized elsewhere is executed?
from element-plus.
Do you mean that when
el-slider
changes, thehome
end
event you customized elsewhere is executed?
是的,我不需要slider去响应home和end按键的事件,因为这两个按键已经被绑定做其他事情,而且我的应用里也不需要用快捷键去调整至最小值或最大值
from element-plus.
Will this problem occur with el-number-input
?
from element-plus.
Will this problem occur with
el-number-input
?
我没有使用el-number-input ,只使用了 el-slider,当el-slider获得焦点的时候,就会响应home按键
from element-plus.
It would be better to provide a detailed example in the playground.
This may help you solve the problem faster.
from element-plus.
It would be better to provide a detailed example in the playground.
其实不需要我提供一个自己的example,官网上的sl-slider的例子就可以测试呀
https://element-plus.org/zh-CN/component/slider.html
只要el-slider获得焦点,你按home按键或者end按键,他都会自动调整到最小值或者最大值
你可以测试一下,但是我在官方文档却没看到有提供 移除这种快捷按键的办法
而且我上面提交的资料里,有一个playground的例子,我已经提供了
from element-plus.
I see
from element-plus.
You can set a public value to temporarily solve your problem.
from element-plus.
You can set a public value to temporarily solve your problem.
没什么变化,只要点击slider的滑块,然后按home或者end按键,一样是可以操作这个slider,@click.stop 好像并没有起任何作用,我发现@keydown.stop 可以拦截键盘事件传递给子元素,但是对这个slider无效,并不能阻止他响应键盘事件,他内部是如何实现的?全局键盘监听?现在好像并没有办法让他不响应....
from element-plus.
You can set a public value to temporarily solve your problem.
找到办法了,我翻了下他的代码
const onHomeKeyDown = () => {
if (disabled.value) return
setPosition(0)
emitChange()
}
我在keydown.capture 中设置disable, keyup.capture中取消disable就可以了,他并没有提供取消的办法,唯一让他不响应的就是disable状态,只能这么处理
from element-plus.
It is best to handle this problem by adding a new props attribute with a default value of true
.
You can try submitting a PR yourself or wait for someone else or me to be available to fix this.
from element-plus.
Related Issues (20)
- [Component] [radio] radio无法被选中 HOT 4
- [Style] [dropdown] Dropdown 下拉菜单 HOT 6
- [Component] [tree-select] 开启 `allow-create` 时样式错乱
- [Component] [All] Failed to resolve component: el-button If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. HOT 1
- [Component] [select]: select 配置可清空功能,清空后值变成undefined,类型发生变化 HOT 7
- [Component] [row, col] 当横向渲染分辨率设置为767px时el-col组件布局失去响应式。
- [IDEA] more Types HOT 1
- [Feature Request] More types HOT 5
- [tree-select] el-tree-select
- [Component] [select, select-v2] select中添加了tagTooltip但popper-options属性不能定义导致tagTooltip显示是会被盖住
- [Component] [input] focus事件里面执行blur,会再次出发focus事件 HOT 2
- [Component] [tree] Tree组件 setCheckedKeys接口中leafOnly参数设置无效
- [Component] [tree] 官网上 el-tree 自定义节点类名这个例子好像有问题,叶子节点横向显示有问题 HOT 2
- [Component] [dialog] edge浏览器使用 el-dialog 中嵌套 video 标签,导致video更多选项不显示 HOT 7
- [Component] [button] Button link variant has invalid color HOT 13
- [Component] [tree] 使用tree 拖动元素时候,如果超出了tree的可操作区域就不应该拖动成功,现在可以拖动成功
- [Component] [All] 在谷歌21版本的浏览器中,el-input输入中文自动带入拼音 HOT 3
- [Component] [table-v2] Component] [table-v2] el-table-v2 设置columns的fixed属性后,如果row-key使用数字或者数字开头的字符串,onRowHovered 事件报错
- [Component] [tree-select] TreeSelect 在文档中的分类应当为 Form 表单组件
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from element-plus.