From 350a0dac3471f2871a585f044368cde01c5c9ec6 Mon Sep 17 00:00:00 2001 From: the1812 Date: Sat, 4 Feb 2023 18:28:52 +0800 Subject: [PATCH] Add data-did for compatibility (#3821) --- src/components/feeds/api/manager/v2.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/feeds/api/manager/v2.ts b/src/components/feeds/api/manager/v2.ts index d3ef00ffb..d309ce220 100644 --- a/src/components/feeds/api/manager/v2.ts +++ b/src/components/feeds/api/manager/v2.ts @@ -87,6 +87,7 @@ const parseCard = async (element: HTMLElement): Promise => { combineText(getText(modules.module_dynamic, cardType), getText(repostDynamicModule, cardType)) } card.text = await card.getText() + card.element.setAttribute('data-did', card.id) // 等待第一次 Vue 渲染完成 await selectAll(() => element.querySelectorAll('.bili-dyn-item *'), { queryInterval: 50 }) return card