PowerPoint.ShapeType enum
指定形状的类型。
注解
示例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/get-shapes-by-type.yaml
// Changes the dash style of every line in the slide.
await PowerPoint.run(async (context) => {
// Get the type of shape for every shape in the collection.
const shapes = context.presentation.slides.getItemAt(0).shapes;
shapes.load("type");
await context.sync();
// Change the dash style for shapes of the type `line`.
shapes.items.forEach((shape) => {
if (shape.type === PowerPoint.ShapeType.line) {
shape.lineFormat.dashStyle = PowerPoint.ShapeLineDashStyle.dashDot;
}
});
await context.sync();
});
字段
geometricShape = "GeometricShape" | 形状是几何形状,如矩形 |
group = "Group" | 形状是包含子形状的组形状 |
image = "Image" | 形状是图像 |
line = "Line" | 形状是一条线 |
table = "Table" | 形状是表格 |
unsupported = "Unsupported" | 给定形状的类型不受支持。 |
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈