Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

颜色选择器 colorpicker 鼠标首次按下并拖动选择颜色的建议 #1922

Closed
4 tasks done
icejd opened this issue May 20, 2024 · 0 comments · Fixed by #1923
Closed
4 tasks done

颜色选择器 colorpicker 鼠标首次按下并拖动选择颜色的建议 #1922

icejd opened this issue May 20, 2024 · 0 comments · Fixed by #1923
Labels
enhancement 改进或增强 resolved 已解决或已优化的问题

Comments

@icejd
Copy link

icejd commented May 20, 2024

议题条件

  • 我确认已查看官方使用文档:https://layui.dev ,但没有找到相关解决方案。
  • 我确认已在 Issues 中搜索过类似的问题,但没有找到相关解决方案。
  • 我已仔细阅读: 🍀 Layui Issue 贡献指南

议题类型

功能请求

使用版本

v2.9.10

问题描述

使用颜色选择器时,如果首次鼠标左键按下并移动鼠标,颜色并没有实时跟随鼠标的移动而变化。需要先松开鼠标左键,然后将鼠标移动到选择器中的小圈上,再次按下并拖动这个小圈,这样颜色才会随着拖动而实时改变。
这不是BUG,,如果不是我使用不当的话,就只当是一个优化建议吧

业务代码

var form = layui.form, colorpicker = layui.colorpicker;
colorpicker.render({
    elem: '#tplstyle-color',
    color: '@(Model.tplstyle)',
    done: function (color) {
          changeBackgroundColor(color);
    },
    change: function (color) {
        changeBackgroundColor(color);
    },
});

截图补充

No response

浏览器

Microsoft Edge 125.0.2535.51

演示地址

No response

友好承诺

  • 我承诺将本着相互尊重、理解和友善的态度进行交流,共同维护 Layui 良好的社区氛围。
@sentsim sentsim added the enhancement 改进或增强 label May 20, 2024
@Sight-wcg Sight-wcg added the resolved 已解决或已优化的问题 label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 改进或增强 resolved 已解决或已优化的问题
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants