feat: 添加控笔页
This commit is contained in:
@@ -6,9 +6,16 @@ import {
|
||||
type MathTypeConfig,
|
||||
type MathTypeAction,
|
||||
} from './registry';
|
||||
import { getPublishMetaByMathState, MATH_WORKSHEET_DEFINITIONS } from './mathDraw.config';
|
||||
import {
|
||||
getPublishMetaByMathState,
|
||||
MATH_WORKSHEET_DEFINITIONS,
|
||||
} from './mathDraw.config';
|
||||
import type { DebugPublishMeta } from '../../utils/debugPublish';
|
||||
import { addFavorite, removeFavorite, batchCheckFavorited } from '../../utils/favorites';
|
||||
import {
|
||||
addFavorite,
|
||||
removeFavorite,
|
||||
batchCheckFavorited,
|
||||
} from '../../utils/favorites';
|
||||
|
||||
const TYPE_LIST = MATH_TYPE_CONFIGS.map((t) => ({
|
||||
id: t.id,
|
||||
@@ -135,9 +142,10 @@ createMathPage({
|
||||
selectedTypeId: id,
|
||||
functionId: id,
|
||||
pageTitle: title,
|
||||
isPreviewFavorite: !!this._favoritedMap[
|
||||
getPublishMetaByMathState(id, id, mode)?.id || id
|
||||
],
|
||||
isPreviewFavorite:
|
||||
!!this._favoritedMap[
|
||||
getPublishMetaByMathState(id, id, mode)?.id || id
|
||||
],
|
||||
showActions: !!typeConfig.actions,
|
||||
currentActions: typeConfig.actions || [],
|
||||
actionsTitle: typeConfig.actionsTitle || '选择模式',
|
||||
@@ -178,7 +186,8 @@ createMathPage({
|
||||
this.setData({
|
||||
currentMode: value,
|
||||
pageTitle: title,
|
||||
isPreviewFavorite: !!this._favoritedMap[this.getWorksheetStatsIdFor(value)],
|
||||
isPreviewFavorite:
|
||||
!!this._favoritedMap[this.getWorksheetStatsIdFor(value)],
|
||||
});
|
||||
|
||||
this.initPageInfo(this.data.functionId, title);
|
||||
|
||||
Reference in New Issue
Block a user