File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
packages/client/src/components Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ export default defineConfig({
7474 } ,
7575 } )
7676 } ,
77+ experimentalRunAllSpecs : true ,
7778 } ,
7879 env : {
7980 E2E_BASE : process . env . E2E_BASE ?? '/' ,
Original file line number Diff line number Diff line change @@ -23,6 +23,29 @@ const guardEvent = (event: MouseEvent): boolean | void => {
2323 return true
2424}
2525
26+ export interface RouteLinkProps {
27+ /**
28+ * Whether the link is active to have an active class
29+ *
30+ * Notice that the active status is not automatically determined according to the current route.
31+ *
32+ * @default false
33+ */
34+ active ?: boolean
35+
36+ /**
37+ * The class to add when the link is active
38+ *
39+ * @default 'route-link-active'
40+ */
41+ activeClass ?: string
42+
43+ /**
44+ * The route path to link to
45+ */
46+ to : string
47+ }
48+
2649/**
2750 * Component to render a link to another route.
2851 *
@@ -80,7 +103,7 @@ export const RouteLink = defineComponent({
80103 href : path . value ,
81104 onClick : ( event : MouseEvent = { } as MouseEvent ) => {
82105 if ( guardEvent ( event ) ) {
83- router . push ( path . value ) . catch ( )
106+ router . push ( props . to ) . catch ( )
84107 }
85108 } ,
86109 } ,
You can’t perform that action at this time.
0 commit comments