修改
This commit is contained in:
@ -14,11 +14,9 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="toggleExpandAll(true)">一键展开</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="toggleExpandAll(false)">一键收起</el-button>
|
||||
<el-button type="primary" @click="toggleExpandAll">{{ isExpandAll ? '一键收起' : '一键展开' }}</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
@ -274,11 +272,12 @@ const handleSave = (row?: any, type?: any) => {
|
||||
};
|
||||
const tableRef = ref<any>();
|
||||
|
||||
const toggleExpandAll = (isExpand: boolean) => {
|
||||
const toggleExpandAll = () => {
|
||||
isExpandAll.value = !isExpandAll.value;
|
||||
console.log(isExpandAll.value);
|
||||
tableData.value.forEach((row) => {
|
||||
tableRef.value.toggleRowExpansion(row, isExpand);
|
||||
tableRef.value.toggleRowExpansion(row, isExpandAll.value);
|
||||
});
|
||||
isExpandAll.value = isExpand;
|
||||
};
|
||||
//导入
|
||||
const importExcel = (options: any): any => {
|
||||
|
Reference in New Issue
Block a user