From 3f1a6aa0d16b7066caea746a6f1f5b4a54047614 Mon Sep 17 00:00:00 2001 From: lijiahangmax Date: Wed, 10 Jan 2024 00:10:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E6=9E=84=E5=BB=BA.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- orion-ops-ui/components.d.ts | 2 ++ orion-ops-ui/src/store/modules/dict/index.ts | 6 ++++++ .../host-list/components/config/ssh/ssh-config-form.vue | 5 ++--- .../components/new-connection/new-connection-view.vue | 5 ++--- .../terminal/components/new-connection/ssh-extra-modal.vue | 5 ++--- .../components/view-setting/terminal-display-block.vue | 5 ++--- .../components/view-setting/terminal-theme-block.vue | 5 ++--- .../src/views/system/menu/components/menu-form-modal.vue | 7 ++----- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/orion-ops-ui/components.d.ts b/orion-ops-ui/components.d.ts index de05cfc5..524ea406 100644 --- a/orion-ops-ui/components.d.ts +++ b/orion-ops-ui/components.d.ts @@ -1,6 +1,8 @@ /* eslint-disable */ /* prettier-ignore */ // @ts-nocheck +// Generated by unplugin-vue-components +// Read more: https://github.com/vuejs/core/pull/3399 import '@vue/runtime-core' export {} diff --git a/orion-ops-ui/src/store/modules/dict/index.ts b/orion-ops-ui/src/store/modules/dict/index.ts index c75c93ef..72f76e71 100644 --- a/orion-ops-ui/src/store/modules/dict/index.ts +++ b/orion-ops-ui/src/store/modules/dict/index.ts @@ -1,3 +1,4 @@ +import type { RadioOption } from '@arco-design/web-vue/es/radio/interface'; import type { DictState } from './types'; import type { Options } from '@/types/global'; import { defineStore } from 'pinia'; @@ -28,6 +29,11 @@ export default defineStore('dict', { return this.$state[key]; }, + // 获取字典选项 + toRadioOptions(key: string) { + return this.$state[key] as RadioOption[]; + }, + // 获取字典值 getDictValue(dict: string, value: any, diff --git a/orion-ops-ui/src/views/asset/host-list/components/config/ssh/ssh-config-form.vue b/orion-ops-ui/src/views/asset/host-list/components/config/ssh/ssh-config-form.vue index 2d62bc13..ea1976a8 100644 --- a/orion-ops-ui/src/views/asset/host-list/components/config/ssh/ssh-config-form.vue +++ b/orion-ops-ui/src/views/asset/host-list/components/config/ssh/ssh-config-form.vue @@ -48,7 +48,7 @@ + :options="toRadioOptions(sshAuthTypeKey)" /> diff --git a/orion-ops-ui/src/views/system/menu/components/menu-form-modal.vue b/orion-ops-ui/src/views/system/menu/components/menu-form-modal.vue index b9e0be6b..49aace91 100644 --- a/orion-ops-ui/src/views/system/menu/components/menu-form-modal.vue +++ b/orion-ops-ui/src/views/system/menu/components/menu-form-modal.vue @@ -35,7 +35,7 @@ label="菜单类型"> + :options="toRadioOptions(menuTypeKey)" /> (); const isAddHandle = ref(true);