UNPKG

mr-component

Version:
54 lines 1.99 kB
import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; var _excluded = ["src", "alt", "width", "height", "fit", "round", "radius", "lazyLoad", "showError", "showLoading", "errorIcon", "loadingIcon", "onClick", "onLoad", "onError", "style", "className"]; import * as React from 'react'; import { forwardRef } from 'react'; import { Image } from 'react-vant'; var VantImage = function VantImage(props, ref) { var src = props.src, alt = props.alt, width = props.width, height = props.height, _props$fit = props.fit, fit = _props$fit === void 0 ? 'fill' : _props$fit, _props$round = props.round, round = _props$round === void 0 ? false : _props$round, radius = props.radius, _props$lazyLoad = props.lazyLoad, lazyLoad = _props$lazyLoad === void 0 ? false : _props$lazyLoad, _props$showError = props.showError, showError = _props$showError === void 0 ? true : _props$showError, _props$showLoading = props.showLoading, showLoading = _props$showLoading === void 0 ? true : _props$showLoading, errorIcon = props.errorIcon, loadingIcon = props.loadingIcon, onClick = props.onClick, onLoad = props.onLoad, onError = props.onError, style = props.style, className = props.className, others = _objectWithoutPropertiesLoose(props, _excluded); return /*#__PURE__*/React.createElement(Image, _extends({ ref: ref, src: src, alt: alt, width: width, height: height, fit: fit, round: round, radius: radius, lazyLoad: lazyLoad, showError: showError, showLoading: showLoading, errorIcon: errorIcon, loadingIcon: loadingIcon, onClick: onClick, onLoad: onLoad, onError: onError, style: style, className: className }, others)); }; var RefVantImage = /*#__PURE__*/forwardRef(VantImage); RefVantImage.displayName = 'VantImage'; export default RefVantImage;