From fb81ab845ae3eda595f0e15249a8021f5b6b603d Mon Sep 17 00:00:00 2001 From: baiqi Date: Thu, 10 Aug 2023 17:06:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=BB=84=E4=BB=B6):=20=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4&=E9=A1=B5=E9=9D=A2=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/requrls/setting/config.ts | 8 ++--- frontend/src/assets/style/arco-reset.less | 15 ++++++-- .../src/components/pure/ms-card/index.vue | 2 +- .../components/pure/ms-table/base-table.vue | 3 +- frontend/src/layout/default-layout.vue | 2 +- frontend/src/locale/en-US/index.ts | 1 + frontend/src/locale/zh-CN/index.ts | 1 + frontend/src/main.ts | 1 - frontend/src/utils/index.ts | 13 +++++++ .../src/views/login/components/login-form.vue | 2 +- .../setting/organization/member/index.vue | 13 ++----- .../system/config/components/authConfig.vue | 17 +++------ .../system/config/components/pageConfig.vue | 14 +++++--- .../pluginManager/components/pluginTable.vue | 5 +-- .../setting/system/resourcePool/index.vue | 15 ++------ .../src/views/setting/system/user/index.vue | 36 +++++++++---------- .../system/usergroup/components/index.vue | 3 +- 17 files changed, 78 insertions(+), 73 deletions(-) diff --git a/frontend/src/api/requrls/setting/config.ts b/frontend/src/api/requrls/setting/config.ts index 3c954e1682..1c6dfa8e03 100644 --- a/frontend/src/api/requrls/setting/config.ts +++ b/frontend/src/api/requrls/setting/config.ts @@ -25,10 +25,10 @@ export const GetAuthDetailUrl = '/system/authsource/get'; // 删除认证源 export const DeleteAuthUrl = '/system/authsource/delete'; // 获取系统主页左上角图片 -export const GetTitleImgUrl = `${import.meta.env.VITE_API_BASE_URL}/display/get/title`; +export const GetTitleImgUrl = `${import.meta.env.VITE_API_BASE_URL}/base-display/get/logo-platform`; // 获取登录 logo -export const GetLoginLogoUrl = `${import.meta.env.VITE_API_BASE_URL}/display/get/loginLogo`; +export const GetLoginLogoUrl = `${import.meta.env.VITE_API_BASE_URL}/base-display/get/login-logo`; // 获取登录大图 -export const GetLoginImageUrl = `${import.meta.env.VITE_API_BASE_URL}/display/get/loginImage`; +export const GetLoginImageUrl = `${import.meta.env.VITE_API_BASE_URL}/base-display/get/login-image`; // 获取平台标签图标 -export const GetPlatformIconUrl = `${import.meta.env.VITE_API_BASE_URL}/display/get/icon`; +export const GetPlatformIconUrl = `${import.meta.env.VITE_API_BASE_URL}/base-display/get/icon`; diff --git a/frontend/src/assets/style/arco-reset.less b/frontend/src/assets/style/arco-reset.less index 6ae06ec160..d3f6a7e713 100644 --- a/frontend/src/assets/style/arco-reset.less +++ b/frontend/src/assets/style/arco-reset.less @@ -41,20 +41,26 @@ padding: 24px; .arco-modal-header { - @apply h-auto border-b-0 p-0; + @apply h-auto items-baseline border-b-0 p-0; margin-bottom: 16px; .arco-modal-title { - @apply flex items-center font-semibold; + @apply flex items-baseline font-semibold; + max-width: calc(100% - 16px); font-size: 14px; .arco-modal-title-icon { - @apply flex items-center; + @apply relative; + + top: 3px; .arco-icon { font-size: 20px; } } } + .arco-modal-close-btn { + @apply ml-0; + } } .arco-modal-body { color: var(--color-text-2); @@ -176,6 +182,9 @@ .arco-input-wrapper, .arco-textarea-wrapper, .arco-input-tag, +.arco-picker, +.arco-select-view, +.arco-select-view-single, .arco-select { border: 1px solid var(--color-text-input-border); background-color: var(--color-text-fff) !important; diff --git a/frontend/src/components/pure/ms-card/index.vue b/frontend/src/components/pure/ms-card/index.vue index 6e293bdd1c..535a876067 100644 --- a/frontend/src/components/pure/ms-card/index.vue +++ b/frontend/src/components/pure/ms-card/index.vue @@ -19,7 +19,7 @@ class="pr-[5px]" :style="{ overflow: 'auto', - width: `calc(100vw - ${menuWidth}px - 48px)`, + width: `calc(100vw - ${menuWidth}px - 58px)`, height: props.autoHeight ? 'auto' : `calc(100vh - ${cardOverHeight}px)`, }" > diff --git a/frontend/src/components/pure/ms-table/base-table.vue b/frontend/src/components/pure/ms-table/base-table.vue index d5b3fc8d10..c8437d8d47 100644 --- a/frontend/src/components/pure/ms-table/base-table.vue +++ b/frontend/src/components/pure/ms-table/base-table.vue @@ -50,7 +50,7 @@ {{ t('system.user.tableEnable') }}
- + {{ t('system.user.tableDisable') }}
@@ -118,6 +118,7 @@ import MsPagination from '@/components/pure/ms-pagination/index'; import type { TableData } from '@arco-design/web-vue'; import ColumnSelector from './columnSelector.vue'; + import MsIcon from '@/components/pure/ms-icon-font/index.vue'; const batchleft = ref('10px'); const { t } = useI18n(); diff --git a/frontend/src/layout/default-layout.vue b/frontend/src/layout/default-layout.vue index 94ce5fbda6..263143b8fb 100644 --- a/frontend/src/layout/default-layout.vue +++ b/frontend/src/layout/default-layout.vue @@ -97,7 +97,7 @@ const route = useRoute(); const permission = usePermission(); - const innerLogo = computed(() => (props.isPreview ? innerProps.value.logo : GetTitleImgUrl)); + const innerLogo = computed(() => (props.isPreview && innerProps.value.logo ? innerProps.value.logo : GetTitleImgUrl)); const innerName = computed(() => (props.isPreview ? innerProps.value.name : appStore.pageConfig.platformName)); const navbarHeight = `56px`; diff --git a/frontend/src/locale/en-US/index.ts b/frontend/src/locale/en-US/index.ts index 07560eed48..59d035bd8a 100644 --- a/frontend/src/locale/en-US/index.ts +++ b/frontend/src/locale/en-US/index.ts @@ -38,6 +38,7 @@ export default { 'menu.settings.system.resourcePoolDetail': 'Add resource pool', 'menu.settings.system.resourcePoolEdit': 'Edit resource pool', 'menu.settings.system.parameter': 'System parameter', + 'menu.settings.system.log': 'Log', 'navbar.action.locale': 'Switch to English', ...sys, ...localeSettings, diff --git a/frontend/src/locale/zh-CN/index.ts b/frontend/src/locale/zh-CN/index.ts index cef6899f98..35bfff0f5e 100644 --- a/frontend/src/locale/zh-CN/index.ts +++ b/frontend/src/locale/zh-CN/index.ts @@ -38,6 +38,7 @@ export default { 'menu.settings.system.resourcePoolDetail': '添加资源池', 'menu.settings.system.resourcePoolEdit': '编辑资源池', 'menu.settings.system.parameter': '系统参数', + 'menu.settings.system.log': '日志', 'navbar.action.locale': '切换为中文', ...sys, ...localeSettings, diff --git a/frontend/src/main.ts b/frontend/src/main.ts index e39aad5854..d13c69b804 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -8,7 +8,6 @@ import router from './router'; import store from './store'; import { setupI18n } from './locale'; import directive from './directive'; -import './mock'; import App from './App.vue'; // eslint-disable-next-line import/no-unresolved import 'virtual:svg-icons-register'; diff --git a/frontend/src/utils/index.ts b/frontend/src/utils/index.ts index 11e6925d76..985709ca92 100644 --- a/frontend/src/utils/index.ts +++ b/frontend/src/utils/index.ts @@ -133,3 +133,16 @@ export function desensitize(str: string): string { return str.replace(/./g, '*'); } + +/** + * 对话框标题动态内容字符限制 + * @param str 标题的动态内容 + * @returns 转化后的字符串 + */ +export function characterLimit(str?: string): string { + if (!str) return ''; + if (str.length <= 20) { + return str; + } + return `${str.slice(0, 20 - 3)}...`; +} diff --git a/frontend/src/views/login/components/login-form.vue b/frontend/src/views/login/components/login-form.vue index f6f5299e36..2fdc5594e9 100644 --- a/frontend/src/views/login/components/login-form.vue +++ b/frontend/src/views/login/components/login-form.vue @@ -77,7 +77,7 @@ }>(); const innerLogo = computed(() => { - return props.isPreview ? props.logo : GetLoginLogoUrl; + return props.isPreview && props.logo ? props.logo : GetLoginLogoUrl; }); const innerSlogan = computed(() => { diff --git a/frontend/src/views/setting/organization/member/index.vue b/frontend/src/views/setting/organization/member/index.vue index 85aea035f2..736feb703a 100644 --- a/frontend/src/views/setting/organization/member/index.vue +++ b/frontend/src/views/setting/organization/member/index.vue @@ -89,16 +89,6 @@ -