props-options.uvue 819 字节
Newer Older
DCloud-WZF's avatar
DCloud-WZF 已提交
1 2 3 4 5
<template>
  <view class="page">
    <array-literal :str="str" :num="num" :bool="bool" :obj="obj" :arr="arr" />
    <object-type str="str" :num="num" :bool="bool" :obj="obj" :arr="arr" />
    <same-name-prop-default-value />
6
    <props-with-defaults />
DCloud-WZF's avatar
DCloud-WZF 已提交
7 8 9 10 11
  </view>
</template>

<script lang="uts">
import ArrayLiteral from './array-literal-options.uvue'
DCloud-WZF's avatar
DCloud-WZF 已提交
12 13
import ObjectType from "./object-type-options.uvue";
import SameNamePropDefaultValue from "./same-name-prop-default-value-options.uvue";
14
import PropsWithDefaults from "./props-with-defaults.uvue";
DCloud-WZF's avatar
DCloud-WZF 已提交
15 16 17 18

export default {
  components: {
    ArrayLiteral,
DCloud-WZF's avatar
DCloud-WZF 已提交
19
    ObjectType,
20 21
    SameNamePropDefaultValue,
    PropsWithDefaults
DCloud-WZF's avatar
DCloud-WZF 已提交
22 23 24 25 26 27 28 29 30 31 32 33
  },
  data() {
    return {
      str: 'str',
      num: 10,
      bool: true,
      obj: {age: 18},
      arr: ['a','b','c']
    }
  },
}
</script>