-webkit-box-orient:vertical; //从上到下垂直排列子元素
-webkit-line-clamp:2; //这个属性不是css的规范属性,需要组合上面两个属性,表示显示的行数。
overflow:hidden;’>
吧啦吧啦吧啦吧啦吧啦吧啦吧啦吧啦吧啦吧啦吧啦吧啦吧啦吧啦吧啦吧啦吧
啦吧啦吧啦吧啦吧啦吧啦吧啦吧啦吧啦吧啦吧啦吧啦吧啦吧啦
overflow: hidden;text-overflow:ellipsis;white-space: nowrap;
const jobColumns = [
{
title: ‘单位名称’,
dataIndex: ‘jsdw’,
key: ‘jsdw’,
// 解决方案一:使用原生的html
// render: val => {val.substring(0, 10)}
// 解决方案二:使用ellipsis 属性跟ToolTip 组件结合的方式
ellipsis: true,
render: (value, record) => {
return (
<div className=“ellipsis” style={{ float: ‘left’, maxWidth: ‘100%’ }}>
{value.substring(0, 10)}
);
},
},
{
title: ‘录用人数’,
dataIndex: ‘counts’,
key: ‘counts’
}
];
————————————————
版权声明:本文为CSDN博主「liuyunshengsir」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/liuyunshengsir/article/details/104770191
let ServiceWaitSettle = {
formatTime: function(num){
let len = (num + ’ ').length;
let data = “”;
if (len == 10) {
data = num * 1000;
} else {
data = num;
}
let date = new Date(data);
let Y = date.getFullYear() + “-”;
let M = (“0” + (date.getMonth() + 1)).slice("-2") + “-”;
let D = (“0” + date.getDate()).slice("-2") + " “;
let h = (“0” + date.getHours()).slice(”-2") + ‘:’;
let m = (“0” + date.getMinutes()).slice("-2") + ‘:’;
let s = (“0” + date.getSeconds()).slice("-2");
return Y + M + D + h + m + s;
},
formatDate: function(num){
let len = (num + ’ ').length;
let data = “”;
if (len == 10) {
data = num * 1000;
} else {
data = num;
}
let date = new Date(data);
let Y = date.getFullYear() + “-”;
let M = (“0” + (date.getMonth() + 1)).slice("-2") + “-”;
let D = (“0” + date.getDate()).slice("-2");
return Y + M + D;
},
getTime: function (value) {
if (value !== 0) {
let secondTime = parseInt(value); // 秒
let minuteTime = 0; // 分
let hourTime = 0; // 小时
if(secondTime > 60) { // 如果秒数大于60,将秒数转换成整数
// 获取分钟,除以60取整数,得到整数分钟
minuteTime = parseInt(secondTime / 60);
// 获取秒数,秒数取佘,得到整数秒数
secondTime = parseInt(secondTime % 60);
// 如果分钟大于60,将分钟转换成小时
if(minuteTime > 60) {
// 获取小时,获取分钟除以60,得到整数小时
hourTime = parseInt(minuteTime / 60);
// 获取小时后取佘的分,获取分钟除以60取佘的分
minuteTime = parseInt(minuteTime % 60);
}
}
let result
// 秒数为0返回空
if (secondTime > 0) {
result = “” + parseInt(secondTime) + “秒”;
} else {
result = “”;
}
if(minuteTime > 0) {
result = “” + parseInt(minuteTime) + “分” + result;
}
if(hourTime > 0) {
result = “” + parseInt(hourTime) + “时” + result;
}
return result
} else {
return ‘0秒’
}
}
};
export default ServiceWaitSettle;
moment(new Date(parseInt(res.servicePlanExpense.date)), ‘YYYY-MM-DD’);
moment().format(‘YYYY-MM-DD HH:mm:ss’)