这是一个创建于 1528 天前的主题,其中的信息可能已经有所发展或是发生改变。
就是我有 N 个 这样的插槽,slot 后面的名字不同,{{ xx }}的内容基本都相同,其中会有一些选择框 /文本输入框,这些绑定的值是 aa,有什么比较好的写法吗请问
<template v-slot:aa="{scope}"> {{ xx }}</template>
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>
|