This commit is contained in:
牛子源 2025-05-06 13:26:33 +08:00
parent 0ddc4ee58d
commit af846cd274
1 changed files with 7 additions and 2 deletions

View File

@ -41,7 +41,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref, onMounted, watch} from 'vue'; import {ref, onMounted, watch, nextTick} from 'vue';
import {ElNotification, type TabsPaneContext} from 'element-plus' import {ElNotification, type TabsPaneContext} from 'element-plus'
import {post} from '@/utils/request.ts' import {post} from '@/utils/request.ts'
import {Search} from '@element-plus/icons-vue' import {Search} from '@element-plus/icons-vue'
@ -82,6 +82,7 @@ function init() {
} }
function set_tab() { function set_tab() {
console.log(current_tab.value)
post("social/directory/column_list", {type: current_tab.value}) post("social/directory/column_list", {type: current_tab.value})
.then((res: any) => { .then((res: any) => {
column_list.value = res; column_list.value = res;
@ -118,7 +119,11 @@ let change_page = (val: number) => {
} }
let change_tab = (tab: TabsPaneContext, event: Event) => { let change_tab = (tab: TabsPaneContext, event: Event) => {
search_keyword.value = ""; search_keyword.value = "";
nextTick(()=>{
init() init()
})
} }
let loading = ref(false) let loading = ref(false)
let uploadMsg = ref("正在更新目录,请稍后...") let uploadMsg = ref("正在更新目录,请稍后...")