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.07k stars 619 forks source link

Using UMD to introduce univer, there is a display problem in the last row of the editing table [Bug] #2363

Closed Robert-Du0001 closed 5 months ago

Robert-Du0001 commented 5 months ago

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

受影响的包和版本

v0.1.12

复现链接

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Univer测试</title>
    <script src="https://unpkg.com/@univerjs/umd/lib/univer.full.umd.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/@univerjs/umd/lib/univer.css">
</head>

<body>
    <div style="height: 600px;" id="app"></div>

    <script>
        var {
            UniverCore,
            UniverDesign,
            UniverEngineRender,
            UniverEngineFormula,
            UniverDocs,
            UniverDocsUi,
            UniverUi,
            UniverSheets,
            UniverSheetsUi,
            UniverSheetsNumfmt,
            UniverSheetsFormula,
            UniverFacade,
        } = window

        var univer = new UniverCore.Univer({
            theme: UniverDesign.defaultTheme,
        });

        univer.registerPlugin(UniverEngineRender.UniverRenderEnginePlugin);
        univer.registerPlugin(UniverEngineFormula.UniverFormulaEnginePlugin);

        univer.registerPlugin(UniverUi.UniverUIPlugin, {
            container: "app",
            footer: false,
        });

        univer.registerPlugin(UniverDocs.UniverDocsPlugin, {
            hasScroll: false,
        });
        univer.registerPlugin(UniverDocsUi.UniverDocsUIPlugin);

        univer.registerPlugin(UniverSheets.UniverSheetsPlugin);
        univer.registerPlugin(UniverSheetsUi.UniverSheetsUIPlugin);
        univer.registerPlugin(UniverSheetsNumfmt.UniverSheetsNumfmtPlugin);
        univer.registerPlugin(UniverSheetsFormula.UniverSheetsFormulaPlugin);

        univer.createUnit(UniverCore.UniverInstanceType.UNIVER_SHEET, {
            "id": "gyI0JO",
            "sheetOrder": [
                "RSfWjJFv4opmE1JaiRj80"
            ],
            "name": "",
            "appVersion": "0.1.11",
            "locale": "zhCN",
            "styles": {},
            "sheets": {
                "RSfWjJFv4opmE1JaiRj80": {
                    "id": "RSfWjJFv4opmE1JaiRj80",
                    "name": "测试",
                    "tabColor": "",
                    "hidden": 0,
                    "rowCount": 30,
                    "columnCount": 10,
                    "zoomRatio": 1,
                    "freeze": {
                        "startRow": -1,
                        "startColumn": -1,
                        "ySplit": 0,
                        "xSplit": 0
                    },
                    "scrollTop": 0,
                    "scrollLeft": 0,
                    "defaultColumnWidth": 73,
                    "defaultRowHeight": 23,
                    "mergeData": [],
                    "cellData": {},
                    "rowData": {},
                    "columnData": {
                        "0": {
                            "w": 125,
                            "hd": 0
                        },
                        "1": {
                            "w": 125,
                            "hd": 0
                        },
                        "2": {
                            "w": 125,
                            "hd": 0
                        },
                        "3": {
                            "w": 125,
                            "hd": 0
                        },
                        "4": {
                            "w": 125,
                            "hd": 0
                        },
                        "5": {
                            "w": 125,
                            "hd": 0
                        },
                        "6": {
                            "w": 125,
                            "hd": 0
                        },
                        "7": {
                            "w": 125,
                            "hd": 0
                        },
                        "8": {
                            "w": 125,
                            "hd": 0
                        },
                        "9": {
                            "w": 125,
                            "hd": 0
                        }
                    },
                    "showGridlines": 1,
                    "rowHeader": {
                        "width": 46,
                        "hidden": 0
                    },
                    "columnHeader": {
                        "height": 20,
                        "hidden": 0
                    },
                    "selections": [
                        "A1"
                    ],
                    "rightToLeft": 0
                }
            },
            "resources": [
                {
                    "name": "SHEET_DEFINED_NAME_PLUGIN",
                    "data": ""
                }
            ]
        }
        )

        const univerAPI = UniverFacade.FUniver.newAPI(univer)
    </script>
</body>

</html>

预期行为

最后一行在编辑时也应该正常显示

实际行为

最后一行出现显示错误

https://github.com/dream-num/univer/assets/29976859/f936aa80-1e3c-4317-8416-2d572ea7ebb2

运行环境

No response

系统信息

No response

univer-bot[bot] commented 5 months ago

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

Origin Title: 使用UMD引入univer,编辑表格最后一行有显示问题[Bug]

Title: Using UMD to introduce univer, there is a display problem in the last row of the editing table [Bug]


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

Affected packages and versions

v0.1.12

Recurrence link

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Univer Test</title>
    <script src="https://unpkg.com/@univerjs/umd/lib/univer.full.umd.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/@univerjs/umd/lib/univer.css">
</head>

<body>
    <div style="height: 600px;" id="app"></div>

    <script>
        var {
            UniverCore,
            UniverDesign,
            UniverEngineRender,
            UniverEngineFormula,
            UniverDocs,
            UniverDocsUi,
            UniverUi,
            UniverSheets,
            UniverSheetsUi,
            UniverSheetsNumfmt,
            UniverSheetsFormula,
            UniverFacade,
        } = window

        var univer = new UniverCore.Univer({
            theme: UniverDesign.defaultTheme,
        });

        univer.registerPlugin(UniverEngineRender.UniverRenderEnginePlugin);
        univer.registerPlugin(UniverEngineFormula.UniverFormulaEnginePlugin);

        univer.registerPlugin(UniverUi.UniverUIPlugin, {
            container: "app",
            footer: false,
        });

        univer.registerPlugin(UniverDocs.UniverDocsPlugin, {
            hasScroll: false,
        });
        univer.registerPlugin(UniverDocsUi.UniverDocsUIPlugin);

        univer.registerPlugin(UniverSheets.UniverSheetsPlugin);
        univer.registerPlugin(UniverSheetsUi.UniverSheetsUIPlugin);
        univer.registerPlugin(UniverSheetsNumfmt.UniverSheetsNumfmtPlugin);
        univer.registerPlugin(UniverSheetsFormula.UniverSheetsFormulaPlugin);

        univer.createUnit(UniverCore.UniverInstanceType.UNIVER_SHEET, {
            "id": "gyI0JO",
            "sheetOrder": [
                "RSfWjJFv4opmE1JaiRj80"
            ],
            "name": "",
            "appVersion": "0.1.11",
            "locale": "zhCN",
            "styles": {},
            "sheets": {
                "RSfWjJFv4opmE1JaiRj80": {
                    "id": "RSfWjJFv4opmE1JaiRj80",
                    "name": "test",
                    "tabColor": "",
                    "hidden": 0,
                    "rowCount": 30,
                    "columnCount": 10,
                    "zoomRatio": 1,
                    "freeze": {
                        "startRow": -1,
                        "startColumn": -1,
                        "ySplit": 0,
                        "xSplit": 0
                    },
                    "scrollTop": 0,
                    "scrollLeft": 0,
                    "defaultColumnWidth": 73,
                    "defaultRowHeight": 23,
                    "mergeData": [],
                    "cellData": {},
                    "rowData": {},
                    "columnData": {
                        "0": {
                            "w": 125,
                            "hd": 0
                        },
                        "1": {
                            "w": 125,
                            "hd": 0
                        },
                        "2": {
                            "w": 125,
                            "hd": 0
                        },
                        "3": {
                            "w": 125,
                            "hd": 0
                        },
                        "4": {
                            "w": 125,
                            "hd": 0
                        },
                        "5": {
                            "w": 125,
                            "hd": 0
                        },
                        "6": {
                            "w": 125,
                            "hd": 0
                        },
                        "7": {
                            "w": 125,
                            "hd": 0
                        },
                        "8": {
                            "w": 125,
                            "hd": 0
                        },
                        "9": {
                            "w": 125,
                            "hd": 0
                        }
                    },
                    "showGridlines": 1,
                    "rowHeader": {
                        "width": 46,
                        "hidden": 0
                    },
                    "columnHeader": {
                        "height": 20,
                        "hidden": 0
                    },
                    "selections": [
                        "A1"
                    ],
                    "rightToLeft": 0
                }
            },
            "resources": [
                {
                    "name": "SHEET_DEFINED_NAME_PLUGIN",
                    "data": ""
                }
            ]
        }
        )

        const univerAPI = UniverFacade.FUniver.newAPI(univer)
    </script>
</body>

</html>

Expected behavior

The last line should also display normally when editing

Actual behavior

An error occurs on the last line

https://github.com/dream-num/univer/assets/29976859/f936aa80-1e3c-4317-8416-2d572ea7ebb2

Running environment

No response

system message

No response

jikkai commented 5 months ago

I'm unable to reproduce the issue you've described. Please provide a link that demonstrates the problem you're facing.

For now, I'm going to close this issue. However, feel free to reopen it at any time once you can provide more information that allows us to replicate the issue.

Robert-Du0001 commented 5 months ago

抱歉,我想提供一个完整的示例,但是文件太大,stackblitz保存不了

image

我在只能先分享个通过CDN引入的例子https://stackblitz.com/edit/stackblitz-starters-xu15fo?file=index.html,但是这个是看不到效果的,因为stackblitz加截不出来。

需要手动换成本地文件

image

改成这样

image

然后在双击最后一行就能看到问题

image

univer-bot[bot] commented 5 months ago

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

Sorry, I wanted to provide a complete example, but the file is too large and stackblitz can't save it

image

I can only share an example introduced through CDN [https://stackblitz.com/edit/stackblitz-starters-xu15fo?file=index.html](https://stackblitz.com/edit/stackblitz-starters- xu15fo?file=index.html), but the effect cannot be seen because stackblitz cannot intercept it.

Need to manually change to local file

image

Change it to this

image

Then double-click the last line to see the problem

image