【修改】j-table修复BUG
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<j-table :isShowPage="isShowPage" :isCheck="isCheck" :dataSource="dataSource" :columns="columns"></j-table>
|
||||
<j-table :isShowPage="isShowPage" :isCheck="isCheck" :isShowDropdown="isShowDropdown" :dataSource="dataSource"
|
||||
:columns="columns">
|
||||
</j-table>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
@@ -16,10 +18,11 @@
|
||||
return {
|
||||
isShowPage: true, // 是否显示分页
|
||||
isCheck: false, // 是否多选
|
||||
isShowDropdown: true, //是否开启下拉功能
|
||||
dataSource: [{
|
||||
key: '1',
|
||||
name: '胡彦斌',
|
||||
age: 32,
|
||||
name: '胡彦斌1',
|
||||
age: 35,
|
||||
address: '西湖区湖底公园1号',
|
||||
address1: '西湖区湖底公园1号',
|
||||
address2: '西湖区湖底公园1号',
|
||||
@@ -28,9 +31,9 @@
|
||||
address5: '西湖区湖底公园1号',
|
||||
}, {
|
||||
key: '2',
|
||||
name: '胡彦斌',
|
||||
name: '胡彦斌2',
|
||||
age: 32,
|
||||
address: '西湖区湖底公园1号',
|
||||
address: '西湖区湖底公园3号',
|
||||
address1: '西湖区湖底公园1号',
|
||||
address2: '西湖区湖底公园1号',
|
||||
address3: '西湖区湖底公园1号',
|
||||
@@ -38,9 +41,9 @@
|
||||
address5: '西湖区湖底公园1号',
|
||||
}, {
|
||||
key: '3',
|
||||
name: '胡彦斌',
|
||||
name: '胡彦斌3',
|
||||
age: 32,
|
||||
address: '西湖区湖底公园1号',
|
||||
address: '西湖区湖底公园5号',
|
||||
address1: '西湖区湖底公园1号',
|
||||
address2: '西湖区湖底公园1号',
|
||||
address3: '西湖区湖底公园1号',
|
||||
@@ -48,9 +51,9 @@
|
||||
address5: '西湖区湖底公园1号',
|
||||
}, {
|
||||
key: '4',
|
||||
name: '胡彦斌',
|
||||
name: '胡彦斌4',
|
||||
age: 32,
|
||||
address: '西湖区湖底公园1号',
|
||||
address: '西湖区湖底公园7号',
|
||||
address1: '西湖区湖底公园1号',
|
||||
address2: '西湖区湖底公园1号',
|
||||
address3: '西湖区湖底公园1号',
|
||||
@@ -58,9 +61,9 @@
|
||||
address5: '西湖区湖底公园1号',
|
||||
}, {
|
||||
key: '5',
|
||||
name: '胡彦斌',
|
||||
age: 32,
|
||||
address: '西湖区湖底公园1号',
|
||||
name: '胡彦斌5',
|
||||
age: 38,
|
||||
address: '西湖区湖底公园9号',
|
||||
address1: '西湖区湖底公园1号',
|
||||
address2: '西湖区湖底公园1号',
|
||||
address3: '西湖区湖底公园1号',
|
||||
@@ -68,9 +71,9 @@
|
||||
address5: '西湖区湖底公园1号',
|
||||
}, {
|
||||
key: '6',
|
||||
name: '胡彦斌',
|
||||
name: '胡彦斌6',
|
||||
age: 32,
|
||||
address: '西湖区湖底公园1号',
|
||||
address: '西湖区湖底公园11号',
|
||||
address1: '西湖区湖底公园1号',
|
||||
address2: '西湖区湖底公园1号',
|
||||
address3: '西湖区湖底公园1号',
|
||||
@@ -80,7 +83,7 @@
|
||||
columns: [{
|
||||
// title: '姓名',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
key: 1,
|
||||
width: 200,
|
||||
slots: {
|
||||
title: '姓名',
|
||||
@@ -89,32 +92,35 @@
|
||||
// 2为右侧冻结
|
||||
// 3为不冻结或解冻
|
||||
fixedValue: 3
|
||||
}
|
||||
},
|
||||
// fixed: 'right'
|
||||
},
|
||||
{
|
||||
// title: '年龄',
|
||||
dataIndex: 'age',
|
||||
key: 'age',
|
||||
key: 2,
|
||||
width: 200,
|
||||
slots: {
|
||||
title: '年龄',
|
||||
fixedValue: 3
|
||||
}
|
||||
},
|
||||
// sorter: (a, b) => a.age - b.age,
|
||||
},
|
||||
{
|
||||
// title: '住址',
|
||||
dataIndex: 'address',
|
||||
key: 'address',
|
||||
key: 3,
|
||||
width: 200,
|
||||
slots: {
|
||||
title: '住址',
|
||||
fixedValue: 3
|
||||
}
|
||||
},
|
||||
// sorter: (a, b) => a.address.length - b.address.length,
|
||||
},
|
||||
{
|
||||
// title: '住址1',
|
||||
dataIndex: 'address1',
|
||||
key: 'address1',
|
||||
key: 4,
|
||||
width: 200,
|
||||
slots: {
|
||||
title: '住址1',
|
||||
@@ -124,7 +130,7 @@
|
||||
{
|
||||
// title: '住址2',
|
||||
dataIndex: 'address2',
|
||||
key: 'address2',
|
||||
key: 5,
|
||||
width: 200,
|
||||
slots: {
|
||||
title: '住址2',
|
||||
@@ -134,7 +140,7 @@
|
||||
{
|
||||
// title: '住址3',
|
||||
dataIndex: 'address3',
|
||||
key: 'address3',
|
||||
key: 6,
|
||||
width: 200,
|
||||
slots: {
|
||||
title: '住址3',
|
||||
@@ -144,7 +150,7 @@
|
||||
{
|
||||
// title: '住址4',
|
||||
dataIndex: 'address4',
|
||||
key: 'address4',
|
||||
key: 7,
|
||||
width: 200,
|
||||
slots: {
|
||||
title: '住址4',
|
||||
@@ -154,7 +160,7 @@
|
||||
{
|
||||
// title: '住址5',
|
||||
dataIndex: 'address5',
|
||||
key: 'address5',
|
||||
key: 8,
|
||||
slots: {
|
||||
title: '住址5',
|
||||
fixedValue: 3
|
||||
|
||||
Reference in New Issue
Block a user