首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
›
Vue.js
广告
V2EX
›
Vue.js
请问一个 slot 相关的问题
muunala10221
·
2021-07-22 16:32:13 +08:00
· 872 次点击
这是一个创建于 1020 天前的主题,其中的信息可能已经有所发展或是发生改变。
就是我有 N 个 这样的插槽,slot 后面的名字不同,{{ xx }}的内容基本都相同,其中会有一些选择框 /文本输入框,这些绑定的值是 aa,有什么比较好的写法吗请问
<template v-slot:aa="{scope}"> {{ xx }}</template>
slot
template
请问
v-slot
1 条回复
•
2021-08-16 12:11:57 +08:00
1
lin07hui
2021-08-16 12:11:57 +08:00
<template v-for="(item, key) in obj" v-slot:[key]="{ scope}">...</template>
<template v-for="(item, index) in arr" v-slot:[item]="{ scope}">...</template>
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
我们的愿景
·
实用小工具
·
5442 人在线
最高记录 6543
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 32ms ·
UTC 05:42
·
PVG 13:42
·
LAX 22:42
·
JFK 01:42
Developed with
CodeLauncher
♥ Do have faith in what you're doing.