-
-
Notifications
You must be signed in to change notification settings - Fork 9k
Closed
Labels
✨ feature requestNew feature or requestNew feature or request
Description
What problem does this feature solve?
I'm developing an app that has v-for to repeat items. in v-for I need the return result of a function in two different positions. I can solve this problem by creating a new array, but it's very inconvenient and memory-consuming.
What does the proposed API look like?
The API that I imagined would look like this:
<template>
<div v-for="name in users" :key="name" v-const:nameObj="name.split(' ')">
First name: {{ nameObj[0] }} <br>
Last name: {{ nameObj[1] }}
</div>
</template>It's like a directive system
v-const:[name]="[value]"
rudyxu1102 and yuanxin518
Metadata
Metadata
Assignees
Labels
✨ feature requestNew feature or requestNew feature or request