c893cc3408b6cd6dad5fa4a404b770881dce8208.svn-base 659 B

1234567891011121314151617181920212223242526
  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. // 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. }