点击选择账号
This commit is contained in:
@ -149,7 +149,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, onMounted, watch } from 'vue';
|
||||
import { ref, reactive, onMounted, nextTick } from 'vue';
|
||||
import aiIcon from '@/assets/img/media-account/icon-AI.png';
|
||||
import { Checkbox, Button, Space, Pagination, notification, DatePicker, TimePicker } from 'ant-design-vue';
|
||||
import { TABS_LIST, ORIGIN_LIST, RawMaterialType } from '@/views/material-center/components/raw-material/constants';
|
||||
@ -263,8 +263,15 @@ const handleAddMaterial = () => {
|
||||
};
|
||||
const handleDateChange = (date) => {};
|
||||
// 暴露方法给父组件
|
||||
const showDrawer = () => {
|
||||
const showDrawer = (accountInfo = null) => {
|
||||
showDriwer.value = true;
|
||||
// 如果传入了账号信息,则设置为默认选中
|
||||
if (accountInfo && accountInfo.id) {
|
||||
// 使用 nextTick 确保在 DOM 更新后设置默认值
|
||||
nextTick(() => {
|
||||
localQuery.value.accounts = [accountInfo.name];
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const showDriwerChange = (visible: boolean) => {
|
||||
|
||||
Reference in New Issue
Block a user