├── .eslintignore ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── bug_report_zh.md │ ├── feature_request.md │ └── feature_request_zh.md └── workflows │ ├── gitee-mirror.yml │ ├── github-demo.yml │ └── github-doc.yml ├── .gitignore ├── .prettierignore ├── .prettierrc.json ├── CHANGELOG.md ├── LICENSE ├── README-zh.md ├── README.md ├── commitlint.config.js ├── deploy.bat ├── docs ├── .vuepress │ ├── config.js │ └── public │ │ ├── favicon.ico │ │ └── img │ │ ├── LuckysheetDemo.gif │ │ ├── QQ群二维码.jpg │ │ ├── excel.png │ │ ├── logo.png │ │ ├── logo_text.png │ │ └── 微信二维码.jpg ├── README.md ├── about │ ├── README.md │ ├── company.md │ └── sponsor.md ├── guide │ ├── FAQ.md │ ├── README.md │ ├── api.md │ ├── cell.md │ ├── config.md │ ├── contribute.md │ ├── data.md │ ├── operate.md │ ├── resource.md │ └── sheet.md └── zh │ ├── README.md │ ├── about │ ├── README.md │ ├── company.md │ └── sponsor.md │ └── guide │ ├── FAQ.md │ ├── README.md │ ├── api.md │ ├── cell.md │ ├── config.md │ ├── contribute.md │ ├── operate.md │ ├── resource.md │ └── sheet.md ├── gulpfile.js ├── package.json └── src ├── assets └── iconfont │ ├── Anton-Regular.ttf │ ├── HanaleiFill-Regular.ttf │ ├── Pacifico-Regular.ttf │ ├── demo.css │ ├── demo_index.html │ ├── iconfont.css │ ├── iconfont.eot │ ├── iconfont.js │ ├── iconfont.json │ ├── iconfont.svg │ ├── iconfont.ttf │ ├── iconfont.woff │ └── iconfont.woff2 ├── config.js ├── controllers ├── alternateformat.js ├── cellDatePickerCtrl.js ├── cellFormat.js ├── conditionformat.js ├── constant.js ├── controlHistory.js ├── dataVerificationCtrl.js ├── dropCell.js ├── expendPlugins.js ├── filter.js ├── formulaBar.js ├── freezen.js ├── handler.js ├── hyperlinkCtrl.js ├── ifFormulaGenerator.js ├── imageCtrl.js ├── imageUpdateCtrl.js ├── inlineString.js ├── insertFormula.js ├── keyboard.js ├── listener.js ├── locationCell.js ├── luckysheetConfigsetting.js ├── matrixOperation.js ├── menuButton.js ├── mobile.js ├── moreFormat.js ├── orderBy.js ├── pivotTable.js ├── postil.js ├── protection.js ├── resize.js ├── rowColumnOperation.js ├── searchReplace.js ├── select.js ├── selection.js ├── server.js ├── sheetBar.js ├── sheetMove.js ├── sheetSearch.js ├── sheetmanage.js ├── sparkline.js ├── splitColumn.js ├── toolbar.js ├── updateCell.js └── zoom.js ├── core.js ├── css ├── EwaAntH.gif ├── EwaAntV.gif ├── arrow-down.png ├── iconCustom.css ├── loading.gif ├── luckysheet-cellFormat.css ├── luckysheet-core.css ├── luckysheet-protection.css ├── luckysheet-zoom.css ├── menuSprite.svg ├── paint_16px.ico ├── paint_24px.ico ├── paint_32px.ico ├── sprite38.svg └── waffle_sprite.png ├── data └── chartJson.js ├── demoData ├── chat.js ├── demoFeature.js ├── getTargetData.js ├── sheetCell.js ├── sheetChart.js ├── sheetComment.js ├── sheetConditionFormat.js ├── sheetDataVerification.js ├── sheetFormula.js ├── sheetPicture.js ├── sheetPivotTable.js ├── sheetPivotTableData.js ├── sheetSparkline.js └── sheetTable.js ├── expendPlugins ├── chart │ ├── chartmix.css │ ├── chartmix.umd.min.js │ ├── chartmix.umd.min.js.map │ └── plugin.js ├── exportXlsx │ └── plugin.js └── print │ ├── plugin.js │ ├── print.css │ └── print.js ├── fonts ├── FontAwesome.otf ├── fontawesome-webfont.eot ├── fontawesome-webfont.svg ├── fontawesome-webfont.ttf ├── fontawesome-webfont.woff └── fontawesome-webfont.woff2 ├── function ├── func.js ├── functionImplementation.js ├── functionListDescriptor.js ├── functionlist.js ├── getLocalizedFunctionList.js ├── luckysheet_function.js └── matrix_methods.js ├── global ├── analysis.js ├── api.js ├── array.js ├── border.js ├── browser.js ├── cleargridelement.js ├── count.js ├── createdom.js ├── createsheet.js ├── cursorPos.js ├── datecontroll.js ├── draw.js ├── dynamicArray.js ├── editor.js ├── extend.js ├── format.js ├── formula.js ├── func_methods.js ├── getRowlen.js ├── getdata.js ├── json.js ├── loading.js ├── location.js ├── method.js ├── refresh.js ├── rhchInit.js ├── scroll.js ├── setdata.js ├── sort.js ├── tooltip.js └── validate.js ├── index.html ├── index.js ├── locale ├── en.js ├── es.js ├── locale.js ├── zh.js └── zh_tw.js ├── methods ├── get.js └── set.js ├── plugins ├── css │ └── spectrum.min.css ├── font-awesome.min.css ├── images │ ├── CFcolorGradation.png │ ├── CFdataBar.png │ ├── CFicons.png │ ├── icon_dropCell.png │ ├── js.png │ ├── ui-icons_444444_256x240.png │ ├── ui-icons_555555_256x240.png │ ├── ui-icons_777620_256x240.png │ ├── ui-icons_777777_256x240.png │ ├── ui-icons_cc0000_256x240.png │ └── ui-icons_ffffff_256x240.png ├── jquery-ui.min.css ├── jquery-ui.theme.min.css ├── jquery.sPage.css └── js │ ├── clipboard.min.js │ ├── crypto-api.min.js │ ├── html2canvas.min.js │ ├── jquery-ui.min.js │ ├── jquery.mousewheel.min.js │ ├── jquery.sPage.min.js │ ├── jstat.min.js │ ├── localforage.min.js │ ├── lodash.min.js │ └── spectrum.min.js ├── store └── index.js └── utils ├── chartUtil.js ├── math.js ├── polyfill.js └── util.js /.eslintignore: -------------------------------------------------------------------------------- 1 | src 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # [mengshukeji] 4 | patreon: mengshukeji 5 | open_collective: luckysheet 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ['https://www.paypal.me/wbfsa'] 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG]Find a bug" 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | **Describe the bug** 17 | 18 | 19 | **To Reproduce** 20 | 21 | 1. The first step: 22 | 2. The second step: 23 | 3. The third step: 24 | 4. See error: 25 | 26 | **What is expected?** 27 | 28 | 29 | **Screenshots or demo** 30 | 31 | 32 | **Environment** 33 | - OS: 34 | - Browser Version: 35 | - Luckysheet Version: 36 | 37 | **Additional context** 38 | 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report_zh.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: '错误报告' 3 | about: 创建报告帮助我们改进 4 | title: '[BUG]发现了个bug' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | **描述错误** 17 | 18 | 19 | **重现** 20 | 21 | 1. 第一步操作: 22 | 2. 第二步操作: 23 | 3. 第三步操作: 24 | 4. 最后看到了什么错误: 25 | 26 | **期望的结果** 27 | 28 | 29 | **屏幕截图或演示** 30 | 31 | 32 | **环境:** 33 | - 操作系统: 34 | - 浏览器 版本号: 35 | - Luckysheet版本: 36 | 37 | **备注** 38 | 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "[Feature request]I have an idea" 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | **Is your feature request related to a problem? Please describe.** 17 | 18 | 19 | **Describe the solution you'd like** 20 | 21 | 22 | **Additional context** 23 | 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request_zh.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 功能要求 3 | about: 为这个项目提出想法 4 | title: "[Feature request]我有个点子" 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | **您的功能请求与问题有关吗?** 17 | 18 | 19 | 20 | **描述您想要的解决方案** 21 | 22 | 23 | **其他内容** 24 | 25 | -------------------------------------------------------------------------------- /.github/workflows/gitee-mirror.yml: -------------------------------------------------------------------------------- 1 | # 使用 GitHub Action 来解决手动同步到 Gitee 的问题 2 | # 效果:github repo 代码更新之后,会自动同步至 gitee 3 | # 使用到的 GitHub Action:https://github.com/Yikun/hub-mirror-action 4 | 5 | # This is a basic workflow to help you get started with Actions 6 | 7 | name: gitee-mirror 8 | 9 | # Controls when the action will run. Triggers the workflow on push or pull request 10 | # events but only for the master branch 11 | on: 12 | push: 13 | branches: 14 | - '*' 15 | 16 | jobs: 17 | # This workflow contains a single job called "build" 18 | build: 19 | # The type of runner that the job will run on 20 | runs-on: ubuntu-latest 21 | 22 | # Steps represent a sequence of tasks that will be executed as part of the job 23 | steps: 24 | - name: Mirror the Github organization repos to Gitee. 25 | uses: Yikun/hub-mirror-action@master 26 | with: 27 | src: github/mengshukeji 28 | dst: gitee/mengshukeji 29 | # 这里请填写与gitee上公钥匹配的的 ssh private key,参见:https://gitee.com/profile/sshkeys 30 | # 填写地址:https://github.com/ly525/luban-h5/settings/secrets 31 | dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} 32 | # 这里请填写 gitee的令牌,参见:https://gitee.com/profile/personal_access_tokens 33 | # 填写地址:https://github.com/ly525/luban-h5/settings/secrets 34 | dst_token: ${{ secrets.GITEE_TOKEN }} 35 | # 项目同步白名单,可以选择填写多个,以英文逗号分割 36 | static_list: "Luckyexcel,Luckysheet,LuckysheetDemo,LuckyexcelDemo,LuckysheetDocs,chartMix,LuckysheetServer" 37 | # 是否强制同步 38 | force_update: true 39 | # 账号类型:对 luban-h5 而言是 user,因为是个人项目;如果是企业项目,请填写 org,因为是组织下的项目 40 | account_type: user 41 | -------------------------------------------------------------------------------- /.github/workflows/github-demo.yml: -------------------------------------------------------------------------------- 1 | name: Luckysheet demo github pages deploy 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v*' 7 | 8 | jobs: 9 | publish: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout # 检查项目 13 | uses: actions/checkout@v2 14 | 15 | - name: Set up Node.js # Nodejs版本 16 | uses: actions/setup-node@master 17 | with: 18 | node-version: 12.13.0 19 | 20 | - name: Install dependencies & Generate static files # 安装依赖打包demo和文档 21 | run: | 22 | node -v 23 | npm install 24 | npm install gulp -g 25 | npm run build 26 | 27 | - name: Deploy LuckysheetDemo to GitHub Pages # 发布demo 到github pages 28 | if: success() 29 | uses: crazy-max/ghaction-github-pages@v2 30 | with: 31 | repo: mengshukeji/LuckysheetDemo 32 | target_branch: gh-pages 33 | build_dir: dist 34 | env: 35 | GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/github-doc.yml: -------------------------------------------------------------------------------- 1 | name: Luckysheet docs github pages deploy 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'doc*' 7 | 8 | jobs: 9 | publish: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout # 检查项目 13 | uses: actions/checkout@v2 14 | 15 | - name: Set up Node.js # Nodejs版本 16 | uses: actions/setup-node@master 17 | with: 18 | node-version: 12.13.0 19 | 20 | - name: Install dependencies & Generate static files # 安装依赖打包demo和文档 21 | run: | 22 | node -v 23 | npm install 24 | npm install gulp -g 25 | npm run docs:build 26 | 27 | - name: Deploy LuckysheetDocs to GitHub Pages # 发布docs 到github pages 28 | if: success() 29 | uses: crazy-max/ghaction-github-pages@v2 30 | with: 31 | repo: mengshukeji/LuckysheetDocs 32 | target_branch: gh-pages 33 | build_dir: docs/.vuepress/dist 34 | env: 35 | GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | package-lock.json 4 | yarn.lock 5 | dist 6 | docs/.vuepress/dist 7 | src/expendPlugins/print/print.js 8 | 9 | .idea 10 | .history 11 | .vs 12 | .vscode -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | dist 2 | 3 | *.css 4 | *.html 5 | *.md 6 | *.yml 7 | *.min.js 8 | package.json 9 | package-lock.json 10 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "trailingComma": "es5", 4 | "tabWidth": 2, 5 | "semi": true, 6 | "singleQuote": false, 7 | "arrowParens": "avoid" 8 | } 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2020-present, Mengshukeji 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@commitlint/config-conventional'] 3 | } 4 | -------------------------------------------------------------------------------- /deploy.bat: -------------------------------------------------------------------------------- 1 | # deploy Demo 2 | npm run build 3 | cd dist 4 | git init 5 | git remote add origin https://github.com/mengshukeji/LuckysheetDemo.git 6 | git config --local user.email "1414556676@qq.com" 7 | git config --local user.name "Dushusir" 8 | git add . 9 | git commit -m 'deploy Luckysheet demo' 10 | git push -f origin master:gh-pages 11 | 12 | # =============================================== 13 | 14 | # deploy Docs 15 | npm run docs:build 16 | cd docs/.vuepress/dist 17 | git init 18 | git remote add origin https://github.com/mengshukeji/LuckysheetDocs.git 19 | git add . 20 | git commit -m 'deploy Luckysheet docs' 21 | git push -f origin master:gh-pages 22 | 23 | # =============================================== 24 | 25 | # add a tags 26 | git tag -a doc -m "doc" 27 | 28 | 29 | # replease 30 | npm run build 31 | npm run release -- --release-as patch 32 | git push --follow-tags origin master 33 | npm publish 34 | 35 | # only publish 36 | npm run build 37 | git add . 38 | npm run commit 39 | npm version patch 40 | git push -u origin master 41 | npm publish 42 | 43 | 44 | # ============================================== 45 | 46 | # test feature branch 47 | git checkout -b fea origin/feature 48 | git pull 49 | 50 | ## After some test, create PR merge feature to master branch 51 | 52 | git checkout master 53 | git branch -d fea 54 | 55 | # =============================================== 56 | 57 | # test pull request: https://docs.github.com/cn/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally 58 | 59 | # 139 is ID, dev is branch name 60 | git fetch origin pull/139/head:test-139 61 | git checkout test-139 62 | # test code 63 | git push origin test-139 64 | # create new PR ,merge test-139 to master 65 | 66 | # list all remote and local branchs 67 | git branch -a 68 | # delete remote branch 69 | git push origin --delete dev 70 | git checkout master 71 | # delete local branch 72 | git branch -d dev 73 | 74 | # pr 75 | ## 1. fork 到自己的仓库 76 | 77 | ## 2. git clone 到本地 78 | 79 | ## 3. 上游建立连接 80 | git remote add upstream https://github.com/mengshukeji/Luckysheet.git 81 | 82 | ## 4. 创建开发分支 83 | git checkout -b dev 84 | 85 | ## 5. 修改提交代码 86 | git add . 87 | git commit -m "add" 88 | git push origin dev 89 | 90 | ## 6. 同步代码,将最新代码同步到本地 91 | git fetch upstream 92 | git rebase upstream/master 93 | 94 | ## 7. 如果有冲突(没有可以略过) 95 | git status # 查看冲突文件,并修改冲突 96 | git add . 97 | git rebase --continue 98 | 99 | ## 8.提交分支代码 100 | git push origin dev 101 | 102 | ## 7. 提交pr 103 | 去自己github仓库对应fork的项目下new pull request -------------------------------------------------------------------------------- /docs/.vuepress/config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | base: '/LuckysheetDocs/', 3 | locales: { 4 | // 键名是该语言所属的子路径 5 | // 作为特例,默认语言可以使用 '/' 作为其路径。 6 | '/': { 7 | lang: 'en-US', // 将会被设置为 的 lang 属性 8 | title: 'Luckysheet Document', 9 | description: 'Luckysheet is an online spreadsheet like excel that is powerful, simple to configure, and completely open source.This site contains official configuration document, API, and tutorial.' 10 | }, 11 | '/zh/': { 12 | lang: 'zh-CN', 13 | title: 'Luckysheet文档', 14 | description: 'Luckysheet ,一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。本站包含官方配置文档,API,教程。' 15 | }, 16 | 17 | }, 18 | themeConfig: { 19 | domain: 'https://dream-num.github.io/LuckysheetDemo', 20 | logo: '/img/logo.png', 21 | author: 'Luckysheet', 22 | // 仓库地址 23 | repo: 'mengshukeji/Luckysheet', 24 | // 允许编辑链接文字 25 | editLinks: true, 26 | // 仓库的文档目录 27 | docsDir: 'docs', 28 | // 页面滚动 29 | smoothScroll: true, 30 | locales: { 31 | '/': { 32 | selectText: 'Languages', 33 | label: 'English', 34 | ariaLabel: 'Select language', 35 | editLinkText: 'Edit this page on GitHub', 36 | lastUpdated: 'Last Updated', 37 | serviceWorker: { 38 | updatePopup: { 39 | message: "New content is available.", 40 | buttonText: "Refresh" 41 | } 42 | }, 43 | nav: [ 44 | { text: 'Home', link: '/' }, 45 | { text: 'Guide', link: '/guide/' }, 46 | { text: 'Demo', link: 'https://dream-num.github.io/LuckysheetDemo/' }, 47 | { 48 | text: 'More', 49 | ariaLabel: 'More', 50 | items: [ 51 | { text: 'About', link: '/about/' } 52 | ] 53 | }, 54 | ], 55 | // 侧边栏 56 | sidebar: { 57 | '/guide/': [ 58 | '', 59 | 'config', 60 | 'sheet', 61 | 'cell', 62 | 'operate', 63 | 'api', 64 | 'resource', 65 | 'FAQ', 66 | 'contribute' 67 | ], 68 | '/about/': [ 69 | '', 70 | 'sponsor', 71 | 'company' 72 | ], 73 | }, 74 | }, 75 | '/zh/': { 76 | // 多语言下拉菜单的标题 77 | selectText: '选择语言', 78 | // 该语言在下拉菜单中的标签 79 | label: '简体中文', 80 | ariaLabel: '选择语言', 81 | // 编辑链接文字 82 | editLinkText: '在 GitHub 上编辑此页', 83 | lastUpdated: '上次更新', 84 | // Service Worker 的配置 85 | serviceWorker: { 86 | updatePopup: { 87 | message: "发现新内容可用.", 88 | buttonText: "刷新" 89 | } 90 | }, 91 | // 导航栏 92 | nav: [ 93 | { text: '首页', link: '/zh/' }, 94 | { text: '指南', link: '/zh/guide/' }, 95 | { text: '演示', link: 'https://dream-num.github.io/LuckysheetDemo/' }, 96 | { 97 | text: '了解更多', 98 | ariaLabel: '了解更多', 99 | items: [ 100 | { text: '关于', link: '/zh/about/' } 101 | ] 102 | }, 103 | ], 104 | // 侧边栏 105 | sidebar: { 106 | '/zh/guide/': [ 107 | '', 108 | 'config', 109 | 'sheet', 110 | 'cell', 111 | 'operate', 112 | 'api', 113 | 'resource', 114 | 'FAQ', 115 | 'contribute' 116 | ], 117 | '/zh/about/': [ 118 | '', 119 | 'sponsor', 120 | 'company' 121 | ], 122 | }, 123 | }, 124 | 125 | }, 126 | }, 127 | plugins: { 128 | 'vuepress-plugin-baidu-autopush': {}, 129 | 'sitemap': { 130 | hostname: 'https://dream-num.github.io/LuckysheetDocs' 131 | }, 132 | 'vuepress-plugin-code-copy': true, 133 | 'seo': { 134 | siteTitle: (_, $site) => $site.title, 135 | title: $page => $page.title, 136 | description: $page => $page.frontmatter.description, 137 | author: (_, $site) => $site.themeConfig.author, 138 | tags: $page => $page.frontmatter.tags, 139 | twitterCard: _ => 'summary_large_image', 140 | type: $page => ['guide'].some(folder => $page.regularPath.startsWith('/' + folder)) ? 'article' : 'website', 141 | url: (_, $site, path) => ($site.themeConfig.domain || '') + path, 142 | image: ($page, $site) => $page.frontmatter.image && (($site.themeConfig.domain && !$page.frontmatter.image.startsWith('http') || '') + $page.frontmatter.image), 143 | publishedAt: $page => $page.frontmatter.date && new Date($page.frontmatter.date), 144 | modifiedAt: $page => $page.lastUpdated && new Date($page.lastUpdated), 145 | } 146 | } 147 | } -------------------------------------------------------------------------------- /docs/.vuepress/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dream-num/Luckysheet/60bdffd5cff3f00e5d6fdec6aa1ad6c7d7797738/docs/.vuepress/public/favicon.ico -------------------------------------------------------------------------------- /docs/.vuepress/public/img/LuckysheetDemo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dream-num/Luckysheet/60bdffd5cff3f00e5d6fdec6aa1ad6c7d7797738/docs/.vuepress/public/img/LuckysheetDemo.gif -------------------------------------------------------------------------------- /docs/.vuepress/public/img/QQ群二维码.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dream-num/Luckysheet/60bdffd5cff3f00e5d6fdec6aa1ad6c7d7797738/docs/.vuepress/public/img/QQ群二维码.jpg -------------------------------------------------------------------------------- /docs/.vuepress/public/img/excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dream-num/Luckysheet/60bdffd5cff3f00e5d6fdec6aa1ad6c7d7797738/docs/.vuepress/public/img/excel.png -------------------------------------------------------------------------------- /docs/.vuepress/public/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dream-num/Luckysheet/60bdffd5cff3f00e5d6fdec6aa1ad6c7d7797738/docs/.vuepress/public/img/logo.png -------------------------------------------------------------------------------- /docs/.vuepress/public/img/logo_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dream-num/Luckysheet/60bdffd5cff3f00e5d6fdec6aa1ad6c7d7797738/docs/.vuepress/public/img/logo_text.png -------------------------------------------------------------------------------- /docs/.vuepress/public/img/微信二维码.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dream-num/Luckysheet/60bdffd5cff3f00e5d6fdec6aa1ad6c7d7797738/docs/.vuepress/public/img/微信二维码.jpg -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | home: true 3 | heroText: Luckysheet 4 | tagline: Configuration Document · API · Tutorial 5 | actionText: Get Started → 6 | actionLink: /guide/ 7 | features: 8 | - title: Powerful Features 9 | details: Contains a large number of commonly used spreadsheet functions to replace your excel 10 | - title: Simple Configuration 11 | details: Get started with minimal configuration 12 | - title: Open Source 13 | details: Community driven, work together to improve your ideas 14 | footer: MIT Licensed | Copyright © 2020-present Mengshukeji 15 | --- -------------------------------------------------------------------------------- /docs/about/README.md: -------------------------------------------------------------------------------- 1 | # Meet the Team 2 | 3 | Luckysheet is a project led by an individual and jointly developed by several friends with the same interests. 4 | 5 | ### Active Core Team Members 6 | - [@wbfsa](https://github.com/wbfsa) 7 | - [@eiji-th](https://github.com/eiji-th) 8 | - [@fly-95](https://github.com/fly-95) 9 | - [@tonytonychopper123](https://github.com/tonytonychopper123) 10 | - [@Dushusir](https://github.com/Dushusir) 11 | - [@iamxuchen800117](https://github.com/iamxuchen800117) 12 | - [@wpxp123456](https://github.com/wpxp123456) 13 | - [@c19c19i](https://weibo.com/u/3884623955) 14 | - [@zhangchen915](https://github.com/zhangchen915) 15 | - [@jerry-f](https://github.com/jerry-f) 16 | - [@flowerField](https://github.com/flowerField) 17 | 18 | ### Community Partners 19 | - [@yiwasheng](https://github.com/yiwasheng) 20 | - [@danielcai1987](https://github.com/danielcai1987) 21 | - [@qq6690876](https://github.com/qq6690876) 22 | - [@javahuang](https://github.com/javahuang) 23 | - [@TimerGang](https://github.com/TimerGang) 24 | - [@gsw945](https://github.com/gsw945) 25 | - [@swen-xiong](https://github.com/swen-xiong) 26 | - [@lzmch](https://github.com/lzmch) 27 | - [@kdevilpf](https://github.com/kdevilpf) 28 | - [@WJWM0316](https://github.com/WJWM0316) -------------------------------------------------------------------------------- /docs/about/company.md: -------------------------------------------------------------------------------- 1 | # Community case 2 | 3 | We collected a lot of case feedback from the community, and also discovered Luckysheet usage scenarios that we did not expect before. 4 | 5 | It is our responsibility to actively listen to the voice of the community, and to continuously update and iterate with your support and feedback. 6 | 7 | 8 | ## Company Case 9 | 10 | 11 | 12 | 13 | 19 | 25 | 31 | 37 | 38 | 39 | 41 | 43 | 45 | 47 | 48 | 49 |
14 | 15 | 16 | 17 |

雄安智评云数字科技有限公司

18 |
20 | 21 | 22 | 23 |

Code the Future

24 |
26 | 27 | 28 | 29 |

吉客云

30 |
32 | 33 | 34 | 35 |

华为

36 |
40 | 42 | 44 | 46 |
-------------------------------------------------------------------------------- /docs/about/sponsor.md: -------------------------------------------------------------------------------- 1 | # Sponsor 2 | 3 | ## Why sponsor 4 | 5 | If you run a business and is using Luckysheet in a revenue-generating product, it would make business sense to sponsor Luckysheet development: it ensures the project that your product relies on stays healthy and actively maintained. It can also help your exposure in the Luckysheet community and more people pay attention to your products. 6 | 7 | Of course, individual users are also welcome to buy author a glass of juice if Luckysheet has helped you in your work or personal projects 😋. 8 | 9 | ## How to sponsor 10 | 11 | Luckysheet is an MIT-licensed open source project with its ongoing development made possible entirely by the support of these awesome [**backers**](#sponsors-list). If you'd like to join them, please consider: 12 | 13 | - [Become a backer or sponsor on Patreon](https://www.patreon.com/mengshukeji). 14 | - [Become a backer or sponsor on Open Collective](https://opencollective.com/luckysheet). 15 | - One-time donation via PayPal, WeChat or Alipay 16 | 17 | | PayPal | WeChat | Alipay | 18 | |---|---|---| 19 | | [Paypal Me](https://www.paypal.me/wbfsa) | | | 20 | 21 | ### What's the difference between Patreon and OpenCollective? 22 | 23 | Funds donated via Patreon go directly to support mengshukeji's work on Luckysheet. Funds donated via OpenCollective are managed with transparent expenses and will be used for compensating work and expenses for core team members or sponsoring community events. Your name/logo will receive proper recognition and exposure by donating on either platform. 24 | 25 | ## Sponsors List 26 | 27 | (Sort by time) 28 | - *涛 ¥ 200 29 | - popo ¥ 1 30 | - 孔垂善 ¥ 5 31 | - Shawn文 ¥ 99 32 | - 幸运的小路易 ¥ 1 33 | - 冯启俊 ¥ 88 34 | - mxb ¥ 10 35 | - 祭阳 ¥ 20 36 | - *勇 ¥ 30 37 | - 虚我 ¥ 200 38 | - 甜党 ¥ 50 39 | - Alphabet(Google)-gcf ¥ 1 40 | - **平 ¥ 100 41 | - **东 ¥ 10 42 | - debugger ¥ 20 43 | - 烦了烦 ¥ 10 44 | - 文顶顶 ¥ 200 45 | - yangxshn ¥ 10 46 | - 爱乐 ¥ 100 47 | - 小李飞刀刀 ¥ 66 48 | - 张铭 ¥ 200 49 | - 曹治军 ¥ 1 50 | - *特 ¥ 10 51 | - **权 ¥ 9.9 52 | - **sdmq ¥ 20 53 | - *旭 ¥ 10 54 | - Quentin ¥ 20 55 | - 周宇凡 ¥ 100 56 | - *超 ¥ 10 57 | - 维宁 ¥ 100 58 | - hyy ¥ 20 59 | - 雨亭寒江月 ¥ 50 60 | - **功 ¥ 10 61 | - **光 ¥ 20 62 | - terrywan ¥ 100 63 | - 王晓洪 ¥ 10 64 | - Sun ¥ 10 65 | - 忧绣 ¥ 100 66 | - Jasonx ¥ 10 67 | - 国勇 ¥ 66.6 68 | - 郎志 ¥ 100 69 | - 匿名 ¥ 1 70 | - ni ¥ 100 71 | - 苏 ¥ 50 72 | - Mads_chan ¥ 1 73 | - LK ¥ 100 74 | - 智连方舟 李汪石 ¥ 168 75 | - **发 ¥ 260 76 | - *超 ¥ 10 77 | - *勇 ¥ 10 78 | - *腾 ¥ 15 79 | - 名字好难起 ¥ 20 80 | - 大山 ¥ 1 81 | - waiting ¥ 1000 82 | - **宇 ¥ 10.00 83 | - 刘小帅的哥哥 ¥ 20.00 84 | - 宁静致远 ¥ 10.00 85 | - Eleven ¥ 1.00 86 | - **帆 ¥ 188 87 | - henry ¥ 100 88 | - .波罗 ¥ 50 89 | - 花落有家 ¥ 50 90 | - 踏遍南水北山 ¥ 1 91 | - LC ¥ 5 92 | - **明 ¥ 8.80 93 | - *军 ¥ 20 94 | - 张彪 ¥ 50 95 | - 企业文档云@肖敏 ¥ 10 96 | - 匿名 ¥ 50 97 | - 逍遥行 ¥ 10 98 | - z.wasaki ¥ 50 99 | - Make Children ¥ 20 100 | - Foam ¥ 20 101 | - 奥特曼( o|o)ノ三 ¥ 50 102 | - **凯 ¥ 10 103 | - **兵 ¥ 20 104 | - **川 ¥ 1 105 | - 二万 ¥ 50 106 | - 蔚然成林 ¥ 10 107 | - 邹杰 ¥ 10 108 | - 张永强 ¥ 50 109 | - 鱼得水 ¥ 50 110 | - Ccther ¥ 1 111 | - Eric Cheng ¥ 10 112 | - 佚名 ¥ 1 113 | - 花叶 ¥ 50 114 | - GT ¥ 20 115 | - 菜菜心 ¥ 10 116 | - fisher ¥ 1 117 | - JC ¥ 5 118 | - 佚名 ¥ 20 119 | - 独孤一剑 ¥ 50 120 | - mxt ¥ 20 121 | - 一叶迷山 ¥ 100 122 | - Jeff ¥ 100 123 | - 八千多条狗🐶 ¥ 100 124 | - 晓峰 ¥ 10 125 | - 戒 ¥ 1 126 | - 浪里个浪 ¥ 1 127 | - 回调函数 ¥ 50 128 | - 赖瓜子 ¥ 5 129 | - Milo•J ¥ 20 130 | - 可道云 ¥ 200 131 | - *程 ¥ 10 132 | - 来一杯卡布酸奶 ¥ 5 133 | - 刘久胜 ¥ 100 134 | - 快意江湖 ¥ 50 135 | - *新 ¥ 9.9 136 | - **龙 ¥ 100 137 | - **江 ¥ 100 138 | - **威 ¥ 9.8 139 | - **涛 ¥ 500 140 | - **嘉 ¥ 10 141 | - *涛 ¥ 1 142 | - *兵 ¥ 5 143 | - *阳 ¥ 200 144 | - *辉 ¥ 1 145 | - *帆 ¥ 30 146 | - **旺 ¥ 10 147 | - **麟 ¥ 20 148 | - *霖 ¥ 9.9 149 | - *帅 ¥ 10 150 | - *鑫 ¥ 6.66 151 | - ~朴:shu ¥ 29.79 152 | - 未来 ¥ 1 153 | - 国勇 ¥ 0.1 154 | - 用心灵听雨 ¥ 10 155 | - 钊 ¥ 5 156 | - 星稀 ¥ 5 -------------------------------------------------------------------------------- /docs/guide/resource.md: -------------------------------------------------------------------------------- 1 | # Tutorials and resources 2 | 3 | Open source software is inseparable from the contribution of the community. Here will be a list of tutorials, learning materials and supporting solutions provided by the community. 4 | 5 | If you have written or found an excellent tutorial and want to recommend it to us, please directly [edit this page](https://github.com/mengshukeji/Luckysheet/edit/master/docs/guide/resource.md) submit a PR. 6 | 7 | ## Blog 8 | - [How Luckysheet initializes the data with merged cells](https://www.cnblogs.com/DuShuSir/p/13272397.html)[Pending translation] 9 | - [How Luckysheet saves the data in the table to the database](https://www.cnblogs.com/DuShuSir/p/13857874.html)[Pending translation] 10 | - [Case of introducing Luckysheet into local HTML using CDN loading](https://www.cnblogs.com/DuShuSir/p/13859103.html)[Pending translation] 11 | - [Basic usage of Luckysheet, use `loadUrl` to load server data](https://blog.csdn.net/DCDC2020/article/details/108486525) 12 | - [Luckysheet import and export implementation-Java background processing](https://blog.csdn.net/u014632228/article/details/109738221) 13 | 14 | ## Front-end case 15 | 16 | ### Community Case 17 | - [luckysheet-vue-importAndExport](https://github.com/oy-paddy/luckysheet-vue-importAndExport/tree/master/) 18 | 19 | ## Back-end case 20 | 21 | ### Official case 22 | - [Java backend Luckysheet Server](https://github.com/mengshukeji/LuckysheetServer) 23 | 24 | ### Community Case 25 | - [Luckysheet save and restore](https://gitee.com/ichiva/luckysheet-saved-in-recovery) (Java version) 26 | - [Online form for collaborative editing based on Luckysheet](https://github.com/DilemmaVi/ecsheet) (Java version) 27 | - [Simple Express.js server example template for individual use](https://github.com/TitanRGB/Luckysheet-ExpressReact-Example) (Node-Express version) 28 | - [Use .net core 3.1 and Npoi to make a basic export based on LuckSheet](https://gitee.com/xiong-kangli/luck-sheet_.-net-core) (.NET version) 29 | - [Collaborative editing in go language version](https://github.com/fandypeng/excel2config)(Go version) 30 | 31 | ## Learning Materials 32 | 33 | - [How to build a web data analysis report from 0 to 1](https://github.com/mengshukeji/LuckyResources/blob/master/ppt/%E5%A6%82%E4%BD%95%E4%BB%8E0%E5%88%B01%E6%90%AD%E5%BB%BA%20Web%20%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90%E6%8A%A5%E8%A1%A8.pptx)[Pending translation] 34 | -------------------------------------------------------------------------------- /docs/zh/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | home: true 3 | heroText: Luckysheet 4 | tagline: 配置文档 · API · 教程 5 | actionText: 快速上手 → 6 | actionLink: /zh/guide/ 7 | features: 8 | - title: 功能强大 9 | details: 包含大量常用电子表格功能,替代你的excel 10 | - title: 配置简单 11 | details: 最少的配置就能开始上手使用 12 | - title: 完全开源 13 | details: 社区驱动,共同来完善你的想法 14 | footer: MIT Licensed | Copyright © 2020-present Mengshukeji 15 | --- -------------------------------------------------------------------------------- /docs/zh/about/README.md: -------------------------------------------------------------------------------- 1 | # 认识团队 2 | 3 | Luckysheet是由个人主导、几个志同道合的小伙伴一同开发的项目。 4 | 5 | ## 核心团队活跃成员 6 | - [@wbfsa](https://github.com/wbfsa) 7 | - [@eiji-th](https://github.com/eiji-th) 8 | - [@fly-95](https://github.com/fly-95) 9 | - [@tonytonychopper123](https://github.com/tonytonychopper123) 10 | - [@Dushusir](https://github.com/Dushusir) 11 | - [@iamxuchen800117](https://github.com/iamxuchen800117) 12 | - [@wpxp123456](https://github.com/wpxp123456) 13 | - [@c19c19i](https://weibo.com/u/3884623955) 14 | - [@zhangchen915](https://github.com/zhangchen915) 15 | - [@jerry-f](https://github.com/jerry-f) 16 | - [@flowerField](https://github.com/flowerField) 17 | 18 | ## 社区伙伴 19 | - [@yiwasheng](https://github.com/yiwasheng) 20 | - [@danielcai1987](https://github.com/danielcai1987) 21 | - [@qq6690876](https://github.com/qq6690876) 22 | - [@javahuang](https://github.com/javahuang) 23 | - [@TimerGang](https://github.com/TimerGang) 24 | - [@gsw945](https://github.com/gsw945) 25 | - [@swen-xiong](https://github.com/swen-xiong) 26 | - [@lzmch](https://github.com/lzmch) 27 | - [@kdevilpf](https://github.com/kdevilpf) 28 | - [@WJWM0316](https://github.com/WJWM0316) -------------------------------------------------------------------------------- /docs/zh/about/company.md: -------------------------------------------------------------------------------- 1 | # 社区案例 2 | 3 | 我们搜集到了很多来自社区的案例反馈,还发现了以前我们没有预想到的Luckysheet使用场景。 4 | 5 | 积极聆听社区的声音,在大家的支持和反馈中不断更新迭代,已是我们的责任。 6 | 7 | 8 | ## 公司案例 9 | 10 | 11 | 12 | 13 | 19 | 25 | 31 | 37 | 38 | 39 | 41 | 43 | 45 | 47 | 48 | 49 |
14 | 15 | 16 | 17 |

雄安智评云数字科技有限公司

18 |
20 | 21 | 22 | 23 |

Code the Future

24 |
26 | 27 | 28 | 29 |

吉客云

30 |
32 | 33 | 34 | 35 |

华为

36 |
40 | 42 | 44 | 46 |
-------------------------------------------------------------------------------- /docs/zh/about/sponsor.md: -------------------------------------------------------------------------------- 1 | # 赞助 2 | 3 | ## 为什么赞助 4 | 5 | 如果您经营一家企业并在盈利产品中使用Luckysheet,那么赞助Luckysheet开发将具有商业意义:它可确保您的产品所依赖的项目保持健康并得到积极维护。 它还可以帮助您在Luckysheet社区中曝光,使得更多的人关注您的产品。 6 | 7 | 当然,如果Luckysheet在您的工作或个人项目中为您提供了帮助,也欢迎请作者喝杯果汁😋。 8 | 9 | ## 赞助方式 10 | 11 | Luckysheet是MIT许可的开源项目,其持续稳定的开发离不开这些优秀的 [**支持者**](#赞助者列表)。 如果您想加入他们,请考虑: 12 | 13 | - [成为Patreon的支持者或赞助商](https://www.patreon.com/mengshukeji) 14 | - [成为Open Collective的支持者或赞助商](https://opencollective.com/luckysheet) 15 | - 通过PayPal,微信或支付宝一次性捐赠 16 | 17 | | PayPal | 微信 | 支付宝 | 18 | |---|---|---| 19 | | [Paypal Me](https://www.paypal.me/wbfsa) | | | 20 | 21 | ### Patreon和OpenCollective有什么区别? 22 | 23 | 通过Patreon捐赠的资金将直接用于支持menshshukeji在Luckysheet上的工作。 通过OpenCollective捐赠的资金由透明费用管理,将用于补偿核心团队成员的工作和费用或赞助社区活动。 通过在任一平台上捐款,您的姓名/徽标将得到适当的认可和曝光。 24 | 25 | ## 赞助者列表 26 | 27 | (按时间顺序排列) 28 | - *涛 ¥ 200 29 | - popo ¥ 1 30 | - 孔垂善 ¥ 5 31 | - Shawn文 ¥ 99 32 | - 幸运的小路易 ¥ 1 33 | - 冯启俊 ¥ 88 34 | - mxb ¥ 10 35 | - 祭阳 ¥ 20 36 | - *勇 ¥ 30 37 | - 虚我 ¥ 200 38 | - 甜党 ¥ 50 39 | - Alphabet(Google)-gcf ¥ 1 40 | - **平 ¥ 100 41 | - **东 ¥ 10 42 | - debugger ¥ 20 43 | - 烦了烦 ¥ 10 44 | - 文顶顶 ¥ 200 45 | - yangxshn ¥ 10 46 | - 爱乐 ¥ 100 47 | - 小李飞刀刀 ¥ 66 48 | - 张铭 ¥ 200 49 | - 曹治军 ¥ 1 50 | - *特 ¥ 10 51 | - **权 ¥ 9.9 52 | - **sdmq ¥ 20 53 | - *旭 ¥ 10 54 | - Quentin ¥ 20 55 | - 周宇凡 ¥ 100 56 | - *超 ¥ 10 57 | - 维宁 ¥ 100 58 | - hyy ¥ 20 59 | - 雨亭寒江月 ¥ 50 60 | - **功 ¥ 10 61 | - **光 ¥ 20 62 | - terrywan ¥ 100 63 | - 王晓洪 ¥ 10 64 | - Sun ¥ 10 65 | - 忧绣 ¥ 100 66 | - Jasonx ¥ 10 67 | - 国勇 ¥ 66.6 68 | - 郎志 ¥ 100 69 | - 匿名 ¥ 1 70 | - ni ¥ 100 71 | - 苏 ¥ 50 72 | - Mads_chan ¥ 1 73 | - LK ¥ 100 74 | - 智连方舟 李汪石 ¥ 168 75 | - **发 ¥ 260 76 | - *超 ¥ 10 77 | - *勇 ¥ 10 78 | - *腾 ¥ 15 79 | - 名字好难起 ¥ 20 80 | - 大山 ¥ 1 81 | - waiting ¥ 1000 82 | - **宇 ¥ 10.00 83 | - 刘小帅的哥哥 ¥ 20.00 84 | - 宁静致远 ¥ 10.00 85 | - Eleven ¥ 1.00 86 | - **帆 ¥ 188 87 | - henry ¥ 100 88 | - .波罗 ¥ 50 89 | - 花落有家 ¥ 50 90 | - 踏遍南水北山 ¥ 1 91 | - LC ¥ 5 92 | - **明 ¥ 8.80 93 | - *军 ¥ 20 94 | - 张彪 ¥ 50 95 | - 企业文档云@肖敏 ¥ 10 96 | - 匿名 ¥ 50 97 | - 逍遥行 ¥ 10 98 | - z.wasaki ¥ 50 99 | - Make Children ¥ 20 100 | - Foam ¥ 20 101 | - 奥特曼( o|o)ノ三 ¥ 50 102 | - **凯 ¥ 10 103 | - **兵 ¥ 20 104 | - **川 ¥ 1 105 | - 二万 ¥ 50 106 | - 蔚然成林 ¥ 10 107 | - 邹杰 ¥ 10 108 | - 张永强 ¥ 50 109 | - 鱼得水 ¥ 50 110 | - Ccther ¥ 1 111 | - Eric Cheng ¥ 10 112 | - 佚名 ¥ 1 113 | - 花叶 ¥ 50 114 | - GT ¥ 20 115 | - 菜菜心 ¥ 10 116 | - fisher ¥ 1 117 | - JC ¥ 5 118 | - 佚名 ¥ 20 119 | - 独孤一剑 ¥ 50 120 | - mxt ¥ 20 121 | - 一叶迷山 ¥ 100 122 | - Jeff ¥ 100 123 | - 八千多条狗🐶 ¥ 100 124 | - 晓峰 ¥ 10 125 | - 戒 ¥ 1 126 | - 浪里个浪 ¥ 1 127 | - 回调函数 ¥ 50 128 | - 赖瓜子 ¥ 5 129 | - Milo•J ¥ 20 130 | - 可道云 ¥ 200 131 | - *程 ¥ 10 132 | - 来一杯卡布酸奶 ¥ 5 133 | - 刘久胜 ¥ 100 134 | - 快意江湖 ¥ 50 135 | - *新 ¥ 9.9 136 | - **龙 ¥ 100 137 | - **江 ¥ 100 138 | - **威 ¥ 9.8 139 | - **涛 ¥ 500 140 | - **嘉 ¥ 10 141 | - *涛 ¥ 1 142 | - *兵 ¥ 5 143 | - *阳 ¥ 200 144 | - *辉 ¥ 1 145 | - *帆 ¥ 30 146 | - **旺 ¥ 10 147 | - **麟 ¥ 20 148 | - *霖 ¥ 9.9 149 | - *帅 ¥ 10 150 | - *鑫 ¥ 6.66 151 | - ~朴:shu ¥ 29.79 152 | - 未来 ¥ 1 153 | - 国勇 ¥ 0.1 154 | - 用心灵听雨 ¥ 10 155 | - 钊 ¥ 5 156 | - 星稀 ¥ 5 -------------------------------------------------------------------------------- /docs/zh/guide/contribute.md: -------------------------------------------------------------------------------- 1 | 2 | # 贡献指南 3 | 4 | 欢迎!我们很高兴您能来到这里,并非常期待您能有兴趣参与 Luckysheet 贡献。当然,在您参与 Luckysheet 贡献之前,请确保通读以下全文: 5 | 6 | ## 我们的行为准则 7 | 8 | 1. 我们保证尊重所有参与贡献的人,不限于提出问题、文档和代码贡献、解决bug以及其它贡献的人; 9 | 10 | 2. 我们有义务遵守当地法律法规,所有的附带法律风险的行为我们都是拒绝的; 11 | 3. 我们反对任何参与者存在贬损评论、人身攻击、骚扰或侮辱他人以及其他非专业行为; 12 | 4. 我们有权并有责任删除或编辑与此行为准则不符的内容,不限于代码、Issues、wiki、文档以及其它。不遵守行为准则的参与者可能会被移除团队; 13 | 5. 我们接受任何人的监督,任何人可通过问题反馈,向我们报告发现的与此行为准则不符的事实存在。 14 | 15 | ## 如何参与贡献? 16 | 17 | * 贡献文档:浏览文档可以加深您对 Luckysheet 的了解,一旦发现文档写得不清晰或逻辑混乱的地方,可以订正、修改、补充,您可以通过 [中文论坛](https://support.qq.com/products/288322)或者 [谷歌论坛](https://groups.google.com/g/luckysheet)给予反馈 18 | * 贡献代码:欢迎大家为 Luckysheet 社区贡献代码,欢迎您认领Open状态的 [Issues](https://github.com/mengshukeji/Luckysheet/issues) 和未完成的特性,提交PR,成为贡献者之一如果您在使用过程中发现有些功能无法满足您的需求或出现问题,请在Issues中记录 19 | * 参与Issue讨论:您可以在任一 [Issues](https://github.com/mengshukeji/Luckysheet/issues) 下发表您的建议 20 | * Review代码:您可以在 [Github](https://github.com/mengshukeji/Luckysheet)上看到所有贡献者提交的PR,您可以Review他们的代码并发表您的建议 21 | 22 | 23 | ## 如何提交 Issues 24 | 25 | 在您提交特性/改进前,应该注意以下几点: 26 | 27 | * 请先确认该特性/改进是否被其他人已经提交 28 | * 一个通俗易懂的标题来阐述你提交的Bug/提交特性/改进 29 | * 如果是Bug则详细描述该bug产生的原因,如果能够复现,请尽量提供完整的重现步骤 30 | * 如果是特性,那么该特性应该有广泛的适用性,适用于大部分用户,最好能够提供详尽的设计文档 31 | * 如果是改进,尽可能描述清楚此改进所带来的益处 32 | 33 | 具体步骤: 34 | 35 | * 创建 [Issues](https://github.com/mengshukeji/Luckysheet/issues) ,描述清楚问题 36 | * 如果你要解决该issue则将issue assign到自己名下,如果你仅仅是提交Bug/特性/改进,并没有时间去贡献代码,则assignne设置为空 37 | * 如果是比较大的特性/改进,尽量先输出设计文档,走 [Luckysheet RFC](https://github.com/mengshukeji/Luckysheet-rfcs) 流程,供其他人review 38 | 39 | ## 如何认领 Issues 40 | 41 | 在 Luckysheet 的 [Issues](https://github.com/mengshukeji/Luckysheet/issues) 列表中,有很多由其他人创建的issue并未被修复,如果你感兴趣的话,可以认领这些issue。认领步骤如下: 42 | 43 | * 在该issue下留言,表达想认领该任务的想法,另注明 **@I can solve it** 即可 44 | * 如果提交者没有意见,则将该issue assign到自己名下并及时更新进度 45 | * 如果是比较大的特性,尽量先输出设计文档,走 [Luckysheet RFC](https://github.com/mengshukeji/Luckysheet-rfcs) 流程,供其他人review 46 | * 开发代码并提交代码至github 47 | 48 | 49 | ## 如何提交代码 50 | 51 | 1. fork 到自己的仓库 52 | 53 | 进入  [Luckysheet](https://github.com/mengshukeji/Luckysheet)  的Github页面 ,点击右上角按钮 Fork 进行 Fork。 54 | 55 | 2. git clone 到本地 56 | 57 | ```shell 58 | git clone https://github.com//Luckysheet.git 59 | ``` 60 | 61 | 3. 上游建立连接 62 | 63 | ```shell 64 | 65 | cd Luckysheet 66 | git remote add upstream https://github.com/mengshukeji/Luckysheet.git 67 | ``` 68 | 4. 创建开发分支 69 | 70 | ```shell 71 | git checkout -b dev 72 | ``` 73 | 74 | 5. 修改提交代码 75 | 76 | ```shell 77 | git add .  78 | npm run commit 79 | git push origin dev 80 | ``` 81 | 82 | 6. 同步代码,将最新代码同步到本地 83 | 84 | ```shell 85 | git fetch upstream  86 | git rebase upstream/master 87 | ``` 88 | 89 | 7. 如果有冲突(没有可以忽略) 90 | 91 | ```shell 92 | git status # 查看冲突文件,并修改冲突 93 | git add . 94 | git rebase --continue 95 | ``` 96 | 提交git rebase --continue命令的时候,如果弹出vim提示编辑commit信息,则可以添加你的修改,然后保存退出 97 | > vim命令请参考阅读[vim](https://www.runoob.com/linux/linux-vim.html) 98 | 99 | 8. 提交分支代码 100 | 101 | ```shell 102 | git push origin dev 103 | ``` 104 | 105 | 如果提示需要先pull 可以先拉取在提交 106 | ```shell 107 | git pull origin dev 108 | git push origin dev 109 | ``` 110 | 若弹出vim提示编辑commit信息,可以直接通过vim命令退出 111 | > vim命令请参考阅读[vim](https://www.runoob.com/linux/linux-vim.html) 112 | 113 | 9. 提交pr 114 | 去自己github仓库对应fork的项目,切换到刚刚创建修改的分支,点击new pull request,并添加上对应的描述,最后点击Create pull request进行提交 115 | 116 | ## 代码规范 117 | 118 | > 一般性的代码规范示例 119 | 120 | * 保持块深度最小。尽可能避免嵌套If条件 121 | ```js 122 | // CORRECT 123 | if (!comparison) return 124 | 125 | if (variable) { 126 | for (const item of items) {} 127 | } else if (variable2) { 128 | // Do something here 129 | } 130 | 131 | // INCORRECT 132 | if (comparison) { 133 | if (variable) { 134 | for (const item in items) {} 135 | } else if (variable2) { 136 | // Do something here 137 | } 138 | } else { 139 | return 140 | } 141 | ``` 142 | 143 | * 不要使用操作数进行链比较 144 | ```js 145 | // CORRECT 146 | 147 | if (cb) cb() 148 | if (!cb || (cb === fn)) cb() 149 | 150 | // INCORRECT 151 | 152 | cb && cb() 153 | (!cb || (cb === fn)) && cb() 154 | ``` 155 | 156 | * 所有变量都应该按字母顺序在块的开头声明 157 | ```js 158 | // CORRECT 159 | function foo () { 160 | const foo = 'bar' 161 | const bar = 'foo' 162 | 163 | if (conditional) {} 164 | 165 | ... 166 | 167 | return foo 168 | } 169 | 170 | // INCORRECT 171 | 172 | function foo () { 173 | const foo = 'bar' 174 | 175 | if (conditional) {} 176 | 177 | const bar = 'foo' 178 | 179 | ... 180 | 181 | return foo 182 | } 183 | ``` 184 | 185 | * 尽快返回 186 | ```js 187 | // CORRECT 188 | if (condition) return 'foo' 189 | if (condition2) return 'bar' 190 | // Return must have a blank line above 191 | return 'fizz' 192 | 193 | // INCORRECT 194 | const variable = '' 195 | 196 | if (condition) { 197 | variable = 'foo' 198 | } else if (condition2) { 199 | variable = 'bar' 200 | } else { 201 | variable = 'fizz' 202 | } 203 | 204 | return variable 205 | ``` 206 | 207 | ## 如何贡献文档 208 | 209 | ## 如何成为Luckysheet Committer 210 | 211 | 任何人只要对 Luckysheet 项目做了贡献,那您就是官方承认的 Luckysheet 项目的Contributor了,从Contributor成长为Committer并没有一个确切的标准, 也没有任何预期的时间表,但是Committer的候选人一般都是长期活跃的贡献者,成为Committer并没有要求必须有巨大的架构改进贡献, 或者多少行的代码贡献,贡献代码、贡献文档、参与邮件列表的讨论、帮助回答问题等等都提升自己影响力的方式。 212 | 213 | 潜在贡献清单(无特定顺序): 214 | 215 | * 提交自己发现的Bug、特性、改进到issue 216 | * 更新官方文档使项目的文档是最近的、撰写 Luckysheet 的最佳实践、特性剖析的各种对用户有用的文档 217 | * 执行测试并报告测试结果,性能测试与其他MQ的性能对比测试等 218 | * 审查(Review)其他人的工作(包括代码和非代码)并发表你自己的建议 219 | * 指导新加入的贡献者,熟悉社区流程 220 | * 发表关于 Luckysheet 的博客 221 | * 有利于 Luckysheet 社区发展的任何贡献 222 | * ...... 223 | -------------------------------------------------------------------------------- /docs/zh/guide/resource.md: -------------------------------------------------------------------------------- 1 | # 教程与资源 2 | 3 | 开源软件离不开社区的贡献,这里将会列举出社区提供的教程、学习资料及配套解决方案。 4 | 5 | 如果您写了或者发现了优秀的教程想要推荐给我们,请直接[编辑此页](https://github.com/mengshukeji/Luckysheet/edit/master/docs/zh/guide/resource.md)提交PR。 6 | 7 | ## 博客 8 | - [Luckysheet如何初始化含合并单元格的数据](https://www.cnblogs.com/DuShuSir/p/13272397.html) 9 | - [Luckysheet如何把表格里的数据保存到数据库](https://www.cnblogs.com/DuShuSir/p/13857874.html) 10 | - [本地HTML采用cdn加载方式引入Luckysheet的案例](https://www.cnblogs.com/DuShuSir/p/13859103.html) 11 | - [Luckysheet基础用法,使用loadUrl加载服务端数据](https://blog.csdn.net/DCDC2020/article/details/108486525) 12 | - [Luckysheet 导入与导出实现 - Java后台处理](https://blog.csdn.net/u014632228/article/details/109738221) 13 | 14 | ## 前端案例 15 | 16 | ### 社区案例 17 | - [luckysheet-vue-importAndExport](https://github.com/oy-paddy/luckysheet-vue-importAndExport/tree/master/) 18 | 19 | ## 后端案例 20 | 21 | ### 官方案例 22 | - [Java 后台 Luckysheet Server](https://github.com/mengshukeji/LuckysheetServer) 23 | 24 | ### 社区案例 25 | - [Luckysheet保存与恢复](https://gitee.com/ichiva/luckysheet-saved-in-recovery)(Java版) 26 | - [基于Luckysheet实现的协同编辑在线表格](https://github.com/DilemmaVi/ecsheet)(Java版) 27 | - [简易的Express服务端示例 个人应用模板](https://github.com/TitanRGB/Luckysheet-ExpressReact-Example) (Node-Express版) 28 | - [使用.net core 3.1和Npoi 制作基于LuckSheet的基础导出](https://gitee.com/xiong-kangli/luck-sheet_.-net-core)(.NET 版本) 29 | - [go语言版本的协同编辑](https://github.com/fandypeng/excel2config)(Go 版本) 30 | 31 | ## 学习资料 32 | 33 | - [如何从0到1搭建 Web 数据分析报表](https://github.com/mengshukeji/LuckyResources/blob/master/ppt/%E5%A6%82%E4%BD%95%E4%BB%8E0%E5%88%B01%E6%90%AD%E5%BB%BA%20Web%20%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90%E6%8A%A5%E8%A1%A8.pptx) 34 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "luckysheet", 3 | "version": "2.1.13", 4 | "main": "dist/luckysheet.cjs.js", 5 | "module": "dist/luckysheet.esm.js", 6 | "browser": "dist/luckysheet.umd.js", 7 | "devDependencies": { 8 | "@babel/core": "^7.12.3", 9 | "@babel/preset-env": "^7.12.1", 10 | "@babel/runtime-corejs3": "^7.12.1", 11 | "@commitlint/cli": "^9.1.1", 12 | "@commitlint/config-conventional": "^9.1.1", 13 | "@rollup/plugin-babel": "^5.2.1", 14 | "@rollup/plugin-commonjs": "^13.0.0", 15 | "@rollup/plugin-node-resolve": "^8.0.1", 16 | "browser-sync": "^2.26.7", 17 | "commitizen": "^4.1.2", 18 | "cross-env": "^7.0.2", 19 | "delete": "^1.1.0", 20 | "gulp": "^4.0.2", 21 | "gulp-babel": "^8.0.0", 22 | "gulp-clean-css": "^4.3.0", 23 | "gulp-concat": "^2.6.1", 24 | "gulp-if": "^3.0.0", 25 | "gulp-uglify": "^3.0.2", 26 | "gulp-useref": "^4.0.1", 27 | "http-proxy-middleware": "^1.0.6", 28 | "prettier": "2.8.8", 29 | "rollup": "^2.32.1", 30 | "rollup-plugin-terser": "^6.1.0", 31 | "standard-version": "^8.0.2", 32 | "uuid": "^8.3.2", 33 | "vuepress": "^1.5.0", 34 | "vuepress-plugin-baidu-autopush": "^1.0.1", 35 | "vuepress-plugin-code-copy": "^1.0.6", 36 | "vuepress-plugin-seo": "^0.1.4", 37 | "vuepress-plugin-sitemap": "^2.3.1" 38 | }, 39 | "dependencies": { 40 | "@babel/runtime": "^7.12.1", 41 | "dayjs": "^1.9.6", 42 | "esbuild": "^0.11.6", 43 | "escape-html": "^1.0.3", 44 | "flatpickr": "^4.6.6", 45 | "jquery": "^2.2.4", 46 | "numeral": "^2.0.6", 47 | "pako": "^1.0.11" 48 | }, 49 | "scripts": { 50 | "build": "cross-env NODE_ENV=production gulp build", 51 | "dev": "cross-env NODE_ENV=development gulp dev", 52 | "docs:dev": "vuepress dev docs", 53 | "docs:build": "vuepress build docs", 54 | "commit": "git-cz", 55 | "release": "standard-version", 56 | "prettier": "npx prettier --check .", 57 | "prettier:fix": "npx prettier -w ." 58 | }, 59 | "files": [ 60 | "dist" 61 | ], 62 | "config": { 63 | "commitizen": { 64 | "path": "./node_modules/cz-conventional-changelog" 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/assets/iconfont/Anton-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dream-num/Luckysheet/60bdffd5cff3f00e5d6fdec6aa1ad6c7d7797738/src/assets/iconfont/Anton-Regular.ttf -------------------------------------------------------------------------------- /src/assets/iconfont/HanaleiFill-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dream-num/Luckysheet/60bdffd5cff3f00e5d6fdec6aa1ad6c7d7797738/src/assets/iconfont/HanaleiFill-Regular.ttf -------------------------------------------------------------------------------- /src/assets/iconfont/Pacifico-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dream-num/Luckysheet/60bdffd5cff3f00e5d6fdec6aa1ad6c7d7797738/src/assets/iconfont/Pacifico-Regular.ttf -------------------------------------------------------------------------------- /src/assets/iconfont/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dream-num/Luckysheet/60bdffd5cff3f00e5d6fdec6aa1ad6c7d7797738/src/assets/iconfont/iconfont.eot -------------------------------------------------------------------------------- /src/assets/iconfont/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dream-num/Luckysheet/60bdffd5cff3f00e5d6fdec6aa1ad6c7d7797738/src/assets/iconfont/iconfont.ttf -------------------------------------------------------------------------------- /src/assets/iconfont/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dream-num/Luckysheet/60bdffd5cff3f00e5d6fdec6aa1ad6c7d7797738/src/assets/iconfont/iconfont.woff -------------------------------------------------------------------------------- /src/assets/iconfont/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dream-num/Luckysheet/60bdffd5cff3f00e5d6fdec6aa1ad6c7d7797738/src/assets/iconfont/iconfont.woff2 -------------------------------------------------------------------------------- /src/config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The default luckysheet config object. 3 | */ 4 | export default { 5 | container: "luckysheet", //容器的ID 6 | loading:{}, //自定义loading 7 | column: 60, //空表格默认的列数量 8 | row: 84, //空表格默认的行数据量 9 | allowCopy: true, //是否允许拷贝 10 | showtoolbar: true, //是否第二列显示工具栏 11 | showinfobar: true, //是否显示顶部名称栏 12 | showsheetbar: true, //是否显示底部表格名称区域 13 | showstatisticBar: true, //是否显示底部计数栏 14 | pointEdit: false, //是否是编辑器插入表格模式 15 | pointEditUpdate: null, //编辑器表格更新函数 16 | pointEditZoom: 1, //编辑器表格编辑时缩放比例 17 | // menu: "undo|redo|freezenrow|freezencolumn|download|share|chart|pivot", 18 | data: [{ "name": "Sheet1", color: "", "status": "1", "order": "0", "data": [], "config": {}, "index":0 }, { "name": "Sheet2", color: "", "status": "0", "order": "1", "data": [], "config": {}, "index":1 }, { "name": "Sheet3", color: "", "status": "0", "order": "2", "data": [], "config": {}, "index":2 }], //客户端sheet数据[sheet1, sheet2, sheet3] 19 | title: "Luckysheet Demo", //表格的名称 20 | userInfo:false,// 右上角的用户信息展示样式,支持 1. boolean类型:false:不展示,true:展示默认 ' rabbit' ,2. HTML模板字符串或者普通字符串,如:' Lucky'或者'用户名', 3. 对象格式,设置 userImage:用户头像地址 和 userName:用户名 4. 不设置或者设置undefined同设置false 21 | userMenuItem: [{url:"www.baidu.com", "icon":'', "name":"我的表格"}, {url:"www.baidu.com", "icon":'', "name":"退出登陆"}], //点击右上角的用户信息弹出的菜单 22 | myFolderUrl: "www.baidu.com", //左上角<返回按钮的链接 23 | config: {}, //表格行高、列宽、合并单元格、公式等设置 24 | fullscreenmode: true, //是否全屏模式,非全屏模式下,标记框不会强制选中。 25 | devicePixelRatio: window.devicePixelRatio, //设备比例,比例越大表格分标率越高 26 | allowEdit: true, //是否允许前台编辑 27 | loadUrl: "", // 配置loadUrl的地址,luckysheet会通过ajax请求表格数据,默认载入status为1的sheet数据中的所有data,其余的sheet载入除data字段外的所有字段 28 | loadSheetUrl: "", //配置loadSheetUrl的地址,参数为gridKey(表格主键) 和 index(sheet主键合集,格式为[1,2,3]),返回的数据为sheet的data字段数据集合 29 | gridKey: "", // 表格唯一标识符 30 | updateUrl: "", //表格数据的更新地址 31 | updateImageUrl: "", //缩略图的更新地址 32 | allowUpdate: false, //是否允许编辑后的后台更新 33 | functionButton: "", //右上角功能按钮,例如' ' 34 | showConfigWindowResize: true, //图表和数据透视表的配置会在右侧弹出,设置弹出后表格是否会自动缩进 35 | enableAddRow: true,//允许添加行 36 | enableAddBackTop: true,//允许回到顶部 37 | // enablePage: false,//允许加载下一页 38 | autoFormatw: false, //自动格式化超过4位数的数字为 亿万格式 例:true or "true" or "TRUE" 39 | accuracy: undefined, //设置传输来的数值的精确位数,小数点后n位 传参数为数字或数字字符串,例: "0" 或 0 40 | pageInfo:{ 41 | 'queryExps':'', 42 | 'reportId':'', 43 | 'fields':'', 44 | 'mobile':'', 45 | 'frezon':'', 46 | 'currentPage':'', 47 | "totalPage":10, 48 | "pageUrl":"", 49 | }, 50 | editMode: false, //是否为编辑模式 51 | beforeCreateDom: null,//表格创建之前的方法 52 | fireMousedown: null, //单元格数据下钻 53 | lang: 'en', //language 54 | plugins: [], //plugins, e.g. ['chart'] 55 | forceCalculation:false,//强制刷新公式,公式较多会有性能问题,慎用 56 | rowHeaderWidth: 46, 57 | columnHeaderHeight: 20, 58 | defaultColWidth:73, 59 | defaultRowHeight:19, 60 | defaultFontSize:10, 61 | limitSheetNameLength:true, //是否限制工作表名的长度 62 | defaultSheetNameMaxLength:31, //默认工作表名称的最大长度 63 | sheetFormulaBar:true, //是否显示公式栏 64 | showtoolbarConfig:{}, //自定义工具栏 65 | showsheetbarConfig:{}, //自定义底部sheet页 66 | showstatisticBarConfig:{}, //自定义计数栏 67 | cellRightClickConfig:{}, //自定义单元格右键菜单 68 | sheetRightClickConfig:{}, //自定义底部sheet页右击菜单 69 | imageUpdateMethodConfig:{}, //自定义图片同步方式 70 | } 71 | -------------------------------------------------------------------------------- /src/controllers/cellDatePickerCtrl.js: -------------------------------------------------------------------------------- 1 | import menuButton from './menuButton'; 2 | import formula from '../global/formula'; 3 | import Store from '../store'; 4 | import flatpickr from 'flatpickr' 5 | import dayjs from "dayjs"; 6 | import { update, datenum_local } from '../global/format'; 7 | import { setCellValue, setCellFormat } from '../global/api'; 8 | 9 | const fitFormat = (formatStr) => { 10 | let dateFormat = formatStr.replace(/y/g, 'Y'); 11 | dateFormat = dateFormat.replace(/d/g, 'D'); 12 | dateFormat = dateFormat.replace(/h/g, 'H'); 13 | 14 | dateFormat = dateFormat.replace(/上午\/下午/g, 'A'); 15 | dateFormat = dateFormat.replace(/上午/g, 'A'); 16 | dateFormat = dateFormat.replace(/下午/g, 'A'); 17 | 18 | dateFormat = dateFormat.replace(/AM\/PM/g, 'A'); 19 | dateFormat = dateFormat.replace(/AM/g, 'A'); 20 | dateFormat = dateFormat.replace(/PM/g, 'A'); 21 | dateFormat = dateFormat.replace(/\"/g, ''); 22 | 23 | if (dateFormat.includes('A')) { 24 | dateFormat = dateFormat.replace(/H/g, 'h'); 25 | } 26 | return dateFormat 27 | } 28 | 29 | const cellDatePickerCtrl = { 30 | cellFocus: function (r, c, cell) { 31 | let row = Store.visibledatarow[r], 32 | row_pre = r == 0 ? 0 : Store.visibledatarow[r - 1]; 33 | let col = Store.visibledatacolumn[c], 34 | col_pre = c == 0 ? 0 : Store.visibledatacolumn[c - 1]; 35 | 36 | let margeset = menuButton.mergeborer(Store.flowdata, r, c); 37 | let type = cell.ct.fa || 'YYYY-MM-DD'; 38 | let defaultDate = update('yyyy-MM-dd hh:mm:ss', cell.v); 39 | let dateFormat = fitFormat(type); 40 | let enableTime = false; 41 | let noCalendar = false; 42 | let enableSeconds = false; 43 | let time_24hr = true; 44 | let hasChineseTime = false; 45 | 46 | 47 | if (!!margeset) { 48 | row = margeset.row[1]; 49 | row_pre = margeset.row[0]; 50 | 51 | col = margeset.column[1]; 52 | col_pre = margeset.column[0]; 53 | } 54 | 55 | $(".cell-date-picker").show().css({ 56 | width: col - col_pre + 1, 57 | height: row - row_pre + 1, 58 | left: col_pre, 59 | top: row_pre 60 | }) 61 | 62 | if (/[上午下午]/.test(type)) { 63 | hasChineseTime = true 64 | } 65 | if (/[Hhms]/.test(dateFormat)) { 66 | enableTime = true; 67 | } 68 | if (!/[YMD]/.test(dateFormat)) { 69 | noCalendar = true; 70 | } 71 | if (/s/.test(dateFormat)) { 72 | enableSeconds = true; 73 | } 74 | if (/A/.test(dateFormat)) { 75 | time_24hr = false; 76 | } 77 | 78 | const fp = flatpickr('#luckysheet-input-box', { 79 | allowInput: false, 80 | noCalendar, 81 | enableSeconds, 82 | enableTime, 83 | dateFormat, 84 | time_24hr, 85 | defaultDate, 86 | onClose() { 87 | setTimeout(() => { 88 | fp.destroy() 89 | }, 0); 90 | }, 91 | parseDate: (datestr, format) => { 92 | return dayjs(datestr).toDate(); 93 | }, 94 | formatDate: (date, format, locale) => { 95 | if (hasChineseTime) { 96 | return dayjs(date).format(format).replace('AM', '上午').replace('PM', '下午') 97 | } 98 | return dayjs(date).format(format); 99 | }, 100 | onChange: function (selectedDates, dateStr) { 101 | let currentVal = datenum_local(new Date(selectedDates)) 102 | $("#luckysheet-rich-text-editor").html(dateStr); 103 | setCellValue(r, c, currentVal, { isRefresh: false }) 104 | setCellFormat(r, c, 'ct', cell.ct) 105 | if (!enableTime) { 106 | formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]); 107 | } 108 | } 109 | }); 110 | 111 | $("#luckysheet-input-box").click(); 112 | }, 113 | } 114 | 115 | export default cellDatePickerCtrl; 116 | -------------------------------------------------------------------------------- /src/controllers/cellFormat.js: -------------------------------------------------------------------------------- 1 | import Store from '../store'; 2 | import { replaceHtml,transformRangeToAbsolute,openSelfModel } from '../utils/util'; 3 | import { modelHTML } from './constant'; 4 | import sheetmanage from './sheetmanage'; 5 | import menuButton from './menuButton'; 6 | import {checkProtectionNotEnable} from './protection'; 7 | import { jfrefreshgrid } from '../global/refresh'; 8 | import locale from '../locale/locale'; 9 | import { setcellvalue } from '../global/setdata'; 10 | 11 | 12 | let isInitialCellFormatModel = false; 13 | 14 | function initialCellFormatModelEvent(){ 15 | const _locale = locale(); 16 | const local_cellFormat = _locale.cellFormat; 17 | 18 | $("#luckysheet-cellFormat-confirm").click(function(){ 19 | let locked = $("#luckysheet-protection-check-locked").is(':checked'); 20 | let hidden = $("#luckysheet-protection-check-hidden").is(':checked'); 21 | 22 | locked = locked==true?1:0; 23 | hidden = hidden==true?1:0; 24 | 25 | let d = recycleSeletion( 26 | function(cell, r, c, data){ 27 | if(cell==null){ 28 | setcellvalue(r, c, data, { 29 | lo:locked, 30 | hi:hidden 31 | }); 32 | } 33 | else{ 34 | cell.lo = locked; 35 | cell.hi = hidden; 36 | } 37 | }, 38 | function(){ 39 | alert(local_cellFormat.sheetDataIsNullAlert); 40 | } 41 | ); 42 | 43 | jfrefreshgrid(d, undefined, undefined, false); 44 | 45 | $("#luckysheet-cellFormat-config").hide(); 46 | $("#luckysheet-modal-dialog-mask").hide(); 47 | }); 48 | } 49 | 50 | function recycleSeletion(cycleFunction, dataIsNullFunction){ 51 | if(Store.luckysheet_select_save != null && Store.luckysheet_select_save.length > 0){ 52 | let sheetFile = sheetmanage.getSheetByIndex(), data=sheetFile.data; 53 | if(data!=null){ 54 | 55 | for(let i=0;i