|
|
@ -5,6 +5,7 @@ import axios from "axios"; |
|
|
|
import { createApp } from "vue"; |
|
|
|
import moment from "moment"; |
|
|
|
import API from "../../api/index.js"; |
|
|
|
import _ from "lodash"; |
|
|
|
|
|
|
|
// 查询用户接口 |
|
|
|
const adminData = ref({ |
|
|
@ -159,7 +160,8 @@ const add = () => { |
|
|
|
} |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
// 使用 _.throttle 并设置 trailing 为 false 实现严格节流,只执行一次 |
|
|
|
const throttledAdd = _.throttle(add, 5000, { trailing: false }); |
|
|
|
// 编辑方法 |
|
|
|
const rateEdit = ref({}); |
|
|
|
//查询已有的数据 |
|
|
@ -663,7 +665,7 @@ function handleInput(value) { |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<div class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="add">添加</el-button> |
|
|
|
<el-button type="primary" @click="throttledAdd">添加</el-button> |
|
|
|
<el-button @click="regeAdd = false">取消</el-button> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|