diff --git a/continew-admin-ui/components.d.ts b/continew-admin-ui/components.d.ts index 54544f7b..eb573b15 100644 --- a/continew-admin-ui/components.d.ts +++ b/continew-admin-ui/components.d.ts @@ -15,6 +15,7 @@ declare module '@vue/runtime-core' { ABreadcrumb: typeof import('@arco-design/web-vue')['Breadcrumb'] ABreadcrumbItem: typeof import('@arco-design/web-vue')['BreadcrumbItem'] AButton: typeof import('@arco-design/web-vue')['Button'] + AButtonGroup: typeof import('@arco-design/web-vue')['ButtonGroup'] ACard: typeof import('@arco-design/web-vue')['Card'] ACardMeta: typeof import('@arco-design/web-vue')['CardMeta'] ACarousel: typeof import('@arco-design/web-vue')['Carousel'] diff --git a/continew-admin-ui/config/plugin/styleImport.ts b/continew-admin-ui/config/plugin/styleImport.ts index 4aca008c..afd13fd2 100644 --- a/continew-admin-ui/config/plugin/styleImport.ts +++ b/continew-admin-ui/config/plugin/styleImport.ts @@ -73,6 +73,7 @@ export default function configStyleImportPlugin() { 'image-preview': 'image', 'image-preview-group': 'image', 'cascader-panel': 'cascader', + 'button-group': 'button', }; if (ignoreList.includes(name)) return ''; // eslint-disable-next-line no-prototype-builtins diff --git a/continew-admin-ui/src/assets/style/global.less b/continew-admin-ui/src/assets/style/global.less index 11dfcba2..9aa31a64 100644 --- a/continew-admin-ui/src/assets/style/global.less +++ b/continew-admin-ui/src/assets/style/global.less @@ -69,6 +69,13 @@ body { &-query { margin-bottom: 8px; } + &-operation { + &-right { + display: flex; + align-items: center; + justify-content: end; + } + } } } diff --git a/continew-admin-ui/src/components/index.ts b/continew-admin-ui/src/components/index.ts index cdd70103..b5888205 100644 --- a/continew-admin-ui/src/components/index.ts +++ b/continew-admin-ui/src/components/index.ts @@ -12,6 +12,7 @@ import { import Chart from './chart/index.vue'; import Breadcrumb from './breadcrumb/index.vue'; import DateRangePicker from './date-range-picker/index.vue'; +import RightToolbar from './right-toolbar/index.vue'; // Manually introduce ECharts modules to reduce packing size @@ -33,5 +34,6 @@ export default { Vue.component('Chart', Chart); Vue.component('Breadcrumb', Breadcrumb); Vue.component('DateRangePicker', DateRangePicker); + Vue.component('RightToolbar', RightToolbar); }, }; diff --git a/continew-admin-ui/src/components/right-toolbar/index.vue b/continew-admin-ui/src/components/right-toolbar/index.vue new file mode 100644 index 00000000..293f1176 --- /dev/null +++ b/continew-admin-ui/src/components/right-toolbar/index.vue @@ -0,0 +1,45 @@ + + + + + + + \ No newline at end of file diff --git a/continew-admin-ui/src/views/system/dept/index.vue b/continew-admin-ui/src/views/system/dept/index.vue index 586cd997..07425e9e 100644 --- a/continew-admin-ui/src/views/system/dept/index.vue +++ b/continew-admin-ui/src/views/system/dept/index.vue @@ -6,7 +6,7 @@
- + - + +
@@ -266,6 +267,7 @@ const title = ref(''); const single = ref(true); const multiple = ref(true); + const showQuery = ref(true); const loading = ref(false); const detailLoading = ref(false); const exportLoading = ref(false); @@ -478,6 +480,13 @@ document.body.removeChild(downloadElement); // 释放掉 blob 对象 window.URL.revokeObjectURL(href); + }).catch(() => { + proxy.$notification.warning({ + title: '警告', + content: "如果您正在访问演示环境,点击导出会报错。这是由于演示环境开启了 Mock.js,而 Mock.js 会将 responseType 设置为 '',不仅会导致关键判断出错,也会导致导出的文件无法打开。", + duration: 10000, + closable: true, + }); }).finally(() => { exportLoading.value = false; });