新增前端vue

This commit is contained in:
2025-11-27 18:09:08 +08:00
parent ee5b38babc
commit 40243abb84
22 changed files with 1331 additions and 261 deletions

View File

@@ -35,24 +35,33 @@
setup() {
const { prefixCls } = useDesign('header-notify');
const { createMessage } = useMessage();
const listData = ref<TabItem[]>([]);
onMounted(async () => {
const response = await tabListDataAll();
listData.value = response;
});
const count = computed(() => {
let count = 0;
for (let i = 0; i < listData.value.length; i++) {
count += listData.value[i].list.length;
const listData = ref<TabItem[]>([]);
const getDataList = async () => {
try {
const result = await tabListDataAll();
listData.value = result || [];
} catch (error) {
listData.value = []; // 异常时置空列表,显示空状态
}
return count;
}
const count = computed(() => {
let count = 0;
for (let i = 0; i < listData.value.length; i++) {
count += listData.value[i].list.length;
}
return count;
});
function onNoticeClick(record: BizListItem) {
createMessage.success('你点击了通知ID=' + record.id);
createMessage.success('你点击了' + record.title);
getDataList()
}
onMounted(() => {
getDataList()
});
return {
prefixCls,