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

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

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