Skip to content

Commit

Permalink
fix(模板列表): 切换为全部是重复请求
Browse files Browse the repository at this point in the history
  • Loading branch information
nihaojob committed Jul 24, 2024
1 parent 46e4569 commit f10026e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/components/importTmpl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@
* @Author: 秦少卫
* @Date: 2022-09-03 19:16:55
* @LastEditors: 秦少卫
* @LastEditTime: 2024-06-12 22:07:28
* @LastEditTime: 2024-07-24 11:28:10
* @Description: 导入模板
-->

<template>
<div>
<!-- 搜索组件 -->
<div class="search-box">
<Select class="select" v-model="typeValue" @on-change="startGetList" :disabled="pageLoading">
<Select
class="select"
v-model="typeValue"
@on-change="changeSelectType"
:disabled="pageLoading"
>
<Option v-for="item in typeList" :value="item.value" :key="item.value">
{{ item.label }}
</Option>
Expand Down Expand Up @@ -60,6 +65,7 @@
import useSelect from '@/hooks/select';
import usePageList from '@/hooks/pageList';
import { Spin, Modal } from 'view-ui-plus';
import { debounce } from 'lodash-es';

import { useI18n } from 'vue-i18n';
import { useRouter, useRoute } from 'vue-router';
Expand Down Expand Up @@ -132,6 +138,10 @@ const getTemplInfo = async () => {
}
}
};

const changeSelectType = debounce(() => {
startGetList();
}, 100);
</script>

<style scoped lang="less">
Expand Down

0 comments on commit f10026e

Please sign in to comment.