Commit 6c9aeea1cfb3e9e9e0bd924eefdfa0942bf9fd25

Authored by zhangzzzz
1 parent bf9d1b77

优化英文版质量巡检样式;

src/components/Common/CommonTable/index.js
... ... @@ -4582,11 +4582,11 @@ class CommonTableRc extends React.Component {
4582 4582 {expandedAllIcon}
4583 4583 {editableSpan}
4584 4584 {props.bXunjian && column.bXunjianSpecial ? (
4585   - <span style={{ color: "red", ...extraStyle }}>
  4585 + <span style={{ color: "red", ...extraStyle }} title={`${column.title}`}>
4586 4586 {column.title}
4587 4587 </span>
4588 4588 ) : props.bXunjian ? (
4589   - <span style={{ ...extraStyle }}>{column.title}</span>
  4589 + <span style={{ ...extraStyle }} title={`${column.title}`}>{column.title}</span>
4590 4590 ) : column.title === "." ? (
4591 4591 ""
4592 4592 ) : (
... ...
src/index.js
... ... @@ -9,6 +9,7 @@ import &#39;./indexNew.less&#39;;
9 9 import './default.less';
10 10 import './g2';
11 11 import './variable.less'; // 用于覆盖上面定义的变量
  12 +import './lang/index.less'; // 用于不同语言的样式
12 13  
13 14  
14 15 const ERROR_MSG_DURATION = 5;
... ...
src/lang/en-lang.less 0 → 100644
  1 +:global {
  2 + html[lang="sEnglish"] {
  3 + th[width="40"] {
  4 + .th-div {
  5 + width: 32px;
  6 + margin: 0;
  7 + height: auto;
  8 + display: -webkit-box;
  9 + /*! autoprefixer: ignore next */
  10 + -webkit-box-orient: vertical;
  11 + -webkit-line-clamp: 10;
  12 + /* 只保留 2 行 */
  13 + overflow: hidden;
  14 + text-overflow: ellipsis;
  15 + /* 兜底 */
  16 + white-space: normal;
  17 + word-break: break-all;
  18 + /* 覆盖 antd 默认 nowrap */
  19 + /* 按需调整,决定何时断行 */
  20 + line-height: 1.2;
  21 + }
  22 + }
  23 + }
  24 +}
0 25 \ No newline at end of file
... ...
src/lang/index.less 0 → 100644
  1 +@import "./en-lang.less";
... ...
src/mes/indexMes/index.js
... ... @@ -365,6 +365,12 @@ const useIndexMesEvent = props =&gt; {
365 365 window.deviceTargetInfoModal = false;
366 366 }, []);
367 367  
  368 + useEffect(() => {
  369 + const { userinfo } = props.app;
  370 + const { sLanguage } = userinfo;
  371 + document.querySelector('html').setAttribute('lang', sLanguage);
  372 + }, []);
  373 +
368 374 return {
369 375 props,
370 376 hooksProps: state,
... ...