From 5ddef0a940f499768ac9cae14633645a8621079c Mon Sep 17 00:00:00 2001 From: Zhu Zhonghua <zhonghua@qq.com> Date: 星期五, 16 五月 2025 13:32:26 +0800 Subject: [PATCH] 修改right toolbar --- src/components/RightToolbar/index.vue | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/components/RightToolbar/index.vue b/src/components/RightToolbar/index.vue index ef4281c..2ccb0d1 100644 --- a/src/components/RightToolbar/index.vue +++ b/src/components/RightToolbar/index.vue @@ -1,10 +1,16 @@ <template> <div class="top-right-btn" :style="style"> <el-row> - <el-tooltip class="item" effect="dark" :content="showSearch ? $t('common.common.hideSearch') : $t('common.common.showSearch')" placement="top" v-if="search"> - <el-button circle icon="Search" @click="toggleSearch()" /> + <el-tooltip class="item" effect="dark" :content="$t('common.common.query')" placement="top" v-if="search"> + <el-button circle icon="search" type="primary" @click="queryData()" /> </el-tooltip> - <el-tooltip class="item" effect="dark" :content="$t('common.common.refresh')" placement="top"> + <el-tooltip class="item" effect="dark" :content="$t('common.common.reset')" placement="top" v-if="search"> + <el-button circle icon="refresh-right" @click="resetData()" /> + </el-tooltip> + <el-tooltip class="item" effect="dark" :content="showSearch ? $t('common.common.hideSearch') : $t('common.common.showSearch')" placement="top" v-if="search"> + <el-button circle :icon="showSearch ? 'arrow-up' : 'arrow-down'" @click="toggleSearch()" /> + </el-tooltip> + <el-tooltip class="item" effect="dark" :content="$t('common.common.refresh')" placement="top" v-if="!search"> <el-button circle icon="Refresh" @click="refresh()" /> </el-tooltip> <el-tooltip class="item" effect="dark" :content="$t('common.common.column')" placement="top" v-if="columns"> @@ -62,7 +68,7 @@ }, }) -const emits = defineEmits(['update:showSearch', 'queryTable']); +const emits = defineEmits(['update:showSearch', 'queryTable', 'refreshTable', 'resetTable']); // 鏄鹃殣鏁版嵁 const value = ref([]); @@ -86,9 +92,17 @@ // 鍒锋柊 function refresh() { + emits("refreshTable"); +} + +function queryData() { emits("queryTable"); } +function resetData() { + emits("resetTable"); +} + // 鍙充晶鍒楄〃鍏冪礌鍙樺寲 function dataChange(data) { for (let item in props.columns) { -- Gitblit v1.9.3