feat(api-select): clear options before fetch

ApiSelect组件在发起新的请求之前先清空已有的options
This commit is contained in:
无木
2021-07-08 02:50:33 +08:00
parent 41e6d94b3b
commit 9cf070dd63
2 changed files with 4 additions and 3 deletions

View File

@@ -106,7 +106,7 @@
async function fetch() {
const api = props.api;
if (!api || !isFunction(api)) return;
options.value = [];
try {
loading.value = true;
const res = await api(props.params);