[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?}"`