Foo-options.uvue 454 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<template>
  <view>
    <slot name="header" :msg="msg"></slot>
    <slot :num="num"></slot>
    <slot name="footer" :arr="arr"></slot>
  </view>
</template>

<script lang="uts">
  export default {
    slots: Object as SlotsType<{
      header: { msg: string }
      default: { num: number }
      footer: { arr: string[] }
    }>,
    data(){
      return {
        msg: 'foo msg',
        num: 0,
        arr: ['a','b', 'c']
      }
    }
  }
</script>