ElemeFE / ElemeFE/element

Image add closeViewer event

Open
#22,522 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used [patch-package](https://github.com/ds300/patch-package) to patch `element-ui@2.15.6` for the project I'm working on.

Here is the diff that solved my problem:

```diff
diff --git a/node_modules/element-ui/packages/image/src/main.vue b/node_modules/element-ui/packages/image/src/main.vue
index 5598bde..209c352 100644
--- a/node_modules/element-ui/packages/image/src/main.vue
+++ b/node_modules/element-ui/packages/image/src/main.vue
@@ -236,6 +236,7 @@
closeViewer() {
document.body.style.overflow = prevOverflow;
this.showViewer = false;
+ this.$emit('closeViewer')
}
}
};
```

This issue body was [partially generated by patch-package](https://github.com/ds300/patch-package/issues/296).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.