添加重置隐藏

This commit is contained in:
GGJ
2024-12-02 15:11:02 +08:00
parent 7d3eefc1ce
commit 4347f4b15b
2 changed files with 8 additions and 3 deletions

View File

@@ -19,7 +19,7 @@
</el-button>
<el-button @click="onComSearch" v-if="showSearch" :loading="tableStore.table.loading" type="primary"
:icon="Search">查询</el-button>
<el-button @click="onResetForm" v-if="showSearch" :loading="tableStore.table.loading"
<el-button @click="onResetForm" v-if="showSearch && showReset" :loading="tableStore.table.loading"
:icon="RefreshLeft">重置</el-button>
</template>
<slot name="operation"></slot>
@@ -54,6 +54,7 @@ interface Props {
showSearch?: boolean
nextFlag?: boolean //控制时间是否可以往后推
theCurrentTime?: boolean //控制时间前3天展示上个月时间
showReset?: boolean //控制时间前3天展示上个月时间
}
const props = withDefaults(defineProps<Props>(), {
@@ -61,7 +62,8 @@ const props = withDefaults(defineProps<Props>(), {
area: false,
showSearch: true,
nextFlag: false,
theCurrentTime: false
theCurrentTime: false,
showReset: true
})
// 动态计算table高度
const resizeObserver = new ResizeObserver(entries => {