【修改】j-table样式问题

This commit is contained in:
dusicong
2021-03-24 17:38:16 +08:00
parent fec6712c17
commit 4aa873012e
2 changed files with 160 additions and 127 deletions
+30 -16
View File
@@ -1,14 +1,22 @@
<template>
<div>
<!-- TODO 使用标签 应每个参数一行保持整体写法统一和美观度-->
<a-table
:columns="aColumns"
:dataSource="dataSource"
:pagination="ispagination"
<a-table
:columns="aColumns"
:dataSource="dataSource"
:pagination="ispagination"
:rowSelection="rowSelect"
bordered
:scroll="{ x: 1920 }"
>
<span slot="action" slot-scope="text, record">
<a>Invite {{ record.name }}</a>
<a-divider type="vertical" />
<a>Delete</a>
<a-divider type="vertical" />
<a class="ant-dropdown-link">
More actions
<a-icon type="down" />
</a>
</span>
<span :slot="a.slots.title" v-for="a in aColumns" :key="a.dataIndex">
{{ a.slots.title }}
<a-dropdown :trigger="['click']">
@@ -34,12 +42,7 @@
</a-menu-item>
</a-sub-menu>
<a-sub-menu key="check" title="筛选列头">
<a-checkbox-group
v-model="checkedList"
:options="plainOptions"
@change="onChange"
:style="checkboxStyle"
/>
<a-checkbox-group v-model="checkedList" :options="plainOptions" @change="onChange" />
</a-sub-menu>
</a-menu>
</a-dropdown>
@@ -113,10 +116,6 @@ export default {
height: '30px',
lineHeight: '30px',
},
checkboxStyle: {
display: 'block',
lineHeight: '30px',
},
}
},
computed: {
@@ -306,4 +305,19 @@ export default {
.ant-dropdown-menu-submenu-popup {
width: 7.5rem;
}
.ant-checkbox-group-item {
line-height: 30px;
padding-left: 15px;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
/* autoprefixer: off */
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
/* autoprefixer: on */
-webkit-line-clamp: 1;
word-wrap: break-word;
word-break: break-all;
}
</style>