vue3中插槽的使用方式

60 阅读1分钟
<template slot='title'>{{ step.label }}</template>

使用了template 上面的slot属性等于了 某某某

vue3已经不支持这种语法了

要写成 v-slot:某某某

<template v-slot:dropdown></template>

可以简写下面这种方式

<template #title>{{ step.label }}</template>