Jeecg-Boot 2.2.0 版本发布 | 重磅升级

This commit is contained in:
zhangdaiscott
2020-05-03 12:43:53 +08:00
parent 046831e700
commit 9e046a07d4
335 changed files with 12894 additions and 27387 deletions

View File

@ -63,12 +63,14 @@
<script>
import { getAction } from '@/api/manage'
import Ellipsis from '@/components/Ellipsis'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { cloneObject, pushIfNotExist } from '@/utils/util'
export default {
name: 'JSelectBizComponentModal',
mixins: [JeecgListMixin],
components: { Ellipsis },
props: {
value: {
type: Array,
@ -128,12 +130,15 @@
type: String,
default: 'id'
},
// 过长裁剪长度,设置为 -1 代表不裁剪
ellipsisLength: {
type: Number,
default: 12
},
},
data() {
return {
innerValue: [],
// 表头
innerColumns: this.columns,
// 已选择列表
selectedTable: {
pagination: false,
@ -147,6 +152,7 @@
],
dataSource: [],
},
renderEllipsis: (value) => (<ellipsis length={this.ellipsisLength}>{value}</ellipsis>),
url: { list: this.listUrl },
/* 分页参数 */
ipagination: {
@ -164,6 +170,19 @@
dataSourceMap: {},
}
},
computed: {
// 表头
innerColumns() {
let columns = cloneObject(this.columns)
columns.forEach(column => {
// 给所有的列加上过长裁剪
if (this.ellipsisLength !== -1) {
column.customRender = (text) => this.renderEllipsis(text)
}
})
return columns
},
},
watch: {
value: {
deep: true,