zhu-jiang-yi-yuan-bigscreen
Version:
南方医科大学珠江医院大屏端
27 lines (23 loc) • 863 B
JavaScript
import { NConst } from "nsn-const";
import { NNum } from "nsn-util";
import React from "react";
import { Arrow } from "./Arrow";
var OnValue = function OnValue(props) {
var value = props.value,
isYearOnYear = props.isYearOnYear,
style = props.style,
className = props.className,
title = props.title,
notPercent = props.notPercent;
var plusOrMinus = NConst.EMPTY;
if (value && value > 0) {
plusOrMinus = '+';
}
return /*#__PURE__*/React.createElement("div", Object.assign({}, {
style: style,
className: className
}), title || (isYearOnYear ? '同比:' : '环比:'), "".concat(plusOrMinus).concat(value ? "".concat(NNum.translate(value)).concat(notPercent ? NConst.EMPTY : '%') : NConst.DASHED), /*#__PURE__*/React.createElement(Arrow, Object.assign({}, {
value: value
})));
};
export { OnValue };