Coder Social home page Coder Social logo

leon-kfd / howdyjs Goto Github PK

View Code? Open in Web Editor NEW
114.0 3.0 26.0 5.59 MB

一个包含Javascript插件、Vue3组件、Vue3指令的工具库

Home Page: https://kongfandong.cn/howdy/

License: MIT License

JavaScript 4.01% HTML 0.25% Vue 63.04% SCSS 1.37% TypeScript 30.81% CSS 0.52%
vue vite javascript typescript rollup contextmenu vue3

howdyjs's Issues

问题反馈

作者,你好,反馈个问题。tsc检测报错 文件找不到,如下图

image

mouse-menu功能请求三则:fn回调参数应传入点击事件、`v-menu`应支持否定值以完全禁用菜单、分割线支持hidden或末端隐藏

1、fn回调参数传入点击事件

建议在参数4中传入HTML原生点击事件
在进行下载文件、复制数据到粘贴板或打开新窗口等,一些可能被浏览器进行安全检查的操作时,一些库如clipboard.js需要手动传入HTML事件才能顺利完成功能。但是当前版本中,fn回调函数并没有传递每次点击对应的事件。导致只能使用HTML标准已不推荐的全局event,这既不符合标准,也不方便于长期使用,希望后续版本能传入原生事件。

2、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指令传入否定值(falsenullundefined)等,代码均将传入值视为正常的Object进行使用,导致各种报错,渲染中断。

综上,除希望修复顶层disabled项外,增加逻辑判断v-menu的传入数据是否为falsenullundefined等,用以判断是否完全禁用菜单。

3、分割线支持hidden或末端隐藏

分割线一旦配置了就只能一直显示,无法通过hidden选项动态显示隐藏,在显示效果上很突兀。希望分割线支持hidden
末端隐藏是指,当分割线处于可显示菜单的最后时,自动隐藏。当然应该不是优先度高的功能,因为只要支持hidden选项即可间接实现

0、文档错别字提醒

https://kongfandong.cn/howdy/mouse-menu/readme中,

配置
Props/指令Value (Objcet)

应为

配置
Props/指令Value (Object)

build.js 一处疑问

script/build.js 文件中,我红线划的这句里,__dirname 是不是应该改成 dirName ?

image

@howdyjs/mouse-menu的onOpen事件能否传递参数

感谢大佬的组件,非常好用,简单易懂,实际项目中用的时候遇到一点问题,如下:
在右键一个元素的时候,希望能在onOpen事件里面获取到元素携带的参数,大佬能否抽空实现一下,感激不尽

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.