随笔分类 - Web前端
摘要:1、value、selectValue、defaultValue 都是不行的,还是会提示信息要必填 <ProFormSelect showSearch name={formName} options={manufacturersLovOptions} width="md" value={initBr
阅读全文
摘要:1、报错信息: 报错Uncaught TypeError: Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator
阅读全文
摘要:1、EditableProTable 新增一行时,报错 Uncaught (in promise) Error: 请设置 recordCreatorProps.record 并返回一个唯一的key at Object.eval [as current] (index.js:679:1) at Obj
阅读全文
摘要:1、其他列是已经生效了,但是固定列是没有生效的 const rowClassName = (record) => { return tableTreeSearchKey.includes(record.key) ? 'selected-row' : ''; }; <ProTable ...... r
阅读全文
摘要:1、报错 WARNING in ./out/site/assets/js/materialInfo/controlUtil.js 558:14-21Critical dependency: require function is used in a way in which dependencies
阅读全文
摘要:1、npm install 报错 E:\wsg\AWC_TEST\stage>npm install react react-domnpm ERR! code CERT_NOT_YET_VALIDnpm ERR! errno CERT_NOT_YET_VALIDnpm ERR! request to
阅读全文
摘要:1、npm install @ant-design/charts --save 报错 npm ERR! code ERR_SOCKET_TIMEOUT npm ERR! network Socket timeout npm ERR! network This is a problem related
阅读全文
摘要:1、我刚开始,是准备使用npm install react-split-pane 来引入的。 但是引入的过程报错了 npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR!
阅读全文
摘要:1、像这种,根据someId值的改变,每次调用一次useEffect 的。如果在useEffect 加上async 则会出现报错 正确的做法,则是去掉useEffect 上的async useEffect(() => { async function fetchData() { try { // 在
阅读全文
摘要:1、我尝试在列中加入ellipsis为true后,让内容超出后,用省略号表示。 {title:displayName,dataIndex:propName,key:newPropName,width:widthIndex //,ellipsis:true } 但是这引发了另外的问题。react-re
阅读全文
摘要:上网找遍的办法,也没找到能否实现需求的。最后自己填填补补,实现了需求 const ResizableBox = () => { const [allWidth, setAllWidth] = React.useState(800); const [width, setWidth] = React.u
阅读全文
摘要:原因:是因为getControl 我用了异步async 的方法。而调用的时候,没有加上await导致的。 解决办法:加上await 就可以了
阅读全文
摘要:1、 export function CreateMaterialButton(props) { const revisionType = props.revisionType //SW8_PARTRevision 还是 SW8_ProductRevision const getTableData
阅读全文
摘要:1、刚开始,我是用第一种方式。通过一个变量,来设置必填属性的提示值 显示是没有问题的。 但是点击ModalForm 确认按钮时,报错 Objects are not valid as a React child (found: object with keys {requiredMsg}). If
阅读全文
摘要:要在 Ant Design ProTable 中去掉默认的信息提示框(alert-info),可以通过设置 tableAlertRender 属性为 false 来实现。这样就可以隐藏默认的信息提示框。 以下是示例代码: <ProTable ... tableAlertRender={false}
阅读全文
摘要:ProTable 表格本身是不支持,列宽度可拖动的。 1、按照一个插件( react-resizable)npm install --save react-resizable 2、新建一个工具类ResizableTableUtil.js import React from 'react'; impo
阅读全文
摘要:1、设置方法:bodyStyle参数 <ProTable bodyStyle={{paddingRight: 0,paddingLeft: 0}}
阅读全文
摘要:如果在 Ant Design 的 ProTable 中尝试更改 selectedRowKeys 的属性名(例如换成其他名字),可能会导致无法正确地管理表格行的选中状态。在 ProTable 中,selectedRowKeys 是一个特定的属性名,用于表示当前选中的行的 keys 列表。 如果你需要将
阅读全文
摘要:1、defaultExpandAllRows:true defaultExpandAllRows设为true就可以了 <ProTable rowKey="key" columns={rightBomColumnArr} dataSource={rightBomTableTreeData} searc
阅读全文
摘要:解决办法:我在JS里面,这个rightSelectRef 是没有用到的。我去掉就解决了
阅读全文

浙公网安备 33010602011771号