template #toolBar #action= records a-button disabled=changeTypevalue === 1 type=primary click=handleSubmitrecords 保存a-button template报错ESLint An element cannot have multiple v-slot direct
根据ESLint的报错信息,一个元素不能有多个 'v-slot' 指令。在你提供的代码中,'' 元素上有两个 'v-slot' 指令,所以会导致报错。
为了解决这个问题,你可以将两个 'v-slot' 指令合并成一个。以下是修改后的代码:
<template #toolBar="{ records }">
<a-button :disabled="changeType.value === '1'" type="primary" @click="handleSubmit(records)"> 保存</a-button>
</template>
这样修改后的代码应该不再报错。
原文地址: https://www.cveoy.top/t/topic/iNX2 著作权归作者所有。请勿转载和采集!