layui / layui/layui

[colorpicker] cancel不起作用

Open
#3,078 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

usage
Dominant language
JavaScript
Stars
30.6k
Forks
7.4k
Avg merge
7m
Merged PRs (30d)
1

Description

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

疑是 BUG

使用版本

v2.13.2

问题描述

点击“清除”按钮,没有弹出:123

业务代码
colorpicker.render({
    elem: '#ID-colorpicker-demo-all',
    color: '#16baaa',
    cancel: function(color){
      alert(123)
    }
   });
截图补充
Image
浏览器

火狐149

演示地址

No response

友好承诺
  • 我承诺将本着相互尊重、理解和友善的态度进行交流,共同维护 Layui 良好的社区氛围。

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the colorpicker.render entry point shown in the issue and reproduce the clear-button behavior in Firefox 149 using the provided callback and colorpicker demo element. Trace when the cancel callback should run and compare the result with the documented behavior at layui.dev. Done means clicking “clear” invokes alert(123) as reported by the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.