Slot Scope Props Vue

pageClasssidebarDepthtitledescription
0
disallow deprecated `slot-scope` attribute (in Vue.js 2.6.0+)
Vue

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+.

PropsSlot Scope Props Vue

📚 Further Reading

Slot Scope Props Vue

🔍 Implementation

Slot Scope Props Vue For Sale

  1. 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.
  2. 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.