瀏覽代碼

隐藏搜索。。

wangwei 3 年之前
父節點
當前提交
e2ec7a40a6

+ 5 - 1
src/components/Form/src/components/FormAction.vue

@@ -1,5 +1,9 @@
 <template>
-  <a-col v-bind="actionColOpt" :style="{ textAlign: 'right' }" v-if="showActionButtonGroup">
+  <a-col
+    v-bind="actionColOpt"
+    :style="{ textAlign: 'center', maxWidth: '100%', flex: 1 }"
+    v-if="showActionButtonGroup"
+  >
     <FormItem>
       <slot name="resetBefore"></slot>
       <Button

+ 11 - 2
src/components/Table/src/BasicTable.vue

@@ -3,7 +3,7 @@
     <BasicForm
       submitOnReset
       v-bind="getFormProps"
-      v-if="getBindValues.useSearchForm"
+      v-if="showSearch"
       :tableAction="tableAction"
       @register="registerForm"
       @submit="handleSearchInfoChange"
@@ -39,7 +39,7 @@
     ColumnChangeParam,
   } from './types/table';
 
-  import { defineComponent, ref, computed, unref, toRaw, onMounted } from 'vue';
+  import { defineComponent, ref, computed, unref, toRaw, onMounted, reactive, toRefs } from 'vue';
   import { Table } from 'ant-design-vue';
   import { BasicForm, useForm } from '/@/components/Form/index';
   import expandIcon from './components/ExpandIcon';
@@ -93,6 +93,9 @@
       'columns-change',
     ],
     setup(props, { attrs, emit, slots }) {
+      const formState = reactive({
+        showSearch: false,
+      });
       const tableElRef = ref<ComponentRef>(null);
       const tableData = ref<Recordable[]>([]);
 
@@ -237,6 +240,8 @@
 
       const getWrapperClass = computed(() => {
         const values = unref(getBindValues);
+        // 显示 表格搜索字段
+        // formState.showSearch = values.useSearchForm;
         return [
           prefixCls,
           attrs.class,
@@ -288,6 +293,9 @@
         getSize: () => {
           return unref(getBindValues).size as SizeType;
         },
+        showTableSearch: () => {
+          formState.showSearch = !formState.showSearch;
+        },
       };
       createTableContext({ ...tableAction, wrapRef, getBindValues });
 
@@ -353,6 +361,7 @@
         getFormSlotKeys,
         getWrapperClass,
         columns: getViewColumns,
+        ...toRefs(formState),
       };
     },
   });

+ 36 - 0
src/components/Table/src/components/settings/ShowFormSearch.vue

@@ -0,0 +1,36 @@
+<template>
+  <Tooltip placement="top">
+    <template #title>
+      <span>{{ t('component.table.showFormSearchConfig') }}</span>
+    </template>
+    <SearchOutlined @click="toggle" />
+  </Tooltip>
+</template>
+<script lang="ts">
+  import { defineComponent } from 'vue';
+  import { Tooltip } from 'ant-design-vue';
+  import { SearchOutlined } from '@ant-design/icons-vue';
+
+  import { useI18n } from '/@/hooks/web/useI18n';
+  import { useTableContext } from '../../hooks/useTableContext';
+
+  export default defineComponent({
+    name: 'ShowFormSearch',
+    components: {
+      SearchOutlined,
+      Tooltip,
+    },
+    setup() {
+      const table = useTableContext();
+      const { t } = useI18n();
+
+      function toggle() {
+        console.log('------------');
+        console.log(`table`, table);
+        table.showTableSearch();
+      }
+
+      return { toggle, t };
+    },
+  });
+</script>

+ 4 - 0
src/components/Table/src/components/settings/index.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="table-settings">
+    <ShowFormSearch v-if="getSetting.formSearch" />
     <RedoSetting v-if="getSetting.redo" />
     <SizeSetting v-if="getSetting.size" />
     <ColumnSetting v-if="getSetting.setting" @columns-change="handleColumnChange" />
@@ -16,6 +17,7 @@
   import SizeSetting from './SizeSetting.vue';
   import RedoSetting from './RedoSetting.vue';
   import FullScreenSetting from './FullScreenSetting.vue';
+  import ShowFormSearch from './ShowFormSearch.vue';
 
   import { useI18n } from '/@/hooks/web/useI18n';
 
@@ -26,6 +28,7 @@
       SizeSetting,
       RedoSetting,
       FullScreenSetting,
+      ShowFormSearch,
     },
     props: {
       setting: {
@@ -43,6 +46,7 @@
           size: true,
           setting: true,
           fullScreen: false,
+          formSearch: true,
           ...props.setting,
         };
       });

+ 3 - 0
src/components/Table/src/hooks/useTable.ts

@@ -141,6 +141,9 @@ export function useTable(tableProps?: Props): [
     expandAll: () => {
       getTableInstance().expandAll();
     },
+    showTableSearch: () => {
+      getTableInstance().showTableSearch();
+    },
     collapseAll: () => {
       getTableInstance().collapseAll();
     },

+ 1 - 1
src/components/Table/src/hooks/useTableForm.ts

@@ -13,7 +13,7 @@ export function useTableForm(
     const { formConfig } = unref(propsRef);
     const { submitButtonOptions } = formConfig || {};
     return {
-      showAdvancedButton: true,
+      showAdvancedButton: false,
       ...formConfig,
       submitButtonOptions: { loading: unref(getLoading), ...submitButtonOptions },
       compact: true,

+ 2 - 0
src/components/Table/src/types/table.ts

@@ -89,6 +89,7 @@ export interface TableActionType {
   getSelectRows: <T = Recordable>() => T[];
   clearSelectedRowKeys: () => void;
   expandAll: () => void;
+  showTableSearch: () => void;
   collapseAll: () => void;
   getSelectRowKeys: () => string[];
   deleteSelectRowByKey: (key: string) => void;
@@ -129,6 +130,7 @@ export interface TableSetting {
   size?: boolean;
   setting?: boolean;
   fullScreen?: boolean;
+  formSearch?: boolean;
 }
 
 export interface BasicTableProps<T = any> {

+ 1 - 0
src/locales/lang/en/component.ts

@@ -48,6 +48,7 @@ export default {
     settingFixedLeft: 'Fixed Left',
     settingFixedRight: 'Fixed Right',
     settingFullScreen: 'Full Screen',
+    showFormSearchConfig: 'Show Search',
     index: 'Index',
     total: 'total of {total}',
   },

+ 1 - 0
src/locales/lang/zh_CN/component.ts

@@ -50,6 +50,7 @@ export default {
     settingFixedLeft: '固定到左侧',
     settingFixedRight: '固定到右侧',
     settingFullScreen: '全屏',
+    showFormSearchConfig: '显示搜索',
 
     index: '序号',
 

+ 15 - 3
src/views/admin/admin/index.vue

@@ -21,9 +21,11 @@
       }"
     >
       <template #toolbar>
-        <a-button type="primary" @click="addRole"> 添加 </a-button>
-        <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
-        <a-button @click="openModal"> 导出 </a-button>
+        <div class="tool-btn-wrap">
+          <a-button type="primary" @click="addRole"> 添加 </a-button>
+          <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
+          <a-button @click="openModal"> 导出 </a-button>
+        </div>
       </template>
       <template #form-custom> custom-slot </template>
       <template #action="{ record }">
@@ -110,6 +112,10 @@
           slots: { customRender: 'action' },
           fixed: undefined,
         },
+        tableSetting: {
+          // redo: false,
+          size: false,
+        },
         showIndexColumn: false,
         bordered: true,
       });
@@ -364,4 +370,10 @@
       padding: 3px;
     }
   }
+  .vben-basic-table-header__toolbar {
+    justify-content: space-between;
+  }
+  .tool-btn-wrap button {
+    margin-right: 5px;
+  }
 </style>

+ 15 - 4
src/views/admin/group/index.vue

@@ -13,13 +13,16 @@
       @rowClick="rowClick"
       @rowDbClick="handleEdit"
       defaultExpandAllRows
+      showTableSetting
       rowKey="id"
     >
       <template #toolbar>
-        <a-button type="primary" @click="toggleRowShow">{{ btn_text }}</a-button>
-        <a-button type="primary" @click="addGroupFn"> 添加 </a-button>
-        <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
-        <a-button @click="openModal"> 导出 </a-button>
+        <div class="tool-btn-wrap">
+          <a-button type="primary" @click="toggleRowShow">{{ btn_text }}</a-button>
+          <a-button type="primary" @click="addGroupFn"> 添加 </a-button>
+          <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
+          <a-button @click="openModal"> 导出 </a-button>
+        </div>
       </template>
       <template #action="{ record, column }">
         <TableAction :actions="createActions(record, column)" stopButtonPropagation />
@@ -337,3 +340,11 @@
     },
   });
 </script>
+<style scoped>
+  .tool-btn-wrap {
+    flex: 1;
+  }
+  .tool-btn-wrap button {
+    margin-right: 5px;
+  }
+</style>

+ 1 - 1
src/views/admin/group/popup.vue

@@ -161,7 +161,7 @@
           }
           const childData = { closeModal, data };
           emit('saveData', childData);
-        } catch (err) {
+        } catch (err: any) {
           error(err.errorFields[0].errors[0]);
         }
       }

+ 20 - 4
src/views/admin/rule/index.vue

@@ -14,13 +14,16 @@
       @rowDbClick="handleEdit"
       @dragRow="dragRow"
       canDragRow
+      showTableSetting
       rowKey="id"
     >
       <template #toolbar>
-        <a-button type="primary" @click="toggleRowShow">{{ btn_text }}</a-button>
-        <a-button type="primary" @click="addRuleFn"> 添加 </a-button>
-        <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
-        <a-button @click="openModal"> 导出 </a-button>
+        <div class="tool-btn-wrap">
+          <a-button type="primary" @click="toggleRowShow">{{ btn_text }}</a-button>
+          <a-button type="primary" @click="addRuleFn"> 添加 </a-button>
+          <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
+          <a-button @click="openModal"> 导出 </a-button>
+        </div>
       </template>
       <template #action="{ record, column }">
         <TableAction :actions="createActions(record, column)" stopButtonPropagation />
@@ -102,6 +105,11 @@
           slots: { customRender: 'action' },
           fixed: undefined,
         },
+        tableSetting: {
+          // redo: false,
+          size: false,
+          formSearch: false,
+        },
         showIndexColumn: false,
         bordered: true,
       });
@@ -335,3 +343,11 @@
     },
   });
 </script>
+<style scoped>
+  .tool-btn-wrap {
+    flex: 1;
+  }
+  .tool-btn-wrap button {
+    margin-right: 5px;
+  }
+</style>

+ 11 - 3
src/views/member/member/index.vue

@@ -20,9 +20,11 @@
       }"
     >
       <template #toolbar>
-        <a-button type="primary" @click="addRole"> 添加 </a-button>
-        <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
-        <a-button @click="openModal"> 导出 </a-button>
+        <div class="tool-btn-wrap">
+          <a-button type="primary" @click="addRole"> 添加 </a-button>
+          <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
+          <a-button @click="openModal"> 导出 </a-button>
+        </div>
       </template>
       <template #form-custom> custom-slot </template>
       <template #action="{ record }">
@@ -296,4 +298,10 @@
   .ant-calendar-picker {
     width: 100%;
   }
+  .vben-basic-table-header__toolbar {
+    justify-content: space-between;
+  }
+  .tool-btn-wrap button {
+    margin-right: 5px;
+  }
 </style>

+ 11 - 3
src/views/member/person/index.vue

@@ -21,9 +21,11 @@
       }"
     >
       <template #toolbar>
-        <a-button type="primary" @click="addRole"> 添加 </a-button>
-        <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
-        <a-button @click="openModal"> 导出 </a-button>
+        <div class="tool-btn-wrap">
+          <a-button type="primary" @click="addRole"> 添加 </a-button>
+          <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
+          <a-button @click="openModal"> 导出 </a-button>
+        </div>
       </template>
       <template #form-custom> custom-slot </template>
       <template #action="{ record }">
@@ -308,4 +310,10 @@
       padding: 3px;
     }
   } */
+  .vben-basic-table-header__toolbar {
+    justify-content: space-between;
+  }
+  .tool-btn-wrap button {
+    margin-right: 5px;
+  }
 </style>

+ 248 - 52
src/views/member/unit/data.ts

@@ -246,6 +246,57 @@ export const schemas: FormSchema[] = [
     required: true,
   },
   {
+    field: 'nature',
+    label: '单位性质',
+    component: 'Select',
+    componentProps: {
+      placeholder: '单位性质',
+      options: [
+        {
+          label: '国有企业',
+          value: 0,
+        },
+        {
+          label: '集体所有制',
+          value: 1,
+        },
+        {
+          label: '私营企业',
+          value: 2,
+        },
+        {
+          label: '股份制企业',
+          value: 3,
+        },
+        {
+          label: '有限合伙企业',
+          value: 4,
+        },
+        {
+          label: '联营企业',
+          value: 5,
+        },
+        {
+          label: '外商投资企业',
+          value: 6,
+        },
+        {
+          label: '个人独资企业',
+          value: 7,
+        },
+        {
+          label: '机关事业单位',
+          value: 8,
+        },
+      ],
+    },
+    labelWidth: adaptWidth.labelWidth,
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    required: true,
+  },
+  {
     field: 'legalman',
     component: 'Input',
     label: '法人代表',
@@ -256,7 +307,72 @@ export const schemas: FormSchema[] = [
     componentProps: {
       placeholder: '法人代表',
     },
-    required: true,
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
+    required: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
+  },
+  {
+    field: 'level',
+    component: 'Input',
+    label: '行政级别',
+    labelWidth: adaptWidth.labelWidth,
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '行政级别',
+    },
+    show: ({ values }) => {
+      if (values.nature === 8) {
+        return true;
+      }
+      return false;
+    },
+  },
+  {
+    field: 'region',
+    component: 'Input',
+    label: '所属地区',
+    labelWidth: adaptWidth.labelWidth,
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '所属地区',
+    },
+    show: ({ values }) => {
+      if (values.nature === 8) {
+        return true;
+      }
+      return false;
+    },
+  },
+  {
+    field: 'superior',
+    component: 'Input',
+    label: '上级单位',
+    labelWidth: adaptWidth.labelWidth,
+    colProps: {
+      span: adaptWidth.elContainer,
+    },
+    componentProps: {
+      placeholder: '上级单位',
+    },
+    show: ({ values }) => {
+      if (values.nature === 8) {
+        return true;
+      }
+      return false;
+    },
   },
   {
     field: 'businessNo',
@@ -269,7 +385,18 @@ export const schemas: FormSchema[] = [
     componentProps: {
       placeholder: '工商登记号',
     },
-    required: true,
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
+    required: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
   },
   {
     field: 'centralTax',
@@ -282,6 +409,12 @@ export const schemas: FormSchema[] = [
     componentProps: {
       placeholder: '国税税号',
     },
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
   },
   {
     field: 'landTax',
@@ -294,53 +427,12 @@ export const schemas: FormSchema[] = [
     componentProps: {
       placeholder: '地税税号',
     },
-  },
-  {
-    field: 'nature',
-    label: '单位性质',
-    component: 'Select',
-    componentProps: {
-      placeholder: '单位性质',
-      options: [
-        {
-          label: '国有企业',
-          value: 0,
-        },
-        {
-          label: '集体所有制',
-          value: 1,
-        },
-        {
-          label: '私营企业',
-          value: 2,
-        },
-        {
-          label: '股份制企业',
-          value: 3,
-        },
-        {
-          label: '有限合伙企业',
-          value: 4,
-        },
-        {
-          label: '联营企业',
-          value: 5,
-        },
-        {
-          label: '外商投资企业',
-          value: 6,
-        },
-        {
-          label: '个人独资企业',
-          value: 7,
-        },
-      ],
-    },
-    labelWidth: adaptWidth.labelWidth,
-    colProps: {
-      span: adaptWidth.elContainer,
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
     },
-    required: true,
   },
   {
     field: 'foundingtime',
@@ -353,7 +445,18 @@ export const schemas: FormSchema[] = [
     componentProps: {
       placeholder: '成立时间',
     },
-    required: true,
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
+    required: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
   },
   {
     field: 'job',
@@ -366,7 +469,18 @@ export const schemas: FormSchema[] = [
     componentProps: {
       placeholder: '行业分类',
     },
-    required: true,
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
+    required: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
   },
   {
     field: 'jobnum',
@@ -455,6 +569,12 @@ export const schemas: FormSchema[] = [
       type: 'number',
       placeholder: '大专以上文化人数',
     },
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
   },
   {
     field: 'laidnum',
@@ -468,6 +588,12 @@ export const schemas: FormSchema[] = [
       type: 'number',
       placeholder: '安置下岗人数',
     },
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
   },
   {
     field: 'partyCase',
@@ -480,6 +606,12 @@ export const schemas: FormSchema[] = [
     componentProps: {
       placeholder: '党、团工会情况',
     },
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
   },
   {
     field: 'web',
@@ -504,6 +636,12 @@ export const schemas: FormSchema[] = [
     componentProps: {
       placeholder: '电子邮箱',
     },
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
   },
   {
     field: 'technology',
@@ -516,6 +654,12 @@ export const schemas: FormSchema[] = [
     componentProps: {
       placeholder: '高新技术企业认证',
     },
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
   },
   {
     field: 'technologyDept',
@@ -552,6 +696,12 @@ export const schemas: FormSchema[] = [
     componentProps: {
       placeholder: '外贸自营进出口权',
     },
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
   },
   {
     field: 'foreignTradeDept',
@@ -588,6 +738,12 @@ export const schemas: FormSchema[] = [
     componentProps: {
       placeholder: '质量管理、质量保证系列认证标准',
     },
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
   },
   {
     field: 'qualityDept',
@@ -625,7 +781,18 @@ export const schemas: FormSchema[] = [
       type: 'number',
       placeholder: '注册资金(万元)',
     },
-    required: true,
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
+    required: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
   },
   {
     field: 'money',
@@ -639,6 +806,12 @@ export const schemas: FormSchema[] = [
       type: 'number',
       placeholder: '资产(万元)',
     },
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
   },
   {
     field: 'ownerMoney',
@@ -652,6 +825,12 @@ export const schemas: FormSchema[] = [
       type: 'number',
       placeholder: '所有者权益(万元)',
     },
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
   },
   {
     field: 'sellMoney',
@@ -665,6 +844,12 @@ export const schemas: FormSchema[] = [
       type: 'number',
       placeholder: '销售收入(万元)',
     },
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
   },
   {
     field: 'product',
@@ -677,6 +862,17 @@ export const schemas: FormSchema[] = [
     componentProps: {
       placeholder: '主要经营项目',
     },
-    required: true,
+    show: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
+    required: ({ values }) => {
+      if (values.nature !== 8) {
+        return true;
+      }
+      return false;
+    },
   },
 ];

+ 11 - 3
src/views/member/unit/index.vue

@@ -25,9 +25,11 @@
       }"
     >
       <template #toolbar>
-        <a-button type="primary" @click="addRole"> 添加 </a-button>
-        <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
-        <a-button @click="openModal"> 导出 </a-button>
+        <div class="tool-btn-wrap">
+          <a-button type="primary" @click="addRole"> 添加 </a-button>
+          <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
+          <a-button @click="openModal"> 导出 </a-button>
+        </div>
       </template>
       <template #form-custom> custom-slot </template>
       <template #action="{ record }">
@@ -312,4 +314,10 @@
   .ant-calendar-picker {
     width: 100%;
   }
+  .vben-basic-table-header__toolbar {
+    justify-content: space-between;
+  }
+  .tool-btn-wrap button {
+    margin-right: 5px;
+  }
 </style>

+ 5 - 3
src/views/money/account/index.vue

@@ -21,9 +21,11 @@
       }"
     >
       <template #toolbar>
-        <a-button type="primary" @click="addRole"> 添加 </a-button>
-        <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
-        <a-button @click="openModal"> 导出 </a-button>
+        <div class="tool-btn-wrap">
+          <a-button type="primary" @click="addRole"> 添加 </a-button>
+          <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
+          <a-button @click="openModal"> 导出 </a-button>
+        </div>
       </template>
       <template #form-custom> custom-slot </template>
       <template #action="{ record }">

+ 10 - 2
src/views/money/bill/index.vue

@@ -21,8 +21,10 @@
       }"
     >
       <template #toolbar>
-        <a-button type="primary" @click="addRole"> 添加 </a-button>
-        <a-button @click="openModal"> 导出 </a-button>
+        <div class="tool-btn-wrap">
+          <a-button type="primary" @click="addRole"> 添加 </a-button>
+          <a-button @click="openModal"> 导出 </a-button>
+        </div>
       </template>
       <template #form-custom> custom-slot </template>
       <template #action="{ record }">
@@ -259,4 +261,10 @@
       padding: 3px;
     }
   } */
+  .vben-basic-table-header__toolbar {
+    justify-content: space-between;
+  }
+  .tool-btn-wrap button {
+    margin-right: 5px;
+  }
 </style>

+ 12 - 4
src/views/money/dues/index.vue

@@ -21,9 +21,11 @@
       }"
     >
       <template #toolbar>
-        <a-button type="primary" @click="addRole"> 添加 </a-button>
-        <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
-        <a-button @click="openModal"> 导出 </a-button>
+        <div class="tool-btn-wrap">
+          <a-button type="primary" @click="addRole"> 添加 </a-button>
+          <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
+          <a-button @click="openModal"> 导出 </a-button>
+        </div>
       </template>
       <template #form-custom> custom-slot </template>
       <template #action="{ record }">
@@ -279,7 +281,7 @@
           {
             label: '复制',
             icon: 'ant-design:copy-outlined',
-            color: 'normal',
+            // color: 'normal',
             popConfirm: {
               title: '是否确认复制',
               confirm: handleCopy.bind(null, record),
@@ -333,4 +335,10 @@
       padding: 3px;
     }
   } */
+  .vben-basic-table-header__toolbar {
+    justify-content: space-between;
+  }
+  .tool-btn-wrap button {
+    margin-right: 5px;
+  }
 </style>

+ 11 - 3
src/views/money/type/index.vue

@@ -21,9 +21,11 @@
       }"
     >
       <template #toolbar>
-        <a-button type="primary" @click="addRole"> 添加 </a-button>
-        <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
-        <a-button @click="openModal"> 导出 </a-button>
+        <div class="tool-btn-wrap">
+          <a-button type="primary" @click="addRole"> 添加 </a-button>
+          <a-button color="error" :disabled="disable_btn" @click="deleteBatches"> 删除 </a-button>
+          <a-button @click="openModal"> 导出 </a-button>
+        </div>
       </template>
       <template #form-custom> custom-slot </template>
       <template #action="{ record }">
@@ -314,4 +316,10 @@
       padding: 3px;
     }
   } */
+  .vben-basic-table-header__toolbar {
+    justify-content: space-between;
+  }
+  .tool-btn-wrap button {
+    margin-right: 5px;
+  }
 </style>