UNPKG

@antmjs/vantui

Version:

一套适用于Taro3及React的vantui组件库

70 lines 2.04 kB
import { View } from '@tarojs/components'; import { Row, Col, Image } from '@antmjs/vantui'; import { jsx as _jsx } from "react/jsx-runtime"; import { jsxs as _jsxs } from "react/jsx-runtime"; export default function Demo() { return /*#__PURE__*/_jsxs(Row, { gutter: "20", children: [/*#__PURE__*/_jsxs(Col, { span: "8", children: [/*#__PURE__*/_jsx(Image, { width: "100%", height: "100px", fit: "contain", src: "https://img.yzcdn.cn/vant/cat.jpeg" }), /*#__PURE__*/_jsx(View, { children: "contain" })] }), /*#__PURE__*/_jsxs(Col, { span: "8", children: [/*#__PURE__*/_jsx(Image, { width: "100%", height: "100px", fit: "cover", src: "https://img.yzcdn.cn/vant/cat.jpeg" }), /*#__PURE__*/_jsx(View, { children: "cover" })] }), /*#__PURE__*/_jsxs(Col, { span: "8", children: [/*#__PURE__*/_jsx(Image, { width: "100%", height: "100px", fit: "fill", src: "https://img.yzcdn.cn/vant/cat.jpeg" }), /*#__PURE__*/_jsx(View, { children: "fill" })] }), /*#__PURE__*/_jsxs(Col, { span: "8", children: [/*#__PURE__*/_jsx(Image, { width: "100%", height: "100px", fit: "none", src: "https://img.yzcdn.cn/vant/cat.jpeg" }), /*#__PURE__*/_jsx(View, { children: "none" })] }), /*#__PURE__*/_jsxs(Col, { span: "8", children: [/*#__PURE__*/_jsx(Image, { width: "100%", height: "100px", fit: "widthFix", src: "https://img.yzcdn.cn/vant/cat.jpeg" }), /*#__PURE__*/_jsx(View, { children: "widthFix" })] }), /*#__PURE__*/_jsxs(Col, { span: "8", children: [/*#__PURE__*/_jsx(Image, { width: "100%", height: "100px", fit: "heightFix", src: "https://img.yzcdn.cn/vant/cat.jpeg" }), /*#__PURE__*/_jsx(View, { children: "heightFix" })] })] }); }