feat: 锁屏遮罩添加系统重置等待
This commit is contained in:
@@ -7,14 +7,14 @@ import { defineStore } from 'pinia';
|
||||
/**锁屏信息类型 */
|
||||
type Locked = {
|
||||
/**锁屏类型 */
|
||||
type: 'none' | 'lock' | 'reload' | string;
|
||||
type: 'none' | 'lock' | 'reload' | 'reset' ;
|
||||
/**lock 超时锁屏时间,秒*/
|
||||
lockTimeout: number;
|
||||
};
|
||||
|
||||
const useLockedStore = defineStore('locked', {
|
||||
state: (): Locked => ({
|
||||
type: localGet(CACHE_LOCAL_LOCK) || 'none',
|
||||
type: (localGet(CACHE_LOCAL_LOCK) || 'none') as Locked['type'],
|
||||
lockTimeout: 0,
|
||||
}),
|
||||
getters: {},
|
||||
@@ -38,7 +38,7 @@ const useLockedStore = defineStore('locked', {
|
||||
}
|
||||
},
|
||||
// 设置锁定
|
||||
async fnLock(type: 'none' | 'lock' | 'reload' | string) {
|
||||
async fnLock(type: Locked['type'] ) {
|
||||
this.type = type;
|
||||
localSet(CACHE_LOCAL_LOCK, type);
|
||||
if (type === 'reload') {
|
||||
|
||||
Reference in New Issue
Block a user