| | |
| | | <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"> |
| | |
| | | }, |
| | | }) |
| | | |
| | | const emits = defineEmits(['update:showSearch', 'queryTable']); |
| | | const emits = defineEmits(['update:showSearch', 'queryTable', 'refreshTable', 'resetTable']); |
| | | |
| | | // 显隐数据 |
| | | const value = ref([]); |
| | |
| | | |
| | | // 刷新 |
| | | function refresh() { |
| | | emits("refreshTable"); |
| | | } |
| | | |
| | | function queryData() { |
| | | emits("queryTable"); |
| | | } |
| | | |
| | | function resetData() { |
| | | emits("resetTable"); |
| | | } |
| | | |
| | | // 右侧列表元素变化 |
| | | function dataChange(data) { |
| | | for (let item in props.columns) { |