# PatternLocker **Repository Path**: OpenHarmony1/PatternLocker ## Basic Information - **Project Name**: PatternLocker - **Description**: 一个OpenHarmony手势解锁组件 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-10-31 - **Last Updated**: 2023-05-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PatternLocker #### 项目介绍 该组件是一个9宫格手势解锁自定义样式组件 #### 项目演示 ![输入图片说明](./screenshot/demo_1.gif) ##### 基础用法 ```java //用法非常简单 //当前解锁标记组件 PatternIndicatorView({ hitIndexList: this.hitIndexList, isError: this.isError }) //当前手势解锁组件 PatternLockerView({lineWidth: 3, isError: this.isError, listener: new PatternChangeListener(this)}) ``` #### 接口及属性 | **属性** | **必填** | **说明** | | ------------------------------------ | :------: | --------------------------------------------------------- | | enableAutoClean: Boolean | 否 | 是否自动清除标志位,默认true | | freezeDuration: number | 否 | 手势解锁完成后冻结时间,默认1500 | | padding: number | 否 | 解锁圆点内边距,默认30 | | lineWidth: number | 否 | 连线宽度,默认2 | | normalColor: string | 否 | 正常显示时的颜色,默认#2196F3 | | fillColor: string | 否 | 填充颜色,默认#FFFFFF | | hitColor: string | 否 | 连线颜色,默认#3F51B5 | | errorColor: string | 否 | 手势错误时的颜色,默认#F44336 | | listener?: OnPatternChangeListener | 否 | 各种状态监听类,如onStart,onChange,onComplete,onClear | #### 版权和许可信息 ``` Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ```