mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-19 15:56:47 +08:00
表格样式
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
<a-table :columns="columns1" :data-source="tableData1"
|
||||
expandRowByClick="true" @expand="expandTable" :pagination="false"/>
|
||||
<div class="tableBox" style="display:flex;justify-content:center;padding:20px;">
|
||||
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
v-if="tableDataTotal > 10"
|
||||
@@ -68,7 +69,7 @@ import * as api from "@/api/indexTemplate"
|
||||
const columns1 = [
|
||||
{
|
||||
title: "模版名称",
|
||||
width: "20%",
|
||||
width: "30%",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
ellipsis: true,
|
||||
@@ -83,21 +84,28 @@ const columns1 = [
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
width: "18%",
|
||||
width: "15%",
|
||||
dataIndex: "creator",
|
||||
key: "creator",
|
||||
align: "center",
|
||||
},
|
||||
// {
|
||||
// title: "最近学习时间",
|
||||
// width: "25%",
|
||||
// dataIndex: "stutime",
|
||||
// key: "stutime",
|
||||
// align: "center",
|
||||
{
|
||||
title: "创建时间",
|
||||
width: "20%",
|
||||
dataIndex: "createTime",
|
||||
key: "createTime",
|
||||
align: "center",
|
||||
},
|
||||
//{
|
||||
// title: "发布时间",
|
||||
// width: "15%",
|
||||
// dataIndex: "publishTime",
|
||||
// key: "publishTime",
|
||||
// align: "center",
|
||||
// },
|
||||
{
|
||||
title: "操作",
|
||||
width: "22%",
|
||||
width: "20%",
|
||||
className: "h",
|
||||
dataIndex: "operation",
|
||||
key: "operation",
|
||||
@@ -114,17 +122,11 @@ export default defineComponent({
|
||||
time:null,
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total:50,
|
||||
total:0,
|
||||
tableDataTotal:0,
|
||||
tableData1: [
|
||||
{
|
||||
key: "1",
|
||||
name: "测试模板1",
|
||||
status: "已发布",
|
||||
creator: "李部长",
|
||||
stutime: "2022-10-31 23:12:00",
|
||||
operation: "operation",
|
||||
projectTemplateId: 1,
|
||||
|
||||
}
|
||||
],
|
||||
});
|
||||
@@ -217,7 +219,8 @@ export default defineComponent({
|
||||
state.tableData1 = []
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
console.log(res);
|
||||
let resData = res.data.data.rows
|
||||
let resData = res.data.data.rows;
|
||||
state.total =res.data.data.total;
|
||||
if (resData.length) {
|
||||
for (let i in resData) {
|
||||
state.tableData1.push({
|
||||
@@ -226,7 +229,8 @@ export default defineComponent({
|
||||
status:resData[i].status ? "已发布" : "未发布",
|
||||
name:resData[i].name,
|
||||
creator:resData[i].createName,
|
||||
stutime:resData[i].publishTime,
|
||||
publishTime:resData[i].publishTime,
|
||||
createTime:resData[i].createTime,
|
||||
operation:"operation"
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user