Foo-options.uvue 950 字节
Newer Older
DCloud-WZF's avatar
DCloud-WZF 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
<template>
  <view>
    <view class="flex justify-between flex-row mb-10">
      <text>props title:</text>
      <text id='foo-props-title'>{{ title }}</text>
    </view>
    <view class="flex justify-between flex-row mb-10">
      <text>props num:</text>
      <text id='foo-props-num'>{{ num }}</text>
    </view>
    <view class="flex justify-between flex-row mb-10">
      <text>props obj['name']:</text>
      <text id='foo-props-obj-name'>{{ obj['name'] }}</text>
    </view>
  </view>
</template>

<script lang="uts">
  export default {
    props: {
      title: {
        type: String,
        default: ''
      },
      num: {
        type: Number,
        default: 0
      },
      obj: {
        // #ifdef APP-ANDROID
        type: FooPropsObjReactiveObject,
        // #endif
        // #ifdef APP-IOS || WEB
        type: Object,
        // #endif
        required: true
      }
    }
  }
</script>