提交 | 用户 | age
|
2a61f6
|
1 |
export default { |
L |
2 |
computed: { |
|
3 |
device() { |
|
4 |
return this.$store.state.app.device |
|
5 |
} |
|
6 |
}, |
|
7 |
mounted() { |
|
8 |
// In order to fix the click on menu on the ios device will trigger the mouseleave bug |
|
9 |
// https://github.com/PanJiaChen/vue-element-admin/issues/1135 |
|
10 |
this.fixBugIniOS() |
|
11 |
}, |
|
12 |
methods: { |
|
13 |
fixBugIniOS() { |
|
14 |
const $subMenu = this.$refs.subMenu |
|
15 |
if ($subMenu) { |
|
16 |
const handleMouseleave = $subMenu.handleMouseleave |
|
17 |
$subMenu.handleMouseleave = (e) => { |
|
18 |
if (this.device === 'mobile') { |
|
19 |
return |
|
20 |
} |
|
21 |
handleMouseleave(e) |
|
22 |
} |
|
23 |
} |
|
24 |
} |
|
25 |
} |
|
26 |
} |