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

View File

@ -1,6 +1,7 @@
<template>
<el-form class="-mb-15px" ref="queryFormRef" :inline="true" label-width="68px">
<el-form-item label="公众号" prop="accountId">
<!-- TODO 芋艿需要将 el-form el-select 解耦 -->
<el-select
v-model="accountId"
placeholder="请选择公众号"
@ -24,13 +25,12 @@ const queryFormRef = ref()
const emit = defineEmits(['change'])
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