Skip to content

AI-native design editor. Open-source Figma alternative.

879 B
Raw Blame

title: useExport description: Scale und Format für den Export der aktuellen Selection verwalten.

useExport

useExport() stellt State und Actions für ein Export-Panel bereit:

  • Export settings;
  • IDs der ausgewählten Objekte;
  • Name der Output file;
  • verfügbare Scales und Formats (formats-IDs und beschriftete formatOptions).

Verwendung

import { useExport } from '@open-pencil/vue/document/export'

const exportState = useExport()

Beispiel

const {
  settings,
  nodeName,
  scales,
  formats,
  formatOptions,
  addSetting,
  updateScale,
  updateFormat,
} = useExport()

Weiteres Export setting

exportState.addSetting()

WEBP mit Scale 2×

exportState.updateScale(0, 2)
exportState.updateFormat(0, 'webp')

Siehe auch