@allindevelopers/vue-local-scope
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

@allindevelopers/vue-local-scope

An implementation of posva/vue-local-scope for Vue 3 and TypeScript support

Allows to reuse an expression that is repeating multiple times in a Vue Template

<script setup lang="ts">
import { LocalScope } from "@allindevelopers/vue-local-scope";
</script>

<template>
	<LocalScope lorem="Lorem Ipsum Dolor Sit Amet" #default="{ lorem }">
		<ol>
			<li>{{ lorem }}</li>
			<li>{{ lorem }}</li>
			<li>{{ lorem }}</li>
		</ol>
	</LocalScope>
</template>

With Full Type Completion

image

[!NOTE]
Can be used in JSX but types are not infered

Package Sidebar

Install

npm i @allindevelopers/vue-local-scope

Weekly Downloads

16

Version

0.2.2

License

MIT

Unpacked Size

17 kB

Total Files

6

Last publish

Collaborators

  • directive4837