summaryrefslogtreecommitdiff
path: root/UI source code/dns_mapping_ui-master/src/layout/components/Sidebar/FixiOSBug.js
diff options
context:
space:
mode:
authorunknown <[email protected]>2022-06-24 17:11:23 +0800
committerunknown <[email protected]>2022-06-24 17:11:23 +0800
commit8565e1bb597b481447d33bac6d8c48c2c45215de (patch)
treea4f10c8f7f85a1a8b5c947f7d0d2f967d808a9c4 /UI source code/dns_mapping_ui-master/src/layout/components/Sidebar/FixiOSBug.js
parent8165dfcc7bdb0b2e6f1c05f8e7c93553c0e7911e (diff)
upload UI source codeHEADmain
Diffstat (limited to 'UI source code/dns_mapping_ui-master/src/layout/components/Sidebar/FixiOSBug.js')
-rw-r--r--UI source code/dns_mapping_ui-master/src/layout/components/Sidebar/FixiOSBug.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/UI source code/dns_mapping_ui-master/src/layout/components/Sidebar/FixiOSBug.js b/UI source code/dns_mapping_ui-master/src/layout/components/Sidebar/FixiOSBug.js
new file mode 100644
index 0000000..bc14856
--- /dev/null
+++ b/UI source code/dns_mapping_ui-master/src/layout/components/Sidebar/FixiOSBug.js
@@ -0,0 +1,26 @@
+export default {
+ computed: {
+ device() {
+ return this.$store.state.app.device
+ }
+ },
+ mounted() {
+ // In order to fix the click on menu on the ios device will trigger the mouseleave bug
+ // https://github.com/PanJiaChen/vue-element-admin/issues/1135
+ this.fixBugIniOS()
+ },
+ methods: {
+ fixBugIniOS() {
+ const $subMenu = this.$refs.subMenu
+ if ($subMenu) {
+ const handleMouseleave = $subMenu.handleMouseleave
+ $subMenu.handleMouseleave = (e) => {
+ if (this.device === 'mobile') {
+ return
+ }
+ handleMouseleave(e)
+ }
+ }
+ }
+ }
+}