feat:作业纸
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
// };
|
||||
|
||||
/** 当前应用版本号;profile 页和首页公告共用 */
|
||||
export const APP_VERSION = '3.4.0';
|
||||
export const APP_VERSION = '3.6.0';
|
||||
|
||||
export const defaultPrintConfig: PrintConfig = {
|
||||
// header: 'LogoImage',
|
||||
|
||||
@@ -1,26 +1,72 @@
|
||||
import type { WorksheetDefinition } from './types';
|
||||
|
||||
export const PAPER_SHEET_WORKSHEET_DEFINITIONS = [
|
||||
/** 业务条目与绘制方式分离;颜色等用户参数不另建 worksheet。 */
|
||||
export const PAPER_TYPES = [
|
||||
{ id: 'tian', name: '田字格', desc: '汉字练习' },
|
||||
{ id: 'mi', name: '米字格', desc: '书法练习' },
|
||||
{ id: 'square', name: '方格', desc: '书法练字纸' },
|
||||
{ id: 'four-line', name: '四线三格', desc: '拼音 / 字母' },
|
||||
{ id: 'letter', name: '信纸', desc: '横线信笺' },
|
||||
{ id: 'horizontal', name: '横线', desc: '横线本' },
|
||||
{ id: 'vertical', name: '竖线', desc: '竖排书写' },
|
||||
{ id: 'dictation-hanzi', name: '汉字听写', desc: '田字格 + 订正栏' },
|
||||
{
|
||||
id: 'paper-sheet',
|
||||
icon: 'draw-o',
|
||||
title: '作业纸',
|
||||
subtitle: '田字格 / 方格 / 信纸等多种作业纸一键打印',
|
||||
ageMin: 3,
|
||||
ageMax: 12,
|
||||
difficulty: 1,
|
||||
tags: [
|
||||
'作业纸',
|
||||
'田字格',
|
||||
'米字格',
|
||||
'方格',
|
||||
'四线三格',
|
||||
'信纸',
|
||||
'横线',
|
||||
'竖线',
|
||||
'听写',
|
||||
'作业登记表',
|
||||
],
|
||||
sortOrder: 50,
|
||||
id: 'dictation-pinyin',
|
||||
name: '拼音/英语听写',
|
||||
desc: '四线三格 + 订正栏',
|
||||
},
|
||||
] as const satisfies ReadonlyArray<WorksheetDefinition>;
|
||||
{ id: 'homework-log', name: '作业登记表', desc: '分科登记' },
|
||||
] as const;
|
||||
|
||||
export type PaperType = (typeof PAPER_TYPES)[number]['id'];
|
||||
|
||||
/** 原综合入口始终保留,不重分配历史收藏和统计。 */
|
||||
export const PAPER_SHEET_WORKSHEET_ID = 'paper-sheet';
|
||||
|
||||
export interface PaperSheetDefinition extends WorksheetDefinition {
|
||||
rendererKey: 'paper-sheet';
|
||||
renderConfig: { paperType?: PaperType };
|
||||
}
|
||||
|
||||
export const PAPER_SHEET_WORKSHEET_DEFINITIONS: ReadonlyArray<PaperSheetDefinition> =
|
||||
[
|
||||
{
|
||||
id: PAPER_SHEET_WORKSHEET_ID,
|
||||
rendererKey: 'paper-sheet',
|
||||
renderConfig: {},
|
||||
icon: 'draw-o',
|
||||
title: '作业纸',
|
||||
subtitle: '田字格 / 方格 / 信纸等多种作业纸一键打印',
|
||||
ageMin: 3,
|
||||
ageMax: 12,
|
||||
difficulty: 1,
|
||||
tags: [
|
||||
'作业纸',
|
||||
'田字格',
|
||||
'米字格',
|
||||
'方格',
|
||||
'四线三格',
|
||||
'信纸',
|
||||
'横线',
|
||||
'竖线',
|
||||
'听写',
|
||||
'作业登记表',
|
||||
],
|
||||
sortOrder: 50,
|
||||
},
|
||||
...PAPER_TYPES.map(
|
||||
(paper, index): PaperSheetDefinition => ({
|
||||
id: `paper-${paper.id}`,
|
||||
rendererKey: 'paper-sheet',
|
||||
renderConfig: { paperType: paper.id },
|
||||
icon: 'draw-o',
|
||||
title: paper.name,
|
||||
subtitle: `${paper.desc},一键生成打印`,
|
||||
ageMin: 3,
|
||||
ageMax: 12,
|
||||
difficulty: 1,
|
||||
tags: ['作业纸', paper.name, paper.desc],
|
||||
sortOrder: 51 + index,
|
||||
}),
|
||||
),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user