From 024a8b459618d38b553feeaf0810ea866f9b4b00 Mon Sep 17 00:00:00 2001 From: lijiahangmax Date: Sun, 24 Sep 2023 23:28:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E4=BB=A3=E7=A0=81.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../orion-vue-views-components-table.vue.vm | 4 ++-- orion-ops-ui/src/api/user/auth.ts | 1 - .../asset/host-identity/host-identity-selector.vue | 4 ++-- .../asset/host-key/host-key-selector.vue | 4 ++-- .../src/components/global-setting/form-wrapper.vue | 2 +- orion-ops-ui/src/components/message-box/index.vue | 3 ++- orion-ops-ui/src/components/tab-bar/tab-item.vue | 6 +++--- .../src/components/tag/tag-multi-selector.vue | 14 +++++++------- orion-ops-ui/src/hooks/copy.ts | 10 +++++----- .../components/host-identity-table.vue | 6 +++--- .../host-key/components/host-key-form-drawer.vue | 2 ++ .../asset/host-key/components/host-key-table.vue | 4 ++-- .../asset/host/components/host-config-drawer.vue | 5 ++++- .../asset/host/components/host-config-ssh-form.vue | 1 + .../src/views/asset/host/components/host-table.vue | 2 +- .../views/asset/host/types/host-config.types.ts | 2 ++ .../dashboard/workplace/components/banner.vue | 2 +- .../system/menu/components/menu-form-modal.vue | 2 +- .../user/role/components/role-menu-grant-modal.vue | 4 +++- .../src/views/user/role/components/role-table.vue | 4 ++-- .../src/views/user/user/components/user-table.vue | 4 ++-- 21 files changed, 48 insertions(+), 38 deletions(-) diff --git a/orion-ops-launch/src/main/resources/templates/orion-vue-views-components-table.vue.vm b/orion-ops-launch/src/main/resources/templates/orion-vue-views-components-table.vue.vm index 33d68ab8..52c7f827 100644 --- a/orion-ops-launch/src/main/resources/templates/orion-vue-views-components-table.vue.vm +++ b/orion-ops-launch/src/main/resources/templates/orion-vue-views-components-table.vue.vm @@ -70,7 +70,7 @@ v-model:selectedKeys="selectedKeys" :row-selection="rowSelection" :data="tableRenderData" - :pagination="pagination" + :pagination="pagination as PaginationProps" @page-change="(page) => fetchTableData(page, pagination.pageSize)" @page-size-change="(size) => fetchTableData(pagination.current, size)" :bordered="false"> @@ -111,7 +111,7 @@ diff --git a/orion-ops-ui/src/hooks/copy.ts b/orion-ops-ui/src/hooks/copy.ts index 468af897..d8572c8f 100644 --- a/orion-ops-ui/src/hooks/copy.ts +++ b/orion-ops-ui/src/hooks/copy.ts @@ -3,15 +3,15 @@ import { Message } from '@arco-design/web-vue'; export default function useCopy() { const { isSupported, copy: c, text, copied } = useClipboard(); - const copy = (value: string, tips = `${value} 已复制`) => { - return c(value) - .then(() => { + const copy = async (value: string, tips = `${ value } 已复制`) => { + try { + await c(value); if (tips) { Message.success(tips); } - }).catch(() => { + } catch { Message.error('复制失败'); - }); + } }; return { isSupported, diff --git a/orion-ops-ui/src/views/asset/host-identity/components/host-identity-table.vue b/orion-ops-ui/src/views/asset/host-identity/components/host-identity-table.vue index 26ebcb7f..17f8f2bf 100644 --- a/orion-ops-ui/src/views/asset/host-identity/components/host-identity-table.vue +++ b/orion-ops-ui/src/views/asset/host-identity/components/host-identity-table.vue @@ -53,7 +53,7 @@ :loading="loading" :columns="columns" :data="tableRenderData" - :pagination="pagination" + :pagination="pagination as PaginationProps" @page-change="(page) => fetchTableData(page, pagination.pageSize)" @page-size-change="(size) => fetchTableData(pagination.current, size)" :bordered="false"> @@ -120,7 +120,7 @@ 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 14240041..0d8011ee 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 @@ -41,7 +41,7 @@ - + diff --git a/orion-ops-ui/src/views/user/role/components/role-menu-grant-modal.vue b/orion-ops-ui/src/views/user/role/components/role-menu-grant-modal.vue index 4049682a..ada0433f 100644 --- a/orion-ops-ui/src/views/user/role/components/role-menu-grant-modal.vue +++ b/orion-ops-ui/src/views/user/role/components/role-menu-grant-modal.vue @@ -88,7 +88,9 @@ // 渲染对象 const renderRecord = (record: any) => { Object.keys(roleRecord).forEach(k => { - roleRecord[k] = record[k]; + if (record.hasOwnProperty(k)) { + roleRecord[k] = record[k]; + } }); }; diff --git a/orion-ops-ui/src/views/user/role/components/role-table.vue b/orion-ops-ui/src/views/user/role/components/role-table.vue index 75e5860f..86ea0c2e 100644 --- a/orion-ops-ui/src/views/user/role/components/role-table.vue +++ b/orion-ops-ui/src/views/user/role/components/role-table.vue @@ -52,7 +52,7 @@ :loading="loading" :columns="columns" :data="tableRenderData" - :pagination="pagination" + :pagination="pagination as PaginationProps" @page-change="(page) => fetchTableData(page, pagination.pageSize)" @page-size-change="(size) => fetchTableData(pagination.current, size)" :bordered="false"> @@ -125,7 +125,7 @@