Commit 9cf070dd6305bb69a67ab6be85ef00bddc86fda0
1 parent
41e6d94b
feat(api-select): clear options before fetch
ApiSelect组件在发起新的请求之前先清空已有的options
Showing
2 changed files
with
4 additions
and
3 deletions
CHANGELOG.zh_CN.md
@@ -4,8 +4,9 @@ | @@ -4,8 +4,9 @@ | ||
4 | - 修复滚动条样式问题 | 4 | - 修复滚动条样式问题 |
5 | - 修复树形表格的带有展开图标的单元格的内容对齐问题 | 5 | - 修复树形表格的带有展开图标的单元格的内容对齐问题 |
6 | - **AppSearch** 修复可能会搜索隐藏菜单的问题 | 6 | - **AppSearch** 修复可能会搜索隐藏菜单的问题 |
7 | -- **其它** 修复菜单默认折叠的配置不起作用的问题 | ||
8 | -- 修复 safari 浏览器报错导致网站打不开 | 7 | +- **其它** |
8 | + - 修复菜单默认折叠的配置不起作用的问题 | ||
9 | + - 修复`safari`浏览器报错导致网站打不开 | ||
9 | 10 | ||
10 | ### 🎫 Chores | 11 | ### 🎫 Chores |
11 | 12 |
src/components/Form/src/components/ApiSelect.vue
@@ -106,7 +106,7 @@ | @@ -106,7 +106,7 @@ | ||
106 | async function fetch() { | 106 | async function fetch() { |
107 | const api = props.api; | 107 | const api = props.api; |
108 | if (!api || !isFunction(api)) return; | 108 | if (!api || !isFunction(api)) return; |
109 | - | 109 | + options.value = []; |
110 | try { | 110 | try { |
111 | loading.value = true; | 111 | loading.value = true; |
112 | const res = await api(props.params); | 112 | const res = await api(props.params); |