提交 | 用户 | 时间
|
fd2207
|
1 |
export default { |
懒 |
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 |
this.fixBugIniOS() |
|
10 |
}, |
|
11 |
methods: { |
|
12 |
fixBugIniOS() { |
|
13 |
const $subMenu = this.$refs.subMenu |
|
14 |
if ($subMenu) { |
|
15 |
const handleMouseleave = $subMenu.handleMouseleave |
|
16 |
$subMenu.handleMouseleave = (e) => { |
|
17 |
if (this.device === 'mobile') { |
|
18 |
return |
|
19 |
} |
|
20 |
handleMouseleave(e) |
|
21 |
} |
|
22 |
} |
|
23 |
} |
|
24 |
} |
|
25 |
} |