<template>
  <view class="flex flex_center_center">
    <van-loading
      type="spinner"
      size="26rpx"
      text-size="22rpx"
      v-if="state === 'loading'"
      >加载中...</van-loading
    >
    <view class="text" v-if="state === 'more'">--上拉加载更多--</view>
    <view class="text" v-if="state === 'none'">--没有更多了--</view>
  </view>
</template>
<script>
import { reactive, toRefs, onMounted } from "vue";
export default {
  name: "",
  props: {
    state: String,
  },
  components: {},
  setup(props) {
    let data = reactive({
      state: props.state
    });
    let methods = {
      jumpPage(url) {
        uni.navigateTo({
          url: url,
        });
      },
    };

    onMounted(() => {
      //   console.log(38, props);
    });
    return {
      ...toRefs(data),
      ...methods,
    };
  },
};
</script>
<style scoped>
.text {
  font-size: 22rpx;
  color: #969799;
  margin-bottom:20rpx;
}
</style>