gaoluyang
2026-06-24 bfdc0e0e6d5e47aa501f9b6fadd143d9c97cf00a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import type { Ref } from 'vue';
 
import type { ReplyType } from '../../../../packages/constants/src';
 
import { unref } from 'vue';
 
export interface Reply {
  accountId: number;
  articles?: any[];
  content?: null | string;
  description?: null | string;
  hqMusicUrl?: null | string;
  introduction?: null | string;
  mediaId?: null | string;
  musicUrl?: null | string;
  name?: null | string;
  thumbMediaId?: null | string;
  thumbMediaUrl?: null | string;
  title?: null | string;
  type: ReplyType;
  url?: null | string;
}
 
/** 利用旧的 reply[accountId, type] 初始化新的 Reply */
export function createEmptyReply(old: Ref<Reply> | Reply): Reply {
  return {
    accountId: unref(old).accountId,
    articles: [],
    content: null,
    description: null,
    hqMusicUrl: null,
    introduction: null,
    mediaId: null,
    musicUrl: null,
    name: null,
    thumbMediaId: null,
    thumbMediaUrl: null,
    title: null,
    type: unref(old).type,
    url: null,
  };
}