fix(全局): 样式调整

This commit is contained in:
baiqi 2024-04-26 18:40:19 +08:00 committed by 刘瑞斌
parent 647e553c99
commit 439742a2c5
10 changed files with 51 additions and 65 deletions

View File

@ -9,7 +9,7 @@ import { vitePluginForArco } from '@arco-plugins/vite-vue';
export default function configArcoStyleImportPlugin() { export default function configArcoStyleImportPlugin() {
// 按需加载主题样式 // 按需加载主题样式
const arcoResolverPlugin = vitePluginForArco({ const arcoResolverPlugin = vitePluginForArco({
theme: '@arco-themes/vue-ms-theme-default', theme: '@arco-themes/vue-metersphere-v3',
}); });
return arcoResolverPlugin; return arcoResolverPlugin;
} }

View File

@ -38,8 +38,8 @@
"dependencies": { "dependencies": {
"@7polo/kity": "2.0.8", "@7polo/kity": "2.0.8",
"@7polo/kityminder-core": "1.4.53", "@7polo/kityminder-core": "1.4.53",
"@arco-design/web-vue": "^2.55.0", "@arco-design/web-vue": "^2.55.1",
"@arco-themes/vue-ms-theme-default": "^0.0.30", "@arco-themes/vue-metersphere-v3": "^0.0.1",
"@form-create/arco-design": "^3.1.23", "@form-create/arco-design": "^3.1.23",
"@halo-dev/richtext-editor": "0.0.0-alpha.33", "@halo-dev/richtext-editor": "0.0.0-alpha.33",
"@tanstack/vue-query": "^5.17.15", "@tanstack/vue-query": "^5.17.15",

View File

@ -479,16 +479,6 @@
@apply flex-1 overflow-hidden; @apply flex-1 overflow-hidden;
} }
} }
.arco-tree-node-drag-icon {
@apply hidden;
// top: 50%;
// right: 16px;
// transform: translateY(-50%);
// .arco-icon {
// font-size: 14px;
// }
}
} }
.arco-tree-node-title-block { .arco-tree-node-title-block {
width: 60%; width: 60%;
@ -582,4 +572,8 @@
} }
} }
} }
// body app
.arco-tree-node-drag-icon {
@apply hidden;
}
</style> </style>

View File

@ -233,7 +233,7 @@
{{ t('msTable.batch.clear') }} {{ t('msTable.batch.clear') }}
</a-button> </a-button>
</span> </span>
<div class="flex flex-grow"> <div class="flex flex-grow items-center">
<batch-action <batch-action
v-if="showBatchAction" v-if="showBatchAction"
class="flex-1" class="flex-1"

View File

@ -1,12 +1,11 @@
<template> <template>
<div v-if="props.actionConfig" ref="refWrapper" class="flex flex-row flex-nowrap"> <div v-if="props.actionConfig" ref="refWrapper" class="flex flex-row flex-nowrap items-center">
<div class="title one-line-text">{{ t('msTable.batch.selected', { count: props.selectRowCount }) }}</div> <div class="title one-line-text">{{ t('msTable.batch.selected', { count: props.selectRowCount }) }}</div>
<div>
<template v-for="(element, idx) in baseAction" :key="element.label"> <template v-for="(element, idx) in baseAction" :key="element.label">
<a-divider v-if="element.isDivider" class="divider mx-0 my-[6px]" /> <a-divider v-if="element.isDivider" class="divider mx-0 my-[6px]" />
<a-button <a-button
v-if="!element.isDivider && !element.children && hasAllPermission(element.permission as string[]) && hasAnyPermission(element.anyPermission as string[])" v-if="!element.isDivider && !element.children && hasAllPermission(element.permission as string[]) && hasAnyPermission(element.anyPermission as string[])"
class="ml-[12px]" class="ml-[8px]"
:class="{ :class="{
'arco-btn-outline--danger': element.danger, 'arco-btn-outline--danger': element.danger,
'ml-[8px]': idx === 0, 'ml-[8px]': idx === 0,
@ -24,7 +23,7 @@
@select="handleSelect" @select="handleSelect"
> >
<a-button <a-button
class="ml-[12px]" class="ml-[8px]"
:class="{ :class="{
'arco-btn-outline--danger': element.danger, 'arco-btn-outline--danger': element.danger,
'ml-[8px]': idx === 0, 'ml-[8px]': idx === 0,
@ -45,8 +44,7 @@
</a-dropdown> </a-dropdown>
<!-- baseAction多菜单选择 --> <!-- baseAction多菜单选择 -->
</template> </template>
</div> <div v-if="moreActionLength > 0" class="drop-down ml-[8px] flex items-center">
<div v-if="moreActionLength > 0" class="drop-down relative ml-[8px] inline-block">
<a-dropdown position="tr" @select="handleSelect"> <a-dropdown position="tr" @select="handleSelect">
<a-button type="outline" :size="props.size"><MsIcon type="icon-icon_more_outlined" /></a-button> <a-button type="outline" :size="props.size"><MsIcon type="icon-icon_more_outlined" /></a-button>
<template #content> <template #content>

View File

@ -1,7 +1,7 @@
/* eslint-disable simple-import-sort/imports */ /* eslint-disable simple-import-sort/imports */
import { createApp } from 'vue'; import { createApp } from 'vue';
import ArcoVue from '@arco-design/web-vue'; import ArcoVue from '@arco-design/web-vue';
import '@arco-themes/vue-ms-theme-default/index.less'; import '@arco-themes/vue-metersphere-v3/index.less';
import MsIcon from '@/components/pure/ms-icon-font/index.vue'; import MsIcon from '@/components/pure/ms-icon-font/index.vue';
import SvgIcon from '@/components/pure/svg-icon/index.vue'; import SvgIcon from '@/components/pure/svg-icon/index.vue';

View File

@ -42,9 +42,10 @@
<a-form-item :label="t('apiTestManagement.belongModule')"> <a-form-item :label="t('apiTestManagement.belongModule')">
<a-tree-select <a-tree-select
v-model:modelValue="importForm.moduleId" v-model:modelValue="importForm.moduleId"
:data="moduleTree" :data="props.moduleTree"
class="w-[436px]" class="w-[436px]"
:field-names="{ title: 'name', key: 'id', children: 'children' }" :field-names="{ title: 'name', key: 'id', children: 'children' }"
:draggable="false"
allow-search allow-search
allow-clear allow-clear
> >
@ -247,7 +248,7 @@
<a-form-item :label="t('apiTestManagement.belongModule')"> <a-form-item :label="t('apiTestManagement.belongModule')">
<a-tree-select <a-tree-select
v-model:modelValue="importForm.moduleId" v-model:modelValue="importForm.moduleId"
:data="moduleTree" :data="props.moduleTree"
class="w-[500px]" class="w-[500px]"
:field-names="{ title: 'name', key: 'id', children: 'children' }" :field-names="{ title: 'name', key: 'id', children: 'children' }"
allow-search allow-search
@ -361,7 +362,6 @@
import { useI18n } from '@/hooks/useI18n'; import { useI18n } from '@/hooks/useI18n';
import useAppStore from '@/store/modules/app'; import useAppStore from '@/store/modules/app';
import useUserStore from '@/store/modules/user'; import useUserStore from '@/store/modules/user';
import { mapTree } from '@/utils';
import type { ImportApiDefinitionParams, ImportApiDefinitionRequest } from '@/models/apiTest/management'; import type { ImportApiDefinitionParams, ImportApiDefinitionRequest } from '@/models/apiTest/management';
import type { ModuleTreeNode } from '@/models/common'; import type { ModuleTreeNode } from '@/models/common';
@ -433,7 +433,6 @@
} }
return !importForm.value.name || !importForm.value.swaggerUrl; return !importForm.value.name || !importForm.value.swaggerUrl;
}); });
const moduleTree = computed(() => mapTree(props.moduleTree, (node) => ({ ...node, draggable: false })));
const syncFrequencyOptions = [ const syncFrequencyOptions = [
{ label: t('apiTestManagement.timeTaskHour'), value: '0 0 0/1 * * ?' }, { label: t('apiTestManagement.timeTaskHour'), value: '0 0 0/1 * * ?' },
{ label: t('apiTestManagement.timeTaskSixHour'), value: '0 0 0/6 * * ?' }, { label: t('apiTestManagement.timeTaskSixHour'), value: '0 0 0/6 * * ?' },

View File

@ -57,7 +57,6 @@
<preview <preview
v-if="activeApiTab.definitionActiveKey === 'preview'" v-if="activeApiTab.definitionActiveKey === 'preview'"
:detail="activeApiTab" :detail="activeApiTab"
:module-tree="props.moduleTree"
:protocols="protocols" :protocols="protocols"
@update-follow="activeApiTab.follow = !activeApiTab.follow" @update-follow="activeApiTab.follow = !activeApiTab.follow"
/> />

View File

@ -68,17 +68,14 @@
import { RequestParam } from '@/views/api-test/components/requestComposition/index.vue'; import { RequestParam } from '@/views/api-test/components/requestComposition/index.vue';
import { toggleFollowDefinition } from '@/api/modules/api-test/management'; import { toggleFollowDefinition } from '@/api/modules/api-test/management';
import { findNodeByKey } from '@/utils';
import { ProtocolItem } from '@/models/apiTest/common'; import { ProtocolItem } from '@/models/apiTest/common';
import { ModuleTreeNode } from '@/models/common';
import { RequestMethods } from '@/enums/apiEnum'; import { RequestMethods } from '@/enums/apiEnum';
import { getValidRequestTableParams } from '@/views/api-test/components/utils'; import { getValidRequestTableParams } from '@/views/api-test/components/utils';
const props = defineProps<{ const props = defineProps<{
detail: RequestParam; detail: RequestParam;
moduleTree: ModuleTreeNode[];
protocols: ProtocolItem[]; protocols: ProtocolItem[];
}>(); }>();
const emit = defineEmits(['updateFollow']); const emit = defineEmits(['updateFollow']);
@ -140,7 +137,7 @@
{ {
key: 'belongModule', key: 'belongModule',
locale: 'apiTestManagement.belongModule', locale: 'apiTestManagement.belongModule',
value: findNodeByKey<ModuleTreeNode>(props.moduleTree, previewDetail.value.moduleId, 'id')?.path, value: previewDetail.value.path,
}, },
{ {
key: 'creator', key: 'creator',

View File

@ -79,13 +79,12 @@
import { getTrashModuleCount } from '@/api/modules/api-test/management'; import { getTrashModuleCount } from '@/api/modules/api-test/management';
import { useI18n } from '@/hooks/useI18n'; import { useI18n } from '@/hooks/useI18n';
import useAppStore from '@/store/modules/app';
import { ApiDefinitionGetModuleParams } from '@/models/apiTest/management'; import { ApiDefinitionGetModuleParams } from '@/models/apiTest/management';
import { ModuleTreeNode } from '@/models/common'; import { ModuleTreeNode } from '@/models/common';
import { ApiTestRouteEnum } from '@/enums/routeEnum'; import { ApiTestRouteEnum } from '@/enums/routeEnum';
import useAppStore from '../../../store/modules/app';
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
const router = useRouter(); const router = useRouter();
@ -100,9 +99,9 @@
const managementRef = ref<InstanceType<typeof management>>(); const managementRef = ref<InstanceType<typeof management>>();
function handleModuleInit(tree: ModuleTreeNode[], _protocol: string, pathMap: Record<string, any>) { function handleModuleInit(tree: ModuleTreeNode[], _protocol: string, pathMap: Record<string, any>) {
// folderTree.value = tree; folderTree.value = tree;
protocol.value = _protocol; protocol.value = _protocol;
// folderTreePathMap.value = pathMap; folderTreePathMap.value = pathMap;
} }
function newApi() { function newApi() {