logo

X6

  • 文档
  • API
  • 图表示例
  • 常见问题
  • 更新日志
  • XFlow
  • 所有产品antv logo arrow
  • 2.x
  • 开始
    • 简介
    • 快速上手
  • 组件
    • XFlowGraph 画布
    • Background 背景
    • Grid 网格
    • Clipboard 复制粘贴
    • History 撤销重做
    • Minimap 小地图
    • Snapline 对齐线
    • Transform 图形变换
    • Control 控制器
  • Hook
    • useGraphInstance
    • useGraphStore
    • useGraphEvent
    • useDnd
    • useClipboard
    • useExport
    • useHistory
    • useKeyboard
  • Store

useExport

上一篇
useClipboard
下一篇
useHistory

Resources

Ant Design
Galacea Effects
Umi-React 应用开发框架
Dumi-组件/文档研发工具
ahooks-React Hooks 库

社区

体验科技专栏
seeconfSEE Conf-蚂蚁体验科技大会

帮助

GitHub
StackOverflow

more products更多产品

Ant DesignAnt Design-企业级 UI 设计语言
yuque语雀-知识创作与分享工具
EggEgg-企业级 Node 开发框架
kitchenKitchen-Sketch 工具集
GalaceanGalacean-互动图形解决方案
xtech蚂蚁体验科技
© Copyright 2025 Ant Group Co., Ltd..备案号:京ICP备15032932号-38

Loading...

画布内容通过图片形式导出的 Hook

基础用法

const { exportPNG, exportJPEG, exportSVG } = useExport();

API

const {
exportPNG: (fileName, options) => void,
exportJPEG: (fileName, options) => void,
exportSVG: (fileName, options) => void
} = useExport();

返回值

参数描述类型默认值
exportPNG导出PNG(fileName:string, options: Export.ToImageOptions = {}) => void('chart', {}) => void
exportJPEG导出JPEG(fileName:string, options: Export.ToImageOptions = {}) => void('chart', {}) => void
exportSVG导出SVG(fileName:string, options: Export.ToSVGOptions = {}) => void('chart', {}) => void

参数

无