Foo-options.uvue 744 字节
Newer Older
1 2 3 4
<template>
  <view>
    <slot name="header" :msg="msg"></slot>
    <slot :num="num"></slot>
5 6 7 8
    <slot name="num1" :num="num"></slot>
    <slot name="num2" :num="num"></slot>
    <slot name="msgTrue" :msg="msg"></slot>
    <slot name="msgFalse" :msg="msg"></slot>
9 10 11 12 13 14 15 16 17
    <slot name="footer" :arr="arr"></slot>
  </view>
</template>

<script lang="uts">
  export default {
    slots: Object as SlotsType<{
      header: { msg: string }
      default: { num: number }
18 19 20 21
      num1: { num: number }
      num2: { num: number }
      msgTrue: { msg: string }
      msgFalse: { msg: string }
22 23 24 25 26 27 28 29 30 31 32
      footer: { arr: string[] }
    }>,
    data(){
      return {
        msg: 'foo msg',
        num: 0,
        arr: ['a','b', 'c']
      }
    }
  }
</script>