mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
perf: 插件贡献文档及示例
This commit is contained in:
@@ -93,7 +93,7 @@
|
||||
"less-loader": "^11.1.3",
|
||||
"lint-staged": "^13.2.3",
|
||||
"postcss": "^8.4.27",
|
||||
"prettier": "3.0.1",
|
||||
"prettier": "^2.8.8",
|
||||
"pretty-quick": "^3.1.3",
|
||||
"rimraf": "^5.0.1",
|
||||
"rollup": "^3.27.2",
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
import { defineComponent, reactive, ref, watch } from "vue";
|
||||
import * as api from "../api";
|
||||
import CertAccessModal from "./access/index.vue";
|
||||
import { GetProviderDefineByAccessType } from "../api";
|
||||
|
||||
export default defineComponent({
|
||||
name: "PiAccessSelector",
|
||||
|
||||
@@ -47,3 +47,11 @@ export function GetProviderDefine(type: string) {
|
||||
params: { type }
|
||||
});
|
||||
}
|
||||
|
||||
export function GetProviderDefineByAccessType(type: string) {
|
||||
return request({
|
||||
url: apiPrefix + "/defineByAccessType",
|
||||
method: "post",
|
||||
params: { type }
|
||||
});
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
"typeorm": "^0.3.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "^2.8.8",
|
||||
"@midwayjs/luckyeye": "^1.1.0",
|
||||
"@midwayjs/mock": "^3.9.0",
|
||||
"@midwayjs/mwcc": "^0.8.0",
|
||||
|
||||
@@ -62,8 +62,8 @@ export class AccessController extends CrudController<AccessService> {
|
||||
|
||||
@Post('/define', { summary: Constants.per.authOnly })
|
||||
async define(@Query('type') type) {
|
||||
const provider = this.service.getDefineByType(type);
|
||||
return this.ok(provider);
|
||||
const access = this.service.getDefineByType(type);
|
||||
return this.ok(access);
|
||||
}
|
||||
|
||||
@Post('/accessTypeDict', { summary: Constants.per.authOnly })
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
import { Provide, Scope, ScopeEnum } from "@midwayjs/decorator";
|
||||
import { Provide, Scope, ScopeEnum } from '@midwayjs/decorator';
|
||||
import { InjectEntityModel } from '@midwayjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
import { BaseService } from '../../../basic/base-service';
|
||||
import { AccessEntity } from '../entity/access';
|
||||
import {
|
||||
accessRegistry,
|
||||
IAccessService,
|
||||
} from '@certd/pipeline';
|
||||
import { accessRegistry, IAccessService } from '@certd/pipeline';
|
||||
|
||||
/**
|
||||
* 授权
|
||||
@@ -38,7 +35,8 @@ export class AccessService
|
||||
return accessRegistry.getDefineList();
|
||||
}
|
||||
|
||||
getDefineByType(type) {
|
||||
getDefineByType(type: string) {
|
||||
return accessRegistry.getDefine(type);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user