2222 </router-link >
2323</template >
2424
25- <script lang="ts" >
25+ <script >
2626import { ModeType , Config , Store } from " ./Model" ;
2727import { withTargetLocation , mixins } from " @/mixins" ;
28-
29- export default mixins (withTargetLocation (" #" )).extend ({
28+ export default {
3029 name: " FdSideNavLink" ,
30+ mixins: [withTargetLocation (" #" )],
3131 inject: {
3232 sideNavStore: { default: null },
3333 sideNavItem: { default: null },
@@ -37,36 +37,33 @@ export default mixins(withTargetLocation("#")).extend({
3737 ariaSelected () {
3838 return this .selected ? " true" : null ;
3939 },
40- parentItemId(): string {
41- // @ts-ignore
40+ parentItemId () {
4241 return this .sideNavItem .uid ;
4342 },
44- store(): Store {
45- // @ts-ignore
43+ store () {
4644 return this .sideNavStore ;
4745 },
48- config(): Config {
49- // @ts-ignore
46+ config () {
5047 return this .$config ;
5148 },
52- manualModeEnabled(): boolean {
49+ manualModeEnabled () {
5350 return this .mode === " manual" ;
5451 },
55- mode(): ModeType {
52+ mode () {
5653 return this .config .mode ;
5754 },
58- hasChildren(): boolean {
55+ hasChildren () {
5956 return this .store .hasSubItems (this .parentItemId );
6057 },
61- selected(): boolean {
58+ selected () {
6259 return this .store .selected (this .parentItemId );
6360 },
6461 routerLinkClasses () {
6562 return {
6663 " has-child" : this .hasChildren
6764 };
6865 },
69- classes(): object {
66+ classes () {
7067 return {
7168 " has-child" : this .hasChildren ,
7269 " is-selected" : this .selected
@@ -78,16 +75,16 @@ export default mixins(withTargetLocation("#")).extend({
7875 this .store .selectedId = this .parentItemId ;
7976 this .store .toggleExpanded (this .parentItemId );
8077 },
81- onRouterLinkClick(): void {
78+ onRouterLinkClick () {
8279 this .selectSelf ();
8380 this .pushLocation ();
8481 },
85- onClick(event : Event ) : void {
82+ onClick (event ) {
8683 event .preventDefault ();
8784 event .stopPropagation ();
8885 this .selectSelf ();
8986 this .pushLocation ();
9087 }
9188 }
92- }) ;
89+ };
9390 </script >
0 commit comments