Skip to content

Commit

Permalink
传递点击事件和传递未声明为 props 的属性
Browse files Browse the repository at this point in the history
  • Loading branch information
sengoku-f committed Sep 20, 2024
1 parent 9f756cc commit 256cdc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ksw-rpom-icon-vue",
"version": "0.1.3",
"version": "0.1.4",
"license": "ISC",
"description": "KSW RPOM ICON",
"main": "packages/cjs/index.js",
Expand Down
4 changes: 4 additions & 0 deletions src/runtime/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export function IconWrapper(name, spin, render) {
"span",
{
class: cls.join(" "),
// 传递事件监听器
on: this.$listeners,
// 传递未声明为 props 的属性
attrs: this.$attrs,
},
[render(h, this)]
);
Expand Down

0 comments on commit 256cdc2

Please sign in to comment.