Commit bb9f48fe authored by 前端-许佳敏's avatar 前端-许佳敏
parents 76f126bb 17c33ce1
......@@ -52,8 +52,19 @@ export const cardSchema: ISchema = {
properties: {
title: {
type: 'string',
title: '活动名称'
}
title: '活动名称',
"x-rules": [
{
"required": true,
"message": "最长32个字符,16个汉字"
},
{
limitByte: true, // 自定义校验规则
maxByte: 60,
}
]
},
}
}
}
......
import React, { CSSProperties, useMemo } from 'react';
import cx from 'classnames';
import { Tooltip } from 'antd';
interface Iprops {
imageUrl: string,
......@@ -22,10 +23,18 @@ const Advertisement: React.FC<Iprops> = (props: Iprops) => {
return (
<div className={classNames} {...divProps}>
<img
src={imageUrl}
style={{width: cacheWidth, height: cacheHeight, ...style}}
/>
{
imageUrl && (
<img
src={imageUrl}
style={{width: cacheWidth, height: cacheHeight, ...style}}
/>
) || (
<Tooltip placement="topLeft" title="活动图片" arrowPointAtCenter>
<div style={{width: cacheWidth, height: cacheHeight, ...style}}></div>
</Tooltip>
)
}
</div>
);
};
......
.recommand {
padding: 0 8px;
margin-top: 24px;
}
.title {
color: #fff;
font-size: 20px;
margin-bottom: 12px;
display: block;
}
.title {
color: #fff;
font-size: 20px;
margin-bottom: 12px;
display: block;
line-height: 28px;
margin-bottom: 8px;
}
.hide {
......
......@@ -2,6 +2,7 @@ import React, { useMemo } from 'react';
import { MarketingCard } from '@lingxi-disign/ui';
import cx from 'classnames';
import styles from './index.less';
import { Tooltip } from 'antd';
const { CouponsItem } = MarketingCard;
......@@ -33,9 +34,11 @@ const Coupon: React.FC<Iprops> & { Item: typeof CouponItem } = (props: Iprops) =
<>
{
!!visible && (
<div {...divProps} className={classNameStr}>
{children}
</div>
<Tooltip placement="topLeft" title="优惠券" arrowPointAtCenter>
<div {...divProps} className={classNameStr}>
{children}
</div>
</Tooltip>
) || null
}
</>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment