Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

【禁止拖拽功能】鼠标操作表格时候拖拽太容易被触发了 而且对这个功能不是特别需要,建议增加原生的禁止拖拽 #1078

Closed
lhtuling opened this issue Jul 4, 2022 · 3 comments

Comments

@lhtuling
Copy link

lhtuling commented Jul 4, 2022

如题
鼠标操作时候特别容易误拖动

@luncheon
Copy link
Contributor

luncheon commented Jul 4, 2022

This is not an official answer, but I think that if you do this after initialization is complete, you can stop moving cells by dragging.

$("#luckysheet-cell-main div.luckysheet-cs-draghandle").off('mousedown')

Relevant source:
https://github.com/mengshukeji/Luckysheet/blob/v2.1.13/src/controllers/handler.js#L4291

@lhtuling
Copy link
Author

lhtuling commented Jul 4, 2022

感谢你的回答!帮大忙了 能实现功能即可 官方能直接搞个配置更好!

@lhtuling lhtuling closed this as completed Jul 4, 2022
@luncheon
Copy link
Contributor

This CSS solution might be better.

.luckysheet-cs-draghandle {
  display: none !important;
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants