Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/S2Public

是否能把行头列头设置成可自选的模式?是否能将合并单元格的功能做成真正的将合并后的单元格的数值进行相加,而不是只是简单的显示 附图#2797

annisFromchina started this conversation inIdeas
Discussion options

是否能把行头列头设置成可自选的模式?我自己P了一个简易图
ideaOfAnTvS201

是否能将合并单元格的功能做成真正的将合并后的单元格的数值进行相加,而不是只是简单的显示
ideaOfAnTvS202

You must be logged in to vote

Replies: 1 comment

Comment options

是否能把行头列头设置成可自选的模式

目前没开放配置, 感兴趣可以来个 PR, 比较简单.

// 开启不允许为空后,如果当前有且仅有一个item时,需要禁用拖动
constisDragDisabled=!allowEmpty&&items.length===1;

是否能将合并单元格的功能做成真正的将合并后的单元格的数值进行相加,而不是只是简单的显示

合并单元格的能力比较弱, 人力有限, 不是后续迭代的重点, 目前是是参考的 Excel 的行为 保留左上角的文字, 如你需要求和, 可以参考自定义合并单元格 的示例.

classCustomMergedCellextendsMergedCell{// 重写绘制文本getFieldValue(){const[groupA]=this.spreadsheet.options.mergedCellsInfo||[]// 根据行列索引拿到合并之前单元格的值constfieldValues=groupA.map(({rowIndex, colIndex})=>{constmeta=this.spreadsheet.facet.getCellMeta(rowIndex,colIndex)returnmeta.fieldValue})constsum=fieldValues.reduce((a,b)=>a+b,0)returnsum}getTextPosition(){constdefaultTextPosition=super.getTextPosition()const{ x, y, width, height}=this.metaconsole.log(this.meta)return{      ...defaultTextPosition,// 重写文本位置// x: 0,// y: 0}}}

image

image

如果后续反馈的人较多, 会考虑内置, 欢迎 PR.

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Ideas
Labels
None yet
2 participants
@annisFromchina@lijinke666

[8]ページ先頭

©2009-2025 Movatter.jp