You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/macros/define-options.md
+88-3Lines changed: 88 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,103 @@
2
2
3
3
Options API can be declared using the `defineOptions` in `<script setup>`, specifically to be able to set `name`, `props`, `emits`, and `render` inside of one function.
4
4
5
-
If you support this feature, you can go to [RFC Discussion](https://github.com/vuejs/rfcs/discussions/430) and hit like :+1: or comment. Thanks!
5
+
If you support this feature, feel free to hit like :+1: or comment on the [RFC Discussion](https://github.com/vuejs/rfcs/discussions/430). Thanks!
6
6
7
7
| Features | Supported |
8
8
| :----------------: | :----------------: |
9
9
| Vue 3 |:white_check_mark:|
10
10
| Vue 2 |:white_check_mark:|
11
11
| TypeScript / Volar |:white_check_mark:|
12
12
13
-
::: tip
14
-
if you need `defineOptions` only, the [standalone version](https://github.com/sxzz/unplugin-vue-macros/tree/main/packages/define-options) is better for you.
13
+
## Installation Standalone Version
14
+
15
+
if you need `defineOptions` feature only, the standalone version is more appropriate for you.
Introduce a macro in `<script setup>`, `defineOptions`,
6
-
to use Options API in `<script setup>`,
7
-
specifically to be able to set `name`, `props`, `emits` and `render` in one function.
11
+
Options API can be declared using the `defineOptions`in `<script setup>`, specifically to be able to set `name`, `props`, `emits`, and `render` inside of one function.
12
+
13
+
If you support this feature, feel free to hit like 👍 or comment on [RFC Discussion](https://github.com/vuejs/rfcs/discussions/430). Thanks!
8
14
9
15
## Features
10
16
@@ -13,165 +19,11 @@ specifically to be able to set `name`, `props`, `emits` and `render` in one func
13
19
- 🦾 Full TypeScript support.
14
20
- ⚡️ Supports Vite, Webpack, Vue CLI, Rollup, esbuild and more, powered by <ahref="https://github.com/unjs/unplugin">unplugin</a>.
0 commit comments