You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ npm run build maifriend-image
> koishi@0.0.0 build
> yakumo build maifriend-image
external/maifriend-image/src/index.tsx:25:13 - error TS2322: Type '{ style: { position: string; left: string; top: string; width: string; height: string; "object-fit": string; }; src: string; }' is not assignable to type 'ResourceElement'.
Property 'style' does not exist on type 'ResourceElement'.
25 style={{
~~~~~
external/maifriend-image/src/index.tsx:36:13 - error TS2322: Type '{ style: { position: string; left: number; top: number; }; src: string; }' is not assignable to type 'ResourceElement'.
Property 'style' does not exist on type 'ResourceElement'.
36 style={{
~~~~~
Found 2 errors.
Describe the bug
我的插件中使用了 TSX 写法,通过
html
元素调用 Puppeteer 渲染网页。其中包含了img
用于在网页中插入图片,但该img
疑似被识别为消息元素导致插件无法编译。从最新的插件模板中更新了
tsconfig.json
后,问题不变。代码:
编译输出:
Steps to reproduce
html
渲染一个包含img
的网页img
添加一些消息元素没有的属性,例如style
Expected behavior
插件能够正常编译并输出编译成果。
Screenshots
编辑器报错:
Versions
Additional context
有问题的插件仓库:https://github.com/TTsdzb/koishi-plugin-maifriend-image
插件在
npm run dev
调试时完全可以正常运行,只是不能编译。我所使用的 koishi 模板项目也是刚创建的。
package.json
:The text was updated successfully, but these errors were encountered: