fab keep at the last position

This commit is contained in:
Gabe Yuan
2023-08-16 22:38:58 +08:00
parent 7de712b2b0
commit 7b6391a673
5 changed files with 31 additions and 6 deletions

View File

@@ -3,6 +3,7 @@ import {
DEFAULT_SETTING,
STOKEY_SETTING,
STOKEY_RULES,
STOKEY_FAB,
GLOBLA_RULE,
GLOBAL_KEY,
} from "../config";
@@ -32,6 +33,18 @@ export const getSetting = async () => ({
*/
export const getRules = async () => (await storage.getObj(STOKEY_RULES)) || [];
/**
* 查询fab位置信息
* @returns
*/
export const getFab = async () => (await storage.getObj(STOKEY_FAB)) || {};
/**
* 设置fab位置信息
* @returns
*/
export const setFab = async (obj) => await storage.setObj(STOKEY_FAB, obj);
/**
* 根据href匹配规则
* TODO: 支持通配符(*)匹配