Deprecated slot
The linter rule page for vue/no-deprecated-slot-attribute
shows the following sample code, which highlights the problem and solution:
<template>
<ListComponent>
<!-- ? GOOD ??-->
<template v-slot:name>...</template>
</ListComponent>
<ListComponent>
<!-- ? BAD ??-->
<template slot="name">...</template>
</ListComponent>
</template>
So, <ion-refresher slot="fixed">
should be changed to <ion-refresher v-slot:fixed>
. However, that causes a different error (vue/valid-v-slot
) because Ionic components are built as native Web Components (not Vue components):
Named slots must use '<template>' on a custom element. (vue/valid-v-slot) eslint
To resolve that error, apply v-slot:fixed
to a <template>
wrapper:
<template v-slot:fixed>
<ion-refresher>...</ion-refresher>
<template>
demo
Unused fixed
Regarding the 'fixed' is defined but never used
error you commented, your <script>
section in the SFC likely has an unused variable named fixed
. Simply remove that variable to resolve the error.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…