Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复了一些已有的问题 #865

Merged
merged 6 commits into from
Feb 25, 2022

Conversation

TMBigGroup
Copy link
Contributor

1. fix: 开放RichTextWidget调色盘

做了什么:之前在做BasicRichText模块的调色盘开发时,没有注意到RichTextWidget。把调色盘代码给提炼了一下,都开放了调色盘功能,后面如果有新的QuillRichText也需要开放,引入之后按照模板配置即可。

2. fix: 修复仪表盘富文本组件新增之后进行编辑就会报错的问题

事故现场:
1.新建一个仪表盘,仪表盘新建一个媒体组件富文本
2.富文本组件随便输入一些文字,并保存,仪表盘也保存
3.重新进入仪表盘的编辑页,且编辑该富文本
4.改动富文本内容,保存,仪表盘也保存
5.页面崩溃

事故分析:
预览和编辑都是共用一个组件,仪表盘保存会从编辑页切换到预览页,对于组件来说是没有变化的,这个时刻,预览页的富文本内容还未更新,会导致strContents !== JSON.stringify(initContent)验证通过,再次进行editBoardStackActions.changeMediaWidgetConfig操作

事故解决:
做好数据有效性验证,过滤无效逻辑。

3. fix: 修复明细表在无数据的时候也有tooltip提示的问题

事故现场:
1.新建一个明细表,明细表不要拖拽任何,保持无数据状态
2.鼠标移动到无数据的dom上,会有tooltip提示

事故解决:
tooltip做一下验证,无意义的单元格不进行tooltip包裹

4. fix: 修复因新增ChartDataSet模型 getCustomBodyRowStyle函数匹配时未做大写转换的问题

ChartDataSet模型会让数据Key默认为大写,使用的时候需要使用对应函数取值,这里的逻辑属于老代码逻辑,同步更新一下判断逻辑即可

<Td {...rest}>{children}</Td>
</Tooltip>
);
if (rest.className.includes('ellipsis')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是否会影响文本过长(使用ellipsis style)单元格的tooltip展示?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

使用ellipsis的单元格className会增加ellipsis类名
if (rest.className.includes('ellipsis')) { 刚好可以用这个区分有没有使用ellipsis的单元格(因为props里也没有别的信息可以做判断了 0.0)
因为默认的title太丑了所以默认增加了ellipsis: { showTitle: false, },配置,用tooltip展示

@@ -136,7 +136,11 @@ export const getCustomBodyRowStyle = (
color: { background, textColor },
target: { name },
}) => {
rowStyle = isMatchedTheCondition(rowRecord[name], operator, value)
rowStyle = isMatchedTheCondition(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️‍🔥

@qxqzx13 qxqzx13 merged commit 4fcd6d6 into running-elephant:dev Feb 25, 2022
@TMBigGroup TMBigGroup deleted the local/color branch March 3, 2022 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants