8000 docs: add example in readme · allindevelopers/vue-local-scope@fd5cc51 · GitHub
[go: up one dir, main page]

Skip to content

Commit fd5cc51

Browse files
committed
docs: add example in readme
1 parent c216439 commit fd5cc51

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1-
# Vue 3 + TypeScript + Vite
1+
# @allindevelopers/vue-local-scope
22

3-
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
3+
Allows to reuse an expression that is repeating multiple times in a Vue Template
44

5-
Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
5+
```vue
6+
<script setup lang="ts">
7+
import { LocalScope } from "@allindevelopers/vue-local-scope";
8+
</script>
9+
10+
<template>
11+
<LocalScope lorem="Lorem Ipsum Dolor Sit Amet" #default="{ lorem }">
12+
<ol>
13+
<li>{{ lorem }}</li>
14+
<li>{{ lorem }}</li>
15+
<li>{{ lorem }}</li>
16+
</ol>
17+
</LocalScope>
18+
</template>
19+
```
20+
21+
> [!NOTE]
22+
> Can be used in JSX but types are not infered

0 commit comments

Comments
 (0)
0