REVIEW 公众号选择的下拉框

This commit is contained in:
YunaiV
2023-04-11 23:28:59 +08:00
parent 129766fca4
commit fd447dc7a3
11 changed files with 18 additions and 16 deletions

View File

@@ -19,13 +19,12 @@ const emit = defineEmits<{
(e: 'change', id: number | undefined): void
}>()
onMounted(async () => {
onMounted(() => {
handleQuery()
})
const handleQuery = async () => {
const data = await MpAccountApi.getSimpleAccountList()
accountList.value = data
accountList.value = await MpAccountApi.getSimpleAccountList()
// 默认选中第一个
if (accountList.value.length > 0) {
accountId.value = accountList.value[0].id