<template>
  <myContent :list="list" @addClick="addClick" />
</template>
<script setup>
import myContent from "@/components/mycomponents/myContent.vue";
import { reactive } from "vue";

let list = reactive({
  // 分页
  pagination: {
    background: false,
    layout: "prev,pager,next,jumper,total,sizes",
    pageSize: 20,
    pageSizes: [10, 20, 30, 50],
  },
  // 表格上工具栏按钮
  toolbar: ["add"],
  // 表格字段
  cols: [
    // { type: "selection", width: 50, align: "center" },
    { label: "设备名称", align: "center", prop: "id", show: false },
    { label: "设备号", align: "center", prop: "username" },
    { label: "品牌", align: "center", prop: "avatar", templet: "image" },
    { label: "打印类型", align: "center", prop: "deptName" },
    {
      label: "状态",
      align: "center",
      prop: "status",
      templet: "switch",
      slotName: "status",
    },
    { label: "创建时间", align: "center", prop: "createTime" },
    {
      label: "操作",
      align: "center",
      fixed: "right",
      width: 280,
      templet: "tool",
      operat: ["edit", "delete"],
    },
  ],
  // 表格数据
  pageData: [],
});
function addClick() {
  console.log(1)
  // list.pageData=res
}
</script>
