Skip to content

Commit

Permalink
style: 优化表格工具栏样式
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Oct 12, 2024
1 parent d881b93 commit ff87940
Show file tree
Hide file tree
Showing 19 changed files with 92 additions and 43 deletions.
5 changes: 4 additions & 1 deletion src/components/GiForm/src/GiForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@
<template #icon><icon-search /></template>
<template #default>{{ options.btns?.searchBtnText || '查询' }}</template>
</a-button>
<a-button @click="emit('reset')">重置</a-button>
<a-button @click="emit('reset')">
<template #icon><icon-refresh /></template>
<template #default>重置</template>
</a-button>
<a-button v-if="options.fold?.enable" type="text" size="mini" @click="collapsed = !collapsed">
<template #icon>
<icon-up v-if="!collapsed" />
Expand Down
10 changes: 5 additions & 5 deletions src/components/GiTable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
<a-space wrap class="gi-table__toolbar-right" :size="[8, 8]">
<slot name="custom-right"></slot>
<a-tooltip content="刷新">
<a-button v-if="showRefreshBtn" class="gi_hover_btn-border" @click="refresh">
<a-button v-if="showRefreshBtn" @click="refresh">
<template #icon><icon-refresh /></template>
</a-button>
</a-tooltip>
<a-dropdown v-if="showSizeBtn" @select="handleSelect">
<a-tooltip content="尺寸">
<a-button class="gi_hover_btn-border">
<a-button>
<template #icon><icon-table-size style="width: 14px; height: 14px" /></template>
</a-button>
</a-tooltip>
Expand All @@ -34,7 +34,7 @@
<a-popover v-if="showSettingColumnBtn" trigger="click" position="br"
:content-style="{ minWidth: '120px', padding: '6px 8px 10px' }">
<a-tooltip content="列设置">
<a-button class="gi_hover_btn-border">
<a-button>
<template #icon>
<icon-settings />
</template>
Expand All @@ -59,7 +59,7 @@
</template>
</a-popover>
<a-tooltip content="全屏">
<a-button v-if="showFullscreenBtn" class="gi_hover_btn-border" @click="isFullscreen = !isFullscreen">
<a-button v-if="showFullscreenBtn" @click="isFullscreen = !isFullscreen">
<template #icon>
<icon-fullscreen v-if="!isFullscreen" />
<icon-fullscreen-exit v-else />
Expand All @@ -71,7 +71,7 @@
<div class="gi-table__body" :class="`gi-table__body-pagination-${attrs['page-position']}`">
<div class="gi-table__container">
<a-table ref="tableRef" :stripe="stripe" :size="size" column-resizable :bordered="{ cell: isBordered }"
v-bind="{ ...attrs, columns: _columns }" :scrollbar="true" >
v-bind="{ ...attrs, columns: _columns }" :scrollbar="true">
<template v-for="key in Object.keys(slots)" :key="key" #[key]="scoped">
<slot :key="key" :name="key" v-bind="scoped"></slot>
</template>
Expand Down
9 changes: 9 additions & 0 deletions src/styles/arco-ui/a-button.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.arco-btn-secondary {
&:hover {
background: var(--color-secondary-hover) !important;
}

&:active {
background: var(--color-secondary-active) !important;
}
}
1 change: 1 addition & 0 deletions src/styles/arco-ui/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
@import './a-message.less';
@import './a-menu.less';
@import './a-typography.less';
@import './a-button.less';

@color-menu-dark-bg: var(--color-bg-1);
@card-color-bg: var(--color-bg-1);
Expand Down
18 changes: 10 additions & 8 deletions src/views/monitor/log/login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@
<template #prefix><icon-search /></template>
</a-input>
<DateRangePicker v-model="queryForm.createTime" @change="search" />
<a-button @click="reset">重置</a-button>
<a-button @click="reset">
<template #icon><icon-refresh /></template>
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<a-tooltip content="导出">
<a-button v-permission="['monitor:log:export']" class="gi_hover_btn-border" @click="onExport">
<template #icon>
<icon-download />
</template>
</a-button>
</a-tooltip>
<a-button v-permission="['monitor:log:export']" @click="onExport">
<template #icon>
<icon-download />
</template>
<template #default>导出</template>
</a-button>
</template>
<template #status="{ record }">
<a-tag v-if="record.status === 1" color="green">
Expand Down
18 changes: 10 additions & 8 deletions src/views/monitor/log/operation/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@
<template #prefix><icon-search /></template>
</a-input>
<DateRangePicker v-model="queryForm.createTime" @change="search" />
<a-button @click="reset">重置</a-button>
<a-button @click="reset">
<template #icon><icon-refresh /></template>
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<a-tooltip content="导出">
<a-button v-permission="['monitor:log:export']" class="gi_hover_btn-border" @click="onExport">
<template #icon>
<icon-download />
</template>
</a-button>
</a-tooltip>
<a-button v-permission="['monitor:log:export']" @click="onExport">
<template #icon>
<icon-download />
</template>
<template #default>导出</template>
</a-button>
</template>
<template #createTime="{ record }">
<a-link @click="onDetail(record)">{{ record.createTime }}</a-link>
Expand Down
5 changes: 4 additions & 1 deletion src/views/monitor/online/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
<template #prefix><icon-search /></template>
</a-input>
<DateRangePicker v-model="queryForm.loginTime" @change="search" />
<a-button @click="reset">重置</a-button>
<a-button @click="reset">
<template #icon><icon-refresh /></template>
<template #default>重置</template>
</a-button>
</template>
<template #nickname="{ record }">{{ record.nickname }}({{ record.username }})</template>
<template #action="{ record }">
Expand Down
2 changes: 1 addition & 1 deletion src/views/schedule/job/JobAddModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
>
<template #append>
<a-tooltip content="Cron表达式生成">
<a-button class="gi_hover_btn-border" @click="openGeneratorCron(form.triggerInterval)">
<a-button @click="openGeneratorCron(form.triggerInterval)">
<template #icon>
<icon-clock-circle />
</template>
Expand Down
5 changes: 4 additions & 1 deletion src/views/schedule/job/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
/>
<a-input v-model="queryForm.jobName" placeholder="请输入任务名称" allow-clear @change="search" />
<a-select v-model="queryForm.jobStatus" placeholder="请选择任务状态" :options="job_status_enum" allow-clear style="width: 150px" @change="search" />
<a-button @click="reset">重置</a-button>
<a-button @click="reset">
<template #icon><icon-refresh /></template>
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<a-button v-permission="['schedule:job:add']" type="primary" @click="onAdd">
Expand Down
5 changes: 4 additions & 1 deletion src/views/schedule/log/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
@change="search"
/>
<DateRangePicker v-model="queryForm.datetimeRange" :allow-clear="false" @change="search" />
<a-button @click="reset">重置</a-button>
<a-button @click="reset">
<template #icon><icon-refresh /></template>
<template #default>重置</template>
</a-button>
</template>
<template #taskBatchStatus="{ record }">
<GiCellTag :value="record.taskBatchStatus" :dict="job_execute_status_enum" />
Expand Down
5 changes: 4 additions & 1 deletion src/views/setting/message/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
<a-option :value="false">未读</a-option>
<a-option :value="true">已读</a-option>
</a-select>
<a-button @click="reset">重置</a-button>
<a-button @click="reset">
<template #icon><icon-refresh /></template>
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<a-button type="primary" status="danger" :disabled="!selectedKeys.length" @click="onDelete">
Expand Down
18 changes: 10 additions & 8 deletions src/views/system/dept/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,22 @@
<a-input v-model="name" placeholder="请输入名称" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-button @click="reset">重置</a-button>
<a-button @click="reset">
<template #icon><icon-refresh /></template>
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:dept:add']" type="primary" @click="onAdd()">
<template #icon><icon-plus /></template>
<span>新增</span>
</a-button>
<a-tooltip content="导出">
<a-button v-permission="['system:dept:export']" class="gi_hover_btn-border" @click="onExport">
<template #icon>
<icon-download />
</template>
</a-button>
</a-tooltip>
<a-button v-permission="['system:dept:export']" @click="onExport">
<template #icon>
<icon-download />
</template>
<template #default>导出</template>
</a-button>
</template>
<template #status="{ record }">
<GiCellStatus :status="record.status" />
Expand Down
5 changes: 4 additions & 1 deletion src/views/system/dict/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
<a-input v-model="queryForm.description" placeholder="请输入标签/描述" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-button @click="reset">重置</a-button>
<a-button @click="reset">
<template #icon><icon-refresh /></template>
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:dict:item:add']" type="primary" @click="onAdd">
Expand Down
2 changes: 1 addition & 1 deletion src/views/system/file/main/FileMain/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</a-button>
<a-button-group>
<a-tooltip content="视图">
<a-button class="gi_hover_btn-border" @click="toggleMode">
<a-button @click="toggleMode">
<template #icon>
<icon-list v-if="mode === 'grid'" />
<icon-apps v-else />
Expand Down
7 changes: 5 additions & 2 deletions src/views/system/menu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@
<a-input v-model="title" placeholder="请输入菜单标题" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-button @click="reset">重置</a-button>
<a-button @click="reset">
<template #icon><icon-refresh /></template>
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:menu:add']" type="primary" @click="onAdd()">
<template #icon><icon-plus /></template>
<span>新增</span>
</a-button>
<a-tooltip content="展开/折叠">
<a-button class="gi_hover_btn-border" @click="onExpanded">
<a-button @click="onExpanded">
<template #icon>
<icon-list v-if="!isExpanded" />
<icon-mind-mapping v-else />
Expand Down
5 changes: 4 additions & 1 deletion src/views/system/notice/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
style="width: 150px"
@change="search"
/>
<a-button @click="reset">重置</a-button>
<a-button @click="reset">
<template #icon><icon-refresh /></template>
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:notice:add']" type="primary" @click="onAdd">
Expand Down
5 changes: 4 additions & 1 deletion src/views/system/role/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
<a-input v-model="queryForm.description" placeholder="请输入名称/编码/描述" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-button @click="reset">重置</a-button>
<a-button @click="reset">
<template #icon><icon-refresh /></template>
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:role:add']" type="primary" @click="onAdd">
Expand Down
5 changes: 4 additions & 1 deletion src/views/system/storage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
style="width: 150px"
@change="search"
/>
<a-button @click="reset">重置</a-button>
<a-button @click="reset">
<template #icon><icon-refresh /></template>
<template #default>重置</template>
</a-button>
</template>
<template #custom-right>
<a-button v-permission="['system:storage:add']" type="primary" @click="onAdd">
Expand Down
5 changes: 4 additions & 1 deletion src/views/tool/generator/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
<a-input v-model="queryForm.tableName" placeholder="请输入表名称" allow-clear @change="search">
<template #prefix><icon-search /></template>
</a-input>
<a-button @click="reset">重置</a-button>
<a-button @click="reset">
<template #icon><icon-refresh /></template>
<template #default>重置</template>
</a-button>
</template>
<template #action="{ record }">
<a-space>
Expand Down

0 comments on commit ff87940

Please sign in to comment.