node-red / node-red/node-red.github.io

Document node 'button' property

未關閉
#45 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
JavaScript
星號
118
分支
161
平均合併
8 小時 18 分鐘
30 天內合併 PR
4

描述

button: {
            toggle: "active",
            enabled: function() {
                return !this.changed
            },
            onclick: function() { }
}

Notes:

  1. toggle identifies this should be a toggle switch (as used by Debug node). Value is a string that identifies the node property whose value should be toggled between true and false.
  2. enabled is a function that can be used to determine if the button is active or not - cannot be used with toggle - new for 0.17.
  3. onclick is a function that is called when the button is clicked. This function is called regardless of what the enabled function may have returned; in other words, even if enabled returned false, this function will still be called when the button is clicked. This allows the node to display a custom notification to tell the user why the button is not enabled.

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

未指定文件或測試。找出現有的 Node-RED 節點屬性文件,並檢視類似按鈕選項的描述方式。記錄 toggle、enabled 和 onclick,包括它們的限制與行為;完成的標準是涵蓋這三個屬性,以及所指出的不相容性和回呼行為。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript
領域
documentation
Issue 類型
文件
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。