feat: 添加控笔页

This commit is contained in:
R524809
2026-05-28 16:46:30 +08:00
parent 824e83c887
commit 2f0c4ab591
21 changed files with 1406 additions and 169 deletions
@@ -136,7 +136,8 @@ export const FOCUS_WORKSHEET_DEFINITIONS = [
},
] as const satisfies ReadonlyArray<FocusWorksheetDefinition>;
type FocusWorksheetDefinitionItem = (typeof FOCUS_WORKSHEET_DEFINITIONS)[number];
type FocusWorksheetDefinitionItem =
(typeof FOCUS_WORKSHEET_DEFINITIONS)[number];
const FOCUS_WORKSHEET_BY_ID = Object.fromEntries(
FOCUS_WORKSHEET_DEFINITIONS.map((item) => [item.id, item]),
+15 -6
View File
@@ -6,9 +6,16 @@ import {
type FocusTypeConfig,
type FocusTypeAction,
} from './registry';
import { getPublishMetaByFocusState, FOCUS_WORKSHEET_DEFINITIONS } from './focusDraw.config';
import {
getPublishMetaByFocusState,
FOCUS_WORKSHEET_DEFINITIONS,
} from './focusDraw.config';
import type { DebugPublishMeta } from '../../utils/debugPublish';
import { addFavorite, removeFavorite, batchCheckFavorited } from '../../utils/favorites';
import {
addFavorite,
removeFavorite,
batchCheckFavorited,
} from '../../utils/favorites';
const TYPE_LIST = FOCUS_TYPE_CONFIGS.map((t) => ({
id: t.id,
@@ -124,9 +131,10 @@ createFocusPage({
selectedTypeId: id,
functionId: id,
pageTitle: title,
isPreviewFavorite: !!this._favoritedMap[
getPublishMetaByFocusState(id, id, mode)?.id || id
],
isPreviewFavorite:
!!this._favoritedMap[
getPublishMetaByFocusState(id, id, mode)?.id || id
],
showActions: !!typeConfig.actions,
currentActions: typeConfig.actions || [],
actionsTitle: typeConfig.actionsTitle || '选择模式',
@@ -163,7 +171,8 @@ createFocusPage({
this.setData({
currentMode: value,
pageTitle: title,
isPreviewFavorite: !!this._favoritedMap[this.getWorksheetStatsIdFor(value)],
isPreviewFavorite:
!!this._favoritedMap[this.getWorksheetStatsIdFor(value)],
});
this.initPageInfo(this.data.functionId, title);