mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-22 07:50:36 +01:00
fix(module): boolean types and bump nuxt to 3.8.2 (#1006)
This commit is contained in:
@@ -7,7 +7,7 @@ import { useShortcuts } from './useShortcuts'
|
||||
export interface ShortcutConfig {
|
||||
handler: Function
|
||||
usingInput?: string | boolean
|
||||
whenever?: WatchSource<Boolean>[]
|
||||
whenever?: WatchSource<boolean>[]
|
||||
}
|
||||
|
||||
export interface ShortcutsConfig {
|
||||
@@ -20,7 +20,7 @@ export interface ShortcutsOptions {
|
||||
|
||||
interface Shortcut {
|
||||
handler: Function
|
||||
condition: ComputedRef<Boolean>
|
||||
condition: ComputedRef<boolean>
|
||||
chained: boolean
|
||||
// KeyboardEvent attributes
|
||||
key: string
|
||||
@@ -149,7 +149,7 @@ export const defineShortcuts = (config: ShortcutsConfig, options: ShortcutsOptio
|
||||
}
|
||||
|
||||
// Create shortcut computed
|
||||
const conditions: ComputedRef<Boolean>[] = []
|
||||
const conditions: ComputedRef<boolean>[] = []
|
||||
if (!(shortcutConfig as ShortcutConfig).usingInput) {
|
||||
conditions.push(logicNot(usingInput))
|
||||
} else if (typeof (shortcutConfig as ShortcutConfig).usingInput === 'string') {
|
||||
|
||||
Reference in New Issue
Block a user