feat: jsPDF
This commit is contained in:
@@ -54,8 +54,8 @@ export interface DeckState {
|
||||
// 错误状态
|
||||
error: string | null;
|
||||
|
||||
// 打印状态
|
||||
isPrinting: boolean;
|
||||
// 导出状态
|
||||
isExporting: boolean;
|
||||
|
||||
// 打印设置
|
||||
printOrientation: 'portrait' | 'landscape';
|
||||
@@ -103,9 +103,9 @@ export interface DeckActions {
|
||||
generateCode: () => string;
|
||||
copyCode: () => Promise<void>;
|
||||
|
||||
// 打印操作
|
||||
setPrinting: (printing: boolean) => void;
|
||||
printDeck: () => void;
|
||||
// 导出操作
|
||||
setExporting: (exporting: boolean) => void;
|
||||
exportDeck: () => void;
|
||||
|
||||
// 打印设置
|
||||
setPrintOrientation: (orientation: 'portrait' | 'landscape') => void;
|
||||
@@ -146,7 +146,7 @@ export function createDeckStore(
|
||||
selectEnd: null,
|
||||
isLoading: false,
|
||||
error: null,
|
||||
isPrinting: false,
|
||||
isExporting: false,
|
||||
printOrientation: 'portrait',
|
||||
printOddPageOffsetX: 0,
|
||||
printOddPageOffsetY: 0
|
||||
@@ -286,10 +286,10 @@ export function createDeckStore(
|
||||
}
|
||||
};
|
||||
|
||||
const setPrinting = (printing: boolean) => setState({ isPrinting: printing });
|
||||
const setExporting = (exporting: boolean) => setState({ isExporting: exporting });
|
||||
|
||||
const printDeck = () => {
|
||||
setState({ isPrinting: true });
|
||||
const exportDeck = () => {
|
||||
setState({ isExporting: true });
|
||||
};
|
||||
|
||||
const setPrintOrientation = (orientation: 'portrait' | 'landscape') => {
|
||||
@@ -330,8 +330,8 @@ export function createDeckStore(
|
||||
clearError,
|
||||
generateCode,
|
||||
copyCode,
|
||||
setPrinting,
|
||||
printDeck,
|
||||
setExporting,
|
||||
exportDeck,
|
||||
setPrintOrientation,
|
||||
setPrintOddPageOffsetX,
|
||||
setPrintOddPageOffsetY
|
||||
|
||||
Reference in New Issue
Block a user