[TOC]
## 公用组件
`pagination`、`Attachment`、`HandleTable`、`CustomColumns`
分页、附件、审批记录、自定义列已定义在全局,使用时无需引用
## 流程组件
```
import FooterToolBar from"@/components/tool/FooterToolBar";
components: {
FooterToolBar
},
```
## 选择组件
### 每个组件都设置多选单选
```
:row-selection="{
type: type,
fixed: true,
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange
}"
```
```
props: {
//多选: checkbox, 单选: radio
type: {
type: String,
default: "radio",
},
}
```
### 行点击
```
//行点击
rowClick(data) {
return {
on: {
click: () => {
let keys = data.id;
// 单选
if (this.type == "radio") {
this.selectedRowKeys = [keys];
this.selectedRow = [data];
return;
}
// 多选
let index = this.selectedRowKeys.indexOf(keys);
if (index == -1) {
this.selectedRowKeys.push(keys);
this.selectedRow.push(data);
} else {
this.selectedRowKeys.splice(index, 1);
this.selectedRow.splice(index, 1);
}
},
},
};
},
```
### 数据挂载
```
getRowKeys() {
return this.selectedRowKeys;
},
getRows() {
return this.selectedRow;
},
```
### 弹窗组件表格高度超过350滚动
`:scroll\="{ x: 800, y: 350 }"`