'v-slot'指令不支持任何修饰符 [英] 'v-slot' directive doesn't support any modifier
问题描述
我正在使用vuetify的数据表,这是一个不同的插槽,例如下面的一些道具
I am using vuetify's datatable, i this we have different slots with some props for example below
<template #header.data-table-select="{ on, props }">
<v-simple-checkbox color="purple" v-bind="props" v-on="on"></v-simple-checkbox>
</template>
我还使用vue的eslint插件检查任何错误/错误代码/或任何违规行为,但是如果我在文件中使用上述代码段,则会给我错误
I am also using vue's eslint plugin to check for any errors/bad code / or any violation , but if i use above code snippet in my file it gives me error
'v-slot'指令不支持任何修饰符
'v-slot' directive doesn't support any modifier
根据此文档,它是正确的 https://eslint.vuejs.org/rules/valid-v-slot.html
as per this docs it is right https://eslint.vuejs.org/rules/valid-v-slot.html
但没有任何示例说明如何处理这种情况
but it don't have any example to how we handle this case
我如何删除此警告/或采用正确的方式,而不使其免除
how can i remove this warning/or make it correct way , without making it exemption
谢谢
推荐答案
在您提供的代码中没有看到任何 v-slot
,因此我只能向您展示我的用例.
I don't see any v-slot
in the code you provided so I can show you only my usecase.
出现Eslint错误:
With Eslint error:
<template v-slot:item.actions="{ item }">
没有错误:
<template v-slot:[`item.actions`]="{ item }">
这篇关于'v-slot'指令不支持任何修饰符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!