@zh-keyboard/vue
Version:
基于Vue的中文虚拟键盘组件
123 lines (122 loc) • 3.18 kB
TypeScript
import { KeyBoardMode, KeyEvent } from '../types';
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
/**
* 默认的键盘模式
*/
defaultMode: {
type: () => KeyBoardMode;
default: () => "symbol" | "zh" | "en" | "hand" | "num";
};
/**
* 是否启用手写输入
*/
enableHandwriting: {
type: BooleanConstructor;
default: () => boolean;
};
/**
* 键盘定位模式
* @default 'static'
*/
position: {
type: () => "static" | "float" | "bottom";
default: () => "static" | "float" | "bottom";
};
/**
* 浮动模式下键盘与输入框的距离
* @default 10
*/
floatMarginTop: {
type: NumberConstructor;
default: () => number;
};
/**
* 当没有input获得焦点时是否禁用键盘
* @default true
*/
disableWhenNoFocus: {
type: BooleanConstructor;
default: () => boolean;
};
/**
* 数字键盘的行配置
*/
numKeys: {
type: () => string[][];
};
/**
* 是否要求 input 元素必须带有 data-inputmode 属性才弹出键盘
* @default false
*/
requireInputmode: {
type: BooleanConstructor;
default: () => boolean;
};
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
key: (payload: KeyEvent) => any;
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
/**
* 默认的键盘模式
*/
defaultMode: {
type: () => KeyBoardMode;
default: () => "symbol" | "zh" | "en" | "hand" | "num";
};
/**
* 是否启用手写输入
*/
enableHandwriting: {
type: BooleanConstructor;
default: () => boolean;
};
/**
* 键盘定位模式
* @default 'static'
*/
position: {
type: () => "static" | "float" | "bottom";
default: () => "static" | "float" | "bottom";
};
/**
* 浮动模式下键盘与输入框的距离
* @default 10
*/
floatMarginTop: {
type: NumberConstructor;
default: () => number;
};
/**
* 当没有input获得焦点时是否禁用键盘
* @default true
*/
disableWhenNoFocus: {
type: BooleanConstructor;
default: () => boolean;
};
/**
* 数字键盘的行配置
*/
numKeys: {
type: () => string[][];
};
/**
* 是否要求 input 元素必须带有 data-inputmode 属性才弹出键盘
* @default false
*/
requireInputmode: {
type: BooleanConstructor;
default: () => boolean;
};
}>> & Readonly<{
onKey?: ((payload: KeyEvent) => any) | undefined;
}>, {
enableHandwriting: boolean;
defaultMode: KeyBoardMode;
position: "static" | "float" | "bottom";
floatMarginTop: number;
disableWhenNoFocus: boolean;
requireInputmode: boolean;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
keyboardRef: HTMLDivElement;
}, HTMLDivElement>;
export default _default;