File tree Expand file tree Collapse file tree 2 files changed +10
-19
lines changed Expand file tree Collapse file tree 2 files changed +10
-19
lines changed Original file line number Diff line number Diff line change 11module . exports = {
22 root : true ,
33 env : {
4- " cypress/globals" : true ,
4+ ' cypress/globals' : true ,
55 browser : true ,
66 node : true
77 } ,
@@ -10,9 +10,9 @@ module.exports = {
1010 'plugin:vue/essential'
1111 ] ,
1212 plugins : [
13- " cypress"
13+ ' cypress'
1414 ] ,
1515 // add your custom rules here
1616 rules : { } ,
1717 globals : { }
18- }
18+ }
Original file line number Diff line number Diff line change 11<template >
2- <a class =" vue-skip-to" :href =" to" >
2+ <a
3+ class =" vue-skip-to"
4+ :href =" to"
5+ @click.prevent =" handleFocusElement"
6+ >
37 <slot >{{ text }}</slot >
48 </a >
59</template >
@@ -19,22 +23,9 @@ export default {
1923 }
2024 },
2125
22- mounted () {
23- this .init ()
24- },
25-
26- beforeDestroy () {
27- window .removeEventListener (' hashchange' , this .handleFocusElement , false )
28- },
29-
3026 methods: {
31- init () {
32- window .addEventListener (' hashchange' , this .handleFocusElement , false )
33- if (location .hash && location .hash .substring (1 )) this .handleFocusElement ()
34- },
35-
36- handleFocusElement () {
37- this .focusElement (location .hash .substring (1 ))
27+ handleFocusElement ({ target }) {
28+ this .focusElement (target .getAttribute (' href' ).substring (1 ))
3829 },
3930
4031 focusElement (id ) {
You can’t perform that action at this time.
0 commit comments