Merge branch 'zcwyMaster' into 'master'

表头定宽

See merge request !152
This commit is contained in:
joshen
2023-10-31 18:15:00 +08:00

View File

@@ -67,7 +67,7 @@
:data-source="tableData1" :data-source="tableData1"
:loading="tableLoading" :loading="tableLoading"
:pagination="false" :pagination="false"
:scroll="{ x: 'max-content' }" :scroll="{ x: 1300 }"
row-key="id" row-key="id"
> >
<template #actions="{ text, record, index }"> <template #actions="{ text, record, index }">
@@ -190,7 +190,7 @@ export default defineComponent({
columns1: [ columns1: [
{ {
title: "序号", title: "序号",
width: 80, width: 40,
dataIndex: "xuhaoid", dataIndex: "xuhaoid",
key: "xuhaoid", key: "xuhaoid",
align: "center", align: "center",
@@ -200,18 +200,19 @@ export default defineComponent({
}, },
{ {
title: "名称", title: "名称",
width: 200, width: 120,
dataIndex: "name", dataIndex: "name",
key: "name", key: "name",
ellipsis: true, ellipsis: true,
align: "left", align: "left",
customRender: ({ text }) => { customRender: ({ text }) => {
return <a-tooltip placement="bottomLeft" title = {text} >{text?text.length>12?text.slice(0,12)+'...':text:''}</a-tooltip> return text ? text : "";
// return <a-tooltip placement="bottomLeft" title = {text} >{text?text.length>12?text.slice(0,12)+'...':text:''}</a-tooltip>
}, },
}, },
{ {
title: "内容分类", title: "内容分类",
width: 200, width: 100,
dataIndex: "sysType1", dataIndex: "sysType1",
ellipsis: true, ellipsis: true,
key: "keywords", key: "keywords",
@@ -224,18 +225,19 @@ export default defineComponent({
}, },
{ {
title: "关键字", title: "关键字",
width: 100, width: 90,
dataIndex: "keywords", dataIndex: "keywords",
key: "keywords", key: "keywords",
align: "left", align: "left",
ellipsis: true, ellipsis: true,
customRender: ({ text }) => { customRender: ({ text }) => {
return <a-tooltip placement="bottomLeft" title = {text} >{text? text.length>12? text.slice(0,12)+'...' : text : ''}</a-tooltip> return text ? text : "";
// return <a-tooltip placement="bottomLeft" title = {text} >{text? text.length>12? text.slice(0,12)+'...' : text : ''}</a-tooltip>
}, },
}, },
{ {
title: "授课教师", title: "授课教师",
width: 100, width: 52,
dataIndex: "teacherName", dataIndex: "teacherName",
key: "8", key: "8",
ellipsis: true, ellipsis: true,
@@ -246,7 +248,7 @@ export default defineComponent({
}, },
{ {
title: "创建时间", title: "创建时间",
width: 100, width: 84,
dataIndex: "sysCreateTime", dataIndex: "sysCreateTime",
key: "9", key: "9",
ellipsis: true, ellipsis: true,
@@ -257,7 +259,7 @@ export default defineComponent({
}, },
{ {
title: "推荐时间", title: "推荐时间",
width: 100, width: 84,
ellipsis: true, ellipsis: true,
dataIndex: "recommendTime", dataIndex: "recommendTime",
key: "10", key: "10",
@@ -268,7 +270,7 @@ export default defineComponent({
}, },
{ {
title: "推荐人", title: "推荐人",
width: 100, width: 52,
dataIndex: "recommendStatus", dataIndex: "recommendStatus",
key: "recommendStatus", key: "recommendStatus",
align: "center", align: "center",
@@ -285,7 +287,7 @@ export default defineComponent({
}, },
{ {
title: "操作", title: "操作",
width: 100, width: 52,
dataIndex: "id", dataIndex: "id",
key: "id", key: "id",
fixed: "right", fixed: "right",
@@ -428,7 +430,9 @@ export default defineComponent({
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
:deep(.ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before){
background-color: rgba(0, 0, 0, 0.1);
}
.grey{ .grey{
color: gray; color: gray;
} }
@@ -495,7 +499,7 @@ export default defineComponent({
.btnn { .btnn {
padding: 0px 26px 0px 26px; padding: 0px 26px 0px 26px;
height: 38px; height: 38px;
// background: #4ea6ff; background: #ffffff;
color: #388BE1; color: #388BE1;
border-radius: 8px; border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1); border: 1px solid rgba(64, 158, 255, 1);