xzx-seckbd
v0.0.9
Published
新中新安全键盘数据接入使用,用于定制安全键盘,支持前端任何框架。
Readme
Xzx Secure Keyboard
新中新安全键盘数据接入使用,用于定制安全键盘,支持前端任何框架。
- ✅ 支持
Typescript。 - ✅ 支持
Vue3、Vue2.7,支持Hooks使用。 - ✅ 支持
Vite全局配置。
原生&前端框架使用
查看 options 相关配置
import { createSeckbd } from 'xzx-seckbd'
const seckbd = createSeckbd({
// ...options
create: (e) => {
if (e.success) {
const { uuid, symbol, password, lowerLetter, upperLetter } = e.data
}
}
})Vue
<template>
<button @click="update">更新安全键盘</button>
</template>
<script setup>
import { useSeckbd } from 'xzx-seckbd/vue'
const { all, uuid, symbol, password, lowerLetter, upperLetter, update } =
useSeckbd({
// ...options,
ready: () => {},
error: (error) => {}
})
</script>Options
baseURL
Type: string
Default: ''
Description: 接口请求 baseurl
authorization
Type: string
Default: ''
Description: 请求凭证,程序优先自动寻找,如未找到,请手动传入
tenantId
Type: string
Default: ''
Description: 租户 ID,非 saas 场景下无需配置
source
Type: string
Default: h5
Description: 场景来源,默认 h5
type
Type: Number | Standard
Default: Standard
Description: 键盘类型,数字键盘和全键盘,默认全键盘
disorder
Type: boolean
Default: false
Description: 键盘是否乱序
create
Type: function
Default: (e) => {}
Description: 创建
