@zekibu/ctxmenu 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
*/
|
5
5
|
|
6
6
|
const SRC_FA = '//cdn.bootcdn.net/ajax/libs/font-awesome/6.4.2/css/all.min.css';
|
7
|
-
|
7
|
+
const init = (el, option = [], close = () => { }) => {
|
8
8
|
if (!el) return console.error('目标元素不存在');
|
9
9
|
el = typeof el != 'string' ? el : document.querySelector(el);
|
10
10
|
if (!el) return console.error('目标元素不存在');
|
@@ -56,6 +56,8 @@ export default init = (el, option = [], close = () => { }) => {
|
|
56
56
|
}
|
57
57
|
};
|
58
58
|
|
59
|
+
export default init;
|
60
|
+
|
59
61
|
/**
|
60
62
|
* @description: 创建Dom
|
61
63
|
* @param {*} index
|