feat: 修复构建.
This commit is contained in:
2
orion-ops-ui/components.d.ts
vendored
2
orion-ops-ui/components.d.ts
vendored
@@ -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 {}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<a-radio-group type="button"
|
||||
class="auth-type-group usn"
|
||||
v-model="formModel.authType"
|
||||
:options="toOptions(sshAuthTypeKey) as RadioOption[]" />
|
||||
:options="toRadioOptions(sshAuthTypeKey)" />
|
||||
</a-form-item>
|
||||
<!-- 主机密码 -->
|
||||
<a-form-item v-if="SshAuthType.PASSWORD === formModel.authType"
|
||||
@@ -135,7 +135,6 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { RadioOption } from '@arco-design/web-vue/es/radio/interface';
|
||||
import type { FieldRule } from '@arco-design/web-vue';
|
||||
import type { HostSshConfig } from './types/const';
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
@@ -151,7 +150,7 @@
|
||||
import HostIdentitySelector from '@/components/asset/host-identity/host-identity-selector.vue';
|
||||
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions } = useDictStore();
|
||||
const { toRadioOptions } = useDictStore();
|
||||
|
||||
const props = defineProps({
|
||||
content: Object,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<a-radio-group v-model="newConnectionType"
|
||||
type="button"
|
||||
class="usn"
|
||||
:options="toOptions(newConnectionTypeKey) as RadioOption[]"
|
||||
:options="toRadioOptions(newConnectionTypeKey)"
|
||||
@change="s => changeNewConnectionType(s as string)" />
|
||||
<!-- 过滤 -->
|
||||
<a-auto-complete v-model="filterValue"
|
||||
@@ -75,7 +75,6 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { RadioOption } from '@arco-design/web-vue/es/radio/interface';
|
||||
import type { SelectOptionData } from '@arco-design/web-vue';
|
||||
import type { AuthorizedHostQueryResponse } from '@/api/asset/asset-authorized-data';
|
||||
import { getCurrentAuthorizedHost } from '@/api/asset/asset-authorized-data';
|
||||
@@ -89,7 +88,7 @@
|
||||
import HostsView from './hosts-view.vue';
|
||||
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions } = useDictStore();
|
||||
const { toRadioOptions } = useDictStore();
|
||||
const { preference, changeNewConnectionType } = useTerminalStore();
|
||||
|
||||
const newConnectionType = ref(preference.newConnectionType || NewConnectionType.GROUP);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<a-form-item field="authType" label="验证方式">
|
||||
<a-radio-group type="button"
|
||||
v-model="formModel.authType"
|
||||
:options="toOptions(extraSshAuthTypeKey) as RadioOption[]" />
|
||||
:options="toRadioOptions(extraSshAuthTypeKey)" />
|
||||
</a-form-item>
|
||||
<!-- 用户名 -->
|
||||
<a-form-item v-if="formModel.authType === ExtraSshAuthType.CUSTOM_KEY"
|
||||
@@ -61,7 +61,6 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { RadioOption } from '@arco-design/web-vue/es/radio/interface';
|
||||
import type { HostQueryResponse } from '@/api/asset/host';
|
||||
import type { SshExtraModel } from '../../types/terminal.const';
|
||||
import { ref } from 'vue';
|
||||
@@ -74,7 +73,7 @@
|
||||
import HostIdentitySelector from '@/components/asset/host-identity/host-identity-selector.vue';
|
||||
import HostKeySelector from '@/components/asset/host-key/host-key-selector.vue';
|
||||
|
||||
const { toOptions } = useDictStore();
|
||||
const { toRadioOptions } = useDictStore();
|
||||
const { visible, setVisible } = useVisible();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<a-radio-group type="button"
|
||||
v-model="formModel.cursorStyle"
|
||||
class="form-item form-item-cursor-style usn"
|
||||
:options="toOptions(cursorStyleKey) as RadioOption[]" />
|
||||
:options="toRadioOptions(cursorStyleKey)" />
|
||||
</a-form-item>
|
||||
<!-- 光标闪烁 -->
|
||||
<a-form-item field="cursorBlink" label="光标是否闪烁">
|
||||
@@ -95,7 +95,6 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { RadioOption } from '@arco-design/web-vue/es/radio/interface';
|
||||
import type { TerminalDisplaySetting } from '@/store/modules/terminal/types';
|
||||
import { ref, watch } from 'vue';
|
||||
import { useDictStore, useTerminalStore } from '@/store';
|
||||
@@ -103,7 +102,7 @@
|
||||
import { labelFilter } from '@/types/form';
|
||||
import TerminalExample from '../view-setting/terminal-example.vue';
|
||||
|
||||
const { toOptions } = useDictStore();
|
||||
const { toOptions, toRadioOptions } = useDictStore();
|
||||
const { preference, changeDisplaySetting } = useTerminalStore();
|
||||
|
||||
const previewTerminal = ref();
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
class="usn"
|
||||
size="mini"
|
||||
type="button"
|
||||
:options="toOptions(darkThemeKey) as RadioOption[]"
|
||||
:options="toRadioOptions(darkThemeKey)"
|
||||
@change="s => changeDarkTheme(s as string)">
|
||||
</a-radio-group>
|
||||
</div>
|
||||
@@ -53,14 +53,13 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { RadioOption } from '@arco-design/web-vue/es/radio/interface';
|
||||
import { darkThemeKey } from '../../types/terminal.const';
|
||||
import ThemeSchema from '../../types/terminal.theme';
|
||||
import { useDictStore, useTerminalStore } from '@/store';
|
||||
import TerminalExample from './terminal-example.vue';
|
||||
|
||||
const { changeThemeSchema, changeDarkTheme, preference } = useTerminalStore();
|
||||
const { toOptions } = useDictStore();
|
||||
const { toRadioOptions } = useDictStore();
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
label="菜单类型">
|
||||
<a-radio-group type="button"
|
||||
v-model="formModel.type"
|
||||
:options="toOptions(menuTypeKey)" />
|
||||
:options="toRadioOptions(menuTypeKey)" />
|
||||
</a-form-item>
|
||||
<!-- 菜单图标 -->
|
||||
<a-form-item v-if="formModel.type !== MenuType.FUNCTION"
|
||||
@@ -86,7 +86,6 @@
|
||||
label="是否可见"
|
||||
tooltip="选择隐藏后不会在菜单以及 tab 中显示 但是可以访问">
|
||||
<a-switch type="round"
|
||||
size="large"
|
||||
v-model="formModel.visible"
|
||||
:checked-text="getDictValue(menuVisibleKey, EnabledStatus.ENABLED)"
|
||||
:unchecked-text="getDictValue(menuVisibleKey, EnabledStatus.DISABLED)"
|
||||
@@ -99,7 +98,6 @@
|
||||
label="新窗口打开"
|
||||
tooltip="选择后点击菜单会使用新页面打开">
|
||||
<a-switch type="round"
|
||||
size="large"
|
||||
v-model="formModel.newWindow"
|
||||
:checked-text="getDictValue(menuNewWindowKey, EnabledStatus.ENABLED)"
|
||||
:unchecked-text="getDictValue(menuNewWindowKey, EnabledStatus.DISABLED)"
|
||||
@@ -112,7 +110,6 @@
|
||||
label="是否缓存"
|
||||
tooltip="选择缓存后则会使用 keep-alive 缓存组件">
|
||||
<a-switch type="round"
|
||||
size="large"
|
||||
v-model="formModel.cache"
|
||||
:checked-text="getDictValue(menuCacheKey, EnabledStatus.ENABLED)"
|
||||
:unchecked-text="getDictValue(menuCacheKey, EnabledStatus.DISABLED)"
|
||||
@@ -147,7 +144,7 @@
|
||||
|
||||
const { visible, setVisible } = useVisible();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { toOptions, getDictValue } = useDictStore();
|
||||
const { toRadioOptions, getDictValue } = useDictStore();
|
||||
|
||||
const title = ref<string>();
|
||||
const isAddHandle = ref<boolean>(true);
|
||||
|
||||
Reference in New Issue
Block a user