From 053a8572716718db8f7bc92d39fed624cda1e59f Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Wed, 15 Dec 2021 16:09:00 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BF=AE=E6=94=B9bbcode=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E6=B8=B2=E6=9F=93=E5=9B=BE=E7=89=87=E6=97=B6?= =?UTF-8?q?=E8=AE=BE=E5=AE=9A=E6=9C=80=E5=A4=A7=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 并修复之前样式不生效的bug --- web/plugins/com.msgbyte.bbcode/src/tags/ImgTag.tsx | 8 +++++++- web/plugins/com.msgbyte.bbcode/tsconfig.json | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/web/plugins/com.msgbyte.bbcode/src/tags/ImgTag.tsx b/web/plugins/com.msgbyte.bbcode/src/tags/ImgTag.tsx index 0c9eab3c..a1d1ca1d 100644 --- a/web/plugins/com.msgbyte.bbcode/src/tags/ImgTag.tsx +++ b/web/plugins/com.msgbyte.bbcode/src/tags/ImgTag.tsx @@ -2,11 +2,17 @@ import React from 'react'; import { Image } from '@capital/component'; import type { TagProps } from '../bbcode/type'; +const imageStyle: React.CSSProperties = { + maxHeight: 320, + maxWidth: 320, + width: 'auto', +}; + export const ImgTag: React.FC = React.memo((props) => { const { node } = props; const text = node.content.join(''); const url = node.attrs.url ?? text; - return ; + return ; }); ImgTag.displayName = 'ImgTag'; diff --git a/web/plugins/com.msgbyte.bbcode/tsconfig.json b/web/plugins/com.msgbyte.bbcode/tsconfig.json index 694f120b..2c0a0cf2 100644 --- a/web/plugins/com.msgbyte.bbcode/tsconfig.json +++ b/web/plugins/com.msgbyte.bbcode/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "rootDir": "./src", "baseUrl": "./src", "esModuleInterop": true, "allowSyntheticDefaultImports": true,