Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

v0.4.0

Compare
Choose a tag to compare
@Jinjiang Jinjiang released this 14 Nov 09:43
  • new experimental MixinTravel

    Extended instance methods:

    • travel($event[, name])

    Extended Vue component option:

    • travel: TravelConfig (for default name)
    • travel: Record<name, TravelConfig>

    The format of `TravelConfig:

    required methods:

    • getIndex(vm: Vue): number
    • setIndex(vm: Vue, index: number): void
    • getItems(vm: Vue): Array<any>

    optional properties:

    • orientation?: string
    • hasPagination?: boolean
    • hasSearch?: boolean

    optional travel methods:

    • move?( vm: Vue, event: KeyboardEvent, newIndex: number, oldIndex: number, items: Array<any> ): any;
    • search?( vm: Vue, event: KeyboardEvent, keyword: string, index: number, items: Array<any> ): any;
    • nextPage?( vm: Vue, event: KeyboardEvent, index: number, items: Array<any> ): any;
    • prevPage?( vm: Vue, event: KeyboardEvent, index: number, items: Array<any> ): any;

    optional action methods:

    • action?(vm: Vue, event: KeyboardEvent, index: number, items: Array<any>): any;
    • enter?(vm: Vue, event: KeyboardEvent, index: number, items: Array<any>): any;
    • space?(vm: Vue, event: KeyboardEvent, index: number, items: Array<any>): any;
    • esc?(vm: Vue, event: KeyboardEvent, index: number, items: Array<any>): any;

    The docs will be added later when it's stable enough.

  • renamed MixinKeyShortcuts into MixinShortcuts

  • deprecated old MixinKeyTravel & MixinKeyShortcuts