Options API (Legacy)

Verze:

31. 12. 2025

Zodpovědná osoba:

Dominik Šlechta

Options API MAY be used for maintaining existing Vue 2 components. New components MUST use Composition API with script setup.

Options API MAY be used for maintaining existing Vue 2 components.

New components MUST use Composition API with <script setup>.

When using Options API, the component options MUST follow this order:

  1. name
  2. components
  3. props
  4. emits
  5. data
  6. computed
  7. watch
  8. mounted (and other lifecycle hooks)
  9. methods