leon-kfd / howdyjs Goto Github PK
View Code? Open in Web Editor NEW一个包含Javascript插件、Vue3组件、Vue3指令的工具库
Home Page: https://kongfandong.cn/howdy/
License: MIT License
一个包含Javascript插件、Vue3组件、Vue3指令的工具库
Home Page: https://kongfandong.cn/howdy/
License: MIT License
建议在参数4中传入HTML原生点击事件
在进行下载文件、复制数据到粘贴板或打开新窗口等,一些可能被浏览器进行安全检查的操作时,一些库如clipboard.js
需要手动传入HTML事件才能顺利完成功能。但是当前版本中,fn回调函数
并没有传递每次点击对应的事件。导致只能使用HTML标准已不推荐的全局event,这既不符合标准,也不方便于长期使用,希望后续版本能传入原生事件。
v-menu
应支持否定值以完全禁用菜单在使用过程中遇到这样的情况:
列表中有两种同结构的数据,A类数据不用触发菜单,而B类数据需要
props
(parasm同级)传入disabled
项的函数,无效,vue3警告:Extraneous non-props attributes (disabled) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.
v-menu
指令传入否定值(false
、null
、undefined
)等,代码均将传入值视为正常的Object
进行使用,导致各种报错,渲染中断。综上,除希望修复顶层disabled
项外,增加逻辑判断v-menu
的传入数据是否为false
、null
、undefined
等,用以判断是否完全禁用菜单。
分割线一旦配置了就只能一直显示,无法通过hidden
选项动态显示隐藏,在显示效果上很突兀。希望分割线支持hidden
。
末端隐藏
是指,当分割线处于可显示菜单的最后时,自动隐藏。当然应该不是优先度高的功能,因为只要支持hidden
选项即可间接实现
https://kongfandong.cn/howdy/mouse-menu/readme中,
配置
Props/指令Value (Objcet)
应为
配置
Props/指令Value (Object)
mouseMenuEl.show(x,y) 说这不是一个函数
https://github.com/leon-kfd/howdyjs/blob/master/packages/mouse-menu/types.ts
export type MenuSetting = {
fn?: MenuCallback;
label?: string | MenuCallback<string>;
tips?: string | MenuCallback<string>;
hidden?: boolean | MenuCallback<boolean>;
disabled?: boolean | MenuCallback<boolean>;
icon?: string | MenuCallback<string>;
line?: boolean;
children?: MenuSetting[]; // 应该是可选的
customClass?: string;
}
改怎么在ts项目下, 全局注册这些指令呢, 目前碰到了update报错
element 是以列为单位的
感谢大佬的组件,非常好用,简单易懂,实际项目中用的时候遇到一点问题,如下:
在右键一个元素的时候,希望能在onOpen事件里面获取到元素携带的参数,大佬能否抽空实现一下,感激不尽
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.