提交 c9e33643 authored 作者: 钟是志's avatar 钟是志

29127 违纪,H5应用增加卡片组件

上级 1a7e4071
import React from 'react';
import moment from 'moment';
import { Modal, message, notification, Tooltip, Spin, Popover, Popconfirm } from 'antd';
import { Modal, message, notification, Tooltip, Spin, Popover, Popconfirm, Tag, Badge } from 'antd';
import md5 from 'js-md5';
import { giveFilePostDataInfoForTrue } from '@/webPublic/one_stop_public/Base16';
import {
......@@ -90,6 +90,8 @@ export function giveSmartFormGlobalProps({
Popover,
Popconfirm,
moment,
Tag,
Badge,
},
};
return true;
......
......@@ -24,22 +24,22 @@ export default function MobileCard(props) {
return null;
}
const dataSource = value?.dataSource || otherProps?.defaultDataSource || [];
const { columns = [], primaryKey = '', style = {} } = otherProps;
const { columns = [], primaryKey = '', style = {}, handleClick } = otherProps;
return (
<>
{dataSource.map((g, index) => {
// const clickFunction = // 点击整个块
// typeof g.handleClick === 'function'
// ? e => {
// if (e && e.stopPropagation) {
// e.stopPropagation();
// e.preventDefault();
// }
// return g.handleClick(g, value);
// }
// : undefined;
const clickFunction = // 点击整个块
typeof handleClick === 'function'
? e => {
if (e && e.stopPropagation) {
e.stopPropagation();
e.preventDefault();
}
return handleClick(g, value);
}
: undefined;
return (
<div key={g[primaryKey]} style={style}>
<div key={g[primaryKey]} style={style} onClick={clickFunction}>
<WingBlank>
{columns.map((c, cIndex) => {
const { style: cStyle, data: cData } = c;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论