<script setup>
import { reactive } from 'vue'
import {getDemoPagePage,addDemoPage,updateDemoPage,deleteDemoPage,getDemoPageDetail} from './api'
import {baseModelOptions,baseFilterOptions} from './options'

// const { proxy } = getCurrentInstance();

const state = reactive({
  baseModelOptions: baseModelOptions(),
  baseFilterOptions: baseFilterOptions(),
  title: "DemoPage管理",
  baseModelName: 'DemoPage信息',
  addBtnName: '添加DemoPage',
  editBtnName: '',
  delBtnName: '',
  primaryKey: 'id',
  getTableFn: getDemoPagePage,
  addFn: addDemoPage,
  editFn: updateDemoPage,
  deleteFn: deleteDemoPage,
  detailFn: getDemoPageDetail,
  showEditBtn: true,
  showDeleteBtn: true,
  // rowControl: {
  //   showEditBtn: false,
  //   showDelBtn: false
  // },
  permission: {//菜单管理中添加权限
    add: 'system:user:list',
    edit: 'system:user:list',
    delete: 'system:user:list',
    detail: 'system:user:list',
  },
  pageInfo: { total: 0, base:{limit: 8,current: 1} },
})

</script>

<template>
  <BaseTablePage 
    :tableOptions="state" 
  >
    <template v-slot:column>
      <el-table-column label="用户编号" align="center" key="userId" prop="userId" />
      <el-table-column label="用户名称" align="center" key="userName" prop="userName" />
      <el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" />
  	</template>
  </BaseTablePage>
</template>

<style scoped>

</style>
