17 lines
345 B
TypeScript
17 lines
345 B
TypeScript
import { View, Image } from "@tarojs/components";
|
|
import { memo } from "react";
|
|
|
|
interface Props {
|
|
src: string;
|
|
size: "small" | "medium" | "large" | "raw";
|
|
}
|
|
|
|
export const ImageTpl = memo(({ src, size }: Props) => {
|
|
console.log(size);
|
|
return (
|
|
<View>
|
|
<Image className="w-full" src={src} mode="widthFix" />
|
|
</View>
|
|
);
|
|
});
|