dream-num / univer

Univer is an Isomorphic Full-Stack Framework for Creating and Editing Spreadsheets, Docs, and Slides Across Web and Server
https://univer.ai
Apache License 2.0
7.15k stars 629 forks source link

[Bug] When the cell is in numeric format, the processing of reducing the cell width is different from that in general Excel. #3112

Open mukiwu opened 3 months ago

mukiwu commented 3 months ago

在您提交此问题之前,您是否检查了以下内容?

受影响的包和版本

v0.2.7

复现链接

https://univer.ai/zh-CN/examples/sheets

预期行为

如果今天輸入的是數字或浮點數,預設會靠右對齊。 當我縮小儲存格寬度時,一般的 Excel (ex. google doc) 他會從右邊的數字開始切掉,而不是從左邊,但 Univer sheet 剛好相反,導致如果是浮點數的話,會看不到整數位

我以 1.234567890 為 demo

這是 google doc 縮小的樣子:

截圖 2024-08-19 10 28 07

這是 univer sheet 縮小的樣子

截圖 2024-08-19 10 32 43

实际行为

这是 google doc 缩小的样子:

截图 2024-08-19 10 28 07

这是 univer sheet 缩小的样子

截图 2024-08-19 10 32 43

不确定这是 feature 还是 bug,但如果宽度不够时,可以保留的是整数码,可能比较好识别

运行环境

Chrome

系统信息

No response

univer-bot[bot] commented 3 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

Origin Title: [Bug] 当单元格是数字体态时,缩小单元格宽度的处理跟一般的 Excel 不同

Title: [Bug] When the cell is in numeric format, the processing of reducing the cell width is different from that in general Excel.


Before you submitted this question, did you check the following?

Affected packages and versions

v0.2.7

Recurrence link

https://univer.ai/zh-CN/examples/sheets

Expected behavior

If you enter a number or floating point number today, it will be aligned to the right by default. When I reduce the cell width, general Excel (ex. google doc) will start cutting off the numbers on the right instead of the left, but the Univer sheet is just the opposite, resulting in the integer not being visible if it is a floating point number. Bit

I used 1.234567890 as demo

This is what the google doc looks like when zoomed out:

Screenshot 2024-08-19 10 28 07

This is what the univer sheet looks like when zoomed out

Screenshot 2024-08-19 10 32 43

Actual behavior

This is what the google doc looks like when zoomed out:

Screenshot 2024-08-19 10 28 07

This is what the univer sheet looks like when zoomed out

Screenshot 2024-08-19 10 32 43

Not sure if this is a feature or a bug, but if the width is not enough, integer numbers can be retained, which may be easier to identify.

Running environment

Chrome

System information

No response