Slot Scope Props Vue
pageClass | sidebarDepth | title | description |
---|---|---|---|
0 | disallow deprecated `slot-scope` attribute (in Vue.js 2.6.0+) |
![Vue Vue](https://vuejsdevelopers.com/images/posts/scoped_slots.jpg)
disallow deprecated slot-scope
attribute (in Vue.js 2.6.0+)
⚙️ This rule is included in all of'plugin:vue/vue3-essential'
,'plugin:vue/vue3-strongly-recommended'
and'plugin:vue/vue3-recommended'
.🔧 The--fix
option on the command line can automatically fix some of the problems reported by this rule.
📖 Rule Details
Slot Scope Props Vueling
This rule reports deprecated slot-scope
attribute in Vue.js v2.6.0+.
![Props Props](https://img2018.cnblogs.com/blog/1717652/201909/1717652-20190903111559290-223200686.gif)
![Slot Scope Props Vue Slot Scope Props Vue](https://raw.githubusercontent.com/f/vue-wait/HEAD/resources/vue-wait-2.gif)
📚 Further Reading
![Slot Scope Props Vue Slot Scope Props Vue](https://static.bookstack.cn/projects/vue.ant.design-v1.3.8/2af8976c438805349b52858408b8e280.png)
🔍 Implementation
Slot Scope Props Vue For Sale
- It’s included in the setupScope slot。 At the same time, the two scopes can be considered to have parent-child relationship, which is used in the first code segmentcurrent-userThe module’s page or the module’s Vue scope is calledcurrent-userThe parent scope of the Vue scope of the module. Further, we can divide the goals into two.
- The slots syntax has been changed in Vue 2.6, the following examples use the new v-slot syntax instead of the deprecated slot-scope, but it is still supported and you can use it. However v-slot have different semantics, consult the Vue docs for more information.
Receive exposed props in the parent component using slot-scope attribute. To receive the props in the parent component we declare a template element and use slot-scope attribute. The attribute has access to the object carrying all props exposed from the child component. However v-slot have different semantics, consult the Vue docs for more information. Using the ValidationProvider offers isolated scope for each field validation state, and does not inject/mutate anything outside its slot. You can import it and use whenever you need it.