Skip to content

Conversation

@jhygreatbug
Copy link

  • vite-imagetools 6.x 数据结构发生变化
    • 字段名称 fallback -> img
    • sources 简化成字符串数组
  • 测试 demo 增加 vite-imagetools 配置

@Amorites
Copy link
Contributor

readme 里有相关的部分也改一下吧

};
};
// v6.0.0以下
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

实际上是4.x,5.x 不是这样的

## 使用

> 建议配合 (vite-plugin-image-presets) 使用
> 建议配合 [vite-plugin-image-presets](github.com/ElMassimo/vite-plugin-image-presets)[vite-imagetools](https://github.com/JonasKruckenberg/imagetools/tree/main/packages/vite) 使用
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vite-plugin-image-presets 相关的东西都去掉吧,现在不建议了

```ts
interface PictureProp {
src: ImgHTMLAttributes[];
src: Array<ImagePresetPictureOption | ImageToolsPictureOption | ImageToolsPictureOptionOld>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉不太对

w?: number;
}[];
};
img: ImageToolsPictureOptionImg;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个old是代表啥,之前支持这样吗?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ImageToolsPictureOptionOld 吗,是 4.x 和 5.x 的类型,跟最新的 6.x 区分了下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants