ui: optimize record_detail rich text message

This commit is contained in:
undefined committed 2024-08-10 02:35:23 +08:00
1 parent ab356b3d80
commit 609466016c
1 file changed
+4 -3
@@ -24,10 +24,11 @@ export default new NamedPage('record_detail', async () => {
if (typeof msg.status === 'number' && window.parent) window.parent.postMessage({ status: msg.status }); if (typeof msg.status === 'number' && window.parent) window.parent.postMessage({ status: msg.status });
}; };
$(document).on('click', '.subtask-case', function () { $(document).on('click', '.subtask-case', function () {
const data = $(this).find('.message').text(); const text = $(this).find('.message').text();
if (!data?.trim()) return; const data = $(this).find('.message').html();
if (!text?.trim()) return;
new InfoDialog({ new InfoDialog({
$body: tpl(<pre>{data}</pre>), $body: tpl(<pre dangerouslySetInnerHTML={{ __html: data }} />),
}).open(); }).open();
}); });
}); });