
<template>
	<SimpleList ref="listRef" :routeTitle="routeTitle"  :listProps="listProps">
    <template v-slot:buttonSlot="{rowData}">
		   <!-- 当前行数据{{rowData}} -->
			 <!-- 自定义按钮
       <view class="uni-select__selector-item"  v-if="auth.buttonAuthCode.includes('自定义按钮权限名称')">
			 	<view class="item-text"> 
			 		自定义按钮
			 	</view>
			 </view> 
       -->
		</template>
  </SimpleList>
</template>

<script setup>
import { ref } from 'vue';
import { onReachBottom, onPullDownRefresh,onShow } from '@dcloudio/uni-app'; //不支持onLoad
import SimpleList from '@/components/simple-list/SimpleList.vue';
import { listProps } from './config/index.js'



onReachBottom(() => {
	// 必须要这个事件 可以不写逻辑 
});
const listRef = ref(); 
const firstLoad = ref(true);
const routeTitle = ref('列表');
let auth=uni.getStorageSync('MenuAuth')
onShow(()=>{
  const pages = getCurrentPages();
	if(pages&&Array.isArray(pages)&&pages.length>0){
		const currentPage = pages[pages.length - 1];
		if(currentPage&&currentPage.$page&&currentPage.$page.meta&&currentPage.$page.meta.navigationBar&&currentPage.$page.meta.navigationBar.titleText){
			const title = currentPage.$page.meta.navigationBar.titleText;
			routeTitle.value = title;
		}
	}
	if (firstLoad.value) {
		firstLoad.value = !firstLoad.value;
		return;
	}
	listRef.value.reload();
}) 
</script>

<style></style>

  
  