摘要:先上圖連接安裝運(yùn)行使用接口一覽顯示菜單隱藏菜單綁定事件提供了事件解除綁定提供了事件
先上圖
github連接
安裝yarn install / npm install運(yùn)行
npm run dev使用
.icon-table{ background: url("build/styles/images/table.png") no-repeat center; } // or .icon-table:before{ content: ""; ... }
// listener event ContextMenu.on("itemclick", function (type, e, cmd) { console.log(arguments) }) // bind comtextmenu event document.querySelector(".somedom") .addEventListener("contextmenu", function (e) { ContextMenu.show([ { text : "item-0", command: "cmd-0", cls: "icon-table" }, "-", { text: "item-1", items: [ { text: "item-1-0", command: "cmd-1-0", disabled: true }, { text: "item-1-1", command: "cmd-1-1" } ] } ], e) })接口一覽
/* * 顯示菜單 */ ContextMenu.show(items: Array, e: Event): void /* * 隱藏菜單 */ ContextMenu.hide(): void /* * 綁定事件 * 提供了 itemclick 事件 */ ContextMenu.on(event: String, hanler: Function): void /* * 解除綁定 * 提供了 itemclick 事件 */ ContextMenu.off(event: String, hanler?: Function): void
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/88309.html
摘要:復(fù)制粘貼斷線重連等常見行為很容易找到,不需要教程或口口相傳的暗示。參考十項(xiàng)全能的遠(yuǎn)程終端登錄軟件開源硬件佳軟介紹 提到SSH、Telnet等遠(yuǎn)程終端登錄,我相信很多人想到的都是PuTTY PuTTY通常用于Windows,但實(shí)際上可以多平臺(tái)運(yùn)行,因此不表達(dá)為Windows下的遠(yuǎn)程終端登錄 PuTTY足夠成熟、小巧、專注核心任務(wù),并且對(duì)編碼等常見坑的處理并不缺乏,這其實(shí)都是優(yōu)點(diǎn)。但PuT...
摘要:分享一些超好用插件,打造一個(gè)不一樣的瀏覽器編輯器。一谷歌瀏覽器插件谷歌訪問助手強(qiáng)烈推薦一鍵安裝,無(wú)需其他配置,即可訪問谷歌。谷歌瀏覽器是很耗內(nèi)存的,該插件會(huì)自動(dòng)掛起長(zhǎng)時(shí)間未使用的網(wǎng)頁(yè),來(lái)釋放系統(tǒng)資源。 showImg(https://segmentfault.com/img/remote/1460000014011338); 分享一些超好用插件,打造一個(gè)不一樣的 GitHub、瀏覽器、...
閱讀 1878·2023-04-26 02:46
閱讀 2013·2021-11-25 09:43
閱讀 1153·2021-09-29 09:35
閱讀 2108·2019-08-30 15:56
閱讀 3432·2019-08-30 15:54
閱讀 2645·2019-08-29 16:35
閱讀 3130·2019-08-29 15:25
閱讀 3302·2019-08-29 14:01