mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
refactor: 线条类型完善
This commit is contained in:
parent
e7bdbffdf2
commit
f2f5ea67f1
@ -1,12 +1,20 @@
|
|||||||
|
import { LinePoint } from '@/types/slides'
|
||||||
|
|
||||||
|
|
||||||
export interface LinePoolItem {
|
export interface LinePoolItem {
|
||||||
path: string;
|
path: string;
|
||||||
style: string;
|
style: 'solid' | 'dashed';
|
||||||
points: [string, string];
|
points: [LinePoint, LinePoint];
|
||||||
isBroken?: boolean;
|
isBroken?: boolean;
|
||||||
isCurve?: boolean;
|
isCurve?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LINE_LIST = [
|
interface PresetLine {
|
||||||
|
type: string;
|
||||||
|
children: LinePoolItem[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export const LINE_LIST: PresetLine[] = [
|
||||||
{
|
{
|
||||||
type: '直线',
|
type: '直线',
|
||||||
children: [
|
children: [
|
||||||
|
@ -286,6 +286,8 @@ export interface PPTShapeElement extends PPTBaseElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export type LinePoint = '' | 'arrow' | 'dot'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 线条元素
|
* 线条元素
|
||||||
*
|
*
|
||||||
@ -311,9 +313,9 @@ export interface PPTLineElement extends Omit<PPTBaseElement, 'height'> {
|
|||||||
type: 'line';
|
type: 'line';
|
||||||
start: [number, number];
|
start: [number, number];
|
||||||
end: [number, number];
|
end: [number, number];
|
||||||
style: string;
|
style: 'solid' | 'dashed';
|
||||||
color: string;
|
color: string;
|
||||||
points: [string, string];
|
points: [LinePoint, LinePoint];
|
||||||
shadow?: PPTElementShadow;
|
shadow?: PPTElementShadow;
|
||||||
broken?: [number, number];
|
broken?: [number, number];
|
||||||
curve?: [number, number];
|
curve?: [number, number];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user