JS.VUE.NO.DEPRECATED.DOLLAR.SCOPEDSLOTS.API
Disallow using deprecated '$scopedSlots' (in Vue.js 3.0.0+)
vue/no-deprecated-dollar-scopedslots-api
disallow using deprecated
$scopedSlots
(in Vue.js 3.0.0+)
Rule Details
This rule reports use of deprecated $scopedSlots
. (in Vue.js 3.0.0+).
See Migration Guide - Slots Unification (https://v3-migration.vuejs.org/breaking-changes/slots-unification.html) for more details.
{'vue/no-deprecated-dollar-scopedslots-api': ['error']}
Copy
<template>
<!-- BAD -->
<div v-if="$scopedSlots.default"><slot /></div>
</template>
<script>
export default {
render() {
/* BAD */
return this.$scopedSlots.default()
}
}
</script>
Options
Nothing.
Further Reading
- Migration Guide - Slots Unification (https://v3-migration.vuejs.org/breaking-changes/slots-unification.html)
- Vue RFCs - 0006-slots-unification (https://github.com/vuejs/rfcs/blob/master/active-rfcs/0006-slots-unification.md)