fix: todo修复

This commit is contained in:
hw
2025-11-21 18:19:42 +08:00
parent 0251dc2f3b
commit 8d7d3d5fe1
86 changed files with 963 additions and 1195 deletions

View File

@@ -26,7 +26,6 @@ const emit = defineEmits<{
(e: 'update:modelValue', v: Reply): void;
}>();
// TODO @hwantd 和 ele 风格不同,需要统一;
interface Props {
modelValue: Reply | undefined;
newsType?: NewsType;
@@ -45,7 +44,6 @@ const reply = computed<Reply>({
const tabCache = new Map<ReplyType, Reply>(); // 作为多个标签保存各自 Reply 的缓存
const currentTab = ref<ReplyType>(props.modelValue?.type || ReplyType.Text); // 采用独立的 ref 来保存当前 tab避免在 watch 标签变化,对 reply 进行赋值会产生了循环调用
// TODO @hwantd 和 ele 风格不同,需要统一;
// 监听 modelValue 变化,同步更新 currentTab 和缓存
watch(
() => props.modelValue,
@@ -64,7 +62,6 @@ watch(
{ immediate: true, deep: true },
);
// TODO @hwantd 和 ele 风格不同,需要统一;
watch(
currentTab,
(newTab, oldTab) => {