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);