perf: 通知渠道支持测试按钮

This commit is contained in:
xiaojunnuo
2024-11-25 11:35:16 +08:00
parent 3af6d96e6e
commit b54ae272eb
13 changed files with 126 additions and 24 deletions
@@ -6,6 +6,9 @@ import SecretPlainGetter from "/@/views/certd/access/access-selector/access/secr
export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
provide("accessApi", api);
provide("get:plugin:type", () => {
return "access";
});
const AccessTypeDictRef = dict({
url: "/pi/access/accessTypeDict"
});
@@ -1,10 +1,13 @@
import { ColumnCompositionProps, dict } from "@fast-crud/fast-crud";
import { ColumnCompositionProps, compute, dict } from "@fast-crud/fast-crud";
import { computed, provide, ref, toRef } from "vue";
import { useReference } from "/@/use/use-refrence";
import { forEach, get, merge, set } from "lodash-es";
export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
provide("notificationApi", api);
provide("get:plugin:type", () => {
return "notification";
});
const notificationTypeDictRef = dict({
url: "/pi/notification/getTypeDict"
});
@@ -125,6 +128,26 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
})
}
} as ColumnCompositionProps,
test: {
title: "测试",
form: {
component: {
name: "api-test",
type: "notification",
typeName: compute(({ form }) => {
return form.type;
}),
action: "TestRequest",
form: compute(({ form }) => {
return form;
})
},
order: 999
},
column: {
show: false
}
},
setting: {
column: { show: false },
form: {
@@ -222,6 +222,9 @@ export default {
provide("getCurrentPluginDefine", () => {
return currentPluginDefine;
});
provide("get:plugin:type", () => {
return "plugin";
});
function getContext() {
return {