review:【antd】【mp】material、message 的迁移 v1

This commit is contained in:
YunaiV
2025-11-13 13:57:17 +08:00
parent b3c1dff37d
commit 80bb508e78
26 changed files with 90 additions and 55 deletions

View File

@@ -1 +1,2 @@
// TODO @dylanyudao-ui-admin-vben-v5/apps/web-antd/src/views/mp/components 要不加个 index.ts统一 export 所有的组件
export { default as WxAccountSelect } from './main.vue';

View File

@@ -12,23 +12,19 @@ import { getSimpleAccountList } from '#/api/mp/account';
defineOptions({ name: 'WxAccountSelect' });
// 定义事件
const emit = defineEmits<{
(e: 'change', id: number, name: string): void;
}>();
// 消息弹窗
const { push } = useRouter();
// 当前选中的公众号
const account: MpAccountApi.Account = reactive({
id: -1,
name: '',
});
}); // 当前选中的公众号
const accountList = ref<MpAccountApi.Account[]>([]); // 公众号列表
// 公众号列表
const accountList = ref<MpAccountApi.Account[]>([]);
// 查询公众号列表
/** 查询公众号列表 */
async function handleQuery() {
accountList.value = await getSimpleAccountList();
if (accountList.value.length === 0) {
@@ -46,7 +42,7 @@ async function handleQuery() {
}
}
// 切换选中公众号
/** 切换选中公众号 */
function onChanged(id: SelectValue) {
const found = accountList.value.find((v) => v.id === id);
if (found) {
@@ -55,7 +51,7 @@ function onChanged(id: SelectValue) {
}
}
// 初始化
/** 初始化 */
onMounted(handleQuery);
</script>