提交 6ed84ed1 编写于 作者: H hdx

fix(define-slots): 类型定义错误的问题

上级 12f2fc93
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
} }
}, },
mounted () { mounted () {
this.name = this.$options.name! this.name = this.$options.name
}, },
methods: { methods: {
// getCustomKey (): string { // getCustomKey (): string {
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
const msg = ref('foo msg') const msg = ref('foo msg')
const num = ref<number>(0) const num = ref<number>(0)
const arr = ref<string[]>(['a', 'b', 'c']) const arr = ref<string[]>(['a', 'b', 'c'])
defineSlots<{ defineSlots<{
default(props : { msg : string }) : any, header(props : { msg : string }) : any,
header(props : { num : string }) : any, default(props : { num : number }) : any,
footer(props : { arr : string[] }) : any footer(props : { arr : string[] }) : any
}>() }>()
</script> </script>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册