secure-action
Version:
Secure Action 是一个基于行为的验证码组件,适用于 Vue 3。
21 lines (20 loc) • 641 B
TypeScript
import type { Plugin } from 'vue';
/**
* 组件外部使用use时执行install,然后将组件注册为全局
*/
export type SFCWithInstall<T> = T & {
name: string;
} & Plugin;
/**
* 定义一个withInstall方法处理以下组件类型问题
* @param comp
*/
export declare const withInstall: <T>(comp: T, name: string) => SFCWithInstall<T>;
/**
* 判断新坐标点是否在半径为 r 的范围内
* 并更新坐标点数组
* @param points 坐标数组
* @param newPoint 新坐标点
* @returns
*/
export declare function addPoint(points: [number, number][], newPoint: [number, number], r?: number): [number, number][];