diff --git a/components/CustomIcon/IconFont.js b/components/CustomIcon/IconFont.js index 4b9f9ecef59d87cb053291f3c1873ca7aeee180b..539ffd0d364957b3f2b3381aac9d0003e7aa40a4 100755 --- a/components/CustomIcon/IconFont.js +++ b/components/CustomIcon/IconFont.js @@ -1,7 +1,7 @@ import { createFromIconfontCN } from '@ant-design/icons'; const IconFont = createFromIconfontCN({ - scriptUrl: 'https://influencer-attachment.mttop.cn/influencer/v2/website/20200629/iconFont.js', + scriptUrl: 'https://static.mttop.cn/website/20200723/iconFont.jsiconfont.js', }); export default IconFont; diff --git a/components/apolloTable/component/Cell.tsx b/components/apolloTable/component/Cell.tsx index 7b61b702fcb3f0cc9169ebfcf637d01f8d206b74..3889e687bef83845762e8594358a3c42d2b8e2c0 100644 --- a/components/apolloTable/component/Cell.tsx +++ b/components/apolloTable/component/Cell.tsx @@ -33,6 +33,8 @@ const Cell = (props: CellProps) => { rowSelection, columns, contentMenu, + tableId, + maxPopHeight, } = props; const { columnType, @@ -72,12 +74,14 @@ const Cell = (props: CellProps) => { if (requiredFlag) { if (!changedValue || changedValue.length === 0) { message.error('该字段为必填项'); + setStatus('detail'); return; } if (changedValue.length === 1) { const data = changedValue[0]; if (!data.value && !data.text) { message.error('该字段为必填项'); + setStatus('detail'); return; } } @@ -102,14 +106,14 @@ const Cell = (props: CellProps) => { }; // 添加行hover样式 const onMouseEnter = () => { - const doms = document.querySelectorAll(`.row_${rowIndex}`); + const doms = document.querySelectorAll(`.table_${tableId}.row_${rowIndex}`); doms.forEach((dom) => { dom.classList.add(s.hover); }); }; // 去除行hover样式 const onMouseLeave = () => { - const doms = document.querySelectorAll(`.row_${rowIndex}`); + const doms = document.querySelectorAll(`.table_${tableId}.row_${rowIndex}`); doms.forEach((dom) => { dom.classList.remove(s.hover); }); @@ -240,7 +244,7 @@ const Cell = (props: CellProps) => { // 否则进入选中状态 if (dom) { // 先清除所有dom的选中状态及样式 - const doms = document.querySelectorAll('.cellUnit'); + const doms = document.querySelectorAll(`.cellUnit.table_${tableId}`); if (doms) { doms.forEach((item) => { item.setAttribute('data-selected-cell', '0'); @@ -334,11 +338,13 @@ const Cell = (props: CellProps) => { const value = setFormat(editConfig, columnConfig, changedValue, optionValue); emitChangeCellData(value, optionValue); }} + tableId={tableId} cellRenderProps={cellRenderProps} style={{ minHeight: cellStyle.height, borderRadius: 0, }} + maxPopHeight={maxPopHeight} /> ); @@ -346,14 +352,14 @@ const Cell = (props: CellProps) => { return (