mirror of
https://gitee.com/eolink_admin/postcat.git
synced 2024-12-03 12:18:22 +08:00
feat: 0.2.0
This commit is contained in:
parent
8d4c88179a
commit
3d18b48853
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "postcat",
|
||||
"souceLocale": "zh-Hans",
|
||||
"version": "0.1.0",
|
||||
"version": "0.2.0",
|
||||
"main": "out/app/electron-main/main.js",
|
||||
"description": "A lightweight, extensible API tool",
|
||||
"homepage": "https://github.com/eolinker/postcat.git",
|
||||
|
@ -19,6 +19,10 @@ import { ApiEffectService } from '../../../service/store/api-effect.service';
|
||||
import { ApiStoreService } from '../../../service/store/api-state.service';
|
||||
|
||||
export type GroupAction = 'new' | 'edit' | 'delete';
|
||||
|
||||
const getAllAPIId = ({ id, children = [] }) => {
|
||||
return [id, ...children.map(getAllAPIId)];
|
||||
};
|
||||
@Component({
|
||||
selector: 'pc-api-group-tree',
|
||||
templateUrl: './api-group-tree.component.html',
|
||||
@ -135,11 +139,14 @@ export class ApiGroupTreeComponent implements OnInit {
|
||||
nzTitle: title,
|
||||
nzContent: ApiGroupEditComponent,
|
||||
nzComponentParams: params,
|
||||
nzOnOk: () =>
|
||||
modal.componentInstance.submit().then(data => {
|
||||
nzOnOk: () => {
|
||||
console.log('this.apiGroupTree', params.group);
|
||||
// const idList = getAllAPIId(params.group)
|
||||
return modal.componentInstance.submit().then(data => {
|
||||
if (params.action !== 'new') return;
|
||||
this.expandKeys = [...(this.expandKeys || []), modal.componentInstance.group.parentId];
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
editGroup(group) {
|
||||
|
Loading…
Reference in New Issue
Block a user