From d286c040a5232dcca829945734affead3ee08b3c Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 9 Feb 2026 14:45:56 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20access=20=E6=8F=92=E4=BB=B6=E6=94=AF?= =?UTF-8?q?=E6=8C=81remote-select=E7=AD=89=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/certd/access/common.tsx | 3 ++ .../src/views/certd/addon/common.tsx | 11 +++--- .../src/views/certd/notification/common.tsx | 4 +++ .../plugin-lib/aliyun/access/alioss-access.ts | 36 ++++++++++++------- 4 files changed, 37 insertions(+), 17 deletions(-) diff --git a/packages/ui/certd-client/src/views/certd/access/common.tsx b/packages/ui/certd-client/src/views/certd/access/common.tsx index 026065e51..0ff0cd7c8 100644 --- a/packages/ui/certd-client/src/views/certd/access/common.tsx +++ b/packages/ui/certd-client/src/views/certd/access/common.tsx @@ -10,6 +10,9 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) { provide("get:plugin:type", () => { return "access"; }); + provide("getCurrentPluginDefine", () => { + return currentDefine; + }); const AccessTypeDictRef = dict({ url: "/pi/access/accessTypeDict", }); diff --git a/packages/ui/certd-client/src/views/certd/addon/common.tsx b/packages/ui/certd-client/src/views/certd/addon/common.tsx index d871e1c9d..6bbd46026 100644 --- a/packages/ui/certd-client/src/views/certd/addon/common.tsx +++ b/packages/ui/certd-client/src/views/certd/addon/common.tsx @@ -1,12 +1,11 @@ import { ColumnCompositionProps, compute, dict } from "@fast-crud/fast-crud"; +import { Modal } from "ant-design-vue"; +import { forEach, get, merge, set } from "lodash-es"; import { computed, provide, ref, toRef } from "vue"; import { useReference } from "/@/use/use-refrence"; -import { forEach, get, merge, set } from "lodash-es"; -import { Modal } from "ant-design-vue"; import { mitter } from "/@/utils/util.mitt"; -import { useI18n } from "/src/locales"; -import * as pipelineApi from "/@/views/certd/pipeline/api"; import { getAddonTypeDefine } from "/@/views/certd/addon/api"; +import { useI18n } from "/src/locales"; export function addonProvide(api: any) { provide("addonApi", api); @@ -30,6 +29,10 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any, a }, }; + provide("getCurrentPluginDefine", () => { + return currentDefine; + }); + function buildDefineFields(define: any, form: any, mode: string) { const formWrapperRef = crudExpose.getFormWrapperRef(); const columnsRef = toRef(formWrapperRef.formOptions, "columns"); diff --git a/packages/ui/certd-client/src/views/certd/notification/common.tsx b/packages/ui/certd-client/src/views/certd/notification/common.tsx index 733a4e624..9b1cec9ff 100644 --- a/packages/ui/certd-client/src/views/certd/notification/common.tsx +++ b/packages/ui/certd-client/src/views/certd/notification/common.tsx @@ -26,6 +26,10 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) { }, }; + provide("getCurrentPluginDefine", () => { + return currentDefine; + }); + function buildDefineFields(define: any, form: any, mode: string) { const formWrapperRef = crudExpose.getFormWrapperRef(); const columnsRef = toRef(formWrapperRef.formOptions, "columns"); diff --git a/packages/ui/certd-server/src/plugins/plugin-lib/aliyun/access/alioss-access.ts b/packages/ui/certd-server/src/plugins/plugin-lib/aliyun/access/alioss-access.ts index eb5bc9e7f..2f2607ee3 100644 --- a/packages/ui/certd-server/src/plugins/plugin-lib/aliyun/access/alioss-access.ts +++ b/packages/ui/certd-server/src/plugins/plugin-lib/aliyun/access/alioss-access.ts @@ -22,9 +22,27 @@ export class AliossAccess extends BaseAccess { @AccessInput({ title: "大区", component: { - name: "a-auto-complete", + name: "remote-auto-complete", vModel: "value", - options: [ + type: "access", + typeName: "alioss", + action: AliossAccess.prototype.onGetRegionList.name + }, + required: true, + }) + region!: string; + + @AccessInput({ + title: "Bucket", + helper: "存储桶名称", + required: true, + }) + bucket!: string; + + + onGetRegionList(){ + return { + list: [ { value: "oss-cn-hangzhou", label: "华东1(杭州)" }, { value: "oss-cn-shanghai", label: "华东2(上海)" }, { value: "oss-cn-nanjing", label: "华东5(南京-本地地域)" }, @@ -54,18 +72,10 @@ export class AliossAccess extends BaseAccess { { value: "oss-eu-west-1", label: "英国(伦敦)" }, { value: "oss-me-east-1", label: "阿联酋(迪拜)①" }, { value: "oss-rg-china-mainland", label: "无地域属性(中国内地)" }, - ], - }, - required: true, - }) - region!: string; + ] + } + } - @AccessInput({ - title: "Bucket", - helper: "存储桶名称", - required: true, - }) - bucket!: string; } new AliossAccess();