-
-
Notifications
You must be signed in to change notification settings - Fork 597
Closed
Description
Info
- Platform: macOS
- Vetur version: 0.27.2
- VS Code version: 1.48.2
Problem
when update to 0.27.2
use v-slot with { } to accept data has this error tip,but I don‘t know how to definition this type
and when use 0.27.1 version has no this error tip
Reproducible Case
// mc-ossfile-view.vue
<template>
<div class="mc-ossfile-view">
<div class="mc-ossfile-view__file-item"
v-for="(item, idx) in fileList" :key="idx">
<slot :item="item" :idx="idx"></slot>
<div class="info-button"></div>
<slot name="after" :item="item" :idx="idx"></slot>
</div>
</div>
</template>
<script lang="ts">
import { Component, Vue, Prop } from 'vue-property-decorator'
@Component
export default class McOssfileView extends Vue {
@Prop({ type: Array, default: () => [] }) readonly fileList!: mcLib.TDataObject[]
}
</script>
// use vue file
<mcOssfileView
:fileList="fileList">
<template v-slot="{item}">{{item.name}}</template>
<template v-slot:after="{item}">
<div class="info-bar">
<div class="text">{{item.name}}</div>
</div>
</template>
</mcOssfileView>
borie88, bestickley, WinterYukky, uwjiaoxing, enua and 5 more