mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-17 12:25:07 +08:00
REVIEW 公众号选择的下拉框
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user