|
@@ -1,13 +1,14 @@
|
|
|
<template>
|
|
<template>
|
|
|
<Tooltip placement="top">
|
|
<Tooltip placement="top">
|
|
|
<template #title>
|
|
<template #title>
|
|
|
- <span>{{ t('component.table.showFormSearchConfig') }}</span>
|
|
|
|
|
|
|
+ <span v-if="state">{{ t('component.table.showFormSearchConfig') }}</span>
|
|
|
|
|
+ <span v-if="!state">{{ t('component.table.hideFormSearchConfig') }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
<SearchOutlined @click="toggle" />
|
|
<SearchOutlined @click="toggle" />
|
|
|
</Tooltip>
|
|
</Tooltip>
|
|
|
</template>
|
|
</template>
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
- import { defineComponent } from 'vue';
|
|
|
|
|
|
|
+ import { defineComponent, ref } from 'vue';
|
|
|
import { Tooltip } from 'ant-design-vue';
|
|
import { Tooltip } from 'ant-design-vue';
|
|
|
import { SearchOutlined } from '@ant-design/icons-vue';
|
|
import { SearchOutlined } from '@ant-design/icons-vue';
|
|
|
|
|
|
|
@@ -21,14 +22,16 @@
|
|
|
Tooltip,
|
|
Tooltip,
|
|
|
},
|
|
},
|
|
|
setup() {
|
|
setup() {
|
|
|
|
|
+ const state = ref(true);
|
|
|
const table = useTableContext();
|
|
const table = useTableContext();
|
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
|
|
|
|
|
|
function toggle() {
|
|
function toggle() {
|
|
|
|
|
+ state.value = !state.value;
|
|
|
table.showTableSearch();
|
|
table.showTableSearch();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return { toggle, t };
|
|
|
|
|
|
|
+ return { toggle, t, state };
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|