root.uvue 439 字节
Newer Older
crlfe's avatar
crlfe 已提交
1 2
<template>
  <view class="page">
crlfe's avatar
crlfe 已提交
3
    <view class="row">root: <text>{{root}}</text></view>
crlfe's avatar
crlfe 已提交
4 5 6
  </view>
</template>

H
hdx 已提交
7
<script>
crlfe's avatar
crlfe 已提交
8 9 10
export default {
  data () {
    return {
crlfe's avatar
crlfe 已提交
11
      root: true
crlfe's avatar
crlfe 已提交
12 13
    }
  },
crlfe's avatar
crlfe 已提交
14 15
  methods: {
    getRoot (): boolean {
16
      return this.$root!.$data['root'] as boolean
crlfe's avatar
crlfe 已提交
17
    }
crlfe's avatar
crlfe 已提交
18 19 20 21 22 23 24 25 26 27 28 29
  }
}
</script>

<style>
  .row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-bottom: 10px;
  }
</style>