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 @@