<template>
  <view class="content">
    <uni-navbar-lite :title="title" :is-left="isLeft"></uni-navbar-lite>
    <scroll-view class="scroll-view" scroll-y="true">
      <view class="content-item" @click="onClick">
        <text>点击此处，将标题切换为{{isLeft?'居中':'左侧'}}显示</text>
      </view>
      <view class="content-item" v-for="item in 100">
        <text class="text">内容：{{item}}</text>
      </view>
      <input/>
    </scroll-view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        title: 'Hello uni-app',
        isLeft: false
      }
    },
    onLoad() { },
    methods: {
      onClick(){
        this.isLeft = !this.isLeft
      }
    }
  }
</script>

<style>
  .content {
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  .scroll-view {
    flex: 1;
    background-color: #f5f5f5;
    padding: 5px 0;
  }

  .content-item {
    padding: 15px;
    margin: 5px 10px;
    background-color: #fff;
    border-radius: 5px;

  }

  .text {
    font-size: 14px;
    color: #666;
  }
</style>
