{"id":13672837,"url":"https://github.com/EmilyYoung71415/web-excel","last_synced_at":"2025-04-28T04:30:28.842Z","repository":{"id":49864496,"uuid":"184576404","full_name":"EmilyYoung71415/web-excel","owner":"EmilyYoung71415","description":"类excel组件","archived":false,"fork":false,"pushed_at":"2021-06-09T18:03:06.000Z","size":1686,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-11T11:45:04.664Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EmilyYoung71415.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-02T12:24:31.000Z","updated_at":"2021-06-26T16:41:34.000Z","dependencies_parsed_at":"2022-09-05T10:51:12.475Z","dependency_job_id":null,"html_url":"https://github.com/EmilyYoung71415/web-excel","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmilyYoung71415%2Fweb-excel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmilyYoung71415%2Fweb-excel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmilyYoung71415%2Fweb-excel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmilyYoung71415%2Fweb-excel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmilyYoung71415","download_url":"https://codeload.github.com/EmilyYoung71415/web-excel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251251749,"owners_count":21559653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T09:01:51.001Z","updated_at":"2025-04-28T04:30:27.940Z","avatar_url":"https://github.com/EmilyYoung71415.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# web excel\n\n[在线预览](https://emilyyoung71415.github.io/web-excel/index.html)\n\n\u003cimg src=\"./screenshots/重构1-效果图.png\" width=\"800\" heght=\"600\"/\u003e\n\n运行\n===\n\n```bash\nnpm i\nnpm start\n```\n\n说明\n===\n\n功能：\n\n- [x] 坐标网格渲染\n- [x] 行列伸缩\n- [x] 滚动\n- [x] 单元格文字渲染处理(换行、溢出省略、居中)\n- [x] 选中框\n- [x] 编辑框 \n- [x] 单元格属性更改: 字体大小、字体加粗、字体颜色、单元格背景色\n- [ ] 合并单元格\n- [ ] 复制粘贴\n- [ ] 撤销前进\n\n⭐️ feature\n- 全面拥抱TS\n- 计算缓存\n- 单元格更新支持局部渲染\n- 更细致的分层：event(aciton) -\u003e command -\u003e datamodel -\u003e viewdata -\u003e render\n- 渲染机制更新：canvas声明式更新、dom命令式更新\n- 模块松耦\n- 事件系统\n- 开放view注册：registerview\n\n使用\n===\n\n直接在浏览器里引用\n\n```html\n\u003clink href=\"/styles/webexcel.css\" rel=\"stylesheet\"\u003e\u003c/head\u003e\n\u003cbody onload=\"load()\"\u003e\n    \u003cdiv id=\"app\"\u003e\n        \u003cdiv id=\"webexcel\"\u003e\u003c/div\u003e\n    \u003c/div\u003e\n    \u003cscript\u003e\n        function load() {\n            const myexcel = XWebExcel.create(\n                document.getElementById('app'), \n                {\n                    viewOption: {\n                        showToolbar: true,\n                        viewHeight: 600,\n                        viewWidth: 800,\n                    },\n                    interactOption: {\n                        canEdit: true \n                    }\n                }\n            );\n            // 棋盘数据\n            myexcel.griddata({\n                row: {\n                    size: 25,   // 行高\n                    len: 1200,    // 行总数\n                },\n                col: {\n                    size: 100,  // 列宽\n                    len: 140,\n                },\n                rowm: {// 特殊列 列高\n                    1: { size: 40}\n                },\n                // colm: {\n                //     1: { size: 60 },\n                //     4: { size: 140 }\n                // },\n            });\n            // 表格数据\n            myexcel.source({\n                cellmm: {\n                    1: {\n                        1: {\n                            text: '输入长文字测试截断',\n                            bgcolor: 'green',\n                            fontColor: '#fff',\n                            fontWeight: 'bold'\n                        },\n                    },\n                    3: {\n                        4: {\n                            bgcolor: 'lightblue',\n                            text: '输入文字2333333erewrwedewrew',\n                            fontWeight: 'bold'\n                        },\n                    },\n                },\n            });\n        }\n    \u003c/script\u003e\n    \u003cscript type=\"text/javascript\" src=\"/excel.js\"\u003e\u003c/script\u003e\n\u003c/body\u003e\n```\n\n原理概览\n===\n\n\u003cimg src=\"./screenshots/重构1-渲染原理图.png\" width=\"800\" heght=\"600\"/\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEmilyYoung71415%2Fweb-excel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEmilyYoung71415%2Fweb-excel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEmilyYoung71415%2Fweb-excel/lists"}