git save current version as 0.0.8
@@ -1 +0,0 @@
|
||||
src
|
||||
@@ -1,12 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # [mengshukeji]
|
||||
patreon: mengshukeji
|
||||
open_collective: luckysheet
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: ['https://www.paypal.me/wbfsa']
|
||||
@@ -1,38 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: "[BUG]Find a bug"
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!--- Thank you for your attention and submit the issue, we hope that besides submitting the issue, you can also help us to understand your user case of Luckysheet, please help fill out the following solicitation form -->
|
||||
|
||||
<!-- Wanted: Who is using Luckysheet https://github.com/mengshukeji/Luckysheet/issues/230 -->
|
||||
|
||||
<!-- The following is the issues template -->
|
||||
|
||||
**Describe the bug**
|
||||
<!--- A clear and concise description of what the bug is. -->
|
||||
|
||||
**To Reproduce**
|
||||
<!--- Steps to reproduce the behavior. -->
|
||||
1. The first step:
|
||||
2. The second step:
|
||||
3. The third step:
|
||||
4. See error:
|
||||
|
||||
**What is expected?**
|
||||
<!--- A clear and concise description of what you expected to happen. -->
|
||||
|
||||
**Screenshots or demo**
|
||||
<!--- If applicable, add screenshots or online demo to help explain your problem.We will be more accurate when we retest. -->
|
||||
|
||||
**Environment**
|
||||
- OS: <!--- [e.g. Windows,Mac,Linux] -->
|
||||
- Browser Version: <!---[e.g. Chrome Version 84.0.4147.105 (Official Build) (64-bit), Safari,Firefox,Edge] -->
|
||||
- Luckysheet Version: <!---[e.g. 1.0.1,latest] -->
|
||||
|
||||
**Additional context**
|
||||
<!--- Add any other context about the problem here. -->
|
||||
@@ -1,38 +0,0 @@
|
||||
---
|
||||
name: '错误报告'
|
||||
about: 创建报告帮助我们改进
|
||||
title: '[BUG]发现了个bug'
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!--- 感谢您的关注并发现问题,我们希望除了提交问题,还能帮助我们对您使用Luckysheet做进一步的了解,请帮忙填写以下征集表 -->
|
||||
|
||||
<!-- 征求:谁在使用Luckysheet https://github.com/mengshukeji/Luckysheet/issues/230 -->
|
||||
|
||||
<!-- 以下是issues正文模板 -->
|
||||
|
||||
**描述错误**
|
||||
<!--- 清楚简洁地描述错误是什么 -->
|
||||
|
||||
**重现**
|
||||
<!--- 重现错误的步骤 -->
|
||||
1. 第一步操作:
|
||||
2. 第二步操作:
|
||||
3. 第三步操作:
|
||||
4. 最后看到了什么错误:
|
||||
|
||||
**期望的结果**
|
||||
<!--- 对您期望发生的结果简洁明了的描述 -->
|
||||
|
||||
**屏幕截图或演示**
|
||||
<!--- 方便的话,贴上屏幕截图或在线链接复现问题,我们复测时会更精准 -->
|
||||
|
||||
**环境:**
|
||||
- 操作系统:<!--- [例如 Windows,Mac,Linux] -->
|
||||
- 浏览器 版本号:<!--- [例如 Chrome 版本 84.0.4147.105(正式版本) (64 位),Safari,Firefox,Edge] -->
|
||||
- Luckysheet版本:<!--- [例如 1.0.1,最新] -->
|
||||
|
||||
**备注**
|
||||
<!--- 其他说明 -->
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: "[Feature request]I have an idea"
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!--- Thank you for your attention and submit the issue, we hope that besides submitting the issue, you can also help us to understand your user case of Luckysheet, please help fill out the following solicitation form -->
|
||||
|
||||
<!-- Wanted: Who is using Luckysheet https://github.com/mengshukeji/Luckysheet/issues/230 -->
|
||||
|
||||
<!-- The following is the issues template -->
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
<!--- A clear and concise description of what the problem is. -->
|
||||
|
||||
**Describe the solution you'd like**
|
||||
<!--- A clear and concise description of what you want to happen. -->
|
||||
|
||||
**Additional context**
|
||||
<!--- Add any other context or screenshots about the feature request here. -->
|
||||
@@ -1,24 +0,0 @@
|
||||
---
|
||||
name: 功能要求
|
||||
about: 为这个项目提出想法
|
||||
title: "[Feature request]我有个点子"
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!--- 感谢您的关注并发现问题,我们希望除了提交问题,还能帮助我们对您使用Luckysheet做进一步的了解,请帮忙填写以下征集表 -->
|
||||
|
||||
<!-- 征求:谁在使用Luckysheet https://github.com/mengshukeji/Luckysheet/issues/230 -->
|
||||
|
||||
<!-- 以下是issues正文模板 -->
|
||||
|
||||
**您的功能请求与问题有关吗?**
|
||||
<!--- 清楚简洁地说明问题 -->
|
||||
|
||||
|
||||
**描述您想要的解决方案**
|
||||
<!--- 对您想要的功能效果简洁明了的描述 -->
|
||||
|
||||
**其他内容**
|
||||
<!--- 其他说明 -->
|
||||
@@ -1,40 +0,0 @@
|
||||
# 使用 GitHub Action 来解决手动同步到 Gitee 的问题
|
||||
# 效果:github repo 代码更新之后,会自动同步至 gitee
|
||||
# 使用到的 GitHub Action:https://github.com/Yikun/hub-mirror-action
|
||||
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: gitee-mirror<sync2gitee.com>
|
||||
|
||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
||||
# events but only for the master branch
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
- name: Mirror the Github organization repos to Gitee.
|
||||
uses: Yikun/hub-mirror-action@master
|
||||
with:
|
||||
src: github/mengshukeji
|
||||
dst: gitee/mengshukeji
|
||||
# 这里请填写与gitee上公钥匹配的的 ssh private key,参见:https://gitee.com/profile/sshkeys
|
||||
# 填写地址:https://github.com/ly525/luban-h5/settings/secrets
|
||||
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
|
||||
# 这里请填写 gitee的令牌,参见:https://gitee.com/profile/personal_access_tokens
|
||||
# 填写地址:https://github.com/ly525/luban-h5/settings/secrets
|
||||
dst_token: ${{ secrets.GITEE_TOKEN }}
|
||||
# 项目同步白名单,可以选择填写多个,以英文逗号分割
|
||||
static_list: "Luckyexcel,Luckysheet,LuckysheetDemo,LuckyexcelDemo,LuckysheetDocs,chartMix,LuckysheetServer"
|
||||
# 是否强制同步
|
||||
force_update: true
|
||||
# 账号类型:对 luban-h5 而言是 user,因为是个人项目;如果是企业项目,请填写 org,因为是组织下的项目
|
||||
account_type: user
|
||||
@@ -1,35 +0,0 @@
|
||||
name: Luckysheet demo github pages deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout # 检查项目
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js # Nodejs版本
|
||||
uses: actions/setup-node@master
|
||||
with:
|
||||
node-version: 12.13.0
|
||||
|
||||
- name: Install dependencies & Generate static files # 安装依赖打包demo和文档
|
||||
run: |
|
||||
node -v
|
||||
npm install
|
||||
npm install gulp -g
|
||||
npm run build
|
||||
|
||||
- name: Deploy LuckysheetDemo to GitHub Pages # 发布demo 到github pages
|
||||
if: success()
|
||||
uses: crazy-max/ghaction-github-pages@v2
|
||||
with:
|
||||
repo: mengshukeji/LuckysheetDemo
|
||||
target_branch: gh-pages
|
||||
build_dir: dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
|
||||
@@ -1,35 +0,0 @@
|
||||
name: Luckysheet docs github pages deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'doc*'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout # 检查项目
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js # Nodejs版本
|
||||
uses: actions/setup-node@master
|
||||
with:
|
||||
node-version: 12.13.0
|
||||
|
||||
- name: Install dependencies & Generate static files # 安装依赖打包demo和文档
|
||||
run: |
|
||||
node -v
|
||||
npm install
|
||||
npm install gulp -g
|
||||
npm run docs:build
|
||||
|
||||
- name: Deploy LuckysheetDocs to GitHub Pages # 发布docs 到github pages
|
||||
if: success()
|
||||
uses: crazy-max/ghaction-github-pages@v2
|
||||
with:
|
||||
repo: mengshukeji/LuckysheetDocs
|
||||
target_branch: gh-pages
|
||||
build_dir: docs/.vuepress/dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
|
||||
@@ -1,12 +0,0 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
dist
|
||||
docs/.vuepress/dist
|
||||
src/expendPlugins/print/print.js
|
||||
|
||||
.idea
|
||||
.history
|
||||
.vs
|
||||
.vscode
|
||||
@@ -1,9 +0,0 @@
|
||||
dist
|
||||
|
||||
*.css
|
||||
*.html
|
||||
*.md
|
||||
*.yml
|
||||
*.min.js
|
||||
package.json
|
||||
package-lock.json
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"printWidth": 80,
|
||||
"trailingComma": "es5",
|
||||
"tabWidth": 2,
|
||||
"semi": true,
|
||||
"singleQuote": false,
|
||||
"arrowParens": "avoid"
|
||||
}
|
||||
@@ -1,474 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
### [2.1.13](https://github.com/mengshukeji/Luckysheet/compare/v2.1.12...v2.1.13) (2021-01-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bug:** bug ([025823b](https://github.com/mengshukeji/Luckysheet/commit/025823b9f386c8048aa44b62f076a739eaa980c0)), closes [#435](https://github.com/mengshukeji/Luckysheet/issues/435)
|
||||
* **bug:** bug ([a8ff967](https://github.com/mengshukeji/Luckysheet/commit/a8ff967be9cdcf3bbcb0045888951a26a852500a)), closes [#398](https://github.com/mengshukeji/Luckysheet/issues/398)
|
||||
* **bug:** bug ([deb3a96](https://github.com/mengshukeji/Luckysheet/commit/deb3a965b881d747f9a2171f7d9c9f967d671901))
|
||||
* **bug:** bug ([5ce1f4a](https://github.com/mengshukeji/Luckysheet/commit/5ce1f4a0b753b7a95569b5285d749389e4d8b943)), closes [#433](https://github.com/mengshukeji/Luckysheet/issues/433)
|
||||
* **bug:** bug ([932e821](https://github.com/mengshukeji/Luckysheet/commit/932e8215563248f97547ad21a429ef3f8ed0682b)), closes [#423](https://github.com/mengshukeji/Luckysheet/issues/423) [#424](https://github.com/mengshukeji/Luckysheet/issues/424)
|
||||
* **bug:** bug ([06636f6](https://github.com/mengshukeji/Luckysheet/commit/06636f6a3c08128fe50aa880baabc9420fce4092)), closes [#154](https://github.com/mengshukeji/Luckysheet/issues/154) [#410](https://github.com/mengshukeji/Luckysheet/issues/410) [#416](https://github.com/mengshukeji/Luckysheet/issues/416)
|
||||
* **bug:** history bug ([973eec8](https://github.com/mengshukeji/Luckysheet/commit/973eec8b71ea963bb23c9fe35c985e86c85ef019))
|
||||
* **bug:** setRangeFormat history ([065148b](https://github.com/mengshukeji/Luckysheet/commit/065148b5a97e9090479f401463c548c3346757ec))
|
||||
* **bug:** setRangeShow api ([5bbc45b](https://github.com/mengshukeji/Luckysheet/commit/5bbc45b68e807a2c58c328d93fe8079f3e56fa9f))
|
||||
* bug ([7412c5b](https://github.com/mengshukeji/Luckysheet/commit/7412c5b4f5aa0afd93f3e0210d3f3fe182c67273))
|
||||
* **bug:** 文本自动换行bug ([bc926e5](https://github.com/mengshukeji/Luckysheet/commit/bc926e5c49f008c14b4b5e1fdf13713fd6e995b5))
|
||||
* 换行 ([94022a4](https://github.com/mengshukeji/Luckysheet/commit/94022a48b6407523c5924e94c86fb2ada0fab301))
|
||||
* **bug:** 渲染换行空行 ([4162b7a](https://github.com/mengshukeji/Luckysheet/commit/4162b7a049f109715a9246ce610d05882d5a5f12))
|
||||
* **hook:** cellrender ([d444980](https://github.com/mengshukeji/Luckysheet/commit/d44498086fcd3b1b2bf75e95c6a236bc79a1df13))
|
||||
* **let:** let declar ([71ade32](https://github.com/mengshukeji/Luckysheet/commit/71ade32abd3989230db609ec37f92e931a4473f0))
|
||||
* **pivottable:** fix ([7cecb12](https://github.com/mengshukeji/Luckysheet/commit/7cecb12ae3a1a0bd0d5bdce803429d4464388e31)), closes [#439](https://github.com/mengshukeji/Luckysheet/issues/439) [#447](https://github.com/mengshukeji/Luckysheet/issues/447)
|
||||
* **pivottable:** init ([5b19e8b](https://github.com/mengshukeji/Luckysheet/commit/5b19e8b06bdd95c2b799d2cc1d6ae677b96617cd))
|
||||
* **pivottable:** refresh ([78330c9](https://github.com/mengshukeji/Luckysheet/commit/78330c95db2735c8139b0320c2e81ee6f438adea))
|
||||
|
||||
### [2.1.12](https://github.com/mengshukeji/Luckysheet/compare/v2.1.11...v2.1.12) (2020-12-22)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **api:** find ([ea97233](https://github.com/mengshukeji/Luckysheet/commit/ea97233a668b3a682f6f0b1ad3fec251b01c33ab))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bug:** bug ([9357792](https://github.com/mengshukeji/Luckysheet/commit/9357792fd1c49737398cf86cdf87d9dbfe35df26)), closes [#359](https://github.com/mengshukeji/Luckysheet/issues/359) [#360](https://github.com/mengshukeji/Luckysheet/issues/360) [#376](https://github.com/mengshukeji/Luckysheet/issues/376) [#382](https://github.com/mengshukeji/Luckysheet/issues/382)
|
||||
* **bug:** bug ([19560eb](https://github.com/mengshukeji/Luckysheet/commit/19560eba3fe36cce4ee65ba3e8ac80ab7ec8d620)), closes [#367](https://github.com/mengshukeji/Luckysheet/issues/367) [#370](https://github.com/mengshukeji/Luckysheet/issues/370)
|
||||
* **bug:** bug ([0f257e8](https://github.com/mengshukeji/Luckysheet/commit/0f257e8f153bb6c0cf38fb85200c587aabac164c)), closes [#361](https://github.com/mengshukeji/Luckysheet/issues/361) [#364](https://github.com/mengshukeji/Luckysheet/issues/364) [#365](https://github.com/mengshukeji/Luckysheet/issues/365)
|
||||
* **bug:** copy bug ([2bcbab9](https://github.com/mengshukeji/Luckysheet/commit/2bcbab9a9f4727fd03930962a2dbdcaec3401597))
|
||||
* **feature:** functionButton ([5983cb0](https://github.com/mengshukeji/Luckysheet/commit/5983cb015e092e2edc1d3f27dba2d585fb4db099)), closes [#336](https://github.com/mengshukeji/Luckysheet/issues/336) [#381](https://github.com/mengshukeji/Luckysheet/issues/381)
|
||||
* copy ([d177cc8](https://github.com/mengshukeji/Luckysheet/commit/d177cc8f5ee01d32932d1137920883209ec24be4))
|
||||
|
||||
### [2.1.10](https://github.com/mengshukeji/Luckysheet/compare/v2.1.9...v2.1.10) (2020-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **rowtitle:** bug ([8faeffe](https://github.com/mengshukeji/Luckysheet/commit/8faeffee08840a5e8119d9fc8ac7204248105616))
|
||||
|
||||
### [2.1.9](https://github.com/mengshukeji/Luckysheet/compare/v2.1.8...v2.1.9) (2020-12-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bug:** bug ([54ae143](https://github.com/mengshukeji/Luckysheet/commit/54ae143aa268b5ce0253752a2a92b2ab22601b42)), closes [#222](https://github.com/mengshukeji/Luckysheet/issues/222) [#355](https://github.com/mengshukeji/Luckysheet/issues/355)
|
||||
* **numeral:** userInfo ([871d381](https://github.com/mengshukeji/Luckysheet/commit/871d3819f7c734b604f19da1ba81bf5ee0ea0814)), closes [#338](https://github.com/mengshukeji/Luckysheet/issues/338)
|
||||
|
||||
### [2.1.8](https://github.com/mengshukeji/Luckysheet/compare/v2.1.7...v2.1.8) (2020-12-16)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **bug:** n
|
||||
|
||||
### Features
|
||||
|
||||
* **api add:** image ([16131b2](https://github.com/mengshukeji/Luckysheet/commit/16131b2776cd278bb7bddae674c206aa739f3a46)), closes [#270](https://github.com/mengshukeji/Luckysheet/issues/270)
|
||||
* **changlang:** changLang ([cbc81e9](https://github.com/mengshukeji/Luckysheet/commit/cbc81e9e17ca56e09f9e697e5372650f3d6a476b)), closes [#318](https://github.com/mengshukeji/Luckysheet/issues/318)
|
||||
* **collaborative editing:** collaborative editing ([6fe8726](https://github.com/mengshukeji/Luckysheet/commit/6fe87260e8986cd83e7bcf655594389c01739107)), closes [#199](https://github.com/mengshukeji/Luckysheet/issues/199) [#201](https://github.com/mengshukeji/Luckysheet/issues/201) [#202](https://github.com/mengshukeji/Luckysheet/issues/202)
|
||||
* **condition format:** formula condition ([6c98bde](https://github.com/mengshukeji/Luckysheet/commit/6c98bded8dcf16aab4bcc89a63a62d3878c06cd3)), closes [#186](https://github.com/mengshukeji/Luckysheet/issues/186)
|
||||
* **demo:** proxy ([bc64807](https://github.com/mengshukeji/Luckysheet/commit/bc64807de9e3f8f60ddc529c6b795c95aff1884c))
|
||||
* **feature:** closeWebsocket api and ctrl ; ([9153bc7](https://github.com/mengshukeji/Luckysheet/commit/9153bc799db2aea947f2ba70a7b947daca55b844)), closes [#328](https://github.com/mengshukeji/Luckysheet/issues/328) [#326](https://github.com/mengshukeji/Luckysheet/issues/326)
|
||||
* **hook:** add ([2c6b1c2](https://github.com/mengshukeji/Luckysheet/commit/2c6b1c21b3ad6535671745fd7483d9318f7e55ec))
|
||||
* **print feature:** develop ([a0921b6](https://github.com/mengshukeji/Luckysheet/commit/a0921b62d73b8b3edcaf1c72dd9e35cd43848f2f))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **add forcecaculation config:** add ([e96d210](https://github.com/mengshukeji/Luckysheet/commit/e96d210fe544caa8b912720a274374bccb0cef7d))
|
||||
* **bug:** bug ([95e26c3](https://github.com/mengshukeji/Luckysheet/commit/95e26c3fa07fa74c238c0c7b96b5b7ff91b79889)), closes [#330](https://github.com/mengshukeji/Luckysheet/issues/330)
|
||||
* **bug:** bug ([c003f8a](https://github.com/mengshukeji/Luckysheet/commit/c003f8a4281f346c89226061851f71693208574a)), closes [#184](https://github.com/mengshukeji/Luckysheet/issues/184) [#337](https://github.com/mengshukeji/Luckysheet/issues/337)
|
||||
* **bug:** bug ([4900b4a](https://github.com/mengshukeji/Luckysheet/commit/4900b4a0f2a82528e130d7281bb1f153ed3297fe)), closes [#331](https://github.com/mengshukeji/Luckysheet/issues/331)
|
||||
* **bug:** bug ([b93ea6b](https://github.com/mengshukeji/Luckysheet/commit/b93ea6b66e444d387f230602dd02034b4b237369)), closes [#284](https://github.com/mengshukeji/Luckysheet/issues/284) [#296](https://github.com/mengshukeji/Luckysheet/issues/296)
|
||||
* **bug:** bug ([57ff2b9](https://github.com/mengshukeji/Luckysheet/commit/57ff2b959b4be8d5cad559624d92f00e996d315f)), closes [#182](https://github.com/mengshukeji/Luckysheet/issues/182) [#220](https://github.com/mengshukeji/Luckysheet/issues/220)
|
||||
* **bug:** bug ([31bdc4f](https://github.com/mengshukeji/Luckysheet/commit/31bdc4feae0037c92074b244e9e52363298b164d)), closes [#263](https://github.com/mengshukeji/Luckysheet/issues/263)
|
||||
* **bug:** bug ([385bc03](https://github.com/mengshukeji/Luckysheet/commit/385bc039c91727655ea771c7a48d6f0890a275fb)), closes [#243](https://github.com/mengshukeji/Luckysheet/issues/243) [#226](https://github.com/mengshukeji/Luckysheet/issues/226)
|
||||
* **bug:** bug ([88aa6c5](https://github.com/mengshukeji/Luckysheet/commit/88aa6c5b59964078c6a9cfffb41308c196a44953)), closes [#278](https://github.com/mengshukeji/Luckysheet/issues/278) [#276](https://github.com/mengshukeji/Luckysheet/issues/276) [#267](https://github.com/mengshukeji/Luckysheet/issues/267) [#215](https://github.com/mengshukeji/Luckysheet/issues/215)
|
||||
* **bug:** copy to excel ([5cf72ec](https://github.com/mengshukeji/Luckysheet/commit/5cf72ec0781f0e3b2ddc77eac228812507ce66a2)), closes [#319](https://github.com/mengshukeji/Luckysheet/issues/319)
|
||||
* **bug:** data verification range select ([6d60679](https://github.com/mengshukeji/Luckysheet/commit/6d606791abaa5d410ce68cfb49f8bc9c2dfaf609))
|
||||
* **cell:** render ([ba21140](https://github.com/mengshukeji/Luckysheet/commit/ba2114055ba62b0401c76075054588642fa4fbf1))
|
||||
* **demo:** websocket url ([cf77ec3](https://github.com/mengshukeji/Luckysheet/commit/cf77ec3307c0d44bc5303f606762c003d4f50b86))
|
||||
* **dynamic array refresh fix:** fix ([b7d634f](https://github.com/mengshukeji/Luckysheet/commit/b7d634f0425dd8cb337784b10094d0952edc460a))
|
||||
* **fix #209:** highlight ([ab2d8b7](https://github.com/mengshukeji/Luckysheet/commit/ab2d8b7b5467200e12c8d4c1ece014ebfc6ee7cc)), closes [#209](https://github.com/mengshukeji/Luckysheet/issues/209)
|
||||
* **fix #209 ,fix #219:** highlight follow checkout keep highlight ([c547596](https://github.com/mengshukeji/Luckysheet/commit/c5475964e41eb7bb12d87b679dffba4b988abb30)), closes [#209](https://github.com/mengshukeji/Luckysheet/issues/209) [#219](https://github.com/mengshukeji/Luckysheet/issues/219)
|
||||
* **fix #209 fix #219:** highlight follow checkout page ([0a5ca86](https://github.com/mengshukeji/Luckysheet/commit/0a5ca86ab808d2cb1da8cb14d93c5d787c50f540)), closes [#209](https://github.com/mengshukeji/Luckysheet/issues/209) [#219](https://github.com/mengshukeji/Luckysheet/issues/219)
|
||||
* **fix #209 fix #219:** highlight follow, checkout keep highlight ([2c7b0bb](https://github.com/mengshukeji/Luckysheet/commit/2c7b0bbdf5adf1b2a6fc537e37825ab01ee3cf96)), closes [#209](https://github.com/mengshukeji/Luckysheet/issues/209) [#219](https://github.com/mengshukeji/Luckysheet/issues/219)
|
||||
* **fix #290:** userinfo ([80d67e1](https://github.com/mengshukeji/Luckysheet/commit/80d67e157d010f8e59c472b2e6046c04efe9b966)), closes [#290](https://github.com/mengshukeji/Luckysheet/issues/290)
|
||||
* **fix #290:** userinfo ([dddfc8f](https://github.com/mengshukeji/Luckysheet/commit/dddfc8f9418991466025682309e73950da6611cd)), closes [#290](https://github.com/mengshukeji/Luckysheet/issues/290)
|
||||
* **fix #290:** userinfo ([27a770e](https://github.com/mengshukeji/Luckysheet/commit/27a770ee863356d2ef120970723bb048c510d9aa)), closes [#290](https://github.com/mengshukeji/Luckysheet/issues/290)
|
||||
* **main canvas:** bottom space ([23c8a78](https://github.com/mengshukeji/Luckysheet/commit/23c8a78cb3bd387c7c609250de41b187105475b5))
|
||||
* **tojson:** bug ([1c94783](https://github.com/mengshukeji/Luckysheet/commit/1c94783677bcfe6488caf39028f18e5b2505a737))
|
||||
* setCellValue API 可设置自定义的属性,不显式设置v, v 不会丢失 ([6d45cf2](https://github.com/mengshukeji/Luckysheet/commit/6d45cf2ce63dca282f4a40ce5aaf628f94bfc8d1))
|
||||
* jfrefreshgrid 函数第二个参数应该是个数组 ([c7cf87a](https://github.com/mengshukeji/Luckysheet/commit/c7cf87a49b1b8ce64fb21249cd05950fabc0e546))
|
||||
* setCellFormat data 引用 ([ed50e47](https://github.com/mengshukeji/Luckysheet/commit/ed50e47b44e079bc76419ba3f96f04d964c70610))
|
||||
* setCellValue 刷新页面时的历史记录问题 ([a2cf969](https://github.com/mengshukeji/Luckysheet/commit/a2cf96978f97b289d603aa404bcfaf8a0d64f87b))
|
||||
* 修复alert ([94e0020](https://github.com/mengshukeji/Luckysheet/commit/94e0020acd49aed50810e6c133688c950690ab3c))
|
||||
* 修复主动关闭socket仍然alert弹窗 ([e0bdb2c](https://github.com/mengshukeji/Luckysheet/commit/e0bdb2c4015355e428c5e8d567196d607606a38e))
|
||||
* 修复主动关闭socket定时器仍运行问题 ([82a8731](https://github.com/mengshukeji/Luckysheet/commit/82a87319342c698c1a1a58972a9d59ab3b7e91cd))
|
||||
* 初始化表单状态下标调整 ([3a54312](https://github.com/mengshukeji/Luckysheet/commit/3a54312c93a6daebf575639dd612e0d01be2a296))
|
||||
* 复制选区虚线框正确显示 ([9d6a2ee](https://github.com/mengshukeji/Luckysheet/commit/9d6a2eed05ae660fb65515217e156817fc4d6443))
|
||||
* 解决单击非时间日期单元格后还会跳出日期时间弹框 ([fc9eb4e](https://github.com/mengshukeji/Luckysheet/commit/fc9eb4e7984af6991b79acae6a2a5c0bbea5254f))
|
||||
* **fix forcecaculation feature:** complete ([7568ceb](https://github.com/mengshukeji/Luckysheet/commit/7568ceb442acdfdedeb6d6e4d623bdcd2a8c4018))
|
||||
* **formula contain text bug:** add iscell method ([89358d3](https://github.com/mengshukeji/Luckysheet/commit/89358d36045baca791f2b5e9d2152349bf5903cf))
|
||||
* **formula update fix:** formula update only one level, when cell value change. Fix it ([cf6c5be](https://github.com/mengshukeji/Luckysheet/commit/cf6c5be8a45616e1002db0ff4b04b47c3ed4c38e))
|
||||
|
||||
### [2.1.7](https://github.com/mengshukeji/Luckysheet/compare/v2.1.6...v2.1.7) (2020-11-26)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **demo:** tool function ([3baf93c](https://github.com/mengshukeji/Luckysheet/commit/3baf93cdb57238ee73ace3e7b9bca142fad81584))
|
||||
* 修改日期能够正常的弹出格式框和设置对应格式的日期时间 ([2c27044](https://github.com/mengshukeji/Luckysheet/commit/2c2704473c1c5a77091acda45a46f39ebbad3592))
|
||||
* 修改日期能够正常的弹出格式框和设置对应格式的日期时间 ([67c44e7](https://github.com/mengshukeji/Luckysheet/commit/67c44e7a68d948fcb90bd499ecc15cfb2bea5127))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **formula:** function ([dad6e2b](https://github.com/mengshukeji/Luckysheet/commit/dad6e2b2d144a31f4cfaaf84c90588e1a02ee006))
|
||||
* **formular:** docs ([ddac582](https://github.com/mengshukeji/Luckysheet/commit/ddac582f696898a1a46fc0ce3eb5d245d20077ae))
|
||||
* **hook:** function ([fb43a56](https://github.com/mengshukeji/Luckysheet/commit/fb43a56222c3d4c77b84efa9ff37eed8e1333a1a))
|
||||
* **hook function:** cellupdate ([5e8f71f](https://github.com/mengshukeji/Luckysheet/commit/5e8f71f32e5104769dbe6e0c61de3cd26b286344))
|
||||
* ie11右下角菜单图标会出现错位 ([34fd6e7](https://github.com/mengshukeji/Luckysheet/commit/34fd6e74cb87f9563ff28979d9f5f8a192fb558a))
|
||||
* 重复create会出现很多问题 ([8f22790](https://github.com/mengshukeji/Luckysheet/commit/8f227904fe9600ea17fdc346924d73c3bc81a041))
|
||||
|
||||
### [2.1.6](https://github.com/mengshukeji/Luckysheet/compare/v2.1.5...v2.1.6) (2020-11-23)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* yes
|
||||
|
||||
q
|
||||
|
||||
### Features
|
||||
|
||||
* **api:** hook function ([a0db530](https://github.com/mengshukeji/Luckysheet/commit/a0db530295bca24b81b02171a073f6b6f1227ce6))
|
||||
* **hook:** add hook function ([215dec2](https://github.com/mengshukeji/Luckysheet/commit/215dec27d796ee9b5be7857a425093a53db84332))
|
||||
* q ([54a42a2](https://github.com/mengshukeji/Luckysheet/commit/54a42a274a96eb3334602fd0de65e1d4b2fc492a))
|
||||
* **bottom alignment of english letters:** fix ([a596d2f](https://github.com/mengshukeji/Luckysheet/commit/a596d2fcd617cac196e3336a8dfe8ac9ba58c9f7))
|
||||
* **config:** sheetRightClickConfig ([59c7cb3](https://github.com/mengshukeji/Luckysheet/commit/59c7cb34a33450e59023fd1ae5e615f3e40ef0d9))
|
||||
* add underline button ([df56ba6](https://github.com/mengshukeji/Luckysheet/commit/df56ba6f359bb12eb765b26b973100c554601eca))
|
||||
* use npm dependencies ([e4bd439](https://github.com/mengshukeji/Luckysheet/commit/e4bd439a0e96dbec0cb3a45e01aaecb129fab2ad))
|
||||
* **row and column width:** batch change the height and width of the selected row and column ([956bd2a](https://github.com/mengshukeji/Luckysheet/commit/956bd2a01012b429c58a14b5b88d02a02350b662))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bug fix:** [#26](https://github.com/mengshukeji/Luckysheet/issues/26) [#91](https://github.com/mengshukeji/Luckysheet/issues/91) ([a26ffd8](https://github.com/mengshukeji/Luckysheet/commit/a26ffd8ac388db475dfd38e4ae83098eeeee8bc8))
|
||||
* **cooperative:** bug ([9e48c72](https://github.com/mengshukeji/Luckysheet/commit/9e48c72a47022188d387558b5b5f3a6250878c65))
|
||||
* **demo:** ie11 ([e7ddc39](https://github.com/mengshukeji/Luckysheet/commit/e7ddc397c8b1e421c63f3e9f661ced99a3d81556)), closes [#234](https://github.com/mengshukeji/Luckysheet/issues/234)
|
||||
* **fix #212:** cancel highlight ([289d3ef](https://github.com/mengshukeji/Luckysheet/commit/289d3ef46ebadf9662d272109a1f24d2a8b0dc1d)), closes [#212](https://github.com/mengshukeji/Luckysheet/issues/212)
|
||||
* **fix #219:** checkout ([15dca04](https://github.com/mengshukeji/Luckysheet/commit/15dca040840d228f6326d4eecad917df38e15f04)), closes [#219](https://github.com/mengshukeji/Luckysheet/issues/219)
|
||||
* **fix #219:** clear info ([080f027](https://github.com/mengshukeji/Luckysheet/commit/080f0275b80143026cc30e8450c901715fc51c19)), closes [#219](https://github.com/mengshukeji/Luckysheet/issues/219)
|
||||
* sheet menu position ([a40f679](https://github.com/mengshukeji/Luckysheet/commit/a40f679fde6700c90cd66c66bb070afabb31fb83))
|
||||
* **iconfont:** conflict ([bf4d539](https://github.com/mengshukeji/Luckysheet/commit/bf4d539dddc4cef232f8eae602b39980ded5b208))
|
||||
* **mousemove hook error:** fix ([89b93e7](https://github.com/mengshukeji/Luckysheet/commit/89b93e71460750be8f736df0dbc13675daf5d72d))
|
||||
|
||||
### [2.1.5](https://github.com/mengshukeji/Luckysheet/compare/v2.1.4...v2.1.5) (2020-11-03)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cell date picker:** cell date picker and bug solve ([2996ae9](https://github.com/mengshukeji/Luckysheet/commit/2996ae9cab724714903d00e0b63022abc4a1a3b6))
|
||||
* **cell hooks add:** go to document for detail ([927ff46](https://github.com/mengshukeji/Luckysheet/commit/927ff46949f688a5bcffcb3fe48dc6b4b12b61c9))
|
||||
* **config:** custom menu button config ([14eb78e](https://github.com/mengshukeji/Luckysheet/commit/14eb78e153cbce726adf9e093702f9b93af1fa03))
|
||||
* **config:** sheetbar ([3555746](https://github.com/mengshukeji/Luckysheet/commit/3555746f4cc8ef2c1fe163a34edd428f1a6377ed))
|
||||
* **date format:** date format Chinese ([8f8d0cb](https://github.com/mengshukeji/Luckysheet/commit/8f8d0cb8c5563a31afba3fe11b525e6bccd5eb56))
|
||||
* **hyperlink:** add hyperlink function ([439dff4](https://github.com/mengshukeji/Luckysheet/commit/439dff4330ab5053643331286091d44ae910fb8d))
|
||||
* **hyperlink:** perfect hyperlink function ([5adfc60](https://github.com/mengshukeji/Luckysheet/commit/5adfc6055bf4cfed7f1ff40933d292057196bc7e))
|
||||
* **statisticbar:** config docs ([c1ed417](https://github.com/mengshukeji/Luckysheet/commit/c1ed417074e89e665f9ef39ee186db9106904c4e))
|
||||
* **tojson:** api/docs ([8e410f5](https://github.com/mengshukeji/Luckysheet/commit/8e410f5d3cd61724230b3024898d6de3c6c41101))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bug:** bug ([ad73f9a](https://github.com/mengshukeji/Luckysheet/commit/ad73f9a679d77721d8af0a483dffe70b90e56412)), closes [#129](https://github.com/mengshukeji/Luckysheet/issues/129)
|
||||
* **bug:** bug ([801cbe5](https://github.com/mengshukeji/Luckysheet/commit/801cbe5a8040d80f2e672b3607c0b92c922281a9))
|
||||
* **bug:** bug ([f8716c1](https://github.com/mengshukeji/Luckysheet/commit/f8716c18db05c7ab8bf59d1feb0dc4c3b364c560)), closes [#67](https://github.com/mengshukeji/Luckysheet/issues/67) [#85](https://github.com/mengshukeji/Luckysheet/issues/85)
|
||||
* **bug:** bug ([0909f5e](https://github.com/mengshukeji/Luckysheet/commit/0909f5e4c957e3d3248a8c86d6e092c5a5396112)), closes [#142](https://github.com/mengshukeji/Luckysheet/issues/142) [#132](https://github.com/mengshukeji/Luckysheet/issues/132)
|
||||
* **bug:** dataVerification and sheet move and delete cell bug ([4815d86](https://github.com/mengshukeji/Luckysheet/commit/4815d86ce564da43aa1ced3b48d38e88afc39f77))
|
||||
* **conflict:** conflict ([b11de26](https://github.com/mengshukeji/Luckysheet/commit/b11de26c4d2dbdd7e9d4363558e95d4433f26585))
|
||||
* **conflict:** toolbar ([8cfa6ac](https://github.com/mengshukeji/Luckysheet/commit/8cfa6ac1bec8bcb156fe45e8c488aa7026b65738))
|
||||
* **fix bug with inline string rotate wrap:** add change to max, fix height error ([1988687](https://github.com/mengshukeji/Luckysheet/commit/198868719ffb19738ee5ecc1ee060a0840fa92df))
|
||||
* **hide row/column:** right click menu ([8070858](https://github.com/mengshukeji/Luckysheet/commit/8070858f6c35f11ee8cf2692d8828d0e78c46d92)), closes [#37](https://github.com/mengshukeji/Luckysheet/issues/37)
|
||||
* **restore demo:** restore demo ([e799862](https://github.com/mengshukeji/Luckysheet/commit/e7998627400b82bf082bad3c984f4d26e3c9f43a))
|
||||
|
||||
### [2.1.3](https://github.com/mengshukeji/Luckysheet/compare/v2.1.2...v2.1.3) (2020-10-22)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **api add:** getRowHeight getColumnWidth getDefaultRowHeight getDefaultColumnWidth ([a72f38b](https://github.com/mengshukeji/Luckysheet/commit/a72f38b641a999bdf15281029777222e0bf79e85))
|
||||
* **api add:** setRowHeight setColumnWidth setSheetZoom setDataVerification deleteDataVerification ([0fd06cc](https://github.com/mengshukeji/Luckysheet/commit/0fd06cc4d7f465967b3bcc91e0b2484ba61b71f6))
|
||||
* **api add:** setSheetOrder refresh getScreenshot setWorkbookName undo redo ([b2a4617](https://github.com/mengshukeji/Luckysheet/commit/b2a46171c2cfcd9682537a801a1ea68e7e2d3ba0))
|
||||
* **api and config:** api exitEditMode() scroll() config defaultFontSize ([5eedc48](https://github.com/mengshukeji/Luckysheet/commit/5eedc48a764727bebe09fd626087b158b2979c1e))
|
||||
* **support spanish:** support Spanish ([41c527c](https://github.com/mengshukeji/Luckysheet/commit/41c527c6f39a8cb3a99d3fc70603f29ab7ba0a82))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **api:** api ([14d72eb](https://github.com/mengshukeji/Luckysheet/commit/14d72ebe56a2f87f0df5d14595c60e41fe9af077))
|
||||
* **bug:** postil image zoom ([76dbb5c](https://github.com/mengshukeji/Luckysheet/commit/76dbb5cc613c8290696e917c554aff934050b6a2))
|
||||
* **destroy function repaire:** repair ([02b9fe7](https://github.com/mengshukeji/Luckysheet/commit/02b9fe75f28a87a475bd0593522b20d030d31b85))
|
||||
* **event name:** fix ([f64ba54](https://github.com/mengshukeji/Luckysheet/commit/f64ba54455e2a757c72fb4c0110fef2cc5ccdaab))
|
||||
* **fix focus after formula edit:** fix ([0ee5f31](https://github.com/mengshukeji/Luckysheet/commit/0ee5f31f5ce84c1a7fab2af17ff102790603e3bb))
|
||||
* **fix text whole text wrap bug:** fix ([ef3d324](https://github.com/mengshukeji/Luckysheet/commit/ef3d324e80bc648080b1e5a53108b30dccf74520))
|
||||
* **function array value error:** fix it ([31e4b3d](https://github.com/mengshukeji/Luckysheet/commit/31e4b3d9e4cf16f005f8cede059b7cb1cab05031))
|
||||
* **function update fix:** fix bug ([28835bb](https://github.com/mengshukeji/Luckysheet/commit/28835bb7533087eb16866b4cdaebe94231c7832b))
|
||||
* **image:** resize and change row or column size ([05c49a2](https://github.com/mengshukeji/Luckysheet/commit/05c49a2fad21706ee7e232fe75d213fed3724109))
|
||||
* **image fuzzy:** fix it ([8fb1a88](https://github.com/mengshukeji/Luckysheet/commit/8fb1a88669d772a0067edb614e5974ada7301c9c))
|
||||
* **image zoom:** fix ([1337178](https://github.com/mengshukeji/Luckysheet/commit/1337178a991b4aa99a6e255e50d69e2c8ca47b82))
|
||||
* **index offset indirect fix:** improve the overall execution efficiency of the function ([7a2f8d0](https://github.com/mengshukeji/Luckysheet/commit/7a2f8d02daf2cc0180adc56dafcfb1d1f6d022ec))
|
||||
* **inline style:** inline style cell delete bug ([8067a01](https://github.com/mengshukeji/Luckysheet/commit/8067a012ec59a39c5a389d357c3ba2c19bc6acb9))
|
||||
* **lineheight change to 0.5:** similar to excel ([760378b](https://github.com/mengshukeji/Luckysheet/commit/760378b369b9bf71da0182ea3b413a0accb23c38))
|
||||
* **more btn:** fix more btn align middle ([c5112e9](https://github.com/mengshukeji/Luckysheet/commit/c5112e9700cd89d4820cbbbefdc0e1d3d0ed940a))
|
||||
* **more formats toolbar:** fix more formats toolbar can't sync with cell, fix mac delete button can't delete cell, fix can't delete cell with inline-style ([23fcb13](https://github.com/mengshukeji/Luckysheet/commit/23fcb137cb594cfb4bc6dfe2ac86d306c42427f9))
|
||||
* **selection bug:** fix it ([b83447d](https://github.com/mengshukeji/Luckysheet/commit/b83447d61805192d0310b20e97821eb01b790fb7))
|
||||
* **setcellvalue delete function fix:** fix it ([00b351f](https://github.com/mengshukeji/Luckysheet/commit/00b351fa0dc01c32cf9c6b8852937e7d2ceb292d))
|
||||
* **sheet name contains squotes bug:** formla can not execute, when sheet name contains squotes ([fc1dd83](https://github.com/mengshukeji/Luckysheet/commit/fc1dd837d4a3d1639914923201e853e55a865143))
|
||||
* **text wrap postion bug:** wrap and rotation postion wrong ([9538972](https://github.com/mengshukeji/Luckysheet/commit/9538972f910ed77e02ccb55c0b96386fcf87297b))
|
||||
* **the bug with first word is space:** fix ti ([6ae8319](https://github.com/mengshukeji/Luckysheet/commit/6ae83196cb50fafbf5657104babd124fac27b818))
|
||||
* **update number add quote automatically:** similar to excel ([05b01a6](https://github.com/mengshukeji/Luckysheet/commit/05b01a6c95a5d0736c51c5c1ca41e9eb463122d8))
|
||||
* **validation of "0" values:** fix ([7255c51](https://github.com/mengshukeji/Luckysheet/commit/7255c51d7b46523ff423ee5560b78d18f8535821))
|
||||
|
||||
## [2.1.0](https://github.com/mengshukeji/Luckysheet/compare/v2.0.0...v2.1.0) (2020-10-10)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **frozen,docs:** when init workbook and sheet has frozen row or column,you need init sheet's
|
||||
property frozen
|
||||
|
||||
### Features
|
||||
|
||||
* **add autocalculationmerge sheet attribute:** it can auto calculate merge infomation ([f7e30cf](https://github.com/mengshukeji/Luckysheet/commit/f7e30cf946f9c5945fd7e69bf4a3273f54e2616f))
|
||||
* **add force cacultion formula:** add forceCaculate parameter ([4dd82ad](https://github.com/mengshukeji/Luckysheet/commit/4dd82ad131e0a936c040852657b05ffd53e4b465))
|
||||
* **api:** add some api functions ([37910ab](https://github.com/mengshukeji/Luckysheet/commit/37910abea38dc37fcb5cc5b905c7b028e3390c10))
|
||||
* **api:** api ([6f7ca26](https://github.com/mengshukeji/Luckysheet/commit/6f7ca26ba22c47ed0746363dccfd1e392040aed9))
|
||||
* **api:** api ([66aecbe](https://github.com/mengshukeji/Luckysheet/commit/66aecbe7fe16be03c9c62e1ebbf941c1a9f4bac7))
|
||||
* **api:** provides an api for users ([b176753](https://github.com/mengshukeji/Luckysheet/commit/b176753ceacba3ab8a243bfe27c5ea8d9455d617))
|
||||
* **api add:** api add ([e4198fa](https://github.com/mengshukeji/Luckysheet/commit/e4198fa5bda4f6787a3153a113d2be10cfe64fd5))
|
||||
* **api add:** deleteRangeConditionalFormat clearRange deleteRange ([44cf72a](https://github.com/mengshukeji/Luckysheet/commit/44cf72a1c7592ac5227a92c3e325e7f5088bca30))
|
||||
* **api add:** setSheetDelete setSheetCopy setSheetHide setSheetShow setSheetName setSheetColor ([62f641f](https://github.com/mengshukeji/Luckysheet/commit/62f641fe7f519b8679c4e006427a74e2e17a8f98))
|
||||
* **data verification:** data verification ([a661d30](https://github.com/mengshukeji/Luckysheet/commit/a661d303101ee6ebedf22aabb60f7a5a50722b0e))
|
||||
* **data verification:** data verification ([9cbbbce](https://github.com/mengshukeji/Luckysheet/commit/9cbbbce556444182536bf0a0641c5db22d4a6007))
|
||||
* **delete cell:** delete cell ([d7de718](https://github.com/mengshukeji/Luckysheet/commit/d7de718d5e6e6308cae1ccf7a7699c3f7d790d8f))
|
||||
* **draw use sacle:** cancel manual devicePixRatio, use context sacle ([c832283](https://github.com/mengshukeji/Luckysheet/commit/c832283c9709a8393f2c6b74d50e984c7720bb34))
|
||||
* **drawmain efficiency optimization:** efficiency optimization ([37080fa](https://github.com/mengshukeji/Luckysheet/commit/37080faa39dccb23539d346080baf07ad367c2d7))
|
||||
* **editor box position fit:** show diffrent position acording to align ([636046d](https://github.com/mengshukeji/Luckysheet/commit/636046dbb2f005c2e6110b3559b72a59a7c67d87))
|
||||
* **fix:** fix ([9830714](https://github.com/mengshukeji/Luckysheet/commit/983071467d21a5eb1a35c0c427005e95364128db))
|
||||
* **hide column:** hide column ([9f05959](https://github.com/mengshukeji/Luckysheet/commit/9f05959d4d5fea7fc26e0cedb7217f0be92bcae9))
|
||||
* **image:** copy and paste ([33d6c96](https://github.com/mengshukeji/Luckysheet/commit/33d6c961bb2d88fa1ba73448c2b808957f750544))
|
||||
* **image insert:** image insert ([4232dfc](https://github.com/mengshukeji/Luckysheet/commit/4232dfc7832846013e623d13f6157ee1e371bda3))
|
||||
* **inline string:** finished ([325b66c](https://github.com/mengshukeji/Luckysheet/commit/325b66ccd0e7508535f16a7dfc51acba622cfc14))
|
||||
* **inline string:** operation like excel ([9ac9f08](https://github.com/mengshukeji/Luckysheet/commit/9ac9f08acf088b614b5318000df2e0d442df21fd))
|
||||
* **inline string:** when focus cell, show inline string content ([713805c](https://github.com/mengshukeji/Luckysheet/commit/713805cd031ccdf3e5ef1b70da504b635fed85fa))
|
||||
* **inline string render finished:** begin to develop edit feature ([2ffd9ae](https://github.com/mengshukeji/Luckysheet/commit/2ffd9aedd82e9abaf32b374337503f25d56fd9da))
|
||||
* **insert image:** insert image ([cf3ba93](https://github.com/mengshukeji/Luckysheet/commit/cf3ba930cadc90e3fc753ac30154974e74089cfc))
|
||||
* **insert image perfect:** insert image perfect ([ad0a88a](https://github.com/mengshukeji/Luckysheet/commit/ad0a88a8d412202692ce1611f6ac7fe4ac30d2e9))
|
||||
* **mobile touch event optimized:** very smooth, good experience ([0ed0bf6](https://github.com/mengshukeji/Luckysheet/commit/0ed0bf63ba06895a2ea39c581d0180db6c0d9266))
|
||||
* **new style:** new style ([5c8d603](https://github.com/mengshukeji/Luckysheet/commit/5c8d603fc41e9c214cb3dca84a147b39f2f6ce06))
|
||||
* **optimization function:** setCellvalue support any cell param ([9b208e4](https://github.com/mengshukeji/Luckysheet/commit/9b208e4e2eeeaae09dbe75b245c989f98747613a))
|
||||
* **protection feature:** protection feature similar to Excel ([a71c92a](https://github.com/mengshukeji/Luckysheet/commit/a71c92a5f05aaed6c3df1556a81fc1b2ed97419a))
|
||||
* **zoom feature beta:** zoom in and zoom out sheet ([249aa02](https://github.com/mengshukeji/Luckysheet/commit/249aa02fa6c74eb854034ee0913a73267b6057cc))
|
||||
* **zoom gui:** zoom plus and minus, restore origin, slider ([d70dab4](https://github.com/mengshukeji/Luckysheet/commit/d70dab4938ff33e1fcefdd15492279347efe6b33))
|
||||
* **zoom redo undo suport:** redo undo ([4d03906](https://github.com/mengshukeji/Luckysheet/commit/4d0390675f3aa021f7e15bf529a8102830878202))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **a few bug fix:** fix ([f07e25d](https://github.com/mengshukeji/Luckysheet/commit/f07e25d0010775b71c1e73cd3ed2db6413d661ca))
|
||||
* **add button bug:** fix ([3250ef6](https://github.com/mengshukeji/Luckysheet/commit/3250ef69606d24518d7b615806c1210c2ce0a684))
|
||||
* **allowedit dont work ,when press del:** allowEdit dont work ,when press DEL ([10dccec](https://github.com/mengshukeji/Luckysheet/commit/10dcceccc7f5f04afe70adebb4db59046382abb6))
|
||||
* **array unique very slow:** fix it ([20f3cb3](https://github.com/mengshukeji/Luckysheet/commit/20f3cb3e2028e455b49a4d1947ac8f02186363af))
|
||||
* **big data slowly:** speed up ([5109873](https://github.com/mengshukeji/Luckysheet/commit/5109873500996ac4e17abb95899f1fe5950f33b9))
|
||||
* **blank border position:** fix ([d285d9f](https://github.com/mengshukeji/Luckysheet/commit/d285d9fb5e3ff74385debaf493ad6125173644a4))
|
||||
* **bug:** bug ([6bb113b](https://github.com/mengshukeji/Luckysheet/commit/6bb113bb4421fc0497f7cf833975e4e2e7544aaa))
|
||||
* **bug:** bug ([4806de8](https://github.com/mengshukeji/Luckysheet/commit/4806de8de501c08bde6e69be1779b3327ecf2364))
|
||||
* **bug:** bug ([0cb1ec2](https://github.com/mengshukeji/Luckysheet/commit/0cb1ec23c26e2393a14475d982349a310587e7a7))
|
||||
* **bug:** bug ([735d1c8](https://github.com/mengshukeji/Luckysheet/commit/735d1c8b5c3777615b20795f70e867e576b8afbf))
|
||||
* **bug:** bug ([ad1ac61](https://github.com/mengshukeji/Luckysheet/commit/ad1ac6154502193a7e34177a08ce678522d08a03))
|
||||
* **bug:** bug ([27d1be0](https://github.com/mengshukeji/Luckysheet/commit/27d1be0037c2bd5ba290e7b0f9db229de04582d9))
|
||||
* **bug:** bug ([dea7bbf](https://github.com/mengshukeji/Luckysheet/commit/dea7bbf44414be31191841443119a3505003522e))
|
||||
* **bug:** bug ([061ea20](https://github.com/mengshukeji/Luckysheet/commit/061ea2003dca838dffb9ee92d1c43f28c64a9978))
|
||||
* **bug:** bug ([ba0b047](https://github.com/mengshukeji/Luckysheet/commit/ba0b04752f35f32df82229339bdb3f295fbcecb2))
|
||||
* **bug:** bug ([7263008](https://github.com/mengshukeji/Luckysheet/commit/726300811a9fdb6e36d19187764aa73daacfc7b7))
|
||||
* **bug:** bug ([c578c0e](https://github.com/mengshukeji/Luckysheet/commit/c578c0e34b6e589dba2ef29146d894b5c6333676))
|
||||
* **bug:** bug ([fc8f61b](https://github.com/mengshukeji/Luckysheet/commit/fc8f61b0154f2220c233e680eaf814edfce3a52b))
|
||||
* **bug:** bug ([fb3b512](https://github.com/mengshukeji/Luckysheet/commit/fb3b5122a5f4e333cca581251ef6d672da767b37))
|
||||
* **bug:** bug ([6236e5e](https://github.com/mengshukeji/Luckysheet/commit/6236e5e8d6621c0ad829206704bdc2fac684d3bc))
|
||||
* **bug:** bug ([f057d7d](https://github.com/mengshukeji/Luckysheet/commit/f057d7d281fccc7094c4f806c4590dca39cfbaa0))
|
||||
* **bug fix:** [#55](https://github.com/mengshukeji/Luckysheet/issues/55) [#50](https://github.com/mengshukeji/Luckysheet/issues/50) [#54](https://github.com/mengshukeji/Luckysheet/issues/54) ([5caf2b0](https://github.com/mengshukeji/Luckysheet/commit/5caf2b028c962e8ca2e6bd1c92fed3e6a9fb462d))
|
||||
* **bug fix:** pivotTable blank title disapear, merge cell is recognized as range ([47fe25c](https://github.com/mengshukeji/Luckysheet/commit/47fe25c32107e719115a98ceef2ed97ae6161f3b))
|
||||
* **bugs:** fix issue [#27](https://github.com/mengshukeji/Luckysheet/issues/27) [#29](https://github.com/mengshukeji/Luckysheet/issues/29) ([5d57267](https://github.com/mengshukeji/Luckysheet/commit/5d572676d46692719309c20e536d001ccfe2cd2f))
|
||||
* **celloverflow border bug:** celloverflow border bug ([86403c2](https://github.com/mengshukeji/Luckysheet/commit/86403c20b329ea4106d6498c33927b714e22941b))
|
||||
* **change sheet:** change sheet must setTimeOut ([e51457e](https://github.com/mengshukeji/Luckysheet/commit/e51457ef492ae74b77a0298931268b9f14feaa44))
|
||||
* **change sheet bug:** multiple refresh canvas bug ([7a625e0](https://github.com/mengshukeji/Luckysheet/commit/7a625e0dae187cc7af8e10e3449abf666fd332eb))
|
||||
* **change sheet scroll bar fix:** change sheet scroll bar dont restore ([02d2655](https://github.com/mengshukeji/Luckysheet/commit/02d26557a52b7cef0cb3b2b8d14996eb29fafa51))
|
||||
* **chart:** chart ([2be467d](https://github.com/mengshukeji/Luckysheet/commit/2be467d6a4b385d7d7bb0585c9be7a227614a04b))
|
||||
* **cloumn and row highlight bug:** column and row highlight bar disapear ([c806211](https://github.com/mengshukeji/Luckysheet/commit/c80621118e28f711b1513c869da36989c1a70c8f))
|
||||
* **columlen:** columlen ([b656c27](https://github.com/mengshukeji/Luckysheet/commit/b656c27a3971b756ea809f4c1010ae28310569da))
|
||||
* **copy cut paste bug:** bug fix ([ade56d5](https://github.com/mengshukeji/Luckysheet/commit/ade56d5b5ff38dd5095234b71bc89927841fa387))
|
||||
* **demo fix:** fix ([3d17426](https://github.com/mengshukeji/Luckysheet/commit/3d174260e27793d1634c5f15b83a4aa9ca4100de))
|
||||
* **demo fix:** fix ([732f678](https://github.com/mengshukeji/Luckysheet/commit/732f6788bcff9ddcf4b0e6bc266b3be9e28eea41))
|
||||
* **demo fontlist url change:** local path ([feb89b3](https://github.com/mengshukeji/Luckysheet/commit/feb89b301b116745e82a2b17071909d7a4873562))
|
||||
* **filter option bug:** position error ([3324512](https://github.com/mengshukeji/Luckysheet/commit/33245124be8972d1e011c047caf657275ac76916))
|
||||
* **fix:** bug fix ([52375dc](https://github.com/mengshukeji/Luckysheet/commit/52375dcb416f435a1adea1fa3abeb486a73d513f))
|
||||
* **fix:** fix ([194dea1](https://github.com/mengshukeji/Luckysheet/commit/194dea17672cc15e76b364b788f0818299b5e64c))
|
||||
* **fix bug:** param dont remenber change ([0425e4e](https://github.com/mengshukeji/Luckysheet/commit/0425e4eef2c585873a61efe9ee34496aab40b810))
|
||||
* **fix bugs:** fix ([bbaafe0](https://github.com/mengshukeji/Luckysheet/commit/bbaafe0d68d670b7621d616db5f91394ded8f573))
|
||||
* **fix index.html:** fix ([e980cd9](https://github.com/mengshukeji/Luckysheet/commit/e980cd91afee781a004d7e207283e41990b4e45c))
|
||||
* **fix number to column title bug:** if column title is big , it will show undefined ([2d6e73e](https://github.com/mengshukeji/Luckysheet/commit/2d6e73eb3fba5ebd85b76d22ba4ffdc9c5197b58))
|
||||
* **fix touch:** touch fix ([d884a69](https://github.com/mengshukeji/Luckysheet/commit/d884a698d6f62aa21bea7d76705682e7406e7973))
|
||||
* **fix wrap bug:** alt + enter twice bug ([789bab5](https://github.com/mengshukeji/Luckysheet/commit/789bab5e5d712af889577ed141387c02a049f21f))
|
||||
* **float calculate bug:** fix it ([ef2a96a](https://github.com/mengshukeji/Luckysheet/commit/ef2a96a7cd6d341810b99698f26063862cf33e35))
|
||||
* **fonts bug on ie:** fit it ([f9a1546](https://github.com/mengshukeji/Luckysheet/commit/f9a1546ca783c058994759dc3443d2e0d9929267))
|
||||
* **format of formula cell bug fix:** if cell has format , it is no effect ([1f6ebad](https://github.com/mengshukeji/Luckysheet/commit/1f6ebad36da9de608bc32bddc945a5e3bb68528d))
|
||||
* **formula -(1-2) error:** fix it ([dee2333](https://github.com/mengshukeji/Luckysheet/commit/dee2333b295aa63fae544c075a98f993c1c3e84c))
|
||||
* **formula bug:** formula bug ([6c84420](https://github.com/mengshukeji/Luckysheet/commit/6c84420ad4461281ba87378af41cde0e5a7fee93))
|
||||
* **formula efficiency up:** speed up ([d05151f](https://github.com/mengshukeji/Luckysheet/commit/d05151f474145cb765a60b2f118c222f8b488efb))
|
||||
* **formula initialization bug:** if formula has cross sheet param, initial this ([c5f6254](https://github.com/mengshukeji/Luckysheet/commit/c5f6254bccd89a90abfa3a6d6728416983ebbb4c))
|
||||
* **frozen bug:** fix ([91daa07](https://github.com/mengshukeji/Luckysheet/commit/91daa07ec94255f9135d423aa17d9425c0ffe58d))
|
||||
* **frozen bug and style change:** fix bug ([7cfd0d9](https://github.com/mengshukeji/Luckysheet/commit/7cfd0d914c8999cfd4dbb2bca50f5766645cb108))
|
||||
* **frozen,docs:** frozen,docs ([e1bd844](https://github.com/mengshukeji/Luckysheet/commit/e1bd844749fa05a7b178565a90bbdba0c81ce1fe))
|
||||
* **function box input bug:** editor box and function box fix ([4ebb79d](https://github.com/mengshukeji/Luckysheet/commit/4ebb79d67f50dc46f97bc64a0cef0ba8d44e5c12))
|
||||
* **green label size fix:** fix ([b0734b5](https://github.com/mengshukeji/Luckysheet/commit/b0734b57bb42c55e99eb831c0ca24053ea4aa6a8))
|
||||
* **hide row and column fix:** add lines ([c430d66](https://github.com/mengshukeji/Luckysheet/commit/c430d6625a23b0f4b8ef903ae62e82833ed0618f))
|
||||
* **hot key bug fix:** range bug when formula move selection ([f4625d1](https://github.com/mengshukeji/Luckysheet/commit/f4625d1dc38d6f69fddb0ae131d54f65bd7bcbd7))
|
||||
* **image background opacity:** fix ([d61d3a0](https://github.com/mengshukeji/Luckysheet/commit/d61d3a07e55978350e9e5171537fee1457847209))
|
||||
* **image,config:** image,config ([2dddfaa](https://github.com/mengshukeji/Luckysheet/commit/2dddfaa8f1a13476f512db0e0d27742ebebb7f35))
|
||||
* **inline string bug:** style lost when change cell to inline string, input error ([405d90b](https://github.com/mengshukeji/Luckysheet/commit/405d90bfec0c7b47dee64e2034aeec8686c53e32))
|
||||
* **inline string finished:** fix some bus ([57e7518](https://github.com/mengshukeji/Luckysheet/commit/57e75188ffb718e92251cb9813ae47b467410889))
|
||||
* **inline string space dont recognize:** fix it ([ddc5c5d](https://github.com/mengshukeji/Luckysheet/commit/ddc5c5dde9a4d4db2ee42207383d696c12c58249))
|
||||
* **input range bug:** fix it ([5412721](https://github.com/mengshukeji/Luckysheet/commit/5412721675598979689e4de31ec37c2e807c7c16))
|
||||
* **jquery error:** jquery error ([1a2fed9](https://github.com/mengshukeji/Luckysheet/commit/1a2fed99871d79bcb895af1796909ee3e286e05f))
|
||||
* **menubutton.js fonts:** fix bug ([1e62de3](https://github.com/mengshukeji/Luckysheet/commit/1e62de3d2f358e99373259600c736ca83601d2ba))
|
||||
* **mobile text dose not display:** fix bug ([19922c7](https://github.com/mengshukeji/Luckysheet/commit/19922c76dd6afc4991ca3816262d40a6659baa5f))
|
||||
* **mobile touch:** moubile touch fix ([04e2b8e](https://github.com/mengshukeji/Luckysheet/commit/04e2b8e06965673f807a46fbcda2a403711ec7ea))
|
||||
* **my english is pool:** fix ([26ff1fd](https://github.com/mengshukeji/Luckysheet/commit/26ff1fd21180e2c795dcc24ed4d4aa2d5ba1f689))
|
||||
* **no fullscreen bug:** when no fullscreen , div go to top ([64f7d0e](https://github.com/mengshukeji/Luckysheet/commit/64f7d0e6c44c24f21e6e7d8d16beac6f23a5d770))
|
||||
* **normal style change bug:** fit error ([f24eb7f](https://github.com/mengshukeji/Luckysheet/commit/f24eb7f69c5c9ae53832f130a27473a686720e72))
|
||||
* **offset indirect formula fix:** fix bug ([d8dfe50](https://github.com/mengshukeji/Luckysheet/commit/d8dfe50782108745e5f132c0bbb1438f7180d198))
|
||||
* **old chrome dont surport actualboundingboxascent:** fix it and make it beautiful ([5c503d8](https://github.com/mengshukeji/Luckysheet/commit/5c503d851945d5ece1d69c2da8fa26c330d13930))
|
||||
* **paste bug:** fixed ([76d966f](https://github.com/mengshukeji/Luckysheet/commit/76d966f27eb7632061b97a438d07a63f88704878))
|
||||
* **pivot table bug:** bug ([9fcc209](https://github.com/mengshukeji/Luckysheet/commit/9fcc209b936eed2057a09b1f070d62832c9801b1))
|
||||
* **pivot table change sheet bug:** if prevous sheet is pivot table and pennel is closed, change bug ([7cac8e6](https://github.com/mengshukeji/Luckysheet/commit/7cac8e62631d90bea0521498e9980234fde88fc3))
|
||||
* **pivot table filter bug:** change sheet bug ,after filter pivot table ([c7c1999](https://github.com/mengshukeji/Luckysheet/commit/c7c1999081289c70b6e575e9e37fae82bdfe438c))
|
||||
* **pivot table show error:** when column area have field and row area is null,pivot table show error ([04bc51c](https://github.com/mengshukeji/Luckysheet/commit/04bc51cf8dc5ff24fc5d71b3bbf755a9787ca57d))
|
||||
* **remain cell style in inline string mode:** click cell and change cell style like to Excel ([7d0438a](https://github.com/mengshukeji/Luckysheet/commit/7d0438a10db44f371c23daccb9c066f30773e307))
|
||||
* **render:** render ([40550d6](https://github.com/mengshukeji/Luckysheet/commit/40550d6e59c44e0f47e23f8b5fac4c5e79a5c122))
|
||||
* **render bug fix:** new render method ([a1bcf81](https://github.com/mengshukeji/Luckysheet/commit/a1bcf81562ebc8c8327baad01d5e814e23fae647))
|
||||
* **rotate text position mistake, when sheet zoom:** fix zoom bug, fix strike and underline bug ([6680a13](https://github.com/mengshukeji/Luckysheet/commit/6680a134252a65b346b0a99142998ced277e8adf))
|
||||
* **scroll bug:** scroll bug ([3637fa4](https://github.com/mengshukeji/Luckysheet/commit/3637fa4121340e6278f12104e7877c450e92d511))
|
||||
* **several bug and new feature:** formula calculation , quotePrefix add ([5a95304](https://github.com/mengshukeji/Luckysheet/commit/5a95304289714d130501faae352dc07fb21dbf68))
|
||||
* **sheet change arrow:** fix bug ([4a7850b](https://github.com/mengshukeji/Luckysheet/commit/4a7850b86ef1086fe18fa7961a62bbc622ed760d))
|
||||
* **splines and dynamicarray bug fix:** formula calculation update is finished ([a59aa04](https://github.com/mengshukeji/Luckysheet/commit/a59aa04e4db70e3d90c6109a18ea6a7d2747c156))
|
||||
* **ssf column resize:** change ([2a09f59](https://github.com/mengshukeji/Luckysheet/commit/2a09f5977e35a388c42d4b43d7fbe6df891234db))
|
||||
* **store cache:** bug fix ([cbd9014](https://github.com/mengshukeji/Luckysheet/commit/cbd90140e0aae293b40724bce692b861047d47c3))
|
||||
* **text get wrong height when zoom:** fix height ([106f1fd](https://github.com/mengshukeji/Luckysheet/commit/106f1fd111a75778a2c61424290f33295cec9964))
|
||||
* **toolbar:** menu button style ([d18478c](https://github.com/mengshukeji/Luckysheet/commit/d18478c0e11cdce994d585be216b9ad95836f073))
|
||||
* **underline and cancelline:** add and fix ([d3f23ff](https://github.com/mengshukeji/Luckysheet/commit/d3f23fffd72f95b241710e9fdf1a70113502a815))
|
||||
* **undo redo bug fix:** formula update bug ([373dc4f](https://github.com/mengshukeji/Luckysheet/commit/373dc4f464d8bd106408ce28bd48b9e44b310b5f))
|
||||
* **update demo:** fix ([e101b91](https://github.com/mengshukeji/Luckysheet/commit/e101b91c4a4a427a83ef727f2e8c2e8166124485))
|
||||
* **updatecell bug fix:** fix undo redo ([d8b76ce](https://github.com/mengshukeji/Luckysheet/commit/d8b76ce52f25d9fc487ca62b7007c049a4a80160))
|
||||
* **websocket bux:** bug ([4eda52a](https://github.com/mengshukeji/Luckysheet/commit/4eda52ac89587515d6a20574c0711fe22de0a8c0))
|
||||
* **zoom scroll position wrong:** fix ([5830e9a](https://github.com/mengshukeji/Luckysheet/commit/5830e9af5a9c8757f55a18b34af2f08ce02f2351))
|
||||
* **zoom slider drag lag:** fix lag ([17ddd13](https://github.com/mengshukeji/Luckysheet/commit/17ddd13b2e87d3879fa49e1f3569f062400eb251))
|
||||
|
||||
## [2.0.0](https://github.com/mengshukeji/Luckysheet/compare/v2.0.0-0...v2.0.0) (2020-07-31)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **api:** 1. luckysheet.flowdata change to luckysheet.flowdata() 2.all apis list in
|
||||
documentation
|
||||
* **gulp:** demo index.html's js and css refrence change
|
||||
* **bug:** bug
|
||||
|
||||
bug
|
||||
* **chart:** add new config : plugins, array
|
||||
* **main:** bug
|
||||
|
||||
### Features
|
||||
|
||||
* **cell overflow:** cell overflow ([c3e4f39](https://github.com/mengshukeji/Luckysheet/commit/c3e4f39919e68d99ad72c6a0ae104926acce6b23))
|
||||
* **chart:** chart ([9991702](https://github.com/mengshukeji/Luckysheet/commit/999170251810720fc4d44012bcc7c70c124463fd))
|
||||
* **chart:** chart plugin ([196362d](https://github.com/mengshukeji/Luckysheet/commit/196362db053a25ea0deaff14b5019e1450902ceb))
|
||||
* d ([07d004f](https://github.com/mengshukeji/Luckysheet/commit/07d004f9d63962dc3ad09a32a1d3c61866de5525))
|
||||
* **allowedit support:** allowEdit support ([59561bb](https://github.com/mengshukeji/Luckysheet/commit/59561bb3453469cbf86703672ec770187545459d))
|
||||
* **bug fix:** bu ([f23ba5d](https://github.com/mengshukeji/Luckysheet/commit/f23ba5df9b967cd9d8188680723c903ee467bb29))
|
||||
* **canvas:** canvas ([c63871f](https://github.com/mengshukeji/Luckysheet/commit/c63871fbeabb47d766320800d3bb8be47604690b))
|
||||
* **chart:** add chart ([139bc6e](https://github.com/mengshukeji/Luckysheet/commit/139bc6ea8510667c4900db6d1b5b26a33fb52734))
|
||||
* **gloabe improve and bug fix:** global improve and bug fix,include formula,find and replace,filter ([e6cfa31](https://github.com/mengshukeji/Luckysheet/commit/e6cfa3156ac2ec8989f3716601dc27bcfbdc4d13))
|
||||
* **globalization fix:** pivot table , drop cell ([55d4cf2](https://github.com/mengshukeji/Luckysheet/commit/55d4cf29868787a94377ea2e659da9e74e062628))
|
||||
* **locale:** locale ([4cd2ee4](https://github.com/mengshukeji/Luckysheet/commit/4cd2ee4cb3f115be9e2455a626469711d8be2c2e))
|
||||
* **move:** move chart ([cda6df0](https://github.com/mengshukeji/Luckysheet/commit/cda6df0209fb1d440e54d663de682f4749660917))
|
||||
* **optimiz:** optimization ([abbf592](https://github.com/mengshukeji/Luckysheet/commit/abbf592d2df320d8a44eb5375075cd65f4ef4066))
|
||||
* **rightclick menu perfect:** add rows and cols delete rows and cols hide rows and cols ([32f94a7](https://github.com/mengshukeji/Luckysheet/commit/32f94a72285d6051df87ce45390cb4e5a4cc49b2))
|
||||
* **scroll style fix beautify:** scroll,sheet color and style ([63f2630](https://github.com/mengshukeji/Luckysheet/commit/63f2630b95ab811807199670db6eee332af882a8))
|
||||
* **split handler.js to small file:** split handler.js file to seven files ([0a62ff0](https://github.com/mengshukeji/Luckysheet/commit/0a62ff0565d4116ae66a758386ef8d84dcfceba5))
|
||||
* **zh en:** zh en ([040bfe4](https://github.com/mengshukeji/Luckysheet/commit/040bfe4b456eb910dc7ddbcc3f5ae0e42d440951))
|
||||
* **zh-cn:** zh-cn ([907226c](https://github.com/mengshukeji/Luckysheet/commit/907226c74297882896f527b9c54a88a11d592a4d))
|
||||
* **zh-cn:** zh-cn ([01f9521](https://github.com/mengshukeji/Luckysheet/commit/01f9521ed37e11b2e9630b01b84583a45302fc77))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **bug:** bug ([7dff640](https://github.com/mengshukeji/Luckysheet/commit/7dff64086aaf034a8c427e37ef7b15da96e1123c))
|
||||
* **bug:** bug ([8baf378](https://github.com/mengshukeji/Luckysheet/commit/8baf378407f67684b77e62bacf6894e4359ed2d3))
|
||||
* **bug:** bug ([5ebd31e](https://github.com/mengshukeji/Luckysheet/commit/5ebd31e4a455c7547e46c418838e2e3a16def6a7))
|
||||
* **bug:** bug ([f53addb](https://github.com/mengshukeji/Luckysheet/commit/f53addbf70e96b45d73014d8e181c2712820b5c3))
|
||||
* **bug:** bug ([9cc36cf](https://github.com/mengshukeji/Luckysheet/commit/9cc36cf40ebb5a4f41b52f230e35d253f8261f69))
|
||||
* **bug:** bug ([186e3c9](https://github.com/mengshukeji/Luckysheet/commit/186e3c9a557a555d1737d456abf872622004f052))
|
||||
* **bug:** bug ([447735c](https://github.com/mengshukeji/Luckysheet/commit/447735c7ea365c2c292dd98a4fba8813a9a62d34))
|
||||
* **bug:** bug ([74639a8](https://github.com/mengshukeji/Luckysheet/commit/74639a8b719db028ab856f95a80d82553c0d919c))
|
||||
* **bug:** bug ([1082ab0](https://github.com/mengshukeji/Luckysheet/commit/1082ab0e2e84c7863ab29c7b68bb2d9934dcf11c))
|
||||
* **bug fix:** sparkLines, pivot Table, change to sheet ([69aee1a](https://github.com/mengshukeji/Luckysheet/commit/69aee1aec3200c75cb4897f0f782a945c2ef9fd1))
|
||||
* **canvas:** canvas,function ([2445ff5](https://github.com/mengshukeji/Luckysheet/commit/2445ff5094fe8da9f7d56612ceb06dd86b75b30e))
|
||||
* **fix:** fix ([bd6a9bd](https://github.com/mengshukeji/Luckysheet/commit/bd6a9bdd31cefe00a6470fbec9d10471d21fac9f))
|
||||
* **fix:** fix byg ([d9fb5fe](https://github.com/mengshukeji/Luckysheet/commit/d9fb5fe4c48637d2ac947fe8aa21d6a7ccde0264))
|
||||
* **fix allowedit:** fix allowEdit attribute ([35820b3](https://github.com/mengshukeji/Luckysheet/commit/35820b3c2ea8437036cfc32911acde9ff32c2fea))
|
||||
* **from github:** github ([abd44e8](https://github.com/mengshukeji/Luckysheet/commit/abd44e882e39bfb85c0e213e049325754bc3ba4f))
|
||||
* **hot key and mousemove:** hot key fix ([1ad40cf](https://github.com/mengshukeji/Luckysheet/commit/1ad40cf5521b7b3bd804c2c1f5f13fe6860ab95e))
|
||||
* **internationalization:** internationalization,formula ([c6901fc](https://github.com/mengshukeji/Luckysheet/commit/c6901fc884d14c5fb8f48a60192f1eb8ad26a485))
|
||||
* **linestyle bug:** lineStyle ([27ba0a3](https://github.com/mengshukeji/Luckysheet/commit/27ba0a3010865aa0e28158e661bcd6196bc1cfe4))
|
||||
* **locale:** locale bug ([3bd0cae](https://github.com/mengshukeji/Luckysheet/commit/3bd0cae0502e14c329304bfbf8c0f98c8e7b284e))
|
||||
* **locale finished and bug fix:** locale finished, condition bug fix , multi range bug fix ([0aa9b3b](https://github.com/mengshukeji/Luckysheet/commit/0aa9b3baa51c818ec2415b9d1c2e838ef32bdc85))
|
||||
* **locale,formula:** locale,formula ([b11b862](https://github.com/mengshukeji/Luckysheet/commit/b11b86295108d8b25ad2cd7b1ba016b3555cee0d))
|
||||
* **mac scroll x reverse fix:** mac scroll x reverse fix and scroll optimization ([8eb68e8](https://github.com/mengshukeji/Luckysheet/commit/8eb68e82e2898b1be2702f463c326a304bc96106))
|
||||
* **main:** bug ([67ebe19](https://github.com/mengshukeji/Luckysheet/commit/67ebe1978bf067c17c74e5b3b7b048055c53c0b4))
|
||||
* **pivot table bug:** uni ([56181e6](https://github.com/mengshukeji/Luckysheet/commit/56181e610085604666d96aa6068944e05355ec7d))
|
||||
|
||||
|
||||
### build
|
||||
|
||||
* **gulp:** gulpfile,index.html,pack js css ([8be0467](https://github.com/mengshukeji/Luckysheet/commit/8be0467dea483be7be2a5af1bc3545a04a67ea72))
|
||||
|
||||
|
||||
* **api:** api ([f19a26e](https://github.com/mengshukeji/Luckysheet/commit/f19a26eab08bc44a5c380afd883d4e730f681062))
|
||||
|
||||
### [1.0.1-6](https://github.com/mengshukeji/Luckysheet/compare/v1.0.1-2...v1.0.1-6) (2020-07-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **core.js:** core function ([6e63969](https://github.com/mengshukeji/Luckysheet/commit/6e639699e117abd241532de5530a533b80d547bb))
|
||||
|
||||
### [1.0.1-2](https://github.com/mengshukeji/Luckysheet/compare/v1.0.1-1...v1.0.1-2) (2020-07-14)
|
||||
|
||||
### [1.0.1-1](https://github.com/mengshukeji/Luckysheet/compare/v1.0.1-0...v1.0.1-1) (2020-07-14)
|
||||
|
||||
### 1.0.1-0 (2020-07-14)
|
||||
|
||||
## 2.0.0-0 (2020-07-24)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **all project:** File name change
|
||||
|
||||
* **all project:** modular,Document promotion,Some bugs ([37c3070](https://github.com/mengshukeji/Luckysheet/commit/37c307087cb50efa9eb3e1f3a22a356024aa43b5)), closes [#11](https://github.com/mengshukeji/Luckysheet/issues/11) [#2](https://github.com/mengshukeji/Luckysheet/issues/2)
|
||||
@@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020-present, Mengshukeji
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -1,327 +0,0 @@
|
||||
<div align="center">
|
||||
|
||||

|
||||
|
||||
</div>
|
||||
|
||||
简体中文 | [English](./README.md)
|
||||
|
||||
# Luckysheet 已不再维护,推荐使用升级版 [Univer](https://univer.short.gy/LuckysheetRepository) 用于生产环境部署,新版解决了大数据量加载,图表样式,透视表,公式计算等方面的问题,做了很多优化设计,增加了导入,导出,打印,协同等功能,提高了表格性能,更有专业技术团队进行技术支持。
|
||||
|
||||
点击 [#1454](https://github.com/dream-num/Luckysheet/issues/1454) 查看更多详情。
|
||||
|
||||
|
||||
## 介绍
|
||||
🚀Luckysheet ,一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。
|
||||
|
||||
|
||||
## 相关链接
|
||||
| 源码 | 文档 | Demo | 论坛 |
|
||||
| ------ | -------- | ------ | ------ |
|
||||
| [Github](https://github.com/mengshukeji/Luckysheet)| [在线文档](https://dream-num.github.io/LuckysheetDocs/zh/) | [在线Demo](https://dream-num.github.io/LuckysheetDemo) / [协同编辑Demo](http://luckysheet.lashuju.com/demo/) | [中文论坛](https://support.qq.com/product/288322) |
|
||||
| [Gitee镜像](https://gitee.com/mengshukeji/Luckysheet)| [Gitee在线文档](https://mengshukeji.gitee.io/LuckysheetDocs/zh/) | [Gitee在线Demo](https://mengshukeji.gitee.io/luckysheetdemo/) | [Google Group](https://groups.google.com/g/luckysheet) |
|
||||
|
||||

|
||||
|
||||
## 插件
|
||||
|
||||
导入导出、打印等高级功能请使用 [Univer](https://github.com/dream-num/univer/)
|
||||
|
||||
## 生态
|
||||
|
||||
| 工程 | 描述 |
|
||||
|---------|-------------|
|
||||
| [Luckysheet Vue] | 在vue cli 3项目中使用Luckysheet和Luckyexcel|
|
||||
| [Luckysheet Vue3] | 在vue3, vite项目中使用Luckysheet和Luckyexcel|
|
||||
| [Luckysheet React] | 在React项目中使用Luckysheet |
|
||||
| [Luckyexcel Node] | 在koa2中使用Luckyexcel |
|
||||
| [Luckysheet Server] | Java后台Luckysheet Server |
|
||||
| [Luckysheet Server Starter] | LuckysheetServer 一键docker部署 |
|
||||
|
||||
[Luckysheet Vue]: https://gitee.com/mengshukeji/luckysheet-vue
|
||||
[Luckysheet Vue3]: https://gitee.com/hjwforever/luckysheet-vue3-vite.git
|
||||
[Luckysheet React]: https://gitee.com/mengshukeji/luckysheet-react
|
||||
[Luckyexcel Node]: https://gitee.com/mengshukeji/Luckyexcel-node
|
||||
[Luckysheet Server]: https://gitee.com/mengshukeji/LuckysheetServer
|
||||
[Luckysheet Server Starter]: https://gitee.com/mengshukeji/LuckysheetServerStarter
|
||||
|
||||
## 特性
|
||||
|
||||
- **格式设置**:样式,条件格式,文本对齐及旋转,文本截断、溢出、自动换行,多种数据类型,单元格内多样式
|
||||
- **单元格**:拖拽,下拉填充,多选区,查找和替换,定位,合并单元格,数据验证
|
||||
- **行和列操作**:隐藏、插入、删除行或列,冻结,文本分列
|
||||
- **操作体验**:撤销、重做,复制、粘贴、剪切,快捷键,格式刷,选区拖拽
|
||||
- **公式和函数**:内置公式,远程公式,自定义公式
|
||||
- **表格操作**:筛选,排序
|
||||
- **增强功能**:数据透视表,图表,评论,共享编辑,插入图片,矩阵计算,截图,复制到其他格式,EXCEL导入及导出等
|
||||
|
||||
更详细的功能列表,请查阅:[特性](https://dream-num.github.io/LuckysheetDocs/zh/guide/#%E7%89%B9%E6%80%A7)
|
||||
|
||||
## 📖 学习资源
|
||||
|
||||
- 新用户优先阅读:[用户指引](https://github.com/mengshukeji/Luckysheet/wiki/User-Guide)
|
||||
- 社区提供的教程、学习资料及配套解决方案请查阅:[教程与资源](https://dream-num.github.io/LuckysheetDocs/zh/guide/resource.html)
|
||||
|
||||
## 📜 更新日志
|
||||
|
||||
每个版本的详细更改都记录在 [CHANGELOG.md](CHANGELOG.md) 中。
|
||||
|
||||
## ❗️ 问题反馈
|
||||
|
||||
在反馈问题之前,请确保仔细阅读 [如何提交问题](https://dream-num.github.io/LuckysheetDocs/zh/guide/contribute.html#如何提交问题)。 不符合准则的问题可能会立即被移除。
|
||||
|
||||
## ✅ 开发计划
|
||||
|
||||
通过 [GitHub Projects](https://github.com/mengshukeji/Luckysheet/projects/1) 管理
|
||||
|
||||
## 💪 贡献
|
||||
|
||||
在提交PR之前,请确保仔细阅读 [贡献指南](https://dream-num.github.io/LuckysheetDocs/zh/guide/contribute.html)。
|
||||
|
||||
## 用法
|
||||
|
||||
### 第一步
|
||||
通过CDN引入依赖
|
||||
|
||||
```
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/css/pluginsCss.css' />
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/plugins.css' />
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/css/luckysheet.css' />
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/assets/iconfont/iconfont.css' />
|
||||
<script src="https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/js/plugin.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/luckysheet.umd.js"></script>
|
||||
```
|
||||
### 第二步
|
||||
指定一个表格容器
|
||||
```
|
||||
<div id="luckysheet" style="margin:0px;padding:0px;position:absolute;width:100%;height:100%;left: 0px;top: 0px;"></div>
|
||||
```
|
||||
### 第三步
|
||||
创建一个表格
|
||||
```
|
||||
<script>
|
||||
$(function () {
|
||||
//配置项
|
||||
var options = {
|
||||
container: 'luckysheet' //luckysheet为容器id
|
||||
}
|
||||
luckysheet.create(options)
|
||||
})
|
||||
</script>
|
||||
```
|
||||
## 开发
|
||||
|
||||
### 环境
|
||||
[Node.js](https://nodejs.org/en/) Version >= 6
|
||||
|
||||
### 安装
|
||||
```
|
||||
npm install
|
||||
npm install gulp -g
|
||||
```
|
||||
### 开发
|
||||
```
|
||||
npm run dev
|
||||
```
|
||||
### 打包
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
## 合作项目
|
||||
|
||||
- [h5-Dooring](https://github.com/MrXujiang/h5-Dooring)
|
||||
|
||||
## 交流
|
||||
|
||||
- [官网](http://lucky.lashuju.com/index.html)
|
||||
- [Github 论坛](https://github.com/mengshukeji/Luckysheet/discussions)
|
||||
- 以下扫码加入官方微信群或者QQ群
|
||||
|
||||
加小编微信: msuniver,备注:加群
|
||||
|
||||
<img src="https://gcore.jsdelivr.net/gh/mengshukeji/LuckyResources@master/assets/img/wechat/univer-wechat.jpg" width="200" />
|
||||
|
||||
|
||||
[英文社群](./README.md)
|
||||
|
||||
## 赞助
|
||||
|
||||
Luckysheet是MIT许可的开源项目,其持续稳定的开发离不开这些优秀的 [**支持者**](https://dream-num.github.io/LuckysheetDocs/zh/about/sponsor.html#%E8%B5%9E%E5%8A%A9%E8%80%85%E5%88%97%E8%A1%A8)。 如果您想加入他们,请考虑:
|
||||
|
||||
- [成为Patreon的支持者或赞助商](https://www.patreon.com/mengshukeji)
|
||||
- [成为Open Collective的支持者或赞助商](https://opencollective.com/luckysheet)
|
||||
- 通过PayPal,微信或支付宝一次性捐赠
|
||||
|
||||
| PayPal | 微信 | 支付宝 |
|
||||
|---|---|---|
|
||||
| [Paypal Me](https://www.paypal.me/wbfsa) | <img src="https://cdn.jsdelivr.net/gh/mengshukeji/LuckyResources@master/assets/img/wechat/wechat.jpg" width="200" />| <img src="https://cdn.jsdelivr.net/gh/mengshukeji/LuckyResources@master/assets/img/wechat/alipay.jpg" width="200" /> |
|
||||
|
||||
### Patreon和OpenCollective有什么区别?
|
||||
|
||||
通过Patreon捐赠的资金将直接用于支持menshshukeji在Luckysheet上的工作。 通过OpenCollective捐赠的资金由透明费用管理,将用于补偿核心团队成员的工作和费用或赞助社区活动。 通过在任一平台上捐款,您的姓名/徽标将得到适当的认可和曝光。
|
||||
|
||||
## 赞助者列表
|
||||
|
||||
(按时间顺序排列)
|
||||
- *涛 ¥ 200
|
||||
- popo ¥ 1
|
||||
- 孔垂善 ¥ 5
|
||||
- Shawn文 ¥ 99
|
||||
- 幸运的小路易 ¥ 1
|
||||
- 冯启俊 ¥ 88
|
||||
- mxb ¥ 10
|
||||
- 祭阳 ¥ 20
|
||||
- *勇 ¥ 30
|
||||
- 虚我 ¥ 200
|
||||
- 甜党 ¥ 50
|
||||
- Alphabet(Google)-gcf ¥ 1
|
||||
- **平 ¥ 100
|
||||
- **东 ¥ 10
|
||||
- debugger ¥ 20
|
||||
- 烦了烦 ¥ 10
|
||||
- 文顶顶 ¥ 200
|
||||
- yangxshn ¥ 10
|
||||
- 爱乐 ¥ 100
|
||||
- 小李飞刀刀 ¥ 66
|
||||
- 张铭 ¥ 200
|
||||
- 曹治军 ¥ 1
|
||||
- *特 ¥ 10
|
||||
- **权 ¥ 9.9
|
||||
- **sdmq ¥ 20
|
||||
- *旭 ¥ 10
|
||||
- Quentin ¥ 20
|
||||
- 周宇凡 ¥ 100
|
||||
- *超 ¥ 10
|
||||
- 维宁 ¥ 100
|
||||
- hyy ¥ 20
|
||||
- 雨亭寒江月 ¥ 50
|
||||
- **功 ¥ 10
|
||||
- **光 ¥ 20
|
||||
- terrywan ¥ 100
|
||||
- 王晓洪 ¥ 10
|
||||
- Sun ¥ 10
|
||||
- 忧绣 ¥ 100
|
||||
- Jasonx ¥ 10
|
||||
- 国勇 ¥ 66.6
|
||||
- 郎志 ¥ 100
|
||||
- 匿名 ¥ 1
|
||||
- ni ¥ 100
|
||||
- 苏 ¥ 50
|
||||
- Mads_chan ¥ 1
|
||||
- LK ¥ 100
|
||||
- 智连方舟 李汪石 ¥ 168
|
||||
- **发 ¥ 260
|
||||
- *超 ¥ 10
|
||||
- *勇 ¥ 10
|
||||
- *腾 ¥ 15
|
||||
- 名字好难起 ¥ 20
|
||||
- 大山 ¥ 1
|
||||
- waiting ¥ 1000
|
||||
- **宇 ¥ 10.00
|
||||
- 刘小帅的哥哥 ¥ 20.00
|
||||
- 宁静致远 ¥ 10.00
|
||||
- Eleven ¥ 1.00
|
||||
- **帆 ¥ 188
|
||||
- henry ¥ 100
|
||||
- .波罗 ¥ 50
|
||||
- 花落有家 ¥ 50
|
||||
- 踏遍南水北山 ¥ 1
|
||||
- LC ¥ 5
|
||||
- **明 ¥ 8.80
|
||||
- *军 ¥ 20
|
||||
- 张彪 ¥ 50
|
||||
- 企业文档云@肖敏 ¥ 10
|
||||
- 匿名 ¥ 50
|
||||
- 逍遥行 ¥ 10
|
||||
- z.wasaki ¥ 50
|
||||
- Make Children ¥ 20
|
||||
- Foam ¥ 20
|
||||
- 奥特曼( o|o)ノ三 ¥ 50
|
||||
- **凯 ¥ 10
|
||||
- **兵 ¥ 20
|
||||
- **川 ¥ 1
|
||||
- 二万 ¥ 50
|
||||
- 蔚然成林 ¥ 10
|
||||
- 邹杰 ¥ 10
|
||||
- 张永强 ¥ 50
|
||||
- 鱼得水 ¥ 270
|
||||
- Ccther ¥ 1
|
||||
- Eric Cheng ¥ 10
|
||||
- 佚名 ¥ 1
|
||||
- 花叶 ¥ 50
|
||||
- GT ¥ 20
|
||||
- 菜菜心 ¥ 10
|
||||
- fisher ¥ 1
|
||||
- JC ¥ 5
|
||||
- 佚名 ¥ 20
|
||||
- 独孤一剑 ¥ 50
|
||||
- mxt ¥ 20
|
||||
- 一叶迷山 ¥ 100
|
||||
- Jeff ¥ 100
|
||||
- 八千多条狗🐶 ¥ 100
|
||||
- 晓峰 ¥ 10
|
||||
- 戒 ¥ 1
|
||||
- 浪里个浪 ¥ 1
|
||||
- 回调函数 ¥ 50
|
||||
- 赖瓜子 ¥ 5
|
||||
- Milo•J ¥ 20
|
||||
- 可道云 ¥ 200
|
||||
- *程 ¥ 10
|
||||
- 来一杯卡布酸奶 ¥ 5
|
||||
- 刘久胜 ¥ 100
|
||||
- 快意江湖 ¥ 50
|
||||
- *新 ¥ 9.9
|
||||
- **龙 ¥ 100
|
||||
- **江 ¥ 100
|
||||
- **威 ¥ 9.8
|
||||
- **涛 ¥ 500
|
||||
- **嘉 ¥ 10
|
||||
- *涛 ¥ 1
|
||||
- *兵 ¥ 5
|
||||
- *阳 ¥ 200
|
||||
- *辉 ¥ 1
|
||||
- *帆 ¥ 30
|
||||
- **旺 ¥ 10
|
||||
- **麟 ¥ 20
|
||||
- *霖 ¥ 9.9
|
||||
- *帅 ¥ 10
|
||||
- *鑫 ¥ 6.66
|
||||
- ~朴:shu ¥ 29.79
|
||||
- 未来 ¥ 1
|
||||
- 国勇 ¥ 0.1
|
||||
- 用心灵听雨 ¥ 10
|
||||
- 钊 ¥ 5
|
||||
- 星稀 ¥ 5
|
||||
|
||||
## 贡献者和感谢
|
||||
|
||||
### 核心团队活跃成员
|
||||
- [@wbfsa](https://github.com/wbfsa)
|
||||
- [@eiji-th](https://github.com/eiji-th)
|
||||
- [@fly-95](https://github.com/fly-95)
|
||||
- [@tonytonychopper123](https://github.com/tonytonychopper123)
|
||||
- [@Dushusir](https://github.com/Dushusir)
|
||||
- [@iamxuchen800117](https://github.com/iamxuchen800117)
|
||||
- [@wpxp123456](https://github.com/wpxp123456)
|
||||
- [@c19c19i](https://weibo.com/u/3884623955)
|
||||
- [@zhangchen915](https://github.com/zhangchen915)
|
||||
- [@jerry-f](https://github.com/jerry-f)
|
||||
- [@flowerField](https://github.com/flowerField)
|
||||
|
||||
### 社区伙伴
|
||||
- [@yiwasheng](https://github.com/yiwasheng)
|
||||
- [@danielcai1987](https://github.com/danielcai1987)
|
||||
- [@qq6690876](https://github.com/qq6690876)
|
||||
- [@javahuang](https://github.com/javahuang)
|
||||
- [@TimerGang](https://github.com/TimerGang)
|
||||
- [@gsw945](https://github.com/gsw945)
|
||||
- [@swen-xiong](https://github.com/swen-xiong)
|
||||
- [@lzmch](https://github.com/lzmch)
|
||||
- [@kdevilpf](https://github.com/kdevilpf)
|
||||
- [@WJWM0316](https://github.com/WJWM0316)
|
||||
|
||||
## 版权信息
|
||||
[MIT](http://opensource.org/licenses/MIT)
|
||||
|
||||
Copyright (c) 2020-present, mengshukeji
|
||||
@@ -1,326 +0,0 @@
|
||||
<div align="center">
|
||||
|
||||

|
||||
|
||||
[](https://gitter.im/mengshukeji/Luckysheet?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
<a href="https://twitter.com/intent/follow?screen_name=luckysheet">
|
||||
<img src="https://img.shields.io/twitter/follow/luckysheet?style=social&logo=twitter"
|
||||
alt="follow on Twitter"></a>
|
||||
|
||||
</div>
|
||||
|
||||
English| [简体中文](./README-zh.md)
|
||||
|
||||
# Luckysheet is no longer maintained. It is recommended to use the upgraded version of [Univer](https://univer.short.gy/LuckysheetRepository) for production environment deployment. The new version solves problems such as large data loading, chart styles, pivot tables, formula calculations, etc., and has made many optimization designs, added import, export, printing, collaboration and other functions, improved table performance, and has a professional technical team to provide technical support.
|
||||
|
||||
Follow the [#1454](https://github.com/dream-num/Luckysheet/issues/1454) issue for more details.
|
||||
|
||||
## Introduction
|
||||
🚀Luckysheet is an online spreadsheet like excel that is powerful, simple to configure, and completely open source.
|
||||
|
||||
|
||||
## Links
|
||||
| Source Code | Documentation | Demo | Forum |
|
||||
| ------ | -------- | ------ | ------ |
|
||||
| [Github](https://github.com/mengshukeji/Luckysheet)| [Online Documentation](https://dream-num.github.io/LuckysheetDocs/) | [Online Demo](https://dream-num.github.io/LuckysheetDemo) / [Cooperative editing demo](http://luckysheet.lashuju.com/demo/) | [Chinese Forum](https://support.qq.com/product/288322) |
|
||||
| [Gitee Mirror](https://gitee.com/mengshukeji/Luckysheet)| [Gitee Online Documentation](https://mengshukeji.gitee.io/LuckysheetDocs/) | [Gitee Online Demo](https://mengshukeji.gitee.io/luckysheetdemo/) | [Google Group](https://groups.google.com/g/luckysheet) |
|
||||
|
||||

|
||||
|
||||
## Plugins
|
||||
|
||||
For advanced features like import, export, and printing, please use [Univer](https://github.com/dream-num/univer/)
|
||||
|
||||
## Ecosystem
|
||||
|
||||
| Project | Description |
|
||||
|---------|-------------|
|
||||
| [Luckysheet Vue] | Luckysheet and Luckyexcel in a vue cli3 project |
|
||||
| [Luckysheet Vue3] | Luckysheet and Luckyexcel in a vue3 project with vite|
|
||||
| [Luckysheet React] | Luckysheet in a React project |
|
||||
| [Luckyexcel Node] | Use Luckyexcel in koa2 |
|
||||
| [Luckysheet Server] | Java backend Luckysheet Server |
|
||||
| [Luckysheet Server Starter] | LuckysheetServer docker deployment startup template |
|
||||
|
||||
[Luckysheet Vue]: https://github.com/mengshukeji/luckysheet-vue
|
||||
[Luckysheet Vue3]: https://github.com/hjwforever/luckysheet-vue3-vite
|
||||
[Luckysheet React]: https://github.com/mengshukeji/luckysheet-react
|
||||
[Luckyexcel Node]: https://github.com/mengshukeji/Luckyexcel-node
|
||||
[Luckysheet Server]: https://github.com/mengshukeji/LuckysheetServer
|
||||
[Luckysheet Server Starter]: https://github.com/mengshukeji/LuckysheetServerStarter
|
||||
|
||||
|
||||
## Features
|
||||
|
||||
- **Formatting**: style, conditional formatting, text alignment and rotation, text truncation, overflow, automatic line wrapping, multiple data types, cell segmentation style
|
||||
- **Cells**: drag and drop, fill handle, multiple selection, find and replace, location, merge cells, data verification
|
||||
- **Row & column**: hide, insert, delete rows or columns, freeze, and split text
|
||||
- **Operation**: undo, redo, copy, paste, cut, hot key, format painter, drag and drop selection
|
||||
- **Formulas & Functions**: Built-in, remote and custom formulas
|
||||
- **Tables**: filter, sort
|
||||
- **Enhanced functions**: Pivot tables, charts, comments, cooperative editing, insert picture, matrix calculations, screenshots, copying to other formats, EXCEL import and export, etc.
|
||||
|
||||
For a more detailed feature list, please refer to: [Features](https://dream-num.github.io/LuckysheetDocs/guide/#features)
|
||||
|
||||
## 📖 Resources
|
||||
- Priority reading for new users: [User Guide](https://github.com/mengshukeji/Luckysheet/wiki/User-Guide)
|
||||
- For the tutorials, learning materials and supporting solutions provided by the community, please refer to: [Tutorials and Resources](https://dream-num.github.io/LuckysheetDocs/guide/resource.html)
|
||||
|
||||
## 📜 Changelog
|
||||
|
||||
Detailed changes for each release are documented in the [CHANGELOG.md](CHANGELOG.md).
|
||||
|
||||
## ❗️ Issues
|
||||
|
||||
Please make sure to read the [Issue Reporting Checklist](https://dream-num.github.io/LuckysheetDocs/guide/contribute.html#how-to-submit-issues) before opening an issue. Issues not conforming to the guidelines may be closed immediately.
|
||||
|
||||
## ✅ TODO
|
||||
|
||||
Managed with [GitHub Projects](https://github.com/mengshukeji/Luckysheet/projects/1)
|
||||
|
||||
## 💪Contribution
|
||||
|
||||
Please make sure to read the[ Contributing Guide](https://dream-num.github.io/LuckysheetDocs/guide/contribute.html) before making a pull request.
|
||||
|
||||
## Usage
|
||||
|
||||
### First step
|
||||
Introduce dependencies through CDN
|
||||
```
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/css/pluginsCss.css' />
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/plugins.css' />
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/css/luckysheet.css' />
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/assets/iconfont/iconfont.css' />
|
||||
<script src="https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/js/plugin.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/luckysheet.umd.js"></script>
|
||||
```
|
||||
### Second step
|
||||
Specify a table container
|
||||
```
|
||||
<div id="luckysheet" style="margin:0px;padding:0px;position:absolute;width:100%;height:100%;left: 0px;top: 0px;"></div>
|
||||
```
|
||||
### Third step
|
||||
Create a table
|
||||
```
|
||||
<script>
|
||||
$(function () {
|
||||
//Configuration item
|
||||
var options = {
|
||||
container: 'luckysheet' //luckysheet is the container id
|
||||
}
|
||||
luckysheet.create(options)
|
||||
})
|
||||
</script>
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
### Requirements
|
||||
[Node.js](https://nodejs.org/en/) Version >= 6
|
||||
|
||||
### Installation
|
||||
```
|
||||
npm install
|
||||
npm install gulp -g
|
||||
```
|
||||
### Development
|
||||
```
|
||||
npm run dev
|
||||
```
|
||||
### Package
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
## Partner project
|
||||
|
||||
- [h5-Dooring](https://github.com/MrXujiang/h5-Dooring)
|
||||
|
||||
## Communication
|
||||
|
||||
- [WebSite](http://lucky.lashuju.com/index.html)
|
||||
- [Github Discussions](https://github.com/mengshukeji/Luckysheet/discussions)
|
||||
- [Gitter](https://gitter.im/mengshukeji/Luckysheet)
|
||||
|
||||
[Chinese community](./README-zh.md)
|
||||
|
||||
## Sponsor
|
||||
|
||||
Luckysheet is an MIT-licensed open source project with its ongoing development made possible entirely by the support of these awesome [backers](https://dream-num.github.io/LuckysheetDocs/about/sponsor.html#sponsors-list). If you'd like to join them, please consider:
|
||||
|
||||
- [Become a backer or sponsor on Patreon](https://www.patreon.com/mengshukeji).
|
||||
- [Become a backer or sponsor on Open Collective](https://opencollective.com/luckysheet).
|
||||
- One-time donation via PayPal, WeChat or Alipay
|
||||
|
||||
| PayPal | WeChat | Alipay |
|
||||
|---|---|---|
|
||||
| [Paypal Me](https://www.paypal.me/wbfsa) | <img src="https://cdn.jsdelivr.net/gh/mengshukeji/LuckyResources@master/assets/img/wechat/wechat.jpg" width="140" />| <img src="https://cdn.jsdelivr.net/gh/mengshukeji/LuckyResources@master/assets/img/wechat/alipay.jpg" width="130" /> |
|
||||
|
||||
### What's the difference between Patreon and OpenCollective?
|
||||
|
||||
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.
|
||||
|
||||
## Sponsors List
|
||||
|
||||
(Sort by time)
|
||||
- *涛 ¥ 200
|
||||
- popo ¥ 1
|
||||
- 孔垂善 ¥ 5
|
||||
- Shawn文 ¥ 99
|
||||
- 幸运的小路易 ¥ 1
|
||||
- 冯启俊 ¥ 88
|
||||
- mxb ¥ 10
|
||||
- 祭阳 ¥ 20
|
||||
- *勇 ¥ 30
|
||||
- 虚我 ¥ 200
|
||||
- 甜党 ¥ 50
|
||||
- Alphabet(Google)-gcf ¥ 1
|
||||
- **平 ¥ 100
|
||||
- **东 ¥ 10
|
||||
- debugger ¥ 20
|
||||
- 烦了烦 ¥ 10
|
||||
- 文顶顶 ¥ 200
|
||||
- yangxshn ¥ 10
|
||||
- 爱乐 ¥ 100
|
||||
- 小李飞刀刀 ¥ 66
|
||||
- 张铭 ¥ 200
|
||||
- 曹治军 ¥ 1
|
||||
- *特 ¥ 10
|
||||
- **权 ¥ 9.9
|
||||
- **sdmq ¥ 20
|
||||
- *旭 ¥ 10
|
||||
- Quentin ¥ 20
|
||||
- 周宇凡 ¥ 100
|
||||
- *超 ¥ 10
|
||||
- 维宁 ¥ 100
|
||||
- hyy ¥ 20
|
||||
- 雨亭寒江月 ¥ 50
|
||||
- **功 ¥ 10
|
||||
- **光 ¥ 20
|
||||
- terrywan ¥ 100
|
||||
- 王晓洪 ¥ 10
|
||||
- Sun ¥ 10
|
||||
- 忧绣 ¥ 100
|
||||
- Jasonx ¥ 10
|
||||
- 国勇 ¥ 66.6
|
||||
- 郎志 ¥ 100
|
||||
- 匿名 ¥ 1
|
||||
- ni ¥ 100
|
||||
- 苏 ¥ 50
|
||||
- Mads_chan ¥ 1
|
||||
- LK ¥ 100
|
||||
- 智连方舟 李汪石 ¥ 168
|
||||
- **发 ¥ 260
|
||||
- *超 ¥ 10
|
||||
- *勇 ¥ 10
|
||||
- *腾 ¥ 15
|
||||
- 名字好难起 ¥ 20
|
||||
- 大山 ¥ 1
|
||||
- waiting ¥ 1000
|
||||
- **宇 ¥ 10.00
|
||||
- 刘小帅的哥哥 ¥ 20.00
|
||||
- 宁静致远 ¥ 10.00
|
||||
- Eleven ¥ 1.00
|
||||
- **帆 ¥ 188
|
||||
- henry ¥ 100
|
||||
- .波罗 ¥ 50
|
||||
- 花落有家 ¥ 50
|
||||
- 踏遍南水北山 ¥ 1
|
||||
- LC ¥ 5
|
||||
- **明 ¥ 8.80
|
||||
- *军 ¥ 20
|
||||
- 张彪 ¥ 50
|
||||
- 企业文档云@肖敏 ¥ 10
|
||||
- 匿名 ¥ 50
|
||||
- 逍遥行 ¥ 10
|
||||
- z.wasaki ¥ 50
|
||||
- Make Children ¥ 20
|
||||
- Foam ¥ 20
|
||||
- 奥特曼( o|o)ノ三 ¥ 50
|
||||
- **凯 ¥ 10
|
||||
- **兵 ¥ 20
|
||||
- **川 ¥ 1
|
||||
- 二万 ¥ 50
|
||||
- 蔚然成林 ¥ 10
|
||||
- 邹杰 ¥ 10
|
||||
- 张永强 ¥ 50
|
||||
- 鱼得水 ¥ 50
|
||||
- Ccther ¥ 1
|
||||
- Eric Cheng ¥ 10
|
||||
- 佚名 ¥ 1
|
||||
- 花叶 ¥ 50
|
||||
- GT ¥ 20
|
||||
- 菜菜心 ¥ 10
|
||||
- fisher ¥ 1
|
||||
- JC ¥ 5
|
||||
- 佚名 ¥ 20
|
||||
- 独孤一剑 ¥ 50
|
||||
- mxt ¥ 20
|
||||
- 一叶迷山 ¥ 100
|
||||
- Jeff ¥ 100
|
||||
- 八千多条狗🐶 ¥ 100
|
||||
- 晓峰 ¥ 10
|
||||
- 戒 ¥ 1
|
||||
- 浪里个浪 ¥ 1
|
||||
- 回调函数 ¥ 50
|
||||
- 赖瓜子 ¥ 5
|
||||
- Milo•J ¥ 20
|
||||
- 可道云 ¥ 200
|
||||
- *程 ¥ 10
|
||||
- 来一杯卡布酸奶 ¥ 5
|
||||
- 刘久胜 ¥ 100
|
||||
- 快意江湖 ¥ 50
|
||||
- *新 ¥ 9.9
|
||||
- **龙 ¥ 100
|
||||
- **江 ¥ 100
|
||||
- **威 ¥ 9.8
|
||||
- **涛 ¥ 500
|
||||
- **嘉 ¥ 10
|
||||
- *涛 ¥ 1
|
||||
- *兵 ¥ 5
|
||||
- *阳 ¥ 200
|
||||
- *辉 ¥ 1
|
||||
- *帆 ¥ 30
|
||||
- **旺 ¥ 10
|
||||
- **麟 ¥ 20
|
||||
- *霖 ¥ 9.9
|
||||
- *帅 ¥ 10
|
||||
- *鑫 ¥ 6.66
|
||||
- ~朴:shu ¥ 29.79
|
||||
- 未来 ¥ 1
|
||||
- 国勇 ¥ 0.1
|
||||
- 用心灵听雨 ¥ 10
|
||||
- 钊 ¥ 5
|
||||
- 星稀 ¥ 5
|
||||
|
||||
## Authors and acknowledgment
|
||||
|
||||
### Active Core Team Members
|
||||
- [@wbfsa](https://github.com/wbfsa)
|
||||
- [@eiji-th](https://github.com/eiji-th)
|
||||
- [@fly-95](https://github.com/fly-95)
|
||||
- [@tonytonychopper123](https://github.com/tonytonychopper123)
|
||||
- [@Dushusir](https://github.com/Dushusir)
|
||||
- [@iamxuchen800117](https://github.com/iamxuchen800117)
|
||||
- [@wpxp123456](https://github.com/wpxp123456)
|
||||
- [@c19c19i](https://weibo.com/u/3884623955)
|
||||
- [@zhangchen915](https://github.com/zhangchen915)
|
||||
- [@jerry-f](https://github.com/jerry-f)
|
||||
- [@flowerField](https://github.com/flowerField)
|
||||
|
||||
### Community Partners
|
||||
- [@yiwasheng](https://github.com/yiwasheng)
|
||||
- [@danielcai1987](https://github.com/danielcai1987)
|
||||
- [@qq6690876](https://github.com/qq6690876)
|
||||
- [@javahuang](https://github.com/javahuang)
|
||||
- [@TimerGang](https://github.com/TimerGang)
|
||||
- [@gsw945](https://github.com/gsw945)
|
||||
- [@swen-xiong](https://github.com/swen-xiong)
|
||||
- [@lzmch](https://github.com/lzmch)
|
||||
- [@kdevilpf](https://github.com/kdevilpf)
|
||||
- [@WJWM0316](https://github.com/WJWM0316)
|
||||
|
||||
## License
|
||||
[MIT](http://opensource.org/licenses/MIT)
|
||||
|
||||
Copyright (c) 2020-present, mengshukeji
|
||||
@@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
extends: ['@commitlint/config-conventional']
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
# deploy Demo
|
||||
npm run build
|
||||
cd dist
|
||||
git init
|
||||
git remote add origin https://github.com/mengshukeji/LuckysheetDemo.git
|
||||
git config --local user.email "1414556676@qq.com"
|
||||
git config --local user.name "Dushusir"
|
||||
git add .
|
||||
git commit -m 'deploy Luckysheet demo'
|
||||
git push -f origin master:gh-pages
|
||||
|
||||
# ===============================================
|
||||
|
||||
# deploy Docs
|
||||
npm run docs:build
|
||||
cd docs/.vuepress/dist
|
||||
git init
|
||||
git remote add origin https://github.com/mengshukeji/LuckysheetDocs.git
|
||||
git add .
|
||||
git commit -m 'deploy Luckysheet docs'
|
||||
git push -f origin master:gh-pages
|
||||
|
||||
# ===============================================
|
||||
|
||||
# add a tags
|
||||
git tag -a doc -m "doc"
|
||||
|
||||
|
||||
# replease
|
||||
npm run build
|
||||
npm run release -- --release-as patch
|
||||
git push --follow-tags origin master
|
||||
npm publish
|
||||
|
||||
# only publish
|
||||
npm run build
|
||||
git add .
|
||||
npm run commit
|
||||
npm version patch
|
||||
git push -u origin master
|
||||
npm publish
|
||||
|
||||
|
||||
# ==============================================
|
||||
|
||||
# test feature branch
|
||||
git checkout -b fea origin/feature
|
||||
git pull
|
||||
|
||||
## After some test, create PR merge feature to master branch
|
||||
|
||||
git checkout master
|
||||
git branch -d fea
|
||||
|
||||
# ===============================================
|
||||
|
||||
# test pull request: https://docs.github.com/cn/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally
|
||||
|
||||
# 139 is ID, dev is branch name
|
||||
git fetch origin pull/139/head:test-139
|
||||
git checkout test-139
|
||||
# test code
|
||||
git push origin test-139
|
||||
# create new PR ,merge test-139 to master
|
||||
|
||||
# list all remote and local branchs
|
||||
git branch -a
|
||||
# delete remote branch
|
||||
git push origin --delete dev
|
||||
git checkout master
|
||||
# delete local branch
|
||||
git branch -d dev
|
||||
|
||||
# pr
|
||||
## 1. fork 到自己的仓库
|
||||
|
||||
## 2. git clone 到本地
|
||||
|
||||
## 3. 上游建立连接
|
||||
git remote add upstream https://github.com/mengshukeji/Luckysheet.git
|
||||
|
||||
## 4. 创建开发分支
|
||||
git checkout -b dev
|
||||
|
||||
## 5. 修改提交代码
|
||||
git add .
|
||||
git commit -m "add"
|
||||
git push origin dev
|
||||
|
||||
## 6. 同步代码,将最新代码同步到本地
|
||||
git fetch upstream
|
||||
git rebase upstream/master
|
||||
|
||||
## 7. 如果有冲突(没有可以略过)
|
||||
git status # 查看冲突文件,并修改冲突
|
||||
git add .
|
||||
git rebase --continue
|
||||
|
||||
## 8.提交分支代码
|
||||
git push origin dev
|
||||
|
||||
## 7. 提交pr
|
||||
去自己github仓库对应fork的项目下new pull request
|
||||
@@ -1,147 +0,0 @@
|
||||
module.exports = {
|
||||
base: '/LuckysheetDocs/',
|
||||
locales: {
|
||||
// 键名是该语言所属的子路径
|
||||
// 作为特例,默认语言可以使用 '/' 作为其路径。
|
||||
'/': {
|
||||
lang: 'en-US', // 将会被设置为 <html> 的 lang 属性
|
||||
title: 'Luckysheet Document',
|
||||
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.'
|
||||
},
|
||||
'/zh/': {
|
||||
lang: 'zh-CN',
|
||||
title: 'Luckysheet文档',
|
||||
description: 'Luckysheet ,一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。本站包含官方配置文档,API,教程。'
|
||||
},
|
||||
|
||||
},
|
||||
themeConfig: {
|
||||
domain: 'https://dream-num.github.io/LuckysheetDemo',
|
||||
logo: '/img/logo.png',
|
||||
author: 'Luckysheet',
|
||||
// 仓库地址
|
||||
repo: 'mengshukeji/Luckysheet',
|
||||
// 允许编辑链接文字
|
||||
editLinks: true,
|
||||
// 仓库的文档目录
|
||||
docsDir: 'docs',
|
||||
// 页面滚动
|
||||
smoothScroll: true,
|
||||
locales: {
|
||||
'/': {
|
||||
selectText: 'Languages',
|
||||
label: 'English',
|
||||
ariaLabel: 'Select language',
|
||||
editLinkText: 'Edit this page on GitHub',
|
||||
lastUpdated: 'Last Updated',
|
||||
serviceWorker: {
|
||||
updatePopup: {
|
||||
message: "New content is available.",
|
||||
buttonText: "Refresh"
|
||||
}
|
||||
},
|
||||
nav: [
|
||||
{ text: 'Home', link: '/' },
|
||||
{ text: 'Guide', link: '/guide/' },
|
||||
{ text: 'Demo', link: 'https://dream-num.github.io/LuckysheetDemo/' },
|
||||
{
|
||||
text: 'More',
|
||||
ariaLabel: 'More',
|
||||
items: [
|
||||
{ text: 'About', link: '/about/' }
|
||||
]
|
||||
},
|
||||
],
|
||||
// 侧边栏
|
||||
sidebar: {
|
||||
'/guide/': [
|
||||
'',
|
||||
'config',
|
||||
'sheet',
|
||||
'cell',
|
||||
'operate',
|
||||
'api',
|
||||
'resource',
|
||||
'FAQ',
|
||||
'contribute'
|
||||
],
|
||||
'/about/': [
|
||||
'',
|
||||
'sponsor',
|
||||
'company'
|
||||
],
|
||||
},
|
||||
},
|
||||
'/zh/': {
|
||||
// 多语言下拉菜单的标题
|
||||
selectText: '选择语言',
|
||||
// 该语言在下拉菜单中的标签
|
||||
label: '简体中文',
|
||||
ariaLabel: '选择语言',
|
||||
// 编辑链接文字
|
||||
editLinkText: '在 GitHub 上编辑此页',
|
||||
lastUpdated: '上次更新',
|
||||
// Service Worker 的配置
|
||||
serviceWorker: {
|
||||
updatePopup: {
|
||||
message: "发现新内容可用.",
|
||||
buttonText: "刷新"
|
||||
}
|
||||
},
|
||||
// 导航栏
|
||||
nav: [
|
||||
{ text: '首页', link: '/zh/' },
|
||||
{ text: '指南', link: '/zh/guide/' },
|
||||
{ text: '演示', link: 'https://dream-num.github.io/LuckysheetDemo/' },
|
||||
{
|
||||
text: '了解更多',
|
||||
ariaLabel: '了解更多',
|
||||
items: [
|
||||
{ text: '关于', link: '/zh/about/' }
|
||||
]
|
||||
},
|
||||
],
|
||||
// 侧边栏
|
||||
sidebar: {
|
||||
'/zh/guide/': [
|
||||
'',
|
||||
'config',
|
||||
'sheet',
|
||||
'cell',
|
||||
'operate',
|
||||
'api',
|
||||
'resource',
|
||||
'FAQ',
|
||||
'contribute'
|
||||
],
|
||||
'/zh/about/': [
|
||||
'',
|
||||
'sponsor',
|
||||
'company'
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
'vuepress-plugin-baidu-autopush': {},
|
||||
'sitemap': {
|
||||
hostname: 'https://dream-num.github.io/LuckysheetDocs'
|
||||
},
|
||||
'vuepress-plugin-code-copy': true,
|
||||
'seo': {
|
||||
siteTitle: (_, $site) => $site.title,
|
||||
title: $page => $page.title,
|
||||
description: $page => $page.frontmatter.description,
|
||||
author: (_, $site) => $site.themeConfig.author,
|
||||
tags: $page => $page.frontmatter.tags,
|
||||
twitterCard: _ => 'summary_large_image',
|
||||
type: $page => ['guide'].some(folder => $page.regularPath.startsWith('/' + folder)) ? 'article' : 'website',
|
||||
url: (_, $site, path) => ($site.themeConfig.domain || '') + path,
|
||||
image: ($page, $site) => $page.frontmatter.image && (($site.themeConfig.domain && !$page.frontmatter.image.startsWith('http') || '') + $page.frontmatter.image),
|
||||
publishedAt: $page => $page.frontmatter.date && new Date($page.frontmatter.date),
|
||||
modifiedAt: $page => $page.lastUpdated && new Date($page.lastUpdated),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 394 KiB |
|
Before Width: | Height: | Size: 398 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 39 KiB |
@@ -1,15 +0,0 @@
|
||||
---
|
||||
home: true
|
||||
heroText: Luckysheet
|
||||
tagline: Configuration Document · API · Tutorial
|
||||
actionText: Get Started →
|
||||
actionLink: /guide/
|
||||
features:
|
||||
- title: Powerful Features
|
||||
details: Contains a large number of commonly used spreadsheet functions to replace your excel
|
||||
- title: Simple Configuration
|
||||
details: Get started with minimal configuration
|
||||
- title: Open Source
|
||||
details: Community driven, work together to improve your ideas
|
||||
footer: MIT Licensed | Copyright © 2020-present Mengshukeji
|
||||
---
|
||||
@@ -1,28 +0,0 @@
|
||||
# Meet the Team
|
||||
|
||||
Luckysheet is a project led by an individual and jointly developed by several friends with the same interests.
|
||||
|
||||
### Active Core Team Members
|
||||
- [@wbfsa](https://github.com/wbfsa)
|
||||
- [@eiji-th](https://github.com/eiji-th)
|
||||
- [@fly-95](https://github.com/fly-95)
|
||||
- [@tonytonychopper123](https://github.com/tonytonychopper123)
|
||||
- [@Dushusir](https://github.com/Dushusir)
|
||||
- [@iamxuchen800117](https://github.com/iamxuchen800117)
|
||||
- [@wpxp123456](https://github.com/wpxp123456)
|
||||
- [@c19c19i](https://weibo.com/u/3884623955)
|
||||
- [@zhangchen915](https://github.com/zhangchen915)
|
||||
- [@jerry-f](https://github.com/jerry-f)
|
||||
- [@flowerField](https://github.com/flowerField)
|
||||
|
||||
### Community Partners
|
||||
- [@yiwasheng](https://github.com/yiwasheng)
|
||||
- [@danielcai1987](https://github.com/danielcai1987)
|
||||
- [@qq6690876](https://github.com/qq6690876)
|
||||
- [@javahuang](https://github.com/javahuang)
|
||||
- [@TimerGang](https://github.com/TimerGang)
|
||||
- [@gsw945](https://github.com/gsw945)
|
||||
- [@swen-xiong](https://github.com/swen-xiong)
|
||||
- [@lzmch](https://github.com/lzmch)
|
||||
- [@kdevilpf](https://github.com/kdevilpf)
|
||||
- [@WJWM0316](https://github.com/WJWM0316)
|
||||
@@ -1,49 +0,0 @@
|
||||
# Community case
|
||||
|
||||
We collected a lot of case feedback from the community, and also discovered Luckysheet usage scenarios that we did not expect before.
|
||||
|
||||
It is our responsibility to actively listen to the voice of the community, and to continuously update and iterate with your support and feedback.
|
||||
|
||||
|
||||
## Company Case
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://www.zpy360.com/" target="_blank">
|
||||
<img width="222px" src="https://cdn.jsdelivr.net/npm/luckyresources/assets/img/community_case/Zhiping_Cloud.png">
|
||||
</a>
|
||||
<p>雄安智评云数字科技有限公司</p>
|
||||
</td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://code-the-future.com/" target="_blank">
|
||||
<img width="222px" src="https://cdn.jsdelivr.net/npm/luckyresources/assets/img/community_case/code_the_future.png">
|
||||
</a>
|
||||
<p>Code the Future</p>
|
||||
</td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="http://www.jackyun.com/" target="_blank">
|
||||
<img width="222px" src="https://cdn.jsdelivr.net/npm/luckyresources/assets/img/community_case/jackyun.png">
|
||||
</a>
|
||||
<p>吉客云</p>
|
||||
</td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://www.huawei.com/cn/" target="_blank">
|
||||
<img width="222px" src="https://cdn.jsdelivr.net/npm/luckyresources/assets/img/community_case/huawei.png">
|
||||
</a>
|
||||
<p>华为</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="middle">
|
||||
</td>
|
||||
<td align="center" valign="middle">
|
||||
</td>
|
||||
<td align="center" valign="middle">
|
||||
</td>
|
||||
<td align="center" valign="middle">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,156 +0,0 @@
|
||||
# Sponsor
|
||||
|
||||
## Why sponsor
|
||||
|
||||
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.
|
||||
|
||||
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 😋.
|
||||
|
||||
## How to sponsor
|
||||
|
||||
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:
|
||||
|
||||
- [Become a backer or sponsor on Patreon](https://www.patreon.com/mengshukeji).
|
||||
- [Become a backer or sponsor on Open Collective](https://opencollective.com/luckysheet).
|
||||
- One-time donation via PayPal, WeChat or Alipay
|
||||
|
||||
| PayPal | WeChat | Alipay |
|
||||
|---|---|---|
|
||||
| [Paypal Me](https://www.paypal.me/wbfsa) | <img src="https://minio.cnbabylon.com/public/luckysheet/wechat.jpg" width="140" />| <img src="https://minio.cnbabylon.com/public/luckysheet/alipay.jpg" width="130" /> |
|
||||
|
||||
### What's the difference between Patreon and OpenCollective?
|
||||
|
||||
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.
|
||||
|
||||
## Sponsors List
|
||||
|
||||
(Sort by time)
|
||||
- *涛 ¥ 200
|
||||
- popo ¥ 1
|
||||
- 孔垂善 ¥ 5
|
||||
- Shawn文 ¥ 99
|
||||
- 幸运的小路易 ¥ 1
|
||||
- 冯启俊 ¥ 88
|
||||
- mxb ¥ 10
|
||||
- 祭阳 ¥ 20
|
||||
- *勇 ¥ 30
|
||||
- 虚我 ¥ 200
|
||||
- 甜党 ¥ 50
|
||||
- Alphabet(Google)-gcf ¥ 1
|
||||
- **平 ¥ 100
|
||||
- **东 ¥ 10
|
||||
- debugger ¥ 20
|
||||
- 烦了烦 ¥ 10
|
||||
- 文顶顶 ¥ 200
|
||||
- yangxshn ¥ 10
|
||||
- 爱乐 ¥ 100
|
||||
- 小李飞刀刀 ¥ 66
|
||||
- 张铭 ¥ 200
|
||||
- 曹治军 ¥ 1
|
||||
- *特 ¥ 10
|
||||
- **权 ¥ 9.9
|
||||
- **sdmq ¥ 20
|
||||
- *旭 ¥ 10
|
||||
- Quentin ¥ 20
|
||||
- 周宇凡 ¥ 100
|
||||
- *超 ¥ 10
|
||||
- 维宁 ¥ 100
|
||||
- hyy ¥ 20
|
||||
- 雨亭寒江月 ¥ 50
|
||||
- **功 ¥ 10
|
||||
- **光 ¥ 20
|
||||
- terrywan ¥ 100
|
||||
- 王晓洪 ¥ 10
|
||||
- Sun ¥ 10
|
||||
- 忧绣 ¥ 100
|
||||
- Jasonx ¥ 10
|
||||
- 国勇 ¥ 66.6
|
||||
- 郎志 ¥ 100
|
||||
- 匿名 ¥ 1
|
||||
- ni ¥ 100
|
||||
- 苏 ¥ 50
|
||||
- Mads_chan ¥ 1
|
||||
- LK ¥ 100
|
||||
- 智连方舟 李汪石 ¥ 168
|
||||
- **发 ¥ 260
|
||||
- *超 ¥ 10
|
||||
- *勇 ¥ 10
|
||||
- *腾 ¥ 15
|
||||
- 名字好难起 ¥ 20
|
||||
- 大山 ¥ 1
|
||||
- waiting ¥ 1000
|
||||
- **宇 ¥ 10.00
|
||||
- 刘小帅的哥哥 ¥ 20.00
|
||||
- 宁静致远 ¥ 10.00
|
||||
- Eleven ¥ 1.00
|
||||
- **帆 ¥ 188
|
||||
- henry ¥ 100
|
||||
- .波罗 ¥ 50
|
||||
- 花落有家 ¥ 50
|
||||
- 踏遍南水北山 ¥ 1
|
||||
- LC ¥ 5
|
||||
- **明 ¥ 8.80
|
||||
- *军 ¥ 20
|
||||
- 张彪 ¥ 50
|
||||
- 企业文档云@肖敏 ¥ 10
|
||||
- 匿名 ¥ 50
|
||||
- 逍遥行 ¥ 10
|
||||
- z.wasaki ¥ 50
|
||||
- Make Children ¥ 20
|
||||
- Foam ¥ 20
|
||||
- 奥特曼( o|o)ノ三 ¥ 50
|
||||
- **凯 ¥ 10
|
||||
- **兵 ¥ 20
|
||||
- **川 ¥ 1
|
||||
- 二万 ¥ 50
|
||||
- 蔚然成林 ¥ 10
|
||||
- 邹杰 ¥ 10
|
||||
- 张永强 ¥ 50
|
||||
- 鱼得水 ¥ 50
|
||||
- Ccther ¥ 1
|
||||
- Eric Cheng ¥ 10
|
||||
- 佚名 ¥ 1
|
||||
- 花叶 ¥ 50
|
||||
- GT ¥ 20
|
||||
- 菜菜心 ¥ 10
|
||||
- fisher ¥ 1
|
||||
- JC ¥ 5
|
||||
- 佚名 ¥ 20
|
||||
- 独孤一剑 ¥ 50
|
||||
- mxt ¥ 20
|
||||
- 一叶迷山 ¥ 100
|
||||
- Jeff ¥ 100
|
||||
- 八千多条狗🐶 ¥ 100
|
||||
- 晓峰 ¥ 10
|
||||
- 戒 ¥ 1
|
||||
- 浪里个浪 ¥ 1
|
||||
- 回调函数 ¥ 50
|
||||
- 赖瓜子 ¥ 5
|
||||
- Milo•J ¥ 20
|
||||
- 可道云 ¥ 200
|
||||
- *程 ¥ 10
|
||||
- 来一杯卡布酸奶 ¥ 5
|
||||
- 刘久胜 ¥ 100
|
||||
- 快意江湖 ¥ 50
|
||||
- *新 ¥ 9.9
|
||||
- **龙 ¥ 100
|
||||
- **江 ¥ 100
|
||||
- **威 ¥ 9.8
|
||||
- **涛 ¥ 500
|
||||
- **嘉 ¥ 10
|
||||
- *涛 ¥ 1
|
||||
- *兵 ¥ 5
|
||||
- *阳 ¥ 200
|
||||
- *辉 ¥ 1
|
||||
- *帆 ¥ 30
|
||||
- **旺 ¥ 10
|
||||
- **麟 ¥ 20
|
||||
- *霖 ¥ 9.9
|
||||
- *帅 ¥ 10
|
||||
- *鑫 ¥ 6.66
|
||||
- ~朴:shu ¥ 29.79
|
||||
- 未来 ¥ 1
|
||||
- 国勇 ¥ 0.1
|
||||
- 用心灵听雨 ¥ 10
|
||||
- 钊 ¥ 5
|
||||
- 星稀 ¥ 5
|
||||
@@ -1,325 +0,0 @@
|
||||
# FAQ
|
||||
|
||||
The content of this chapter collects the common problems that everyone has feedback. If the official documents and this list can’t answer your questions, I recommend you to [Official Forum](https://github.com/mengshukeji/Luckysheet/discussions)
|
||||
|
||||
## What is the difference between data and celldata in luckysheetfile?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: Use one-dimensional array format [celldata](/guide/sheet.html#celldata), after the initialization is completed, the data converted into a two-dimensional array format is used for storage and update, and celldata is no longer used.
|
||||
|
||||
If you need to take out `data` as initial data, you need to execute [transToCellData(data)](/guide/api.html#transtocelldata-data-setting) to convert it to celldata data.
|
||||
Among them, the celldata in `{ r, c, v }` format is converted to a two-dimensional array using [transToData(celldata)](/guide/api.html#transtodata-celldata-setting)
|
||||
|
||||
Summarized as follows:
|
||||
```js
|
||||
// data => celldata two-dimensional array data into {r, c, v} format one-dimensional array
|
||||
luckysheet.transToCellData(data)
|
||||
|
||||
// celldata => data to generate the two-dimensional array required for the table
|
||||
luckysheet.transToData(celldata)
|
||||
```
|
||||
|
||||
------------
|
||||
|
||||
## What are the cell types?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: Refer to [Cell Format List](/guide/cell.html), with examples of available cell formats
|
||||
|
||||
------------
|
||||
|
||||
## How to use Luckysheet in Vue/React project?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: Check
|
||||
|
||||
- Vue case: [luckysheet-vue](https://github.com/mengshukeji/luckysheet-vue)
|
||||
- React case: [luckysheet-react](https://github.com/mengshukeji/luckysheet-react)
|
||||
|
||||
------------
|
||||
|
||||
## Why will the formula in the table not be triggered after initialization?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: Refer to [Table data format](/guide/sheet.html#calcchain) ,just set the calcChain corresponding to the cell data.
|
||||
|
||||
------------
|
||||
|
||||
## Is the remote loading data loadUrl or updateUrl?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: [loadUrl](/guide/config.html#loadurl). Configure loadUrl, Luckysheet will request the entire table data through ajax, and updateUrl will be used as the interface address for collaborative editing in real-time saving.
|
||||
Note: Initial data needs to be configured with loadUrl parameter, while for collaborative editing, the four parameters of loadUrl, updateUrl and allowUpdate can be configured to take effect.
|
||||
|
||||
------------
|
||||
|
||||
## What is the difference between `index` and `order` for each sheet page?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: Each sheet page has a unique id, which is `index`, which can be incremented by numbers or a random string. And `order` is the sorting situation of all sheets, starting from 0, can only be numbers `0,1,2...`.
|
||||
|
||||
------------
|
||||
|
||||
## Why can’t I run the project directly under the dist folder?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: Need to start the local server
|
||||
|
||||
- [Node build a local server](https://github.com/JacksonTian/anywhere)
|
||||
- [Python build local server](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server)
|
||||
|
||||
------------
|
||||
|
||||
## How to import and export excel?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: The excel import and export library developed with Luckysheet-[Luckyexcel](https://github.com/mengshukeji/Luckyexcel) has realized the excel import function, and the export function is under development.You can refer to these 2 blog posts for excel export at this stage:
|
||||
|
||||
- [Development of Excel download function based on LuckySheet online form](https://www.cnblogs.com/recode-hyh/p/13168226.html)
|
||||
- [Use exceljs to export luckysheet form](https://blog.csdn.net/csdn_lsy/article/details/107179708)
|
||||
|
||||
------------
|
||||
|
||||
## How to merge cells during initialization?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: Refer to the following case:
|
||||
- [How Luckysheet initializes the data with merged cells](https://www.cnblogs.com/DuShuSir/p/13272397.html)
|
||||
|
||||
------------
|
||||
|
||||
## How does 'Luckysheet' save the data from the table to the database? Is there a soulution for storage and collaboration?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: There are two options:
|
||||
|
||||
- 1. after the table operation is completed, you can use `luckysheet.getAllSheets()` to get all sheet data that stroed in the back-end.
|
||||
- 2. enable the collaborative editing function to transmit data to the back-end in real-time.
|
||||
refer this article:
|
||||
[How Luckysheet saves the data in the table to the database](https://www.cnblogs.com/DuShuSir/p/13857874.html)
|
||||
|
||||
------------
|
||||
|
||||
## How to monitor cell hover or click events? how to monitor `cellRenderAfter` in real-time?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: We have collected the secondary development requirements for cell events, and planned the cell-related hook functions, refer to [cell hook function](/guide/config.html#cellrenderafter) (the TODO displayed is not yet open)
|
||||
|
||||
------------
|
||||
|
||||
## How to customize the top toolbar?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:
|
||||
reference: [options.showtoolbarconfig](/guide/config.html#showtoolbarconfig)(TODO means waiting to developed)
|
||||
|
||||
------------
|
||||
|
||||
## Does the project use jQuery?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: yes. At the beginning, Luckysheet uses jQuery。The packaging tool will package the jQuery to this file `./plugins/js/plugin.js`
|
||||
|
||||
If your project (such as react / Vue) also references jQuery globally and causes conflicts, you can try to remove a jQuery.
|
||||
|
||||
if you want to remove jQuery in `Luckysheet`, you can find `jQuery` in source code folder `gulpfile.js`: [src/plugins/js/jquery.min.js](https://github.com/mengshukeji/Luckysheet/blob/master/gulpfile.js),then delete information related to jQuery.
|
||||
|
||||
------------
|
||||
|
||||
## How to add a field to a cell object?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: reference [cell object format](/guide/cell.html),then read this annotation[src/controllers/postil.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/postil.js)。the annotation is a configuration in a cell object.
|
||||
|
||||
------------
|
||||
|
||||
## The toolbar icon is on the loading stage all the time.
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: The luckysheet use iconfont icon in this project, if any icon cannot be loaded ,plz check your iconfont.css. we are so sorry that we did not describe it clearly in the old version documents.
|
||||
|
||||
Now the documents have been updated.[official documents](/guide/#steps-for-usage)
|
||||
|
||||
------------
|
||||
|
||||
## Can't run Luckyexcel after package.
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: Terminal does not show `end`, but if the `dist` folder has this file `luckyexcel.js`, it is normal.
|
||||
|
||||
Lucky excel is an excel import and export library. The project uses `gulp` as a packaging tool. There is a problem with the old version of the packaging tool, but it is fixed now. if this problem still troubles you, plz check the following steps:
|
||||
1. pull the latest code.
|
||||
2. `npm i`
|
||||
3. `npm run build`
|
||||
|
||||
more information: [Luckyexcel](https://github.com/mengshukeji/Luckyexcel/)
|
||||
|
||||
------------
|
||||
|
||||
## How to disable editing of cells?How to open sheet protection?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: Sheet protection includes disable editing of cells that you need to make some configurations on each sheets. `config.authority`, the latest configurations[sheet protection](/guide/sheet.html#config-authority)。
|
||||
|
||||
In order to make it easier for you to understand the function of sheet protection, the following video shows how to make the whole sheet uneditable, but allow a column of cells to be edited:
|
||||
|
||||
<iframe frameborder="0" src="https://v.qq.com/txp/iframe/player.html?vid=g3162sacwn6" allowFullScreen="true"></iframe>
|
||||
|
||||
In you local browser, you can open the control pannel, use `luckysheet.getLuckysheetfile()[0].config.authority` to get the configuration parameters.
|
||||
|
||||
------------
|
||||
|
||||
## How to configure data validation?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: there is the configuration of data validation,[data validation](/guide/sheet.html#dataVerification)。Also there is the API that you can use `data validation` in any time. [setDataVerification](/guide/api.html#setdataverification-optionitem-setting).
|
||||
|
||||
------------
|
||||
|
||||
## Is there a case for using Luckysheet with CDN?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: Luckysheet supports CDN. reference: [The case of using luckysheet by CDN](https://www.cnblogs.com/DuShuSir/p/13859103.html)
|
||||
|
||||
------------
|
||||
|
||||
## how to limit the adaptive height of a picture in a cell?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: First of all, you need to move the picture and adjust the cell size, and then there are the following situations:
|
||||
|
||||
- if the cell contains a picture and you expand the cell, the picure will not be expanded.
|
||||
- if the cell contains a picture and you shorten the cell to the edge of the picture, the picture will shrink.
|
||||
- When the picture exceeds the border of the cell, the size of this picture will change with the size of the cell.
|
||||
|
||||
if you want to get the position of the picture, you can overlap the picture with the border of the cell.(in the source code, it needs to overlap more than 2px.)The following demo video shows how to limit the image to the adaptive width and height of the cell.
|
||||
|
||||
<iframe frameborder="0" src="https://v.qq.com/txp/iframe/player.html?vid=y3163ya0q6c" allowFullScreen="true"></iframe>
|
||||
|
||||
------------
|
||||
|
||||
## How to get the default row height and column width of the worksheet?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: There are two ways to get it
|
||||
|
||||
- 1. use `luckysheet.getLuckysheetfile()` to get all configuration data, so you can get the `defaultRowHeight` and `defaultColWidth` in the sheet configuration data。
|
||||
- 2. use API to get the default row height [getDefaultRowHeight](/guide/api.html#getdefaultrowheight-setting) and column width.[getDefaultColWidth](/guide/api.html#getdefaultcolwidth-setting)
|
||||
|
||||
------------
|
||||
|
||||
## How to hide the add row button and the back to top button below the worksheet?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: Configuration is open
|
||||
- Allow adding rows [enableAddRow](/guide/config.html#enableaddrow)
|
||||
- Allow back to top [enableAddBackTop](/guide/config.html#enableAddBackTop)
|
||||
|
||||
------------
|
||||
|
||||
## How to hide the row and column headings of the worksheet?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: Configuration is open
|
||||
- The width of the row header area [rowHeaderWidth](/guide/config.html#rowheaderwidth)
|
||||
- The height of the column header area [columnHeaderHeight](/guide/config.html#columnHeaderHeight)
|
||||
|
||||
------------
|
||||
|
||||
## What method can be called to set `config.merge`?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: Three methods
|
||||
- Interface operation
|
||||
- Use API: [setRangeMerge](/guide/api.html#setrangemerge-type-setting)
|
||||
- Manually assemble merge parameters
|
||||
|
||||
------------
|
||||
|
||||
## Why is the official new feature ineffective?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: The first step is to check whether you have used CDN to import,
|
||||
|
||||
The CDN link used in the Luckysheet tutorial is the service provided by [jsdelivr](https://www.jsdelivr.com/package/npm/luckysheet), and the code is from [npmjs.com](https://www.npmjs.com/) automatically sync the past, not from [Github](https://github.com/mengshukeji/Luckysheet/). Because our newly submitted code still needs to be tested for a period of time, it will not be released to npm immediately, causing the npm code to lag behind Github.
|
||||
|
||||
If you need to try the latest code, we strongly recommend that you pull the code from the [Luckysheet Github](https://github.com/mengshukeji/Luckysheet/) main repository. After our version is stable, we will consider releasing the npm package in real time.
|
||||
|
||||
The second step, if it is to import the packaged code of the github repository, test to determine whether there is a bug, you can find the problem and try to fix it, and then [submit a PR](https://github.com/mengshukeji/Luckysheet/pulls), if can't fix it, please [submit issues](https://github.com/mengshukeji/Luckysheet/issues).
|
||||
|
||||
------------
|
||||
|
||||
## `npm run dev` reported an error: ʻError: Cannot find module'rollup'`?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: It may be a problem with the npm package installation, try the following steps:
|
||||
1. `npm cache clean --force`
|
||||
2. `npm i rimraf -g`
|
||||
3. `rimraf node_modules`
|
||||
4. Delete the package-lock.json file
|
||||
5. `npm i`
|
||||
6. `npm run dev`
|
||||
|
||||
Tip: Most other npm installation problems can also be solved by trying above steps.
|
||||
|
||||
------------
|
||||
|
||||
## How to carry out secondary development of Luckysheet in Vue project?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: The [luckysheet-vue](https://github.com/mengshukeji/luckysheet-vue) case is to provide an application integration solution.
|
||||
|
||||
If directly developed locally:
|
||||
1. Start both the Luckysheet project and your own Vue project. For example, the Luckysheet project is at http://localhost:3001
|
||||
2. Import Luckysheet to use in the Vue project through `http://localhost:3001`
|
||||
|
||||
In this case, after Luckysheet is modified in real time, the changes can be seen in the Vue project
|
||||
|
||||
------------
|
||||
|
||||
## Error reporting `Store.createChart` when creating chart?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: You need to introduce a chart plugin to use it. You should configure the chart plugin to use when the workbook is initialized. Refer to
|
||||
|
||||
- Plugins configuration [plugins](/guide/config.html#plugins)
|
||||
- 或 官方demo [src/index.html](https://github.com/mengshukeji/Luckysheet/blob/master/src/index.html)
|
||||
|
||||
------------
|
||||
|
||||
## Can cells add custom attributes?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: The custom attributes directly assigned to the cell object will be filtered. To make the custom attributes take effect, you need to edit the code to remove the filter attributes.
|
||||
|
||||
------------
|
||||
|
||||
## How to enter text starting with `'='`? For example, `=currentDate('YYYY-MM-DD')`, it will remove the function by default, how to prohibit the function?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: Just add a single quotation mark in front of it, and it will be forcibly recognized as a string, which is consistent with excel. For example: `'=currentDate('YYYY-MM-DD')`
|
||||
|
||||
------------
|
||||
|
||||
## Why does the create callback have no effect?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: The API method `luckysheet.create()` does not have a callback, but Luckysheet provides a hook function to execute the callback method at a specified location, such as:
|
||||
- Triggered before the workbook is created [workbookCreateBefore](/guide/config.html#workbookcreatebefore)
|
||||
- Triggered after the workbook is created [workbookCreateAfter](/guide/config.html#workbookcreateafter)
|
||||
|
||||
------------
|
||||
|
||||
## When create, the first cell is selected by default, how to remove it?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: When the cell is selected, it is highlighted by default, just remove the highlight, use API: [setRangeShow](/guide/api.html#setrangeshow-range-setting)
|
||||
|
||||
```js
|
||||
luckysheet.setRangeShow("A2",{show:false})
|
||||
```
|
||||
|
||||
------------
|
||||
|
||||
## Where is the right-click event bound?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: In the source code [src/controllers/hander.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/handler.js), search for `event.which == "3"` to find the code executed by the right-click event.
|
||||
|
||||
------------
|
||||
|
||||
## How to add a custom toolbar?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: No configuration is currently provided, you can refer to the implementation of the print button in the toolbar to modify the source code:
|
||||
1. Search for `luckysheet-icon-print` globally to find the implementation of the print button, in [src/controllers/constant.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/constant.js) add a similar template string, you need to customize a unique id
|
||||
2. Modify [src/controllers/resize.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/resize.js) and add a new record in the toobarConfig object
|
||||
3. Modify [src/controllers/menuButton.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/menuButton.js) to add an event listener
|
||||
|
||||
------------
|
||||
|
||||
## How to add custom formulas?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: Two source codes need to be modified:
|
||||
1. Add a formula to the `functionImplementation` object in the [src/function/functionImplementation.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/function/functionImplementation.js) file, format refer to formulas such as `SUM`/`AVERAGE`
|
||||
2. Modify all the language packs in the [src/locale](https://github.com/mengshukeji/Luckysheet/blob/master/src/locale) file directory, and add the new formula description to the `functionlist` array in. Among them, `t` is the category of the function, `m` is the number of parameters, the minimum number of parameters and the maximum number of parameters.
|
||||
|
||||
------------
|
||||
|
||||
## Is there a similar loadData interface, I want to load 10 records first, and then dynamically load the data, these data are appended to the table?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**: Yes. Our `loadSheetUrl` provides this function, which can be turned on by initializing `options.enablePage = true`.
|
||||
|
||||
Searching for `enablePage` in the source code, you can see that there is a `method.addDataAjax` method, which contains an ajax request to dynamically load data, which will be appended to the worksheet.
|
||||
|
||||
This function is now hidden in the document, because when we made this interface, the interface parameters were matched according to our actual business, which may not be universal. We are going to abstract and release it for everyone to use. If you want to use it yourself you can change it based on this.
|
||||
|
||||
It is recommended that you consider writing your own interface to load the data, and then use `setRangeValue` to append the data at the specified location, which has a higher degree of customization.
|
||||
|
||||
------------
|
||||
@@ -1,271 +0,0 @@
|
||||
# Luckysheet is no longer maintained, please use [Univer](https://github.com/dream-num/univer) instead!
|
||||
|
||||
# Get started
|
||||
|
||||
## Introduction
|
||||
Luckysheet is an online spreadsheet like excel that is powerful, simple to configure, and completely open source.
|
||||
|
||||
## Demo
|
||||
[Online demo](https://dream-num.github.io/LuckysheetDemo/)
|
||||
|
||||

|
||||
|
||||
## Online Case
|
||||
|
||||
- [Cooperative editing demo](http://luckysheet.lashuju.com/demo/)(Note: The official Java backend will also be open source after finishing,using OT algorithm. Please do not operate frequently to prevent the server from crashing)
|
||||
|
||||
## Features
|
||||
|
||||
### 🛠️Formatting
|
||||
+ **Styling** (Change font style, size, color, or apply effects)
|
||||
+ **Conditional formatting** (highlight interesting cells or ranges of cells, emphasize unusual values, and visualize data by using data bars, color scales, and icon sets that correspond to specific variations in the data)
|
||||
+ **Align or rotate text**
|
||||
+ **Support text truncation, overflow, automatic line wrapping**
|
||||
+ **Data types**
|
||||
+ **currency, percentages, decimals, dates**
|
||||
+ **Custom** (E.g `##,###0.00` , `$1,234.56$##,###0.00_);[Red]($##,###0.00)`, `_($* ##,###0.00_);_(...($* "-"_);_(@_)`, `08-05 PM 01:30MM-dd AM/PM hh:mm` )
|
||||
+ **Cell segmentation style** (Alt+Enter line break, sub,super, in-cell style)
|
||||
|
||||
### 🧬Cells
|
||||
+ **Move cells by drag and dropping** (Operate on selection)
|
||||
+ **Fill handle** (For a series like 1, 2, 3, 4, 5..., type 1 and 2 in the first two cells. For the series 2, 4, 6, 8..., type 2 and 4. Support arithmetic sequence, geometric sequence,date, week,chinese numbers)
|
||||
+ **Auto Fill Options** (Fill copy, sequence, only format, no format, day, month, year)
|
||||
+ **Multiple selection** (Hold Ctrl Selecting multiple cells, copy and paste)
|
||||
+ **Find and replace** (Such as a particular number or text string, Support regular expression, whole word, case sensitive)
|
||||
+ **Location** (Cells can be selected according to the data type)
|
||||
+ **Merge cells**
|
||||
+ **Data validation** (Checkbox, drop-down list, datePicker)
|
||||
|
||||
### 🖱️Row & columns
|
||||
+ **Hide, Insert, Delete rows and columns**
|
||||
+ **Frozen rows and columns** (First row, first column, Frozen to selection, freeze adjustment lever can be dragged)
|
||||
+ **Split text** (Split text into different columns with the Convert Text to Columns Wizard)
|
||||
|
||||
### 🔨Operation
|
||||
+ **Undo/Redo**
|
||||
+ **Copy/Paste/Cut** (Copy from excel to Luckysheet with format, vice versa)
|
||||
+ **Hot key** (The operating experience is consistent with excel, if there are differences or missing, please feedback to us)
|
||||
+ **Format Painter** (Similar to google sheet)
|
||||
+ **Selection by drag and dropping** (Change the parameters of formula and chart through selection)
|
||||
|
||||
### ⚙️Formulas & functions
|
||||
+ **Built-in formulas**
|
||||
+ Math (SUMIFS, AVERAGEIFS, SUMIF, SUM, etc.)
|
||||
+ Text (CONCATENATE, REGEXMATCH, MID)
|
||||
+ Date (DATEVALUE, DATEDIF, NOW, WEEKDAY, etc.)
|
||||
+ Financial (PV, FV, IRR, NPV, etc.)
|
||||
+ Logical (IF, AND, OR, IFERROR, etc.)
|
||||
+ Lookup (VLOOKUP, HLOOkUP, INDIRECT, OFFSET, etc.)
|
||||
+ Dynamic Array (Excel2019 new formulas, SORT,FILTER,UNIQUE,RANDARRAY,SEQUENCE)
|
||||
+ **Array** (={1,2,3,4,5,6}, Crtl+Shift+Enter)
|
||||
+ **Remote formulas** (DM_TEXT_TFIDF, DM_TEXT_TEXTRANK,DATA_CN_STOCK_CLOSE etc. Need remote interface, can realize complex calculation)
|
||||
+ **Custom** (Some formula suitable for use in China have been added. AGE_BY_IDCARD, SEX_BY_IDCARD, BIRTHDAY_BY_IDCARD, PROVINCE_BY_IDCARD, CITY_BY_IDCARD, etc. You can define any formula you want)
|
||||
|
||||
### 📐Tables
|
||||
+ **Filters** (Support color , numerical, date, text filtering)
|
||||
+ **Sort** (Sort multiple fields simultaneously)
|
||||
|
||||
### 📈Pivot table
|
||||
+ **Arrange fields** (Add fileds to rows, columns, values, area, it is similar to excel)
|
||||
+ **Aggregation** (Surport Sum,Count,CountA,CountUnique,Average,Max,Min,Median,Product,Stdev,Stdevp,Var,VarP etc.)
|
||||
+ **Filter data** (Add fileds to filters area and analyze the desired data )
|
||||
+ **Drill down** (Double click pivot table cell to drill down for detail data )
|
||||
+ **Create a PivotChart** (Pivot table can create a chart )
|
||||
|
||||
### 📊Chart
|
||||
+ **Support types** (Line, Column, Area, Bar, Pie, comming soon Scatter, Radar, Gauge, Funnel etc.)
|
||||
+ **Chart Plugins** (Link to another project [ChartMix](https://github.com/mengshukeji/chartMix)(MIT): ECharts is currently supported,Highcharts, Ali G2, amCharts, googleChart, chart.js are being developed gradually)
|
||||
+ **Sparklines** (Support by formula : Line, Pie, Box, Pie etc.)
|
||||
|
||||
### ✍️Share
|
||||
+ **Comments** (Add, delete, update)
|
||||
+ **Collaborate** (Simultaneous editing by multiple users)
|
||||
|
||||
### 📚Insert object
|
||||
+ **Insert picture** (JPG,PNG,SVG and so on)
|
||||
|
||||
### ⚡Luckysheet
|
||||
+ **Matrix operation** (Operate selection through the right-click menu: transpose, rotate, numerical calculation)
|
||||
+ **Screenshot** (Take a screenshot with selection)
|
||||
+ **Copy to** (In the right-click menu, copy selection to json, array etc.)
|
||||
+ **EXCEL import/export** (Specially adapted to Luckysheet, export is under development)
|
||||
|
||||
### ⏱️Coming soon
|
||||
+ **Print** (Like excel print option, save to PDF)
|
||||
+ **Tree menu** (Just like the outline (group) function of excel)
|
||||
+ **Table new Features** (filter, slicer)
|
||||
+ **CSV,TXT import/export** (Specially adapted to Luckysheet)
|
||||
+ **Insert Shapes** ([Pen tool](https://github.com/mengshukeji/Pentool) Shapes)
|
||||
+ **Documentation** (Improve documentation and API)
|
||||
+ **More...** (Please advise us)
|
||||
|
||||
## Development model
|
||||
|
||||
### Requirements
|
||||
[Node.js](https://nodejs.org/en/) Version >= 6
|
||||
|
||||
### Installation
|
||||
```shell
|
||||
npm install
|
||||
npm install gulp -g
|
||||
```
|
||||
|
||||
### Development
|
||||
```shell
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Package
|
||||
```shell
|
||||
npm run build
|
||||
```
|
||||
|
||||
## Steps for usage
|
||||
|
||||
### First step
|
||||
|
||||
There are two ways to introduce dependencies
|
||||
|
||||
#### CDN
|
||||
```html
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/css/pluginsCss.css' />
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/plugins.css' />
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/css/luckysheet.css' />
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/assets/iconfont/iconfont.css' />
|
||||
<script src="https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/js/plugin.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/luckysheet.umd.js"></script>
|
||||
```
|
||||
|
||||
Note that the path of `https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/luckysheet.umd.js` means that the latest luckysheet code will be pulled, but if Luckysheet has just been released, the jsdelivr website may not have time Synchronize from npm, so using this path will still pull to the previous version. We recommend that you directly specify the latest version.
|
||||
|
||||
To specify the Luckysheet version, please add the version number after all CDN dependent files, such as: `https://cdn.jsdelivr.net/npm/luckysheet@2.1.12/dist/luckysheet.umd.js`.
|
||||
|
||||
> How do I know which version is the latest version? View the latest [release record](https://github.com/mengshukeji/Luckysheet/releases) or [package.json](https://github.com/mengshukeji/Luckysheet/blob/master/package.json)` version` field.
|
||||
|
||||
If it is not convenient to access jsdelivr.net, you can also import it locally
|
||||
|
||||
#### Import locally
|
||||
After `npm run build`, all files in the `dist` folder are copied to the project directory
|
||||
```html
|
||||
<link rel='stylesheet' href='./plugins/css/pluginsCss.css' />
|
||||
<link rel='stylesheet' href='./plugins/plugins.css' />
|
||||
<link rel='stylesheet' href='./css/luckysheet.css' />
|
||||
<link rel='stylesheet' href='./assets/iconfont/iconfont.css' />
|
||||
<script src="./plugins/js/plugin.js"></script>
|
||||
<script src="./luckysheet.umd.js"></script>
|
||||
```
|
||||
### Second step
|
||||
Specify a table container
|
||||
```html
|
||||
<div id="luckysheet" style="margin:0px;padding:0px;position:absolute;width:100%;height:100%;left: 0px;top: 0px;"></div>
|
||||
```
|
||||
### Third step
|
||||
Create a table
|
||||
```javascript
|
||||
<script>
|
||||
$(function () {
|
||||
//Configuration item
|
||||
var options = {
|
||||
container: 'luckysheet' //luckysheet is the container id
|
||||
}
|
||||
luckysheet.create(options)
|
||||
})
|
||||
</script>
|
||||
```
|
||||
|
||||
## Structure
|
||||
|
||||
### Format
|
||||
|
||||
The data format of a complete Luckysheet table file is: luckysheetfile, a table file contains several sheet files, corresponding to excel sheet0, sheet1, etc.
|
||||
|
||||
An example of a Luckysheet file is as follows, the table contains 3 sheets:`
|
||||
luckysheetfile = [{sheet1 settings}, {sheet2 settings}, {sheet3 settings}]`
|
||||
Equivalent to 3 sheets of excel
|
||||
|
||||

|
||||
|
||||
An example of a sheet in the file is as follows:
|
||||
```javascript
|
||||
luckysheetfile[0] =
|
||||
{
|
||||
"name": "Cell", //Worksheet name
|
||||
"color": "", //Worksheet color
|
||||
"config": {}, //Table row height, column width, merged cells, borders, hidden rows and other settings
|
||||
"index": "0", //Worksheet index
|
||||
"chart": [], //Chart configuration
|
||||
"status": "1", //Activation status
|
||||
"order": "0", //The order of the worksheet
|
||||
"hide": 0,//whether to hide
|
||||
"column": 18, //Number of columns
|
||||
"row": 36, //number of rows
|
||||
"celldata": [], //Original cell data set
|
||||
"visibledatarow": [], //The position of all rows
|
||||
"visibledatacolumn": [], //The position of all columns
|
||||
"ch_width": 2322, //The width of the worksheet area
|
||||
"rh_height": 949, //The height of the worksheet area
|
||||
"scrollLeft": 0, //Left and right scroll bar position
|
||||
"scrollTop": 315, //Up and down scroll bar position
|
||||
"luckysheet_select_save": [], //selected area
|
||||
"luckysheet_conditionformat_save": {},//Conditional format
|
||||
"calcChain": [],//Formula chain
|
||||
"isPivotTable":false,//Whether to pivot table
|
||||
"pivotTable":{},//Pivot table settings
|
||||
"filter_select": null,//Filter range
|
||||
"filter": null,//Filter configuration
|
||||
"luckysheet_alternateformat_save": [], //Alternate colors
|
||||
"luckysheet_alternateformat_save_modelCustom": []//Customize alternate colors
|
||||
}
|
||||
```
|
||||
### View method
|
||||
View in chrome's console
|
||||
`luckysheet.getluckysheetfile()`
|
||||
You can see the complete settings
|
||||
`[{shee1}, {sheet2}, {sheet3}]`
|
||||
|
||||
## Keyboard shortcuts
|
||||
|
||||
| Keyboard shortcuts | Features |
|
||||
| ------------ | ------------ |
|
||||
| CTRL + C | Copy cell |
|
||||
| CTRL + V | Paste cell |
|
||||
| CTRL + X | Cut cell |
|
||||
| CTRL + Z | Undo |
|
||||
| CTRL + Y | Redo |
|
||||
| CTRL + A | Select all |
|
||||
| CTRL + B | Bold |
|
||||
| CTRL + F | Find |
|
||||
| CTRL + H | Replace |
|
||||
| CTRL + I | Italic |
|
||||
| CTRL + UP/DOWN/LEFT/RIGHT | Quickly adjust cell marquee |
|
||||
| SHIFT + UP/DOWN/LEFT/RIGHT | Adjust selection area |
|
||||
| CTRL + Left mouse click | Multiple selection cell |
|
||||
| SHIFT + Left mouse click | Adjust selection area |
|
||||
| UP/DOWN/LEFT/RIGHT | Move cell selection box |
|
||||
| ENTER | Edit cell |
|
||||
| TAB | Move cell selection box to the right |
|
||||
| DELETE | Clear cell data |
|
||||
|
||||
## Guide
|
||||
|
||||
If you encounter problems with Luckysheet, follow the steps below to find the answer
|
||||
|
||||
1. Use Doge or Google to search for common technical issues
|
||||
2. For Luckysheet related issues, please view [Luckysheet Official Document](https://dream-num.github.io/LuckysheetDocs/)(Note that the function of marking TODO has not yet been implemented)
|
||||
3. Search [FAQ List](https://dream-num.github.io/LuckysheetDocs/guide/FAQ.html)
|
||||
4. Search [Official Forum](https://groups.google.com/g/luckysheet) to see if anyone has encountered it
|
||||
5. Try to check or experiment by yourself to find the answer
|
||||
6. Please try to read the source code to find the answer,
|
||||
|
||||
If none of the above methods solve your problem, you can consider:
|
||||
|
||||
- Go to [Official Forum](https://groups.google.com/g/luckysheet) to ask questions
|
||||
- Go to [Gitter](https://gitter.im/mengshukeji/Luckysheet) to ask questions
|
||||
- If there are obvious problems or the needs cannot be met, please submit [issues](https://github.com/mengshukeji/Luckysheet/issues)
|
||||
|
||||
> Recommended reading [How To Ask Questions The Smart Way](http://www.catb.org/~esr/faqs/smart-questions.html)
|
||||
|
||||
At the same time, we strongly recommend you to help us enrich the Luckysheet community
|
||||
|
||||
- If you find a problem with the documentation or code, you can contribute by submitting a PR. All reasonable changes, optimizations, amendments, or document amendments or updates related to submissions will be accepted
|
||||
- When you have some experience in using or secondary developing Luckysheet, we encourage you to share it through blog posts
|
||||
@@ -1,391 +0,0 @@
|
||||
# Format attributes
|
||||
|
||||
## Cell attributes table
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>Attribute value</td>
|
||||
<td>Full name</td>
|
||||
<td><div style="width:100px">Explanation</div></td>
|
||||
<td>Example value</td>
|
||||
<td>Aspose method or attribute</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ct</td>
|
||||
<td>celltype</td>
|
||||
<td>Cell value format: text, time, etc.</td>
|
||||
<td><a href="#cellStyle">Cell format</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bg</td>
|
||||
<td>background</td>
|
||||
<td>background color</td>
|
||||
<td>#fff000</td>
|
||||
<td>setBackgroundColor</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ff</td>
|
||||
<td>fontfamily</td>
|
||||
<td>Font</td>
|
||||
<td>0 Times New Roman, 1 Arial, 2 Tahoma, 3 Verdana, 4 Microsoft Yahei, 5 Song, 6 ST Heiti, 7 ST Kaiti, 8 ST FangSong, 9 ST Song, 10 Chinese New Wei, 11 Chinese Xingkai, 12 Chinese Lishu</td>
|
||||
<td>Style.Font object's Name property.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fc</td>
|
||||
<td>fontcolor</td>
|
||||
<td>font color</td>
|
||||
<td>#fff000</td>
|
||||
<td>Style.Font object's Color property</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bl</td>
|
||||
<td>bold</td>
|
||||
<td>Bold</td>
|
||||
<td>0 Regular, 1 Bold</td>
|
||||
<td>Style.Font object's IsBold property to true.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>it</td>
|
||||
<td>italic</td>
|
||||
<td>Italic</td>
|
||||
<td>0 Regular, 1 Italic</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fs</td>
|
||||
<td>fontsize</td>
|
||||
<td>font size</td>
|
||||
<td>14</td>
|
||||
<td>Style.Font object's Size property.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>cl</td>
|
||||
<td>cancelline</td>
|
||||
<td>Cancelline</td>
|
||||
<td>0 Regular, 1 Cancelline</td>
|
||||
<td>Style.Font object's Underline property</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>vt</td>
|
||||
<td>verticaltype</td>
|
||||
<td>Vertical alignment</td>
|
||||
<td>0 middle, 1 up, 2 down</td>
|
||||
<td>setVerticalAlignment</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ht</td>
|
||||
<td>horizontaltype</td>
|
||||
<td>Horizontal alignment</td>
|
||||
<td>0 center, 1 left, 2 right</td>
|
||||
<td>setHorizontalAlignment</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mc</td>
|
||||
<td>mergecell</td>
|
||||
<td>Merge Cells</td>
|
||||
<td>{rs: 10, cs:5} indicates that the cells from this cell to 10 rows and 5 columns are merged.</td>
|
||||
<td>Merge</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tr</td>
|
||||
<td>textrotate</td>
|
||||
<td>Text rotation</td>
|
||||
<td>0: 0、1: 45 、2: -45、3 Vertical text、4: 90 、5: -90</td>
|
||||
<td>setRotationAngle</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tb</td>
|
||||
<td>textbeak</td>
|
||||
<td>Text wrap</td>
|
||||
<td>0 truncation, 1 overflow, 2 word wrap</td>
|
||||
<td>2: setTextWrapped <br> 0和1: IsTextWrapped = true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>v</td>
|
||||
<td>value</td>
|
||||
<td>Original value</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>m</td>
|
||||
<td>monitor</td>
|
||||
<td>Display value</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>f</td>
|
||||
<td>function</td>
|
||||
<td>formula</td>
|
||||
<td></td>
|
||||
<td>setFormula <br> setArrayFormula <br> workbook.calculateFormula();</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
The following is the storage of 3 cells:
|
||||
```json
|
||||
[
|
||||
{
|
||||
"r": 10,
|
||||
"c": 11,
|
||||
"v": {
|
||||
"f": "=MAX(A7:A9)",
|
||||
"ct": {
|
||||
"fa": "General",
|
||||
"t": "n"
|
||||
},
|
||||
"v": 100,
|
||||
"m": "100"
|
||||
}
|
||||
},
|
||||
{
|
||||
"r": 0,
|
||||
"c": 1,
|
||||
"v": {
|
||||
"v": 12,
|
||||
"f": "=SUM(A2)",
|
||||
"bg": "#fff000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"r": 10,
|
||||
"c": 11,
|
||||
"v": "值2"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## <div id='cellStyle'>Cell format</div>
|
||||
|
||||
Reference[Aspose.Cells](https://docs.aspose.com/display/cellsnet/List+of+Supported+Number+Formats#ListofSupportedNumberFormats-Aspose.Cells)
|
||||
|
||||
The format is set to:
|
||||
|
||||
```json
|
||||
{
|
||||
"ct": {
|
||||
"fa": "General",
|
||||
"t": "g"
|
||||
},
|
||||
"m": "2424",
|
||||
"v": 2424
|
||||
}
|
||||
```
|
||||
|
||||
|Parameter|Explanation|Value|
|
||||
| ------------ | ------------ | ------------ |
|
||||
|fa|Format definition string| such as "General"|
|
||||
|t|Type|Such as "g"|
|
||||
|
||||
The available settings are as follows:
|
||||
| Format | ct.fa | ct.t | Example of m value | Remarks |
|
||||
|----------|----------|-------------------------|------------------------- |------------------------- |
|
||||
| Automatic | General | g | Luckysheet |Automatic format, which is also the default format; When the cell content is a number, the value of `m` is `'n'`|
|
||||
| Plain text | @ | s | Luckysheet ||
|
||||
| <br><br><br>**Number Format** | | | | |
|
||||
| Integer | 0 | n | 1235 | 0 decimal places |
|
||||
| One decimal place of the number | 0.0 | n | 1234.6 | The number of 0 after the dot represents the number of decimal places. If the original number is large, the number of digits will be rounded to the nearest hour |
|
||||
| Two decimal places | 0.00 | n | 1234.56 ||
|
||||
| Percentage integer | 0% | n | 123456% |The usage of #0% is also supported|
|
||||
| Percentage | 0.00% | n | 123456.00% |The usage of #0.00% is also supported. The number of 0 after the dot represents the number of decimal places|
|
||||
| Scientific Notation | 0.00E+00 | n | 1.23E+03 ||
|
||||
| Scientific Notation | ##0.0E+0 | n | 1.2E+3 ||
|
||||
| Fractions | # ?/? | n | 1234 5/9 ||
|
||||
| Score | # ??/?? | n | 1234 14/25 ||
|
||||
| Ten thousand | w | n |123 thousand and 456||
|
||||
| Ten thousand two decimal places | w0.00 | n |123 thousand and 3456.00 ||
|
||||
| Accounting | ¥(0.00) | n ||
|
||||
| More number formats | #,##0 | n | 1,235 ||
|
||||
| More number formats | #,##0.00 | n | 1,234.56 ||
|
||||
| More number formats | `#,##0_);(#,##0)` | n | 1,235 ||
|
||||
| More number formats | `#,##0_);[Red](#,##0)` | n | 1,235 ||
|
||||
| More number formats | `#,##0.00_);(#,##0.00)` | n | 1,234.56 ||
|
||||
| More number formats | `#,##0.00_);[Red](#,##0.00)` | n | 1,234.56 ||
|
||||
| More number formats | $#,##0_);($#,##0) | n | $1,235 ||
|
||||
| More number formats | `$#,##0_);[Red]($#,##0)` | n | $1,235 ||
|
||||
| More number formats | $#,##0.00_);($#,##0.00) | n | $1,234.56 ||
|
||||
| More number formats | `$#,##0.00_);[Red]($#,##0.00)` | n | $1,234.56 ||
|
||||
| More number formats | _($* #,##0_);_(...($* "-"_);_(@_) | n | $ 1,235 ||
|
||||
| More number formats | _(* #,##0_);_(*..._(* "-"_);_(@_) | n | 1,235 ||
|
||||
| More number formats | _($* #,##0.00_);_(...($* "-"_);_(@_) | n | $ 1,234.56 ||
|
||||
| More number formats | _(* #,##0.00_);...* "-"??_);_(@_) | n | 1,234.56 ||
|
||||
| <br><br><br>**Time and Date Format** | | | | |
|
||||
| Time | hh:mm AM/PM | d |10:23 AM||
|
||||
| Time 24H | hh:mm | d |10:23||
|
||||
| Date Time | yyyy-MM-dd hh:mm AM/PM | d |2020-07-29 10:23 AM||
|
||||
| Date Time 24H | yyyy-MM-dd hh:mm | d |2020-07-29 10:23||
|
||||
| Date | yyyy-MM-dd | d | 1930-08-05 ||
|
||||
| Date | yyyy/MM/dd | d | 1930/8/5 ||
|
||||
| Date | yyyy "year" M" month "d" day" | d | August 5, 1930 ||
|
||||
| Date | MM-dd | d | 08-05 ||
|
||||
| Date | M-d | d | 8-5 ||
|
||||
| Date | M"Month"d"Day" | d | August 5th ||
|
||||
| Date | h:mm:ss | d | 13:30:30 ||
|
||||
| Date | h:mm | d | 13:30 ||
|
||||
| Date | AM/PM hh:mm | d | 01:30 PM ||
|
||||
| Date | AM/PM h:mm | d | 1:30 PM ||
|
||||
| Date | AM/PM h:mm:ss | d | 1:30:30 PM ||
|
||||
| Date | MM-dd AM/PM hh:mm | d | Next 08-05 01:30 PM ||
|
||||
| <br><br><br>**Currency Format** | | | | |
|
||||
| Currency: RMB | "¥" 0.00 | n | ¥ 123.00 | Also supports ¥ #.00 or ¥0.00|
|
||||
| Currency: US Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Euro | "€" 0.00 | n | € 123.00 ||
|
||||
| Currency: British Pound | "£" 0.00 | n | £ 123.00 ||
|
||||
| Currency: Hong Kong Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Japanese Yen | "¥" 0.00 | n | ¥123.00 ||
|
||||
| Currency: Albanian Lek | "Lek" 0.00 | n | Lek 123.00 ||
|
||||
| Currency: Algerian Dinar | "din" 0.00 | n | din 123.00 ||
|
||||
| Currency: Afghani | "Af" 0.00 | n | Af 123.00 ||
|
||||
| Currency: Argentine Peso | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: United Arab Emirates Dirham | "dh" 0.00 | n | dh 123.00 ||
|
||||
| Currency: Aruban Florin | "Afl" 0.00 | n | Afl 123.00 ||
|
||||
| Currency: Omani Rial | "Rial" 0.00 | n | Rial 123.00 ||
|
||||
| Currency: Azerbaijani Manat | "?" 0.00 | n |? 123.00 ||
|
||||
| Currency: Egyptian Pound | "£" 0.00 | n | £ 123.00 ||
|
||||
| Currency: Ethiopian Birr | "Birr" 0.00 | n | Birr 123.00 ||
|
||||
| Currency: Angolan Kwanza | "Kz" 0.00 | n | Kz 123.00 ||
|
||||
| Currency: Australian Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Macau Patacas | "MOP" 0.00 | n | MOP 123.00 ||
|
||||
| Currency: Barbadian Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Papua New Guinea Kina | "PGK" 0.00 | n | PGK 123.00 ||
|
||||
| Currency: Bahamian Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Pakistani Rupee | "Rs" 0.00 | n | Rs 123.00 ||
|
||||
| Currency: Paraguayan Guarani | "Gs" 0.00 | n | Gs 123.00 ||
|
||||
| Currency: Bahraini Dinar | "din" 0.00 | n | din 123.00 ||
|
||||
| Currency: Panamanian Balboa | "B/" 0.00 | n | B/ 123.00 ||
|
||||
| Currency: Brazilian Riyal | "R$" 0.00 | n | R$ 123.00 ||
|
||||
| Currency: Belarusian ruble | "р" 0.00 | n | р 123.00 ||
|
||||
| Currency: Bermudian Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Bulgarian Lev | "lev" 0.00 | n | lev 123.00 ||
|
||||
| Currency: Iceland Krona | "kr" 0.00 | n | kr 123.00 ||
|
||||
| Currency: Bosnia and Herzegovina convertible mark | "KM" 0.00 | n | KM 123.00 ||
|
||||
| Currency: Polish Zloty | "z?" 0.00 | n | z? 123.00 ||
|
||||
| Currency: Boliviano | "Bs" 0.00 | n | Bs 123.00 ||
|
||||
| Currency: Belize Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Botswana Pula | "P" 0.00 | n | P 123.00 ||
|
||||
| Currency: Bhutan Nusam | "Nu" 0.00 | n | Nu 123.00 ||
|
||||
| Currency: Burundian Franc | "FBu" 0.00 | n | FBu 123.00 ||
|
||||
| Currency: North Korean Won | "?KP" 0.00 | n | ?KP 123.00 ||
|
||||
| Currency: Danish Krone | "kr" 0.00 | n | kr 123.00 ||
|
||||
| Currency: East Caribbean Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Dominican Peso | "RD$" 0.00 | n | RD$ 123.00 ||
|
||||
| Currency: Russian ruble | "?" 0.00 | n |? 123.00 ||
|
||||
| Currency: Eritrean Nakfa | "Nfk" 0.00 | n | Nfk 123.00 ||
|
||||
| Currency: CFA franc | "CFA" 0.00 | n | CFA 123.00 ||
|
||||
| Currency: Philippine Peso | "?" 0.00 | n |? 123.00 ||
|
||||
| Currency: Fijian Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Cape Verde Escudo | "CVE" 0.00 | n | CVE 123.00 ||
|
||||
| Currency: Falkland Islands Pound | "£" 0.00 | n | £ 123.00 ||
|
||||
| Currency: Gambia Dalasi | "GMD" 0.00 | n | GMD 123.00 ||
|
||||
| Currency: Congolese Franc | "FrCD" 0.00 | n | FrCD 123.00 ||
|
||||
| Currency: Colombian Peso | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Costa Rican Colon | "?" 0.00 | n |? 123.00 ||
|
||||
| Currency: Cuban Peso | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Cuban Convertible Peso | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Guyana Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Kazakhstan tenge | "?" 0.00 | n |? 123.00 ||
|
||||
| Currency: Haitian Gourde | "HTG" 0.00 | n | HTG 123.00 ||
|
||||
| Currency: Korean Won | "?" 0.00 | n |? 123.00 ||
|
||||
| Currency: Netherlands Antilles Guild | "NAf." 0.00 | n | NAf. 123.00 ||
|
||||
| Currency: Honduras Lalempira | "L" 0.00 | n | L 123.00 ||
|
||||
| Currency: Djiboutian Franc | "Fdj" 0.00 | n | Fdj 123.00 ||
|
||||
| Currency: Kyrgyzstan Som | "KGS" 0.00 | n | KGS 123.00 ||
|
||||
| Currency: Guinean Franc | "FG" 0.00 | n | FG 123.00 ||
|
||||
| Currency: Canadian Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Ghanaian Cedi | "GHS" 0.00 | n | GHS 123.00 ||
|
||||
| Currency: Cambodian Riel | "Riel" 0.00 | n | Riel 123.00 ||
|
||||
| Currency: Czech Koruna | "K?" 0.00 | n | K? 123.00 ||
|
||||
| Currency: Zimbabwe dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Qatari Rial | "Rial" 0.00 | n | Rial 123.00 ||
|
||||
| Currency: Cayman Islands Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Comorian Franc | "CF" 0.00 | n | CF 123.00 ||
|
||||
| Currency: Kuwaiti Dinar | "din" 0.00 | n | din 123.00 ||
|
||||
| Currency: Croatian Kuna | "kn" 0.00 | n | kn 123.00 ||
|
||||
| Currency: Kenyan Shilling | "Ksh" 0.00 | n | Ksh 123.00 ||
|
||||
| Currency: Lesotho Loti | "LSL" 0.00 | n | LSL 123.00 ||
|
||||
| Currency: Lao Kip | "?" 0.00 | n |? 123.00 ||
|
||||
| Currency: Lebanese Pound | "L£" 0.00 | n | L£ 123.00 ||
|
||||
| Currency: Lithuanian Litas | "Lt" 0.00 | n | Lt 123.00 ||
|
||||
| Currency: Libyan Dinar | "din" 0.00 | n | din 123.00 ||
|
||||
| Currency: Libyan Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Rwandan franc | "RF" 0.00 | n | RF 123.00 ||
|
||||
| Currency: Romanian Lei | "RON" 0.00 | n | RON 123.00 ||
|
||||
| Currency: Madagascar Ariary | "Ar" 0.00 | n | Ar 123.00 ||
|
||||
| Currency: Maldivian Rufiyaa | "Rf" 0.00 | n | Rf 123.00 ||
|
||||
| Currency: Malawian Kwacha | "MWK" 0.00 | n | MWK 123.00 ||
|
||||
| Currency: Malaysian Ringgit | "RM" 0.00 | n | RM 123.00 ||
|
||||
| Currency: Macedonian Dinar | "din" 0.00 | n | din 123.00 ||
|
||||
| Currency: Mauritian Rupee | "MURs" 0.00 | n | MURs 123.00 ||
|
||||
| Currency: Mauritania Ouguiya | "MRO" 0.00 | n | MRO 123.00 ||
|
||||
| Currency: Mongolian Tugrik | "?" 0.00 | n |? 123.00 ||
|
||||
| Currency: Bangladeshi Taka | "?" 0.00 | n |? 123.00 ||
|
||||
| Currency: Peruvian New Sol | "S/" 0.00 | n | S/ 123.00 ||
|
||||
| Currency: Myanmar Kyat | "K" 0.00 | n | K 123.00 ||
|
||||
| Currency: Moldovan Lei | "MDL" 0.00 | n | MDL 123.00 ||
|
||||
| Currency: Moroccan Dirham | "dh" 0.00 | n | dh 123.00 ||
|
||||
| Currency: Mozambique Metical | "MTn" 0.00 | n | MTn 123.00 ||
|
||||
| Currency: Mexican Peso | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Namibian Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: South African Rand | "R" 0.00 | n | R 123.00 ||
|
||||
| Currency: South Sudanese Pound | "£" 0.00 | n | £ 123.00 ||
|
||||
| Currency: Nicaragua Cordoba | "C$" 0.00 | n | C$ 123.00 ||
|
||||
| Currency: Nepalese Rupee | "Rs" 0.00 | n | Rs 123.00 ||
|
||||
| Currency: Nigerian Naira | "?" 0.00 | n |? 123.00 ||
|
||||
| Currency: Norwegian Krone | "kr" 0.00 | n | kr 123.00 ||
|
||||
| Currency: Georgia Lari | "GEL" 0.00 | n | GEL 123.00 ||
|
||||
| Currency: RMB (Offshore) | "¥" 0.00 | n | ¥123.00 ||
|
||||
| Currency: Swedish Krona | "kr" 0.00 | n | kr 123.00 ||
|
||||
| Currency: Swiss Franc | "CHF" 0.00 | n | CHF 123.00 ||
|
||||
| Currency: Serbian Dinar | "din" 0.00 | n | din 123.00 ||
|
||||
| Currency: Sierra Leone Leone | "SLL" 0.00 | n | SLL 123.00 ||
|
||||
| Currency: Seychelles Rupee | "SCR" 0.00 | n | SCR 123.00 ||
|
||||
| Currency: Saudi Riyal | "Rial" 0.00 | n | Rial 123.00 ||
|
||||
| Currency: Sao Tome Dobra | "Db" 0.00 | n | Db 123.00 ||
|
||||
| Currency: St. Helena Pound | "£" 0.00 | n | £ 123.00 ||
|
||||
| Currency: Sri Lankan Rupee | "Rs" 0.00 | n | Rs 123.00 ||
|
||||
| Currency: Swaziland Lilangeni | "SZL" 0.00 | n | SZL 123.00 ||
|
||||
| Currency: Sudanese Pound | "SDG" 0.00 | n | SDG 123.00 ||
|
||||
| Currency: Surinamese Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Solomon Islands Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Somali Shilling | "SOS" 0.00 | n | SOS 123.00 ||
|
||||
| Currency: Tajikistani Somoni | "Som" 0.00 | n | Som 123.00 ||
|
||||
| Currency: Pacific Franc | "FCFP" 0.00 | n | FCFP 123.00 ||
|
||||
| Currency: Thai Baht | "?" 0.00 | n |? 123.00 ||
|
||||
| Currency: Tanzanian Shilling | "TSh" 0.00 | n | TSh 123.00 ||
|
||||
| Currency: Tongan Paanga | "T$" 0.00 | n | T$ 123.00 ||
|
||||
| Currency: Trinidad and Tobago Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Tunisian Dinar | "din" 0.00 | n | din 123.00 ||
|
||||
| Currency: Turkish Lira | "?" 0.00 | n |? 123.00 ||
|
||||
| Currency: Vanuatu Vatu | "VUV" 0.00 | n | VUV 123.00 ||
|
||||
| Currency: Guatemalan Quetzal | "Q" 0.00 | n | Q 123.00 ||
|
||||
| Currency: Venezuelan Bolivar | "Bs" 0.00 | n | Bs 123.00 ||
|
||||
| Currency: Brunei Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Ugandan Shilling | "UGX" 0.00 | n | UGX 123.00 ||
|
||||
| Currency: Ukrainian Hryvnia | "грн." 0.00 | n | грн. 123.00 ||
|
||||
| Currency: Uruguayan Peso | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Uzbekistani Sum | "so?m" 0.00 | n | so?m 123.00 ||
|
||||
| Currency: Western Samoa Tala | "WST" 0.00 | n | WST 123.00 ||
|
||||
| Currency: Singapore Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: New Taiwan Dollar | "NT$" 0.00 | n | NT$ 123.00 ||
|
||||
| Currency: New Zealand Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Hungarian Forint | "Ft" 0.00 | n | Ft 123.00 ||
|
||||
| Currency: Syrian Pound | "£" 0.00 | n | £ 123.00 ||
|
||||
| Currency: Jamaican Dollar | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: Armenian Dram | "Dram" 0.00 | n | Dram 123.00 ||
|
||||
| Currency: Yemeni Rial | "Rial" 0.00 | n | Rial 123.00 ||
|
||||
| Currency: Iraqi Dinar | "din" 0.00 | n | din 123.00 ||
|
||||
| Currency: Iranian Rial | "Rial" 0.00 | n | Rial 123.00 ||
|
||||
| Currency: Israeli New Shekel | "?" 0.00 | n |? 123.00 ||
|
||||
| Currency: Indian Rupee | "?" 0.00 | n |? 123.00 ||
|
||||
| Currency: Indonesian Rupiah | "Rp" 0.00 | n | Rp 123.00 ||
|
||||
| Currency: Jordanian Dinar | "din" 0.00 | n | din 123.00 ||
|
||||
| Currency: Vietnamese Dong | "?" 0.00 | n |? 123.00 ||
|
||||
| Currency: Zambian Kwacha | "ZMW" 0.00 | n | ZMW 123.00 ||
|
||||
| Currency: Gibraltar Pound | "£" 0.00 | n | £ 123.00 ||
|
||||
| Currency: Chilean Peso | "$" 0.00 | n | $ 123.00 ||
|
||||
| Currency: China-Africa Financial Cooperation Franc | "FCFA" 0.00 | n | FCFA 123.00 ||
|
||||
|
||||
Notice: Import/export only considers the data style that the user sees. For example, the way to process the date format in excel is to convert the date into a number: 42736 represents 2017-1-1.
|
||||
@@ -1,221 +0,0 @@
|
||||
|
||||
# Contribution guide
|
||||
|
||||
welcome! We are very happy that you are here and look forward to your interest in participating in Luckysheet contributions. Of course, before you participate in the Luckysheet contribution, please make sure to read the following full text:
|
||||
|
||||
## Our code of conduct
|
||||
|
||||
1. We promise to respect all those who participated in the contribution, not limited to those who raised questions, contributed documents and code, resolved bugs and other contributions;
|
||||
|
||||
2. We are obliged to abide by local laws and regulations, and we reject all behaviors with legal risks;
|
||||
3. We oppose any participant's derogatory comments, personal attacks, harassment or insult to others, and other non-professional behaviors;
|
||||
4. We have the right and responsibility to delete or edit content that does not comply with this code of conduct, not limited to code, issues, wikis, documents and others. Participants who do not comply with the code of conduct may be removed from the team;
|
||||
5. We accept the supervision of anyone, and anyone can report to us the facts that are found to be inconsistent with this code of conduct through problem feedback.
|
||||
|
||||
## How to participate in contributing?
|
||||
|
||||
* Contributed documents: Browsing the document can deepen your understanding of Luckysheet. Once you find that the document is not clearly written or the logic is confusing, you can correct, modify, and supplement. You can go to [Google Forum](https://groups.google.com/g/luckysheet) to give feedback
|
||||
* Contributing code: Welcome everyone to contribute code to the Luckysheet community, you are welcome to claim the Open state [Issues](https://github.com/mengshukeji/Luckysheet/issues) and unfinished features, submit a PR, and become one of the contributors If you find that some functions cannot meet your needs or have problems during use, please record in Issues
|
||||
* Participate in the issue discussion: you can post your suggestions under any [Issues](https://github.com/mengshukeji/Luckysheet/issues)
|
||||
* Review code: You can see PR submitted by all contributors on [Github](https://github.com/mengshukeji/Luckysheet), you can review their code and post your suggestions
|
||||
|
||||
## How to submit issues
|
||||
|
||||
Before you submit features/improvements, you should pay attention to the following points:
|
||||
|
||||
* Please confirm whether the feature/improvement has been submitted by others
|
||||
* An easy-to-understand title to explain the bug/submission feature/improvement you submitted
|
||||
* If it is a bug, describe the cause of the bug in detail. If it can be reproduced, please try to provide complete reproduction steps
|
||||
* If it is a feature, then the feature should have wide applicability, suitable for most users, and it is best to provide detailed design documents
|
||||
* If it is an improvement, describe the benefits of this improvement as clearly as possible
|
||||
|
||||
Specific steps:
|
||||
|
||||
* Create [Issues](https://github.com/mengshukeji/Luckysheet/issues) and describe the issue clearly
|
||||
* If you want to solve the issue, assign the issue to your own name. If you just submit a bug/feature/improvement and don’t have time to contribute code, set assignne to empty
|
||||
* If it is a relatively large feature/improvement, try to output the design document first and follow the [Luckysheet RFC](https://github.com/mengshukeji/Luckysheet-rfcs) process for others to review
|
||||
|
||||
## How to claim Issues
|
||||
|
||||
In Luckysheet's [Issues](https://github.com/mengshukeji/Luckysheet/issues) list, there are many issues created by others that have not been repaired. If you are interested, you can claim these issues. The steps to claim are as follows:
|
||||
|
||||
* Leave a message under the issue, express the idea of claiming the task, and specify **@I can solve it**
|
||||
* If the submitter has no comments, assign the issue to your own name and update the progress in time
|
||||
* If it is a relatively large feature, try to output the design document first and follow the [Luckysheet RFC](https://github.com/mengshukeji/Luckysheet-rfcs) process for others to review
|
||||
* Develop the code and submit the code to github
|
||||
|
||||
## How to submit code
|
||||
|
||||
1. Fork to own warehouse
|
||||
|
||||
Go to the Github page of [Luckysheet](https://github.com/mengshukeji/Luckysheet), and click the Fork button in the upper right corner to proceed.
|
||||
|
||||
2. Git clone to local
|
||||
|
||||
```shell
|
||||
git clone https://github.com/<your_github_name>/Luckysheet.git
|
||||
```
|
||||
|
||||
3. Establish a connection upstream
|
||||
|
||||
```shell
|
||||
|
||||
cd Luckysheet
|
||||
gitremote add upstream https://github.com/mengshukeji/Luckysheet.git
|
||||
```
|
||||
|
||||
4. Create a development branch
|
||||
|
||||
```shell
|
||||
git checkout -b dev
|
||||
```
|
||||
|
||||
5. Modify the submission code
|
||||
|
||||
```shell
|
||||
git add.
|
||||
npm run commit
|
||||
git push origin dev
|
||||
```
|
||||
|
||||
6. Sync code, synchronize the latest code to the local
|
||||
|
||||
```shell
|
||||
git fetch upstream
|
||||
git rebase upstream/master
|
||||
```
|
||||
|
||||
7. If there is a conflict (nothing can be ignored)
|
||||
|
||||
```shell
|
||||
git status # View conflict files and modify conflicts
|
||||
git add.
|
||||
git rebase --continue
|
||||
```
|
||||
When submitting the git rebase --continue command, if vim prompts to edit the commit information, you can add your changes, then save and exit
|
||||
> For vim commands, please refer to the [vim](https://www.runoob.com/linux/linux-vim.html)
|
||||
|
||||
8. Submit branch code
|
||||
|
||||
```shell
|
||||
git push origin dev
|
||||
```
|
||||
|
||||
If you are prompted to pull first, you can pull it before submitting
|
||||
```shell
|
||||
git pull origin dev
|
||||
git push origin dev
|
||||
```
|
||||
If the vim prompt to edit the commit information pops up, you can exit directly through the vim command
|
||||
> For vim commands, please refer to [vim](https://www.runoob.com/linux/linux-vim.html)
|
||||
|
||||
9. Submit pr
|
||||
Go to the fork project in your github warehouse, switch to the branch you just created and modified, click new pull request, and add the corresponding description, and finally click Create pull request to submit
|
||||
|
||||
## Code Specification
|
||||
|
||||
> General code specification example
|
||||
|
||||
* Keep the block depth to a minimum. Avoid nested If conditions as much as possible
|
||||
```js
|
||||
// CORRECT
|
||||
if (!comparison) return
|
||||
|
||||
if (variable) {
|
||||
for (const item of items) {}
|
||||
} else if (variable2) {
|
||||
// Do something here
|
||||
}
|
||||
|
||||
// INCORRECT
|
||||
if (comparison) {
|
||||
if (variable) {
|
||||
for (const item in items) {}
|
||||
} else if (variable2) {
|
||||
// Do something here
|
||||
}
|
||||
} else {
|
||||
return
|
||||
}
|
||||
```
|
||||
|
||||
* Do not use operands for chain comparison
|
||||
```js
|
||||
// CORRECT
|
||||
|
||||
if (cb) cb()
|
||||
if (!cb || (cb === fn)) cb()
|
||||
|
||||
// INCORRECT
|
||||
|
||||
cb && cb()
|
||||
(!cb || (cb === fn)) && cb()
|
||||
```
|
||||
|
||||
* All variables should be declared at the beginning of the block in alphabetical order
|
||||
```js
|
||||
// CORRECT
|
||||
function foo () {
|
||||
const foo ='bar'
|
||||
const bar ='foo'
|
||||
|
||||
if (conditional) {}
|
||||
|
||||
...
|
||||
|
||||
return foo
|
||||
}
|
||||
|
||||
// INCORRECT
|
||||
|
||||
function foo () {
|
||||
const foo ='bar'
|
||||
|
||||
if (conditional) {}
|
||||
|
||||
const bar ='foo'
|
||||
|
||||
...
|
||||
|
||||
return foo
|
||||
}
|
||||
```
|
||||
|
||||
* Return as soon as possible
|
||||
```js
|
||||
// CORRECT
|
||||
if (condition) return'foo'
|
||||
if (condition2) return'bar'
|
||||
// Return must have a blank line above
|
||||
return'fizz'
|
||||
|
||||
// INCORRECT
|
||||
const variable =''
|
||||
|
||||
if (condition) {
|
||||
variable ='foo'
|
||||
} else if (condition2) {
|
||||
variable ='bar'
|
||||
} else {
|
||||
variable ='fizz'
|
||||
}
|
||||
|
||||
return variable
|
||||
```
|
||||
|
||||
## How to contribute documents
|
||||
|
||||
## How to become Luckysheet Committer
|
||||
|
||||
As long as anyone contributes to the Luckysheet project, you are the officially recognized Contributor of the Luckysheet project. There is no exact standard for growing from Contributor to Committer, and there is no expected timetable, but Committer candidates are generally A long-term active contributor, becoming Committer does not require a huge architectural improvement contribution, or how many lines of code contributions, contributing code, contributing documents, participating in mailing list discussions, helping to answer questions, etc., are all ways to increase their influence .
|
||||
|
||||
List of potential contributions (in no particular order):
|
||||
|
||||
* Submit the bugs, features, and improvements you found to the issue
|
||||
* Update the official documents so that the project documents are the most recent, the best practices for writing Luckysheet, and various useful documents for the users
|
||||
* Perform test and report test results, performance test and other MQ performance comparison test, etc.
|
||||
* Review the work of others (including code and non-code) and publish your own suggestions
|
||||
* Guide new contributors and be familiar with the community process
|
||||
* Post a blog about Luckysheet
|
||||
* Any contribution to the development of the Luckysheet community
|
||||
* ......
|
||||
@@ -1,809 +0,0 @@
|
||||
# Table Data
|
||||
|
||||
## Get table data
|
||||
|
||||
- **Configuration**:
|
||||
|
||||
Configure the address of `updateUrl`, Luckysheet will request the table data through ajax. By default, all `data` in the sheet data with status 1 is loaded, and the rest of the sheet loads all fields except the `data` field.
|
||||
|
||||
- **Format**:
|
||||
Through the global method `luckysheet.getluckysheetfile()`, the configuration information of all worksheets can be obtained.
|
||||
|
||||
The luckysheetfile example is as follows:
|
||||
```json
|
||||
[
|
||||
{
|
||||
"name": "Cell", //Worksheet name
|
||||
"color": "", //Worksheet color
|
||||
"index": "0", //Worksheet index
|
||||
"status": "1", //Activation status
|
||||
"order": "0", //The order of the worksheet
|
||||
"hide": 0,//whether to hide
|
||||
"row": 36, //number of rows
|
||||
"column": 18, //Number of columns
|
||||
"config": {
|
||||
"merge":{}, //merged cells
|
||||
"rowlen":{}, //Table row height
|
||||
"columnlen":{}, //Table column width
|
||||
"rowhidden":{}, //hidden rows
|
||||
"colhidden":{}, //hidden columns
|
||||
"borderInfo":{}, //borders
|
||||
},
|
||||
"celldata": [], //initialize the cell data
|
||||
"data": [], //Update and store the cell data
|
||||
"scrollLeft": 0, //Left and right scroll bar position
|
||||
"scrollTop": 315, //Up and down scroll bar position
|
||||
"luckysheet_select_save": [], //selected area
|
||||
"luckysheet_conditionformat_save": {},//Conditional format
|
||||
"calcChain": [],//Formula chain
|
||||
"isPivotTable":false,//Whether to pivot table
|
||||
"pivotTable":{},//Pivot table configuration
|
||||
"filter_select": null,//Filter range
|
||||
"filter": null,//Filter configuration
|
||||
"luckysheet_alternateformat_save": [], //Alternate colors
|
||||
"luckysheet_alternateformat_save_modelCustom": [], //Customize alternate colors
|
||||
"chart": [], //Chart configuration
|
||||
"visibledatarow": [], //The position of all rows
|
||||
"visibledatacolumn": [], //The position of all columns
|
||||
"ch_width": 2322, //The width of the worksheet area
|
||||
"rh_height": 949, //The height of the worksheet area
|
||||
},
|
||||
{
|
||||
"name": "Sheet2",
|
||||
"color": "",
|
||||
"status": "0",
|
||||
"order": "1",
|
||||
"data": [],
|
||||
"config": {},
|
||||
"index": 1
|
||||
},
|
||||
{
|
||||
"name": "Sheet3",
|
||||
"color": "",
|
||||
"status": "0",
|
||||
"order": "2",
|
||||
"data": [],
|
||||
"config": {},
|
||||
"index": 2
|
||||
}
|
||||
]
|
||||
```
|
||||
- **Explanation**:
|
||||
|
||||
## name
|
||||
- Type:String
|
||||
- Default:"Sheet1"
|
||||
- Usage:Worksheet name
|
||||
|
||||
------------
|
||||
## color
|
||||
- Type:String
|
||||
- Default:"##f20e0e"
|
||||
- Usage:Worksheet color, there will be a bottom border under the worksheet name
|
||||
|
||||
------------
|
||||
## index
|
||||
- Type:Number
|
||||
- Default:0
|
||||
- Usage:Worksheet index, starting from 0
|
||||
|
||||
------------
|
||||
## status
|
||||
- Type:Number
|
||||
- Default:1
|
||||
- Usage:Active state, there is only one active worksheet which number will be 1 and the other worksheets are 0
|
||||
|
||||
------------
|
||||
## order
|
||||
- Type:Number
|
||||
- Default:0
|
||||
- Usage: The index of the worksheets is starting from 0. it will increase when a worksheet is added.
|
||||
|
||||
------------
|
||||
## hide
|
||||
- Type:Number
|
||||
- Default:0
|
||||
- Usage: Whether to hide, `0` means not to hide, `1` means to hide
|
||||
|
||||
------------
|
||||
## row
|
||||
- Type:Number
|
||||
- Default:36
|
||||
- Usage: The number of cell rows
|
||||
|
||||
------------
|
||||
## column
|
||||
- Type:Number
|
||||
- Default:18
|
||||
- Usage: The number of cell columns
|
||||
|
||||
------------
|
||||
## scrollLeft
|
||||
- Type:Number
|
||||
- Default:0
|
||||
- Usage: Left and right scroll bar position
|
||||
|
||||
------------
|
||||
## scrollTop
|
||||
- Type:Number
|
||||
- Default:0
|
||||
- Usage: Up and down scroll bar position
|
||||
|
||||
------------
|
||||
## config
|
||||
- Type: Object
|
||||
- Default: {}
|
||||
- Usage: Table row height, column width, merged cells, borders, hidden rows and other settings
|
||||
|
||||
### config.merge
|
||||
- Type:Object
|
||||
- Default:{}
|
||||
- Usage:Merge cell settings
|
||||
- example:
|
||||
```js
|
||||
{
|
||||
"13_5": {
|
||||
"r": 13,
|
||||
"c": 5,
|
||||
"rs": 3,
|
||||
"cs": 1
|
||||
},
|
||||
"13_7": {
|
||||
"r": 13,
|
||||
"c": 7,
|
||||
"rs": 3,
|
||||
"cs": 2
|
||||
},
|
||||
"14_2": {
|
||||
"r": 14,
|
||||
"c": 2,
|
||||
"rs": 1,
|
||||
"cs": 2
|
||||
}
|
||||
}
|
||||
```
|
||||
The `key` in the object is the spliced value of `r +'_' + c`, and the `value` is the cell information in the upper left corner: r: number of rows, c: number of columns, rs: number of merged rows, cs: merge Number of columns
|
||||
|
||||
### config.rowlen
|
||||
- Type:Object
|
||||
- Default:{}
|
||||
- Usage:The row height of each cell
|
||||
- example:
|
||||
```js
|
||||
"rowlen": {
|
||||
"0": 20,
|
||||
"1": 20,
|
||||
"2": 20
|
||||
}
|
||||
```
|
||||
|
||||
### config.columnlen
|
||||
- Type:Object
|
||||
- Default:{}
|
||||
- Usage:The column width of each cell
|
||||
- example:
|
||||
```js
|
||||
"columnlen": {
|
||||
"0": 97,
|
||||
"1": 115,
|
||||
"2": 128
|
||||
}
|
||||
```
|
||||
|
||||
### config.rowhidden
|
||||
- Type:Object
|
||||
- Default:{}
|
||||
- Usage:Hidden row information, Rows:`rowhidden[Rows]: 0`,
|
||||
|
||||
you should specify the number of rows by `key`,`value` is always `0`
|
||||
- example:
|
||||
```js
|
||||
"rowhidden": {
|
||||
"30": 0,
|
||||
"31": 0
|
||||
}
|
||||
```
|
||||
|
||||
### config.colhidden
|
||||
- Type:Object
|
||||
- Default:{}
|
||||
- Usage:Hidden column information, Columns:`colhidden[Columns]: 0`,
|
||||
|
||||
`key` specify the number of columns,`value` is always `0`
|
||||
- example:
|
||||
```js
|
||||
"colhidden": {
|
||||
"30": 0,
|
||||
"31": 0
|
||||
}
|
||||
```
|
||||
|
||||
### config.borderInfo
|
||||
- Type:Array
|
||||
- Default:{}
|
||||
- Usage:The border information of the cell
|
||||
- example:
|
||||
```js
|
||||
"borderInfo": [{
|
||||
"rangeType": "cell",
|
||||
"value": {
|
||||
"row_index": 3,
|
||||
"col_index": 3,
|
||||
"l": {
|
||||
"style": 10,
|
||||
"color": "rgb(255, 0, 0)"
|
||||
},
|
||||
"r": {
|
||||
"style": 10,
|
||||
"color": "rgb(255, 0, 0)"
|
||||
},
|
||||
"t": {
|
||||
"style": 10,
|
||||
"color": "rgb(255, 0, 0)"
|
||||
},
|
||||
"b": {
|
||||
"style": 10,
|
||||
"color": "rgb(255, 0, 0)"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"rangeType": "range",
|
||||
"borderType": "border-all",
|
||||
"style": "3",
|
||||
"color": "#0000ff",
|
||||
"range": [{
|
||||
"row": [7, 8],
|
||||
"column": [2, 3]
|
||||
}]
|
||||
}, {
|
||||
"rangeType": "range",
|
||||
"borderType": "border-inside",
|
||||
"style": "3",
|
||||
"color": "#0000ff",
|
||||
"range": [{
|
||||
"row": [7, 8],
|
||||
"column": [8, 9]
|
||||
}]
|
||||
}]
|
||||
```
|
||||
The range type can be divided into single cell and selected area
|
||||
1. selection `rangeType: "range"`
|
||||
|
||||
+ Border type `borderType:"border-left" | "border-right" | "border-top" | "border-bottom" | "border-all" | "border-outside" | "border-inside" | "border-horizontal" | "border-vertical" | "border-none"`,
|
||||
+ Border thickness `style: 1 Thin | 2 Hair | 3 Dotted | 4 Dashed | 5 DashDot | 6 DashDotDot | 7 Double | 8 Medium | 9 MediumDashed | 10 MediumDashDot | 11 MediumDashDotDot | 12 SlantedDashDot | 13 Thick`
|
||||
+ Border color `color: Hexadecimal color value`
|
||||
+ Selection area `range: Row and column information array`
|
||||
|
||||
2. Single cell `rangeType:"cell"`
|
||||
+ Number of rows and columns `value.row_index: number,value.col_index: number`
|
||||
+ Four border objects `value.l:Left border,value.r:Right border,value.t:Top border,value.b:Bottom border`
|
||||
+ Border thickness `value.l.style: 1 Thin | 2 Hair | 3 Dotted | 4 Dashed | 5 DashDot | 6 DashDotDot | 7 Double | 8 Medium | 9 MediumDashed | 10 MediumDashDot | 11 MediumDashDotDot | 12 SlantedDashDot | 13 Thick`
|
||||
+ Border color `value.l.color: Hexadecimal color value`
|
||||
|
||||
- 示例
|
||||
+ ```js
|
||||
{
|
||||
"rangeType": "range",
|
||||
"borderType": "border-all",
|
||||
"style": "3",
|
||||
"color": "#0000ff",
|
||||
"range": [{
|
||||
"row": [7, 8],
|
||||
"column": [2, 3]
|
||||
}]
|
||||
}
|
||||
```
|
||||
Represents a selection with a setting range of `{"row": [7, 8], "column": [2, 3]}`, the type is all borders, the border thickness is `Dotted`, and the color is `"#0000ff"`
|
||||
|
||||
+ ```js
|
||||
{
|
||||
"rangeType": "cell",
|
||||
"value": {
|
||||
"row_index": 3,
|
||||
"col_index": 3,
|
||||
"l": {
|
||||
"style": 10,
|
||||
"color": "rgb(255, 0, 0)"
|
||||
},
|
||||
"r": {
|
||||
"style": 10,
|
||||
"color": "rgb(255, 0, 0)"
|
||||
},
|
||||
"t": {
|
||||
"style": 10,
|
||||
"color": "rgb(255, 0, 0)"
|
||||
},
|
||||
"b": {
|
||||
"style": 10,
|
||||
"color": "rgb(255, 0, 0)"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
Means to set the cell `"D4"`, the upper border/lower border/left border/right border are all border thicknesses `"MediumDashDot"`, color is `"rgb(255, 0, 0)"`
|
||||
|
||||
------------
|
||||
## celldata
|
||||
- Type:Array
|
||||
- Default:[]
|
||||
- Usage: The original cell data set is a set containing `{r:0,c:0,v:{m:"value",v:"value",ct: {fa: "General", t: "g"}} }`The one-dimensional array of format cell information is only used during initialization. After the table is initialized with celldata, the data is converted to the same level field data in the luckysheetfile, such as `luckysheetfile[0].data`, the subsequent operation of the table Data update will be updated to this data field, and celldata is no longer used. Example:
|
||||
```js
|
||||
[{
|
||||
"r": 0,
|
||||
"c": 0,
|
||||
"v": {
|
||||
ct: {fa: "General", t: "g"},
|
||||
m:"value1",
|
||||
v:"value1"
|
||||
}
|
||||
}, {
|
||||
"r": 0,
|
||||
"c": 1,
|
||||
"v": {
|
||||
ct: {fa: "General", t: "g"},
|
||||
m:"value2",
|
||||
v:"value2"
|
||||
}
|
||||
}]
|
||||
```
|
||||
|
||||
------------
|
||||
## luckysheet_select_save
|
||||
- Type:Array
|
||||
- Default:[]
|
||||
- Usage: The selected area supports multiple selections and is a one-dimensional array containing multiple selection objects. Example:
|
||||
```js
|
||||
[
|
||||
{
|
||||
"left": 0,
|
||||
"width": 97,
|
||||
"top": 0,
|
||||
"height": 20,
|
||||
"left_move": 0,
|
||||
"width_move": 97,
|
||||
"top_move": 0,
|
||||
"height_move": 41,
|
||||
"row": [ 0, 1 ],
|
||||
"column": [ 0, 0 ],
|
||||
"row_focus": 0,
|
||||
"column_focus": 0
|
||||
},
|
||||
{
|
||||
"left": 98,
|
||||
"width": 73,
|
||||
"top": 63,
|
||||
"height": 20,
|
||||
"left_move": 98,
|
||||
"width_move": 189,
|
||||
"top_move": 63,
|
||||
"height_move": 41,
|
||||
"row": [ 3, 4 ],
|
||||
"column": [ 1, 2 ],
|
||||
"row_focus": 3,
|
||||
"column_focus": 1
|
||||
},
|
||||
{
|
||||
"left": 288,
|
||||
"width": 128,
|
||||
"top": 21,
|
||||
"height": 20,
|
||||
"left_move": 288,
|
||||
"width_move": 128,
|
||||
"top_move": 21,
|
||||
"height_move": 62,
|
||||
"row": [ 1, 3 ],
|
||||
"column": [ 3, 3 ],
|
||||
"row_focus": 1,
|
||||
"column_focus": 3
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
------------
|
||||
## luckysheet_conditionformat_save
|
||||
- Type:Array
|
||||
- Default:[]
|
||||
- Usage: Conditional format configuration information, a one-dimensional array containing multiple conditional format configuration objects,
|
||||
|
||||
type: "default": Highlight cell rules and project selection rules,
|
||||
|
||||
"dataBar": Data bar,
|
||||
|
||||
"icons": Icon set,
|
||||
|
||||
"colorGradation": Color scale
|
||||
|
||||
Example:
|
||||
```js
|
||||
[
|
||||
{
|
||||
"type": "default",
|
||||
"cellrange": [
|
||||
{
|
||||
"row": [ 2, 7 ],
|
||||
"column": [ 2, 2 ]
|
||||
}
|
||||
],
|
||||
"format": {
|
||||
"textColor": "#000000",
|
||||
"cellColor": "#ff0000"
|
||||
},
|
||||
"conditionName": "betweenness",
|
||||
"conditionRange": [
|
||||
{
|
||||
"row": [ 4, 4 ],
|
||||
"column": [ 2, 2 ]
|
||||
},
|
||||
{
|
||||
"row": [ 6, 6 ],
|
||||
"column": [ 2, 2 ]
|
||||
}
|
||||
],
|
||||
"conditionValue": [ 2, 4
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "dataBar",
|
||||
"cellrange": [
|
||||
{
|
||||
"row": [ 10, 15 ],
|
||||
"column": [ 10, 11 ]
|
||||
}
|
||||
],
|
||||
"format": [
|
||||
"#6aa84f",
|
||||
"#ffffff"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "icons",
|
||||
"cellrange": [
|
||||
{
|
||||
"row": [ 19, 23 ],
|
||||
"column": [ 2, 2 ]
|
||||
}
|
||||
],
|
||||
"format": {
|
||||
"len": "3",
|
||||
"leftMin": "0",
|
||||
"top": "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "colorGradation",
|
||||
"cellrange": [
|
||||
{
|
||||
"left": 422,
|
||||
"width": 100,
|
||||
"top": 210,
|
||||
"height": 20,
|
||||
"left_move": 422,
|
||||
"width_move": 100,
|
||||
"top_move": 210,
|
||||
"height_move": 125,
|
||||
"row": [ 10, 15 ],
|
||||
"column": [ 6, 6 ],
|
||||
"row_focus": 10,
|
||||
"column_focus": 6
|
||||
}
|
||||
],
|
||||
"format": [
|
||||
"rgb(99, 190, 123)",
|
||||
"rgb(255, 235, 132)",
|
||||
"rgb(248, 105, 107)"
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
------------
|
||||
## calcChain
|
||||
- Type:Array
|
||||
- Default:[]
|
||||
- Usage:Formula chain, used when the cell linked by the formula is changed, all formulas referencing this cell will be refreshed, example:
|
||||
```js
|
||||
[{
|
||||
"r": 6,
|
||||
"c": 3,
|
||||
"index": 1,
|
||||
"func": [true, 23.75, "=AVERAGE(D3:D6)"],
|
||||
"color": "w",
|
||||
"parent": null,
|
||||
"chidren": {},
|
||||
"times": 0
|
||||
}, {
|
||||
"r": 7,
|
||||
"c": 3,
|
||||
"index": 1,
|
||||
"func": [true, 30, "=MAX(D3:D6)"],
|
||||
"color": "w",
|
||||
"parent": null,
|
||||
"chidren": {},
|
||||
"times": 0
|
||||
}]
|
||||
```
|
||||
|
||||
------------
|
||||
## isPivotTable
|
||||
- Type:Boolean
|
||||
- Default:false
|
||||
- Usage: Whether PivotTable
|
||||
|
||||
------------
|
||||
## pivotTable
|
||||
- Type:Object
|
||||
- Default:{}
|
||||
- Usage: Pivot table settings, example:
|
||||
```js
|
||||
{
|
||||
"pivot_select_save": {
|
||||
"left": 0,
|
||||
"width": 73,
|
||||
"top": 0,
|
||||
"height": 19,
|
||||
"left_move": 0,
|
||||
"width_move": 369,
|
||||
"top_move": 0,
|
||||
"height_move": 259,
|
||||
"row": [0, 12],
|
||||
"column": [0, 4],
|
||||
"row_focus": 0,
|
||||
"column_focus": 0
|
||||
},
|
||||
"pivotDataSheetIndex": 6, //The sheet index where the source data is located
|
||||
"column": [{
|
||||
"index": 3,
|
||||
"name": "subject",
|
||||
"fullname": "subject"
|
||||
}],
|
||||
"row": [{
|
||||
"index": 1,
|
||||
"name": "student",
|
||||
"fullname": "student"
|
||||
}],
|
||||
"filter": [],
|
||||
"values": [{
|
||||
"index": 4,
|
||||
"name": "score",
|
||||
"fullname": "count:score",
|
||||
"sumtype": "COUNTA",
|
||||
"nameindex": 0
|
||||
}],
|
||||
"showType": "column",
|
||||
"pivotDatas": [
|
||||
["count:score", "science", "mathematics", "foreign language", "English", "total"],
|
||||
["Alex", 1, 1, 1, 1, 4],
|
||||
["Joy", 1, 1, 1, 1, 4],
|
||||
["Tim", 1, 1, 1, 1, 4],
|
||||
["total", 3, 3, 3, 3, 12]
|
||||
],
|
||||
"drawPivotTable": false,
|
||||
"pivotTableBoundary": [5, 6]
|
||||
}
|
||||
```
|
||||
|
||||
------------
|
||||
## filter_select
|
||||
- Type:Object
|
||||
- Default:{}
|
||||
- Usage:Filter range, a selection area, a sheet has only one filter range, similar to the `luckysheet_select_save` example:
|
||||
```js
|
||||
{
|
||||
"left": 74,
|
||||
"width": 73,
|
||||
"top": 40,
|
||||
"height": 19,
|
||||
"left_move": 74,
|
||||
"width_move": 221,
|
||||
"top_move": 40,
|
||||
"height_move": 99,
|
||||
"row": [
|
||||
2,
|
||||
6
|
||||
],
|
||||
"column": [
|
||||
1,
|
||||
3
|
||||
],
|
||||
"row_focus": 2,
|
||||
"column_focus": 1
|
||||
}
|
||||
```
|
||||
|
||||
------------
|
||||
## filter
|
||||
- Type:Object
|
||||
- Default:{}
|
||||
- Usage: Specific settings for filtering, examples:
|
||||
```js
|
||||
{
|
||||
"0": {
|
||||
"caljs": {},
|
||||
"rowhidden": {
|
||||
"3": 0,
|
||||
"4": 0
|
||||
},
|
||||
"optionstate": true,
|
||||
"str": 2,
|
||||
"edr": 6,
|
||||
"cindex": 1,
|
||||
"stc": 1,
|
||||
"edc": 3
|
||||
},
|
||||
"1": {
|
||||
"caljs": {},
|
||||
"rowhidden": {
|
||||
"6": 0
|
||||
},
|
||||
"optionstate": true,
|
||||
"str": 2,
|
||||
"edr": 6,
|
||||
"cindex": 2,
|
||||
"stc": 1,
|
||||
"edc": 3
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
------------
|
||||
## luckysheet_alternateformat_save
|
||||
- Type:Array
|
||||
- Default:[]
|
||||
- Usage: Alternating color configuration, example:
|
||||
```js
|
||||
[{
|
||||
"cellrange": {
|
||||
"row": [1, 6],
|
||||
"column": [1, 5]
|
||||
},
|
||||
"format": {
|
||||
"head": {
|
||||
"fc": "#000",
|
||||
"bc": "#5ed593"
|
||||
},
|
||||
"one": {
|
||||
"fc": "#000",
|
||||
"bc": "#ffffff"
|
||||
},
|
||||
"two": {
|
||||
"fc": "#000",
|
||||
"bc": "#e5fbee"
|
||||
},
|
||||
"foot": {
|
||||
"fc": "#000",
|
||||
"bc": "#a5efcc"
|
||||
}
|
||||
},
|
||||
"hasRowHeader": false,
|
||||
"hasRowFooter": false
|
||||
}, {
|
||||
"cellrange": {
|
||||
"row": [1, 6],
|
||||
"column": [8, 12]
|
||||
},
|
||||
"format": {
|
||||
"head": {
|
||||
"fc": "#000",
|
||||
"bc": "#5599fc"
|
||||
},
|
||||
"one": {
|
||||
"fc": "#000",
|
||||
"bc": "#ffffff"
|
||||
},
|
||||
"two": {
|
||||
"fc": "#000",
|
||||
"bc": "#ecf2fe"
|
||||
},
|
||||
"foot": {
|
||||
"fc": "#000",
|
||||
"bc": "#afcbfa"
|
||||
}
|
||||
},
|
||||
"hasRowHeader": false,
|
||||
"hasRowFooter": false
|
||||
}]
|
||||
```
|
||||
|
||||
------------
|
||||
## luckysheet_alternateformat_save_modelCustom
|
||||
- Type:Array
|
||||
- Default:[]
|
||||
- Usage:Custom alternate colors, including multiple custom alternate colors configuration, example:
|
||||
```js
|
||||
[{
|
||||
"head": {
|
||||
"fc": "#6aa84f",
|
||||
"bc": "#ffffff"
|
||||
},
|
||||
"one": {
|
||||
"fc": "#000",
|
||||
"bc": "#ffffff"
|
||||
},
|
||||
"two": {
|
||||
"fc": "#000",
|
||||
"bc": "#e5fbee"
|
||||
},
|
||||
"foot": {
|
||||
"fc": "#000",
|
||||
"bc": "#a5efcc"
|
||||
}
|
||||
}]
|
||||
```
|
||||
|
||||
------------
|
||||
## chart
|
||||
- Type:Array
|
||||
- Default:[]
|
||||
- Usage: Chart configuration (under development)
|
||||
|
||||
------------
|
||||
## visibledatarow
|
||||
- Type:Number
|
||||
- Default:[]
|
||||
- Usage: Position information of all rows, incremental row position data, No need to set up for initialization
|
||||
|
||||
------------
|
||||
## visibledatacolumn
|
||||
- Type:Number
|
||||
- Default:[]
|
||||
- Usage: Position information of all columns, incremental column position data, No need to set up for initialization
|
||||
|
||||
------------
|
||||
## ch_width
|
||||
- Type:Number
|
||||
- Default:2322
|
||||
- Usage:The width of the entire worksheet area (the gray area including the border), No need to set up for initialization
|
||||
|
||||
------------
|
||||
## rh_height
|
||||
- Type:Number
|
||||
- Default:2322
|
||||
- Usage:The height of the entire worksheet area (the gray area containing the border), No need to set up for initialization
|
||||
|
||||
------------
|
||||
|
||||
## Get sheet data
|
||||
|
||||
- **Configuration**:
|
||||
|
||||
Configure the address of `loadSheetUrl`, the parameters are `gridKey` (table primary key) and `index` (sheet primary key collection, format is `[1,2,3]`), the returned data is the `data` field set of sheet
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"1": [{r:0, c:1, v:"value 1"},{r:10, c:11, v:"value 2"}],
|
||||
"2": [data],
|
||||
"3": [data],
|
||||
}
|
||||
```
|
||||
- **Explanation**:
|
||||
|
||||
`r` stands for row, `c` stands for column, and `v` stands for the value of the cell. The value can be a character, number, or json string.
|
||||
|
||||
The data will only be loaded once, generally speaking, there is only one primary key, but considering that some formulas, charts and pivot tables will refer to the data of other sheets, the front desk will add a judgment, if the current sheet refers to the data of other sheets, then complete the data of the referenced sheet together.
|
||||
|
||||
## Update data
|
||||
|
||||
- **Configuration**:
|
||||
|
||||
Configure the address of `updateUrl`, and the parameter sent to the backend is a json string.
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
compress: false,
|
||||
gridKey:10004,
|
||||
data: [update data]
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
| Parameter | Explanation | Example |
|
||||
| ------------ | ------------ | ------------ |
|
||||
| compress | Luckysheet uses client pako for zlib parameter compression, which is true if the browser supports compression, otherwise false. The backend can decide whether to decompress the data content based on this parameter | The process of obtaining parameters on the server side: 1. Serialize json string 2. Decode the data field if the compress field is TRUE 3. Decode the data string URLDecoder.decode(utf-8) |
|
||||
| gridKey | Luckysheet file identifier | none |
|
||||
| data | An array containing updated data. For the parameter format in the array, please see the introduction below. In the example: `t` indicates the update type, `i` is the index of the sheet, `c` is the row number, `r` is the column number, and `v` is the value | `data: [{ t : 'cell', i:0, c : 0, r : 0 , v: 2 }]` |
|
||||
@@ -1,903 +0,0 @@
|
||||
# Table Operation
|
||||
`luckysheet` stores all operations in the history to `undo` and `redo`. If `allowupdate` is set to true and `updateURL` is available in initial, operations will be updated on the backend in real-time via webSocket. And every one can edit same sheet on the same time.
|
||||
|
||||
>Source code [`src/controllers/server.js`] (https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/server.js) The module shows us the function of background saving.
|
||||
|
||||
In general, shared editing(or collaborative editing) is controled by the account system created by developers to control permissions.
|
||||
|
||||
The following are all types of operations that support transferring to the background. In this case, I use mongodb as a storage example to explain how front-end and back-end interacts with eachother.
|
||||
|
||||
Pay attention, `i` in the object is the `index` of the sheet rather than `order`.
|
||||
## Cell refresh
|
||||
### single cell refresh
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "v",
|
||||
"i": "Sheet_0554kKiKl4M7_1597974810804",
|
||||
"v": {
|
||||
"v": 233,
|
||||
"ct": { "fa": "General", "t": "n" },
|
||||
"m": "233"
|
||||
},
|
||||
"r": 0,
|
||||
"c": 1
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
|Parameter|Explanation|
|
||||
| ------------ | ------------ |
|
||||
|t|Operation type symbol|
|
||||
|i|The index value of the current sheet|
|
||||
|v|Cell value, refer to [单元格属性表](/zh/guide/cell.html#基本单元格)|
|
||||
|r|Row number of cell|
|
||||
|c|The column number of the cell|
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
The cell update is mainly to update the `luckysheetfile[i].celldata` parameter, which is an array:
|
||||
```json
|
||||
[
|
||||
{r:0, c:1, v: "value1"},
|
||||
{r:10, c:11, v:"value2"},
|
||||
{r:10, c:11, v:{f:"=sum", v:"100"}}
|
||||
]
|
||||
```
|
||||
Store the values in all the cells in the sheet, Luckysheet will create a new table data according to the number of rows and columns in `luckysheetfile[i].row` and `luckysheetfile[i].column` when it is created, and then use `data[ r][c]=v` to fill the table data, empty data cells are represented by null.
|
||||
|
||||
When saving the data posted by the frontend, the backend needs to convert the parameters to the format of `{r:0, c:1:v:100}` first, and then update the field of `luckysheetfile[i].celldata`, if the cell exists the cell is updated, if not, it is added, and if the cell exists but `v` is null, the cell is deleted.
|
||||
|
||||
- **Frontend view**:
|
||||
|
||||
You can modify the value of any cell, and then go to the chrome console to view the operation of `"t"=="v"`.
|
||||
|
||||
## Config operation
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "cg",
|
||||
"i": 3,
|
||||
"v": {
|
||||
"7": 192
|
||||
},
|
||||
"k": "rowlen"
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
|Parameter|Explanation|
|
||||
| ------------ | ------------ |
|
||||
|t|Operation type symbol|
|
||||
|i|The index value of the current sheet|
|
||||
|v|The internal key-value that needs to be updated|
|
||||
|k|Operation key name|
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
Update `luckysheetfile[i].config.[k][v.key] = v.value`, if `k` does not exist in `config`, then create a new `k` attribute and set it to empty, If there is no `v.key` in `k`, create a new `v.key` and update `v.value`.
|
||||
|
||||
1. Examples of modifying row height:
|
||||
- Enter: `{"t":"cg","i":3,"v":{"3":10, "5":70, "10":100},"k":" rowlen"}`
|
||||
- Update: `luckysheetfile[3].config.["rowlen"]["3"] = 10`
|
||||
|
||||
2. Examples of modifying column width:
|
||||
- Enter: `{"t":"cg","i":1,"v":{"20":74, "15":170, "6":40},"k":" columnlen"}`
|
||||
- Update: `luckysheetfile[1].config.["columnlen"]["20"] = 74`
|
||||
|
||||
3. Examples of merged cells:
|
||||
- Enter: `{"t":"cg","i":1,"v":{"5_10":{row:[1,3], column:[3,5]},"k":" merge "}`
|
||||
- Update: `luckysheetfile[1].config.["merge"]["5_10"] = {row:[1,3], column:[3,5]}`
|
||||
|
||||
## General save
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "all",
|
||||
"i": 3,
|
||||
"v": {
|
||||
"v": 1,
|
||||
"m":1,
|
||||
},
|
||||
"k": "freezen",
|
||||
"s": false
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
|Parameter|Explanation|
|
||||
| ------------ | ------------ |
|
||||
|t|Operation type symbol|
|
||||
|i|The index value of the current sheet|
|
||||
|v|The internal key-value that needs to be updated|
|
||||
|k|The `value` in the key-value that needs to be saved|
|
||||
|s|If it is `true` then `v` is saved as a string, otherwise it is saved according to the object|
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
`luckysheetfile[3].[k]= v`
|
||||
If `s` is `true`, it is `luckysheetfile[3].[k]= JSON.stringify(v)`
|
||||
|
||||
1. Pivot table:
|
||||
- Enter: `{"t":"all","i":1,"v":{………},"k":"pivotTable", "s": false}`
|
||||
- Update: `luckysheetfile[1].["pivotTable"] = {………}`
|
||||
|
||||
2. Freeze rows and columns:
|
||||
- Enter: `{"t":"all","i":3,"v":{………},"k":"freezen", "s": false}`
|
||||
- Update: `luckysheetfile[3].["freezen"] = {………}`
|
||||
|
||||
3. Filter range:
|
||||
- Enter: `{"t":"all","i":3,"v":{………},"k":"filter_select", "s": true }`
|
||||
- Update: `luckysheetfile[3].["filter_select"] = JSON.stringify ({………})`
|
||||
|
||||
4. Sheet name:
|
||||
- Enter: `{"t":"all","i":1,"v":"doc","k":"name", "s": false}`
|
||||
- Update: `luckysheetfile[1].["name"] = "doc"`
|
||||
|
||||
5. Sheet color:
|
||||
- Enter: `{"t":"all","i":2,"v":"#FFF000","k":"color", "s": false}`
|
||||
- Update: `luckysheetfile[2].["color"] = "#FFF000"`
|
||||
|
||||
## Function chain operation
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "fc",
|
||||
"i": 0,
|
||||
"v": {
|
||||
"r": 3,
|
||||
"c": 7,
|
||||
"index": 0,
|
||||
"func": [
|
||||
true,
|
||||
187282,
|
||||
"=SUM(E4:G4)"
|
||||
]
|
||||
},
|
||||
"op": "add",
|
||||
"pos": 0
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
|Parameter|Explanation|
|
||||
| ------------ | ------------ |
|
||||
|t|Operation type symbol|
|
||||
|i|The index value of the current sheet|
|
||||
|v|Object value, the internal fields of the object do not need to be updated separately, so save as text|
|
||||
|op|Operation type, `add` is add, `update` is update, and `del` is delete|
|
||||
|pos|Updated or deleted function location|
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
calcChain is an array
|
||||
- If the value of `op` is `add` then add to the end `luckysheetfile[i].calcChain.push (v)`,
|
||||
- If the value of `op` is `update` then update `luckysheetfile[i].calcChain[pos]= v`,
|
||||
- If the value of `op` is `del` then delete `luckysheetfile[i].calcChain.splice(pos, 1)`。
|
||||
|
||||
- **Frontend view**:
|
||||
|
||||
You can modify the value of any cell, and then go to the chrome console to view the operation of `"t"=="v"`.
|
||||
|
||||
## Row and column operations
|
||||
|
||||
### Delete rows or columns
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "drc",
|
||||
"i": 3,
|
||||
"v": {
|
||||
"index": 6,
|
||||
"len": 2
|
||||
},
|
||||
"rc": "r"
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">Parameter</td>
|
||||
<td>Explanation</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">t</td>
|
||||
<td>Operation type symbol</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">i</td>
|
||||
<td>The index value of the current sheet</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">rc</td>
|
||||
<td>Row operation or column operation, the value `r` stands for row, and `c` stands for column</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">v</td>
|
||||
<td>index</td>
|
||||
<td>Delete from which row or column</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>len</td>
|
||||
<td>Number of rows or columns deleted</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
If the value of `rc` is `'r'` then delete the row, if the value of `rc` is `'c'` then delete the column, eg `rc='r'`, `index=4`, `len= 5`, means to delete the next 5 lines (4, 5, 6, 7, 8) from the 4th line.
|
||||
|
||||
Mainly operate on the cells in `luckysheetfile[i].celldata`, delete the qualified cells described in the parameters and update the row and column values of other cells. Taking the above as an example, first find the `r` in the cell Delete all the cells with values from 4 to 8, and then subtract the value of 5 from the original cell number 9 and later, and finally subtract 5 from `luckysheetfile[i].row`.
|
||||
If the `v` value is `"#__qkdelete#"` (without quotes), then this is the cell to be deleted.
|
||||
|
||||
- **Front view**:
|
||||
|
||||
You can delete rows or columns, and then go to the chrome console to view the operation of `"t"=="drc"`.
|
||||
|
||||
### Add rows or columns
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "arc",
|
||||
"i": 0,
|
||||
"v": {
|
||||
"index": 5,
|
||||
"len": 10,
|
||||
"data": []
|
||||
},
|
||||
"rc": "c"
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">Parameter</td>
|
||||
<td>Explanation</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">t</td>
|
||||
<td>Operation type symbol</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">i</td>
|
||||
<td>The index value of the current sheet</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">rc</td>
|
||||
<td>Row operation or column operation, the value `r` stands for row, and `c` stands for column</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="3">v</td>
|
||||
<td>index</td>
|
||||
<td>Start from which row or column</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>len</td>
|
||||
<td>How many rows or columns to add</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>data</td>
|
||||
<td>New row or column content</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
If the value of `rc` is `r`, add a new row. If the value of `rc` is `c`, add a new column. For example, `rc=r, index=4, len=5` then it means increase 5 lines from line 4. If `data` is empty, add an empty line. If `data` is not empty, use the array in `data` to add a new line.
|
||||
|
||||
Mainly operate on the cells in `luckysheetfile[i].celldata`. Taking the above as an example, first add 5 to `luckysheetfile[i].row`, and then add `r` greater than 4 to the entire cell`r `Value +5, if `data` is empty, add an empty line to end, if `data` is not empty, convert the two-dimensional array `data` to `{r:0,c:0,v:100}` Format and added to `celldata`, the pseudo code for conversion is as follows:
|
||||
|
||||
```javascript
|
||||
var ret = [];
|
||||
for(var r=0;r<data.length;r++){
|
||||
for(var c=0;c<data[0].length;c++){
|
||||
if(d[r][c]==null){
|
||||
continue;
|
||||
}
|
||||
ret.push({r:r+5, c:c, v: data[r][c]});
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
```
|
||||
|
||||
- **Front view**:
|
||||
You can add rows or columns, and then go to the chrome console to view the operation of `"t"=="arc"`. If you want to view the operation with the value of `data`, you can delete some rows or columns, and then undelete (Ctrl+Z), you can see.
|
||||
|
||||
## Filter operating
|
||||
|
||||
### Select filter condition
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "f",
|
||||
"i": 0,
|
||||
"v": "{\"caljs\":{},\"selected\":{\"Qingdao\":\"1\",\"Guangxi\":\"1\",\"Chongqing\":\"1\"},\"rowhidden\":{\"1\":0,\"2\":0,\"3\":0,\"4\":0,\"6\":0,\"7\":0,\"8\":0,\"9\":0,\"10\":0,\"11\":0,\"12\":0,\"13\":0,\"14\":0,\"15\":0,\"16\":0,\"17\":0,\"18\":0,\"19\":0,\"21\":0,\"22\":0,\"24\":0,\"25\":0,\"26\":0,\"27\":0,\"28\":0,\"29\":0,\"30\":0,\"31\":0,\"32\":0,\"33\":0,\"34\":0,\"35\":0}}",
|
||||
"op": "upOrAdd",
|
||||
"pos": 1
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
|Parameter|Explanation|
|
||||
| ------------ | ------------ |
|
||||
|t|Operation type symbol|
|
||||
|i|The index value of the current sheet|
|
||||
|v|Object value, the internal fields of the object do not need to be updated separately, so save as text|
|
||||
|op|The operation type `upOrAdd` is update, if it does not exist, it is added, and `del` is delete|
|
||||
|pos|Updated or deleted `option` location|
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
Update `luckysheetfile[i].filter = {pos: v }`, the value of `v` is a string in JSON format. `filter` is a key-value pair, `key` is the index value (in characters) of the option position, and `v` is a json string parameter. `filter` represents a set of filter conditions.
|
||||
|
||||
### Clear filter
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "fsc",
|
||||
"i": 0,
|
||||
"v": null
|
||||
}
|
||||
```
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
Clear `luckysheetfile[i]. filter = null` , `luckysheetfile[i]. filter_select = null`。
|
||||
|
||||
### Restore filter
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "fsr",
|
||||
"i": 0,
|
||||
"v": {
|
||||
"filter": [],
|
||||
"filter_select": {}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
Clear `luckysheetfile[i]. filter = v.filter`, `luckysheetfile[i]. filter_select = v. filter_select`。
|
||||
|
||||
## Sheet operation
|
||||
|
||||
### New sheet
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "sha",
|
||||
"i": null,
|
||||
"v": {
|
||||
"name": "Sheet4",
|
||||
"color": "",
|
||||
"status": "0",
|
||||
"order": 3,
|
||||
"index": 3,
|
||||
"data": [],
|
||||
"config": {},
|
||||
"pivotTable": null,
|
||||
"isPivotTable": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">Parameter</td>
|
||||
<td>Explanation</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">t</td>
|
||||
<td>Operation type symbol</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">i</td>
|
||||
<td>The index value of the current sheet</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="9">v</td>
|
||||
<td>name</td>
|
||||
<td>The index value of the sheet jumped after hiding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>color</td>
|
||||
<td>Sheet color</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>status</td>
|
||||
<td>Active state</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>order</td>
|
||||
<td>Sheet order</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>index</td>
|
||||
<td>Sheet Index</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>celldata</td>
|
||||
<td>Cell dataset</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>config</td>
|
||||
<td>Setting</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pivotTable</td>
|
||||
<td>Pivot table settings</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>isPivotTable</td>
|
||||
<td>Whether the pivot table</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
Add a line (a document) to the database.
|
||||
|
||||
### Copy sheet
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "shc",
|
||||
"i": "New sheet location",
|
||||
"v": {
|
||||
"copyindex": "copyindex"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
Copy the sheet index value in the table, set it to `copyindex` and add it to the database, set the `index` of the new document to the value corresponding to `i`.
|
||||
|
||||
### Delete sheet
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "shd",
|
||||
"i": null,
|
||||
"v": {
|
||||
"deleIndex": 0
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">Parameter</td>
|
||||
<td>Explanation</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">t</td>
|
||||
<td>Operation type symbol</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">v</td>
|
||||
<td>deleIndex</td>
|
||||
<td>The sheet index to be deleted</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
Delete the sheet whose index is the value corresponding to `deleIndex`.
|
||||
|
||||
### restore from a deleted sheet
|
||||
|
||||
- **format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "shre",
|
||||
"i": null,
|
||||
"v": {
|
||||
"reIndex": "0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">Parameter</td>
|
||||
<td>Explanation</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">t</td>
|
||||
<td>Operation type symbol</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">v</td>
|
||||
<td>deleIndex</td>
|
||||
<td>需要恢复的sheet索引</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
restore the sheet whose index is the number of `reIndex`.
|
||||
|
||||
### Position
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "shr",
|
||||
"i": null,
|
||||
"v": {
|
||||
"0": 1,
|
||||
"1": 0,
|
||||
"2": 2,
|
||||
"3": 3,
|
||||
"4": 4,
|
||||
"5": 5,
|
||||
"6": 6,
|
||||
"7": 7,
|
||||
"Sheet_6az6nei65t1i_1596209937084": 8
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
|Parameter|Explanation|
|
||||
| ------------ | ------------ |
|
||||
|t|Operation type symbol|
|
||||
|v|Set the sorting of Sheet as a key-value pair, `key` represents the index of the sheet, and `value` represents the order value. The format is: `{"1": 3, "2":1, "0": 2, "3":0}`|
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
For the page where the `index` of the sheet is equal to the `key`, set its `order` attribute to the `value`. Examples:
|
||||
|
||||
`luckysheetfile[key1].order = value1`
|
||||
`luckysheetfile[key2].order = value2`
|
||||
`luckysheetfile[key3].order = value3`
|
||||
|
||||
### switch to the specified sheet
|
||||
|
||||
- **format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "shs",
|
||||
"i": null,
|
||||
"v": 1
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
|Parameter|Explanation|
|
||||
| ------------ | ------------ |
|
||||
|t|Operation type symbol|
|
||||
|v|index of the specified sheet|
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
setting the `status` = `1`, when the `index` of a sheet is eaqul to `v`:
|
||||
|
||||
`luckysheetfile[v].status = 1`
|
||||
|
||||
## Sheet attributes (hide or show)
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "sh",
|
||||
"i": 0,
|
||||
"v": 1,
|
||||
"op": " hide",
|
||||
"cur": 2
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
|Parameter|Explanation|
|
||||
| ------------ | ------------ |
|
||||
|t|Operation type symbol|
|
||||
|i|The index value of the current sheet|
|
||||
|op|Operation options include hide and show|
|
||||
|v|Hide if `hide` is `1`, show if `0` or empty|
|
||||
|cur|After hiding, set sheet which index corresponding to the `cur` to the active state|
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
The `hide` field of the root path of the sheet corresponding to `i` is updated to `v`. When hidden, the `status` value is `0`. When displayed, it is `1`. If hidden, the sheet which `cur` corresponds to `index`, its `status` is updated to `1`.
|
||||
|
||||
## Table information change
|
||||
|
||||
### Table name
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "na",
|
||||
"i": null,
|
||||
"v": "Data"
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
|Parameter|Explanation|
|
||||
| ------------ | ------------ |
|
||||
|t|Operation type symbol|
|
||||
|v|The name of the table|
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
Update the table name in the database according to gridkey.
|
||||
|
||||
### Thumbnail
|
||||
|
||||
- **Format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "thumb",
|
||||
"img": "base64",
|
||||
"curindex": "curindx"
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
|Parameter|Explanation|
|
||||
| ------------ | ------------ |
|
||||
|t|Operation type symbol|
|
||||
|img|Thumbnail of current table, base64 string|
|
||||
|curindex|The current sheet opened by default|
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
According to gridkey, update the thumbnail field of the table in mysql to the img value, and update the status field of the sheet whose index is the curindex value to 1, and set the status value of other sheets to 0.
|
||||
|
||||
## Chart(TODO)
|
||||
|
||||
There are four types of chart operations: add new chart -"add", move chart position-"xy", zoom chart-"wh", and update chart configuration-"update".
|
||||
|
||||
### new chart
|
||||
|
||||
- **format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "c",
|
||||
"i": 0,
|
||||
"op":"add",
|
||||
"v": {
|
||||
"chart_id": "chart_p145W6i73otw_1596209943446",
|
||||
"width": 400,
|
||||
"height": 250,
|
||||
"left": 20,
|
||||
"top": 120,
|
||||
"sheetIndex": "Sheet_6az6nei65t1i_1596209937084",
|
||||
"needRangeShow": true,
|
||||
"chartOptions": {
|
||||
"chart_id": "chart_p145W6i73otw_1596209943446",
|
||||
"chartAllType": "echarts|line|default",
|
||||
"rangeArray": [ { "row": [ 0, 4 ], "column": [ 0, 7 ] } ],
|
||||
"rangeColCheck": { "exits": true, "range": [ 0, 0 ] },
|
||||
"rangeRowCheck": { "exits": true, "range": [ 0, 0 ] },
|
||||
"rangeConfigCheck": false,
|
||||
"defaultOption": {
|
||||
"title": {
|
||||
"show": true,
|
||||
"text": "default title"
|
||||
}
|
||||
}
|
||||
},
|
||||
"isShow": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
|Parameter|Explanation|
|
||||
| ------------ | ------------ |
|
||||
|t|Operation type symbol|
|
||||
|i|The index value of the current sheet|
|
||||
|op|Operation options include hide and show|
|
||||
|v|configuration information of charts|
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
update the chart settings in the current sheet,if`luckysheetfile[i].chart` is null,the array should be `[]` on initial.
|
||||
|
||||
```json
|
||||
luckysheetfile[0].chart.push(v)
|
||||
```
|
||||
|
||||
### move chart position
|
||||
|
||||
- **format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "c",
|
||||
"i": 0,
|
||||
"op":"xy",
|
||||
"v": {
|
||||
"chart_id": "chart_p145W6i73otw_1596209943446",
|
||||
"left": 20,
|
||||
"top": 120
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
|Parameter|Explanation|
|
||||
| ------------ | ------------ |
|
||||
|t|Operation type symbol|
|
||||
|i|The index value of the current sheet|
|
||||
|op|Operation options include hide and show|
|
||||
|v|configuration information of charts|
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
update the chart settings in the current sheet
|
||||
|
||||
```js
|
||||
luckysheetfile[0].chart[v.chart_id].left = v.left;
|
||||
luckysheetfile[0].chart[v.chart_id].top = v.top;
|
||||
```
|
||||
|
||||
### zoom chart
|
||||
|
||||
- **format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "c",
|
||||
"i": 0,
|
||||
"op":"wh",
|
||||
"v": {
|
||||
"chart_id": "chart_p145W6i73otw_1596209943446",
|
||||
"width": 400,
|
||||
"height": 250,
|
||||
"left": 20,
|
||||
"top": 120
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
|Parameter|Explanation|
|
||||
| ------------ | ------------ |
|
||||
|t|Operation type symbol|
|
||||
|i|The index value of the current sheet|
|
||||
|op|Operation options include hide and show|
|
||||
|v|configuration information of charts|
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
update the chart settings in the current sheet
|
||||
|
||||
```js
|
||||
luckysheetfile[0].chart[v.chart_id].left = v.left;
|
||||
luckysheetfile[0].chart[v.chart_id].top = v.top;
|
||||
luckysheetfile[0].chart[v.chart_id].width = v.width;
|
||||
luckysheetfile[0].chart[v.chart_id].height = v.height;
|
||||
```
|
||||
|
||||
### change the configuration of charts
|
||||
|
||||
- **format**:
|
||||
|
||||
```json
|
||||
{
|
||||
"t": "c",
|
||||
"i": 0,
|
||||
"op":"update",
|
||||
"v": {
|
||||
"chart_id": "chart_p145W6i73otw_1596209943446",
|
||||
"width": 400,
|
||||
"height": 250,
|
||||
"left": 20,
|
||||
"top": 120,
|
||||
"sheetIndex": "Sheet_6az6nei65t1i_1596209937084",
|
||||
"needRangeShow": true,
|
||||
"chartOptions": {
|
||||
"chart_id": "chart_p145W6i73otw_1596209943446",
|
||||
"chartAllType": "echarts|line|default",
|
||||
"rangeArray": [ { "row": [ 0, 4 ], "column": [ 0, 7 ] } ],
|
||||
"rangeColCheck": { "exits": true, "range": [ 0, 0 ] },
|
||||
"rangeRowCheck": { "exits": true, "range": [ 0, 0 ] },
|
||||
"rangeConfigCheck": false,
|
||||
"defaultOption": {
|
||||
"title": {
|
||||
"show": true,
|
||||
"text": "default title"
|
||||
}
|
||||
}
|
||||
},
|
||||
"isShow": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- **Explanation**:
|
||||
|
||||
|Parameter|Explanation|
|
||||
| ------------ | ------------ |
|
||||
|t|Operation type symbol|
|
||||
|i|The index value of the current sheet|
|
||||
|op|Operation options include hide and show|
|
||||
|v|configuration information of charts|
|
||||
|
||||
- **Backend update**:
|
||||
|
||||
update the chart settings in the current sheet
|
||||
|
||||
```js
|
||||
luckysheetfile[0].chart[v.chart_id] = v;
|
||||
```
|
||||
|
||||
## Backend return format
|
||||
|
||||
Data format returned by websocket backend
|
||||
```js
|
||||
{
|
||||
createTime: command sending time
|
||||
data:{} modified command
|
||||
id: "7a" websocket id
|
||||
returnMessage: "success"
|
||||
status: "0" 0 tells the front end to modify according to the data command 1 meaningless
|
||||
type: 0: connection is successful, 1: send to the currently connected user, 2: send information to other users, 3: send selection location information, 999: user disconnected
|
||||
username: username
|
||||
}
|
||||
```
|
||||
@@ -1,33 +0,0 @@
|
||||
# Tutorials and resources
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
## Blog
|
||||
- [How Luckysheet initializes the data with merged cells](https://www.cnblogs.com/DuShuSir/p/13272397.html)[Pending translation]
|
||||
- [How Luckysheet saves the data in the table to the database](https://www.cnblogs.com/DuShuSir/p/13857874.html)[Pending translation]
|
||||
- [Case of introducing Luckysheet into local HTML using CDN loading](https://www.cnblogs.com/DuShuSir/p/13859103.html)[Pending translation]
|
||||
- [Basic usage of Luckysheet, use `loadUrl` to load server data](https://blog.csdn.net/DCDC2020/article/details/108486525)
|
||||
- [Luckysheet import and export implementation-Java background processing](https://blog.csdn.net/u014632228/article/details/109738221)
|
||||
|
||||
## Front-end case
|
||||
|
||||
### Community Case
|
||||
- [luckysheet-vue-importAndExport](https://github.com/oy-paddy/luckysheet-vue-importAndExport/tree/master/)
|
||||
|
||||
## Back-end case
|
||||
|
||||
### Official case
|
||||
- [Java backend Luckysheet Server](https://github.com/mengshukeji/LuckysheetServer)
|
||||
|
||||
### Community Case
|
||||
- [Luckysheet save and restore](https://gitee.com/ichiva/luckysheet-saved-in-recovery) (Java version)
|
||||
- [Online form for collaborative editing based on Luckysheet](https://github.com/DilemmaVi/ecsheet) (Java version)
|
||||
- [Simple Express.js server example template for individual use](https://github.com/TitanRGB/Luckysheet-ExpressReact-Example) (Node-Express version)
|
||||
- [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)
|
||||
- [Collaborative editing in go language version](https://github.com/fandypeng/excel2config)(Go version)
|
||||
|
||||
## Learning Materials
|
||||
|
||||
- [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]
|
||||
@@ -1,15 +0,0 @@
|
||||
---
|
||||
home: true
|
||||
heroText: Luckysheet
|
||||
tagline: 配置文档 · API · 教程
|
||||
actionText: 快速上手 →
|
||||
actionLink: /zh/guide/
|
||||
features:
|
||||
- title: 功能强大
|
||||
details: 包含大量常用电子表格功能,替代你的excel
|
||||
- title: 配置简单
|
||||
details: 最少的配置就能开始上手使用
|
||||
- title: 完全开源
|
||||
details: 社区驱动,共同来完善你的想法
|
||||
footer: MIT Licensed | Copyright © 2020-present Mengshukeji
|
||||
---
|
||||
@@ -1,28 +0,0 @@
|
||||
# 认识团队
|
||||
|
||||
Luckysheet是由个人主导、几个志同道合的小伙伴一同开发的项目。
|
||||
|
||||
## 核心团队活跃成员
|
||||
- [@wbfsa](https://github.com/wbfsa)
|
||||
- [@eiji-th](https://github.com/eiji-th)
|
||||
- [@fly-95](https://github.com/fly-95)
|
||||
- [@tonytonychopper123](https://github.com/tonytonychopper123)
|
||||
- [@Dushusir](https://github.com/Dushusir)
|
||||
- [@iamxuchen800117](https://github.com/iamxuchen800117)
|
||||
- [@wpxp123456](https://github.com/wpxp123456)
|
||||
- [@c19c19i](https://weibo.com/u/3884623955)
|
||||
- [@zhangchen915](https://github.com/zhangchen915)
|
||||
- [@jerry-f](https://github.com/jerry-f)
|
||||
- [@flowerField](https://github.com/flowerField)
|
||||
|
||||
## 社区伙伴
|
||||
- [@yiwasheng](https://github.com/yiwasheng)
|
||||
- [@danielcai1987](https://github.com/danielcai1987)
|
||||
- [@qq6690876](https://github.com/qq6690876)
|
||||
- [@javahuang](https://github.com/javahuang)
|
||||
- [@TimerGang](https://github.com/TimerGang)
|
||||
- [@gsw945](https://github.com/gsw945)
|
||||
- [@swen-xiong](https://github.com/swen-xiong)
|
||||
- [@lzmch](https://github.com/lzmch)
|
||||
- [@kdevilpf](https://github.com/kdevilpf)
|
||||
- [@WJWM0316](https://github.com/WJWM0316)
|
||||
@@ -1,49 +0,0 @@
|
||||
# 社区案例
|
||||
|
||||
我们搜集到了很多来自社区的案例反馈,还发现了以前我们没有预想到的Luckysheet使用场景。
|
||||
|
||||
积极聆听社区的声音,在大家的支持和反馈中不断更新迭代,已是我们的责任。
|
||||
|
||||
|
||||
## 公司案例
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://www.zpy360.com/" target="_blank">
|
||||
<img width="222px" src="https://cdn.jsdelivr.net/npm/luckyresources/assets/img/community_case/Zhiping_Cloud.png">
|
||||
</a>
|
||||
<p>雄安智评云数字科技有限公司</p>
|
||||
</td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://code-the-future.com/" target="_blank">
|
||||
<img width="222px" src="https://cdn.jsdelivr.net/npm/luckyresources/assets/img/community_case/code_the_future.png">
|
||||
</a>
|
||||
<p>Code the Future</p>
|
||||
</td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="http://www.jackyun.com/" target="_blank">
|
||||
<img width="222px" src="https://cdn.jsdelivr.net/npm/luckyresources/assets/img/community_case/jackyun.png">
|
||||
</a>
|
||||
<p>吉客云</p>
|
||||
</td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://www.huawei.com/cn/" target="_blank">
|
||||
<img width="222px" src="https://cdn.jsdelivr.net/npm/luckyresources/assets/img/community_case/huawei.png">
|
||||
</a>
|
||||
<p>华为</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="middle">
|
||||
</td>
|
||||
<td align="center" valign="middle">
|
||||
</td>
|
||||
<td align="center" valign="middle">
|
||||
</td>
|
||||
<td align="center" valign="middle">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,156 +0,0 @@
|
||||
# 赞助
|
||||
|
||||
## 为什么赞助
|
||||
|
||||
如果您经营一家企业并在盈利产品中使用Luckysheet,那么赞助Luckysheet开发将具有商业意义:它可确保您的产品所依赖的项目保持健康并得到积极维护。 它还可以帮助您在Luckysheet社区中曝光,使得更多的人关注您的产品。
|
||||
|
||||
当然,如果Luckysheet在您的工作或个人项目中为您提供了帮助,也欢迎请作者喝杯果汁😋。
|
||||
|
||||
## 赞助方式
|
||||
|
||||
Luckysheet是MIT许可的开源项目,其持续稳定的开发离不开这些优秀的 [**支持者**](#赞助者列表)。 如果您想加入他们,请考虑:
|
||||
|
||||
- [成为Patreon的支持者或赞助商](https://www.patreon.com/mengshukeji)
|
||||
- [成为Open Collective的支持者或赞助商](https://opencollective.com/luckysheet)
|
||||
- 通过PayPal,微信或支付宝一次性捐赠
|
||||
|
||||
| PayPal | 微信 | 支付宝 |
|
||||
|---|---|---|
|
||||
| [Paypal Me](https://www.paypal.me/wbfsa) | <img src="https://minio.cnbabylon.com/public/luckysheet/wechat.jpg" width="140" />| <img src="https://minio.cnbabylon.com/public/luckysheet/alipay.jpg" width="130" /> |
|
||||
|
||||
### Patreon和OpenCollective有什么区别?
|
||||
|
||||
通过Patreon捐赠的资金将直接用于支持menshshukeji在Luckysheet上的工作。 通过OpenCollective捐赠的资金由透明费用管理,将用于补偿核心团队成员的工作和费用或赞助社区活动。 通过在任一平台上捐款,您的姓名/徽标将得到适当的认可和曝光。
|
||||
|
||||
## 赞助者列表
|
||||
|
||||
(按时间顺序排列)
|
||||
- *涛 ¥ 200
|
||||
- popo ¥ 1
|
||||
- 孔垂善 ¥ 5
|
||||
- Shawn文 ¥ 99
|
||||
- 幸运的小路易 ¥ 1
|
||||
- 冯启俊 ¥ 88
|
||||
- mxb ¥ 10
|
||||
- 祭阳 ¥ 20
|
||||
- *勇 ¥ 30
|
||||
- 虚我 ¥ 200
|
||||
- 甜党 ¥ 50
|
||||
- Alphabet(Google)-gcf ¥ 1
|
||||
- **平 ¥ 100
|
||||
- **东 ¥ 10
|
||||
- debugger ¥ 20
|
||||
- 烦了烦 ¥ 10
|
||||
- 文顶顶 ¥ 200
|
||||
- yangxshn ¥ 10
|
||||
- 爱乐 ¥ 100
|
||||
- 小李飞刀刀 ¥ 66
|
||||
- 张铭 ¥ 200
|
||||
- 曹治军 ¥ 1
|
||||
- *特 ¥ 10
|
||||
- **权 ¥ 9.9
|
||||
- **sdmq ¥ 20
|
||||
- *旭 ¥ 10
|
||||
- Quentin ¥ 20
|
||||
- 周宇凡 ¥ 100
|
||||
- *超 ¥ 10
|
||||
- 维宁 ¥ 100
|
||||
- hyy ¥ 20
|
||||
- 雨亭寒江月 ¥ 50
|
||||
- **功 ¥ 10
|
||||
- **光 ¥ 20
|
||||
- terrywan ¥ 100
|
||||
- 王晓洪 ¥ 10
|
||||
- Sun ¥ 10
|
||||
- 忧绣 ¥ 100
|
||||
- Jasonx ¥ 10
|
||||
- 国勇 ¥ 66.6
|
||||
- 郎志 ¥ 100
|
||||
- 匿名 ¥ 1
|
||||
- ni ¥ 100
|
||||
- 苏 ¥ 50
|
||||
- Mads_chan ¥ 1
|
||||
- LK ¥ 100
|
||||
- 智连方舟 李汪石 ¥ 168
|
||||
- **发 ¥ 260
|
||||
- *超 ¥ 10
|
||||
- *勇 ¥ 10
|
||||
- *腾 ¥ 15
|
||||
- 名字好难起 ¥ 20
|
||||
- 大山 ¥ 1
|
||||
- waiting ¥ 1000
|
||||
- **宇 ¥ 10.00
|
||||
- 刘小帅的哥哥 ¥ 20.00
|
||||
- 宁静致远 ¥ 10.00
|
||||
- Eleven ¥ 1.00
|
||||
- **帆 ¥ 188
|
||||
- henry ¥ 100
|
||||
- .波罗 ¥ 50
|
||||
- 花落有家 ¥ 50
|
||||
- 踏遍南水北山 ¥ 1
|
||||
- LC ¥ 5
|
||||
- **明 ¥ 8.80
|
||||
- *军 ¥ 20
|
||||
- 张彪 ¥ 50
|
||||
- 企业文档云@肖敏 ¥ 10
|
||||
- 匿名 ¥ 50
|
||||
- 逍遥行 ¥ 10
|
||||
- z.wasaki ¥ 50
|
||||
- Make Children ¥ 20
|
||||
- Foam ¥ 20
|
||||
- 奥特曼( o|o)ノ三 ¥ 50
|
||||
- **凯 ¥ 10
|
||||
- **兵 ¥ 20
|
||||
- **川 ¥ 1
|
||||
- 二万 ¥ 50
|
||||
- 蔚然成林 ¥ 10
|
||||
- 邹杰 ¥ 10
|
||||
- 张永强 ¥ 50
|
||||
- 鱼得水 ¥ 50
|
||||
- Ccther ¥ 1
|
||||
- Eric Cheng ¥ 10
|
||||
- 佚名 ¥ 1
|
||||
- 花叶 ¥ 50
|
||||
- GT ¥ 20
|
||||
- 菜菜心 ¥ 10
|
||||
- fisher ¥ 1
|
||||
- JC ¥ 5
|
||||
- 佚名 ¥ 20
|
||||
- 独孤一剑 ¥ 50
|
||||
- mxt ¥ 20
|
||||
- 一叶迷山 ¥ 100
|
||||
- Jeff ¥ 100
|
||||
- 八千多条狗🐶 ¥ 100
|
||||
- 晓峰 ¥ 10
|
||||
- 戒 ¥ 1
|
||||
- 浪里个浪 ¥ 1
|
||||
- 回调函数 ¥ 50
|
||||
- 赖瓜子 ¥ 5
|
||||
- Milo•J ¥ 20
|
||||
- 可道云 ¥ 200
|
||||
- *程 ¥ 10
|
||||
- 来一杯卡布酸奶 ¥ 5
|
||||
- 刘久胜 ¥ 100
|
||||
- 快意江湖 ¥ 50
|
||||
- *新 ¥ 9.9
|
||||
- **龙 ¥ 100
|
||||
- **江 ¥ 100
|
||||
- **威 ¥ 9.8
|
||||
- **涛 ¥ 500
|
||||
- **嘉 ¥ 10
|
||||
- *涛 ¥ 1
|
||||
- *兵 ¥ 5
|
||||
- *阳 ¥ 200
|
||||
- *辉 ¥ 1
|
||||
- *帆 ¥ 30
|
||||
- **旺 ¥ 10
|
||||
- **麟 ¥ 20
|
||||
- *霖 ¥ 9.9
|
||||
- *帅 ¥ 10
|
||||
- *鑫 ¥ 6.66
|
||||
- ~朴:shu ¥ 29.79
|
||||
- 未来 ¥ 1
|
||||
- 国勇 ¥ 0.1
|
||||
- 用心灵听雨 ¥ 10
|
||||
- 钊 ¥ 5
|
||||
- 星稀 ¥ 5
|
||||
@@ -1,325 +0,0 @@
|
||||
# 常见问题
|
||||
|
||||
本章内容搜集了大家反馈的常见问题,如果官方文档和此列表都不能解答您的疑问,推荐到[官方论坛](https://github.com/mengshukeji/Luckysheet/discussions)反馈
|
||||
|
||||
## luckysheetfile中的data和celldata有什么区别?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:表格初始化时使用一维数组格式的 [celldata](/zh/guide/sheet.html#celldata),初始化完成后转化为二维数组格式的data作为存储更新使用,celldata不再使用。
|
||||
|
||||
如果需要将`data`拿出来作为初始化数据,则需要执行 [transToCellData(data)](/zh/guide/api.html#transtocelldata-data-setting)转换为celldata数据。
|
||||
其中`{ r, c, v }`格式的celldata转换为二维数组使用的是[transToData(celldata)](/zh/guide/api.html#transtodata-celldata-setting)
|
||||
|
||||
总结如下:
|
||||
```js
|
||||
// data => celldata 二维数组数据 转化成 {r, c, v}格式 一维数组
|
||||
luckysheet.transToCellData(data)
|
||||
|
||||
// celldata => data 生成表格所需二维数组
|
||||
luckysheet.transToData(celldata)
|
||||
```
|
||||
|
||||
------------
|
||||
|
||||
## 单元格的类型有哪些?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:参考[单元格格式列表](/zh/guide/cell.html),例举了可用的单元格格式
|
||||
|
||||
------------
|
||||
|
||||
## 如何在Vue/React项目中使用Luckysheet?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:参考
|
||||
- Vue案例:[luckysheet-vue](https://github.com/mengshukeji/luckysheet-vue)
|
||||
- React案例:[luckysheet-react](https://github.com/mengshukeji/luckysheet-react)
|
||||
|
||||
------------
|
||||
|
||||
## 为什么初始化后表格里面的公式不会被触发?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:参考 [表格数据格式](/zh/guide/sheet.html#calcchain) ,设置单元格数据对应的calcChain即可。
|
||||
|
||||
------------
|
||||
|
||||
## 远端加载数据是loadUrl还是updateUrl?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:[loadUrl](/zh/guide/config.html#loadurl)。配置了loadUrl,Luckysheet会通过ajax请求整个表格数据,而updateUrl会作为协同编辑实时保存的接口地址。
|
||||
注意:初始化数据需要配置loadUrl参数,而协同编辑则在配置loadUrl、updateUrl和allowUpdate四个参数才能生效。
|
||||
|
||||
------------
|
||||
|
||||
## 每个sheet页的`index`和`order`有什么区别?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:每个sheet页都有一个唯一id,就是`index`,可以用数字递增,也可以使用随机字符串,而`order`是所有的sheet的排序情况,从0开始,只能为数字`0,1,2...`。
|
||||
|
||||
------------
|
||||
|
||||
## dist文件夹下为什么不能直接运行项目?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:需要启动本地服务器
|
||||
|
||||
- [Node搭建本地服务器](https://github.com/JacksonTian/anywhere)
|
||||
- [Python搭建本地服务器](https://developer.mozilla.org/zh-CN/docs/Learn/Common_questions/set_up_a_local_testing_server)
|
||||
|
||||
------------
|
||||
|
||||
## excel导入导出怎么做?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:配合Luckysheet开发的excel导入导出库-[Luckyexcel](https://github.com/mengshukeji/Luckyexcel)已经实现了excel导入功能,导出功能正在开发当中。现阶段excel导出可以参考这2篇博文:
|
||||
|
||||
- [基于LuckySheet在线表格的Excel下载功能开发](https://www.cnblogs.com/recode-hyh/p/13168226.html)
|
||||
- [使用exceljs导出luckysheet表格](https://blog.csdn.net/csdn_lsy/article/details/107179708)
|
||||
|
||||
------------
|
||||
|
||||
## 初始化时合并单元格怎么做?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:参考以下案例
|
||||
- [Luckysheet如何初始化含合并单元格的数据](https://www.cnblogs.com/DuShuSir/p/13272397.html)
|
||||
|
||||
------------
|
||||
|
||||
## Luckysheet如何把表格里的数据保存到数据库?有没有服务端存储和协作的解决方案?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:有两个方案:
|
||||
|
||||
- 一是表格操作完成后,使用`luckysheet.getAllSheets()`方法获取到全部的工作表数据,全部发送到后台存储。
|
||||
- 二是开启协同编辑功能,实时传输数据给后端。
|
||||
具体的操作步骤参考这篇文章:[Luckysheet如何把表格里的数据保存到数据库](https://www.cnblogs.com/DuShuSir/p/13857874.html)
|
||||
|
||||
------------
|
||||
|
||||
## 如何监听单元格hover或者点击事件?`cellRenderAfter`如何实时监听变化?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:我们搜集到需要针对单元格事件的二次开发需求,规划了单元格相关的钩子函数,参考[单元格钩子函数](/zh/guide/config.html#cellrenderafter)(显示的TODO的暂未开放)
|
||||
|
||||
------------
|
||||
|
||||
## 顶部的工具栏不支持自定义配置?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:
|
||||
顶部工具栏的自定义配置使用初始[options.showtoolbarconfig](/zh/guide/config.html#showtoolbarconfig)(如果标注TODO表示暂未开发)
|
||||
|
||||
------------
|
||||
|
||||
## 项目使用了jQuery吗?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:是的。Luckysheet内部启动时间比开源的时间早很多,所以用到了jQuery。打包工具会把jQuery集成到打包目录的`./plugins/js/plugin.js`文件中。
|
||||
|
||||
如果您的项目中(比如React/Vue)也自己全局引用了jQuery,且造成了冲突,可以尝试去掉一个jQuery。
|
||||
|
||||
要想在Luckysheet里去除jQuery,需要在源码根目录下的`gulpfile.js`文件中找到打包jQuery的地方:[src/plugins/js/jquery.min.js](https://github.com/mengshukeji/Luckysheet/blob/master/gulpfile.js),删除jQuery相关的信息即可。
|
||||
|
||||
------------
|
||||
|
||||
## 如何为单元格对象新增字段?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:首先参考[单元格对象格式](/zh/guide/cell.html),然后参照源码批注的部分[src/controllers/postil.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/postil.js)。批注是一个加在单元格对象上的一个配置。
|
||||
|
||||
------------
|
||||
|
||||
## 工具栏图标加载不出来?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:工具栏及其他部分图标采用了iconfont图标,加载不出来是因为缺少了iconfont.css的引入,之前旧版官方文档未写清楚这一点对大家造成误导,很抱歉。
|
||||
|
||||
详细的Luckysheet使用教程参考已经更新的[官方文档](/zh/guide/#使用步骤)
|
||||
|
||||
------------
|
||||
|
||||
## Luckyexcel打包后不动?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:打包的终端命令行不显示结束,但是如果`dist`文件夹内已经有了结果文件`luckyexcel.js`,则表明是正常的。
|
||||
|
||||
Luckyexcel是excel导入导出库,项目采用了gulp作为打包工具,旧版打包工具有点问题在命令行显示这块有些问题,问题已经修复。请还出现此问题的小伙伴做如下更新操作:
|
||||
1. pull最新代码
|
||||
2. `npm i`
|
||||
3. `npm run build`
|
||||
|
||||
更多详细信息关注:[Luckyexcel](https://github.com/mengshukeji/Luckyexcel/)
|
||||
|
||||
------------
|
||||
|
||||
## 单元格不可编辑如何控制?表格保护怎么操作?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:单元格不可编辑属于工作表保护的功能范畴,需要配置在每个sheet页中`config.authority`,最新的设置参数请参考[工作表保护](/zh/guide/sheet.html#config-authority)。
|
||||
|
||||
为了大家便于理解工作表保护的功能使用,下方的视频演示了如何让当前整个工作表不可编辑,但是允许某一列单元格可编辑的功能:
|
||||
|
||||
<iframe frameborder="0" src="https://v.qq.com/txp/iframe/player.html?vid=g3162sacwn6" allowFullScreen="true"></iframe>
|
||||
|
||||
跟着演示操作一下本地的工作表,然后打开浏览器控制台,使用`luckysheet.getLuckysheetfile()[0].config.authority`就可以获取到第一个工作表的工作表保护参数。
|
||||
|
||||
------------
|
||||
|
||||
## 数据验证怎么配置?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:最新文档已经提供了数据验证的配置信息,参考[数据验证配置](/zh/guide/sheet.html#dataVerification)。官方也提供了API方法 [setDataVerification](/zh/guide/api.html#setdataverification-optionitem-setting),用于动态设置数据验证功能。
|
||||
|
||||
------------
|
||||
|
||||
## Luckysheet通过引入CDN有案例吗?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:Luckysheet支持CDN方式引入,参考:[本地HTML采用cdn加载方式引入Luckysheet的案例](https://www.cnblogs.com/DuShuSir/p/13859103.html)
|
||||
|
||||
------------
|
||||
|
||||
## 请问一下图片怎么限制在单元格里面自适应高度?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:首先需要对图片设置移动并调整单元格大小,然后有以下几种情况:
|
||||
|
||||
- 如果图片位置完全在单元格内部时,当拉长单元格的宽度或高度的时候,图片不会随着单元格的变大而伸缩变大
|
||||
- 如果图片位置完全在单元格内部时,当拉短单元格的宽度或高度,贴到图片的边时,图片会随着单元格的变小而伸缩变小
|
||||
- 当这个图片超过单元格的边框时,图片可以跟随单元格大小变化
|
||||
|
||||
根据图片的第二个特性,可以操作得到图片位置信息,原理就是将图片的位置设置成和单元格边框重叠(源码中,需要重叠超过2px),以下演示视频展示了怎么将图片限制在单元格里面自适应宽高。
|
||||
|
||||
<iframe frameborder="0" src="https://v.qq.com/txp/iframe/player.html?vid=y3163ya0q6c" allowFullScreen="true"></iframe>
|
||||
|
||||
------------
|
||||
|
||||
## 如何获取工作表默认的行高列宽?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:有两种方式可以获取
|
||||
|
||||
- 一是使用`luckysheet.getLuckysheetfile()`获取到所有工作表配置后,在各个工作表的配置中直接取得默认行高`defaultRowHeight`和默认列宽`defaultColWidth`。
|
||||
- 二是开放了API可以获取到工作表默认的行高[getDefaultRowHeight](/zh/guide/api.html#getdefaultrowheight-setting)和列宽[getDefaultColWidth](/zh/guide/api.html#getdefaultcolwidth-setting)
|
||||
|
||||
------------
|
||||
|
||||
## 如何隐藏工作表下方的添加行按钮和回到顶部按钮?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:已开放配置
|
||||
- 允许添加行 [enableAddRow](/zh/guide/config.html#enableaddrow)
|
||||
- 允许回到顶部 [enableAddBackTop](/zh/guide/config.html#enableAddBackTop)
|
||||
|
||||
------------
|
||||
|
||||
## 如何隐藏工作表的行标题和列标题?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:已开放配置
|
||||
- 行标题区域的宽度 [rowHeaderWidth](/zh/guide/config.html#rowheaderwidth)
|
||||
- 列标题区域的高度 [columnHeaderHeight](/zh/guide/config.html#columnHeaderHeight)
|
||||
|
||||
------------
|
||||
|
||||
## 调用什么方法能设置`config.merge`?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:三个方法
|
||||
- 界面操作
|
||||
- 用API:[setRangeMerge](/zh/guide/api.html#setrangemerge-type-setting)
|
||||
- 手动组装merge参数
|
||||
|
||||
------------
|
||||
|
||||
## 为什么官方公布的新功能没有效果?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:第一步,检查下您是否使用了CDN的方式引入,
|
||||
|
||||
Luckysheet教程里采用的CDN链接是 [jsdelivr](https://www.jsdelivr.com/package/npm/luckysheet) 提供的服务,代码是从 [npmjs.com](https://www.npmjs.com/) 自动同步过去的,不是从 [Github](https://github.com/mengshukeji/Luckysheet/) 同步过去的。因为我们新提交的代码,还需要经过一段时间的测试,所以不会立即发布到npm使用,导致了npm的代码稍滞后于Github。
|
||||
|
||||
如果需要尝试最新代码,我们强烈建议您从 [Luckysheet Github](https://github.com/mengshukeji/Luckysheet/) 主仓库拉取代码。后续我们版本稳定了,会考虑实时发布npm包。
|
||||
|
||||
第二步,如果是引用github仓库打包后的代码,测试判断是否有bug,您可以查找问题并尝试修复,再[提交PR](https://github.com/mengshukeji/Luckysheet/pulls),如果修复不了,请[提交issues](https://github.com/mengshukeji/Luckysheet/issues)。
|
||||
|
||||
------------
|
||||
|
||||
## `npm run dev`报错:`Error: Cannot find module 'rollup'`?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:可能是npm包安装问题,尝试以下步骤:
|
||||
1. `npm cache clean --force`
|
||||
2. `npm i rimraf -g`
|
||||
3. `rimraf node_modules`
|
||||
4. 删除package-lock.json文件
|
||||
5. `npm i`
|
||||
6. `npm run dev`
|
||||
|
||||
提示:大多数的其他npm安装问题,也可以尝试此步骤来解决。
|
||||
|
||||
------------
|
||||
|
||||
## 怎样在vue工程里对Luckysheet进行二次开发?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:[luckysheet-vue](https://github.com/mengshukeji/luckysheet-vue) 案例是提供一个应用集成的方案。
|
||||
|
||||
如果本地直接开发的话:
|
||||
1. 把Luckysheet的工程和自己的Vue工程都启动起来,比如Luckysheet的工程在 `http://localhost:3001`
|
||||
2. 在Vue工程里面通过 `http://localhost:3001` 引入Luckysheet使用
|
||||
|
||||
这样的话,Luckysheet实时修改后,Vue工程里是可以看到更改的
|
||||
|
||||
------------
|
||||
|
||||
## 创建图表时候报错`Store.createChart`?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:需要引入图表插件才能使用,工作簿初始化的时候应该配置图表插件使用,参考
|
||||
|
||||
- 插件配置 [plugins](/zh/guide/config.html#配置项)
|
||||
- 或 官方demo [src/index.html](https://github.com/mengshukeji/Luckysheet/blob/master/src/index.html)
|
||||
|
||||
通常,参考demo配置完后就可以和demo一样正常使用了,但是还是会偶现`chartmix is not defined`,这时需要在谷歌浏览器控制台的network里检查下图表的依赖是否都加载了,有5项依赖需要关注:`vue / vuex / element-ui / echarts / chartmix.umd.js`。
|
||||
|
||||
------------
|
||||
|
||||
## 单元格能增加自定义属性吗?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:直接赋值到单元格对象上的自定义属性会被过滤,要想使得自定义属性生效,需要二开去除过滤属性的代码。
|
||||
|
||||
------------
|
||||
|
||||
## 如何输入以`'='`开头的文本?例如`=currentDate('YYYY-MM-DD')`,它默认会去掉函数,函数怎么禁止?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:前面加一个单引号就行,会强制识别为字符串,和excel表现一致的。比如:`'=currentDate('YYYY-MM-DD')`
|
||||
|
||||
------------
|
||||
|
||||
## create回调为什么没有效果?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:API 方法`luckysheet.create()`这个方法没有回调,但是Luckysheet提供了钩子函数用于在指定位置执行回调方法,比如:
|
||||
- 表格创建之前触发 [workbookCreateBefore](/zh/guide/config.html#workbookcreatebefore)
|
||||
- 表格创建之后触发 [workbookCreateAfter](/zh/guide/config.html#workbookcreateafter)
|
||||
|
||||
------------
|
||||
|
||||
## create的时候默认选中第一个单元格,怎么去除?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:选中单元格时默认是高亮,把高亮去除即可,使用API: [setRangeShow](/zh/guide/api.html#setrangeshow-range-setting)
|
||||
|
||||
```js
|
||||
luckysheet.setRangeShow("A2",{show:false})
|
||||
```
|
||||
|
||||
------------
|
||||
|
||||
## 右键事件绑定在哪?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:在源码的 [src/controllers/hander.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/handler.js) 搜索`event.which == "3"`即可找到右键事件触发执行的代码。
|
||||
|
||||
------------
|
||||
|
||||
## 如何添加自定义工具栏?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:暂未提供配置,可以参照工具栏打印按钮的实现来修改源码:
|
||||
1. 全局搜索 `luckysheet-icon-print`即可找到打印按钮的实现,在 [src/controllers/constant.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/constant.js) 中增加一个类似的模板字符串,需要自定义一个唯一id
|
||||
2. 修改 [src/controllers/resize.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/resize.js) ,在toobarConfig对象中新增一条记录
|
||||
3. 修改 [src/controllers/menuButton.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/controllers/menuButton.js) ,新增一个事件监听
|
||||
|
||||
------------
|
||||
|
||||
## 如何添加自定义公式?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:需要修改两处源码:
|
||||
1. 在 [src/function/functionImplementation.js](https://github.com/mengshukeji/Luckysheet/blob/master/src/function/functionImplementation.js) 文件中的`functionImplementation`对象中增加一个公式,格式参考`SUM`/`AVERAGE`等公式
|
||||
2. 修改 [src/locale](https://github.com/mengshukeji/Luckysheet/blob/master/src/locale) 文件目录下所有的语言包,将自己新增的公式说明加到`functionlist`数组中。其中,`t`是函数的类别,`m`是参数的个数,最小参数个数和最大参数个数。
|
||||
|
||||
------------
|
||||
|
||||
## 有没有类似loadData接口,我想实现先加载10条记录,然后再动态加载数据,这些数据都追加到表格中?
|
||||
|
||||
**<span style="font-size:20px;">A</span>**:有的。我们`loadSheetUrl`提供了这个功能,初始化`options.enablePage = true`可以开启。
|
||||
|
||||
源码里搜索`enablePage`可以看到,有个`method.addDataAjax`方法,里面就有一个ajax请求,用来动态加载数据,这些数据会追加到表格中。
|
||||
|
||||
这个功能现在在文档上是隐藏的,是因为这个接口我们做的时候,接口参数是根据我们实际业务匹配的,可能不太通用,我们准备抽象后再放出来给大家用,如果您想自己用可以依据这个改下。
|
||||
|
||||
推荐您考虑自己写接口来加载数据,然后使用`setRangeValue`来在指定位置追加数据,这样的自定义程度更高。
|
||||
|
||||
------------
|
||||
@@ -1,281 +0,0 @@
|
||||
# Luckysheet 已不再维护,推荐使用 [Univer](https://github.com/dream-num/univer) 替代
|
||||
|
||||
# 快速上手
|
||||
|
||||
## 基本介绍
|
||||
Luckysheet ,一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。
|
||||
|
||||
## Demo
|
||||
[在线demo](https://dream-num.github.io/LuckysheetDemo/)
|
||||
|
||||

|
||||
|
||||
## 在线案例
|
||||
|
||||
- [协同编辑Demo](http://luckysheet.lashuju.com/demo/)
|
||||
|
||||
## 特性
|
||||
|
||||
### 🛠️格式设置
|
||||
+ **样式** (修改字体样式,字号,颜色或者其他通用的样式)
|
||||
+ **条件格式** (突出显示所关注的单元格或单元格区域;强调异常值;使用数据栏、色阶和图标集(与数据中的特定变体对应)直观地显示数据)
|
||||
+ **文本对齐及旋转**
|
||||
+ **支持文本的截断、溢出、自动换行**
|
||||
+ **数据类型**
|
||||
+ **货币, 百分比, 数字, 日期**
|
||||
+ **Custom** (和excel保持一致,例如: `##,###0.00` , `$1,234.56$##,###0.00_);[Red]($##,###0.00)`, `_($* ##,###0.00_);_(...($* "-"_);_(@_)`, `08-05 PM 01:30MM-dd AM/PM hh:mm` )
|
||||
+ **单元格内多样式** (Alt+Enter单元格内换行、上标、下标、单元格内可定义每个文字的不同样式)
|
||||
|
||||
### 🧬单元格
|
||||
+ **拖拽选取来修改单元格** (对选区进行操作,可以拖动四边来移动选区,也可以在右下角对选区进行下拉填充操作)
|
||||
+ **选区下拉填充** (对于一个1,2,3,4,5的序列,将会按照间隔为1进行下拉填充,而对2,4,6,8将会以2作为间隔。支持等差数列,等比数列,日期,周,天,月,年,中文数字填充)
|
||||
+ **自动填充选项** (下拉填充后,会出现填充选项的菜单,支持选择复制,序列,仅格式,只填充格式,天,月,年的选择)
|
||||
+ **多选区操作** (可以按住Ctrl键进行单元格多选操作,支持多选区的复制粘贴)
|
||||
+ **查找和替换** (对内容进行查找替换,支持正则表达式,整词,大小写敏感)
|
||||
+ **定位** (可以根据单元格的数据类型进行自动定位并选中,选中后可以批量进行格式等操作)
|
||||
+ **合并单元格**
|
||||
+ **数据验证(表单功能)** (支持Checkbox, drop-down list, datePicker)
|
||||
|
||||
### 🖱️行和列操作
|
||||
+ **隐藏,插入,删除行或列**
|
||||
+ **冻结行或列** (支持冻结首行和首列,冻结到选区,冻结调节杆可以进行拖动操作)
|
||||
+ **文本分列** (可以把文本根据不同符号进行拆分,和excel的分列功能类似)
|
||||
|
||||
### 🔨操作体验
|
||||
+ **撤销/重做**
|
||||
+ **复制/粘贴/剪切操作** (支持Luckysheet到excel和excel到Luckysheet带格式的互相拷贝)
|
||||
+ **快捷键支持** (快捷键操作保持与excel一致,如果有不同或者缺失请反馈给我们)
|
||||
+ **格式刷** (与google sheet类似)
|
||||
+ **任意选区拖拽** (选择单元格,输入公式,插入图表,会与选区相关,可以通过任意拖动和放大缩小选区来改变与之关联的参数)
|
||||
|
||||
### ⚙️公式和函数
|
||||
+ **内置公式**
|
||||
+ 数学 (SUMIFS, AVERAGEIFS, SUMIF, SUM, etc.)
|
||||
+ 文本 (CONCATENATE, REGEXMATCH, MID)
|
||||
+ 日期 (DATEVALUE, DATEDIF, NOW, WEEKDAY, etc.)
|
||||
+ 财务 (PV, FV, IRR, NPV, etc.)
|
||||
+ 逻辑 (IF, AND, OR, IFERROR, etc.)
|
||||
+ 查找和引用 (VLOOKUP, HLOOkUP, INDIRECT, OFFSET, etc.)
|
||||
+ 动态数组 (Excel2019新函数,SORT,FILTER,UNIQUE,RANDARRAY,SEQUENCE)
|
||||
+ **公式支持数组** (={1,2,3,4,5,6}, Crtl+Shift+Enter)
|
||||
+ **远程公式** (DM_TEXT_TFIDF, DM_TEXT_TEXTRANK,DATA_CN_STOCK_CLOSE etc. Need remote interface, can realize complex calculation)
|
||||
+ **自定义公式** (根据身份证识别年龄,性别,生日,省份,城市等. AGE_BY_IDCARD, SEX_BY_IDCARD, BIRTHDAY_BY_IDCARD, PROVINCE_BY_IDCARD, CITY_BY_IDCARD, etc. 可以任意加入自己的公式哦)
|
||||
|
||||
### 📐表格操作
|
||||
+ **筛选** (支持颜色、数字、字符、日期的筛选)
|
||||
+ **排序** (同时加入多个字段进行排序)
|
||||
|
||||
### 📈数据透视表
|
||||
+ **字段拖拽** (操作方式与excel类似,拖动字段到行、列、数值、筛选等4个区域)
|
||||
+ **聚合方式** (支持汇总、计数、去重计数、平均、最大、最小、中位数、协方差、标准差、方差等计算)
|
||||
+ **筛选数据** (可对字段进行筛选后再进行汇总)
|
||||
+ **数据透视表下钻** (双击数据透视表中的数据,可以下钻查看到明细,操作方式与excel一致)
|
||||
+ **根据数据透视表新建图表** (数据透视表产生的数据也可以进行图表的制作)
|
||||
|
||||
### 📊图表
|
||||
+ **支持的图表类型** (目前折线图、柱状图、面积图、条形图、饼图可以使用,散点图、雷达图、仪表盘、漏斗图正在接入,其他图表正在陆续开发中,请大家给予建议)
|
||||
+ **关于图表插件** (图表使用了一个中间插件[ChartMix](https://github.com/mengshukeji/chartMix)(MIT协议): 目前支持ECharts,正在逐步接入Highcharts、阿里G2、amCharts、googleChart、chart.js)
|
||||
+ **Sparklines小图** (以公式的形式进行设置和展示,目前支持:折线图、面积图、柱状图、累积图、条形图、离散图、三态图、饼图、箱线图等)
|
||||
|
||||
### ✍️分享及写作
|
||||
+ **评论** (评论的删除、添加、修改、隐藏)
|
||||
+ **共享编辑** (支持多用户共享编辑,内置API)
|
||||
|
||||
### 📚插入对象
|
||||
+ **插入图片** (支持JPG,PNG,SVG的插入、修改和删除,并且随表格的变动而产生变化)
|
||||
|
||||
### ⚡Luckysheet专有
|
||||
+ **矩阵计算** (通过右键菜单进行支持:对选区内的数据进行转置、旋转、数值计算)
|
||||
+ **截图** (把选区的内容进行截图展示)
|
||||
+ **复制到其他格式** (右键菜单的"复制为", 支持复制为json、array、对角线数据、去重等)
|
||||
+ **EXCEL导入及导出** (专为Luckysheet打造的导入导出插件,支持密码、水印、公式等的本地导入导出,导出正在开发)
|
||||
|
||||
### ⏱️未来开发计划
|
||||
+ **打印及设置** (像excel一样进行打印设置,并导出为图片或者PDF)
|
||||
+ **树形菜单** (类似excel中的分级显示(分组))
|
||||
+ **表格新功能** (类似excel中表格的筛选器和切片器)
|
||||
+ **CSV,TXT导入及导出** (专为Luckysheet打造的导入导出插件,支持密码、水印、公式等的本地导入导出)
|
||||
+ **插入svg形状** (支持[Pen tool](https://github.com/mengshukeji/Pentool)的插入、修改和删除,并且随表格的变动而产生变化)
|
||||
+ **文档** (完善文档和API)
|
||||
+ **敬请期待...** (可以提出好的建议给我们)
|
||||
|
||||
## 开发模式
|
||||
|
||||
### 环境
|
||||
[Node.js](https://nodejs.org/en/) Version >= 6
|
||||
|
||||
### 安装
|
||||
```shell
|
||||
npm install
|
||||
npm install gulp -g
|
||||
```
|
||||
|
||||
### 开发
|
||||
```shell
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### 打包
|
||||
```shell
|
||||
npm run build
|
||||
```
|
||||
|
||||
## 使用步骤
|
||||
|
||||
### 第一步
|
||||
引入依赖,有2种方式
|
||||
|
||||
#### CDN
|
||||
```html
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/css/pluginsCss.css' />
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/plugins.css' />
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/css/luckysheet.css' />
|
||||
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/assets/iconfont/iconfont.css' />
|
||||
<script src="https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/js/plugin.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/luckysheet.umd.js"></script>
|
||||
```
|
||||
|
||||
注意,`https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/luckysheet.umd.js`这个路径意思是会拉取到最新的luckysheet代码,但是如果Luckysheet刚刚发布,jsdelivr网站可能还没来得及从npm上同步过去,故而使用这个路径还是会拉到上一个版本,我们推荐您直接指定最新版本。
|
||||
|
||||
想要指定Luckysheet版本,请在所有的CDN依赖文件后面加上版本号,如:`https://cdn.jsdelivr.net/npm/luckysheet@2.1.12/dist/luckysheet.umd.js`。
|
||||
|
||||
> 如何知道最新版本是哪一版?查看最新 [release记录](https://github.com/mengshukeji/Luckysheet/releases) 或者 [package.json](https://github.com/mengshukeji/Luckysheet/blob/master/package.json) 的`version`字段。
|
||||
|
||||
如果不方便访问 jsdelivr.net,还可以采用本地方式引入
|
||||
|
||||
#### 本地引入
|
||||
|
||||
`npm run build`后`dist`文件夹下的所有文件复制到项目目录,然后通过相对路径引入
|
||||
|
||||
```html
|
||||
<link rel='stylesheet' href='./plugins/css/pluginsCss.css' />
|
||||
<link rel='stylesheet' href='./plugins/plugins.css' />
|
||||
<link rel='stylesheet' href='./css/luckysheet.css' />
|
||||
<link rel='stylesheet' href='./assets/iconfont/iconfont.css' />
|
||||
<script src="./plugins/js/plugin.js"></script>
|
||||
<script src="./luckysheet.umd.js"></script>
|
||||
```
|
||||
### 第二步
|
||||
指定一个表格容器
|
||||
```html
|
||||
<div id="luckysheet" style="margin:0px;padding:0px;position:absolute;width:100%;height:100%;left: 0px;top: 0px;"></div>
|
||||
```
|
||||
### 第三步
|
||||
创建一个表格
|
||||
```javascript
|
||||
<script>
|
||||
$(function () {
|
||||
//配置项
|
||||
var options = {
|
||||
container: 'luckysheet' //luckysheet为容器id
|
||||
}
|
||||
luckysheet.create(options)
|
||||
})
|
||||
</script>
|
||||
```
|
||||
|
||||
## 整体结构
|
||||
|
||||
### 格式
|
||||
|
||||
一个完整的Luckysheet表格文件的数据格式为:luckysheetfile,一个表格文件包含若干个sheet文件,对应excel的sheet0、sheet1等。
|
||||
|
||||
一个Luckysheet文件的示例如下,该表格包含3个sheet:`
|
||||
luckysheetfile = [ {sheet1设置}, {sheet2设置}, {sheet3设置} ]`
|
||||
相当于excel的3个sheet
|
||||
|
||||

|
||||
|
||||
文件中的一个sheet的数据`luckysheetfile[0]`的结构如下:
|
||||
```json
|
||||
{
|
||||
"name": "Cell", //工作表名称
|
||||
"color": "", //工作表颜色
|
||||
"index": "0", //工作表索引
|
||||
"status": "1", //激活状态
|
||||
"order": "0", //工作表的顺序
|
||||
"hide": 0,//是否隐藏
|
||||
"row": 36, //行数
|
||||
"column": 18, //列数
|
||||
"config": {
|
||||
"merge":{}, //合并单元格
|
||||
"rowlen":{}, //表格行高
|
||||
"columnlen":{}, //表格列宽
|
||||
"rowhidden":{}, //隐藏行
|
||||
"colhidden":{}, //隐藏列
|
||||
"borderInfo":{}, //边框
|
||||
},
|
||||
"celldata": [], //初始化使用的单元格数据
|
||||
"data": [], //更新和存储使用的单元格数据
|
||||
"scrollLeft": 0, //左右滚动条位置
|
||||
"scrollTop": 315, //上下滚动条位置
|
||||
"luckysheet_select_save": [], //选中的区域
|
||||
"luckysheet_conditionformat_save": {},//条件格式
|
||||
"calcChain": [],//公式链
|
||||
"isPivotTable":false,//是否数据透视表
|
||||
"pivotTable":{},//数据透视表设置
|
||||
"filter_select": {},//筛选范围
|
||||
"filter": null,//筛选配置
|
||||
"luckysheet_alternateformat_save": [], //交替颜色
|
||||
"luckysheet_alternateformat_save_modelCustom": [], //自定义交替颜色
|
||||
"freezen": {}, //冻结行列
|
||||
"chart": [], //图表配置
|
||||
"visibledatarow": [], //所有行的位置
|
||||
"visibledatacolumn": [], //所有列的位置
|
||||
"ch_width": 2322, //工作表区域的宽度
|
||||
"rh_height": 949, //工作表区域的高度
|
||||
"load": "1", //已加载过此sheet的标识
|
||||
}
|
||||
```
|
||||
### 查看方式
|
||||
在chrome的console中查看
|
||||
`luckysheet.getluckysheetfile()`
|
||||
可以看到完整设置
|
||||
`[{shee1}, {sheet2}, {sheet3}]`
|
||||
|
||||
## 快捷键
|
||||
|
||||
| 快捷键 | 功能 |
|
||||
| ------------ | ------------ |
|
||||
| CTRL + C | 复制单元格 |
|
||||
| CTRL + V | 粘贴单元格 |
|
||||
| CTRL + X | 剪切单元格 |
|
||||
| CTRL + Z | 撤销 |
|
||||
| CTRL + Y | 重做 |
|
||||
| CTRL + A | 全选 |
|
||||
| CTRL + B | 加粗 |
|
||||
| CTRL + F | 查找 |
|
||||
| CTRL + H | 替换 |
|
||||
| CTRL + I | 斜体 |
|
||||
| CTRL + UP/DOWN/LEFT/RIGHT | 快捷调整单元格选框 |
|
||||
| SHIFT + UP/DOWN/LEFT/RIGHT | 调整选区 |
|
||||
| CTRL + 鼠标左击 | 多选单元格 |
|
||||
| SHIFT + 鼠标左击 | 调整选区 |
|
||||
| UP/DOWN/LEFT/RIGHT | 移动单元格选框 |
|
||||
| ENTER | 编辑单元格 |
|
||||
| TAB | 向右移动单元格选框 |
|
||||
| DELETE | 清除单元格数据 |
|
||||
|
||||
## 指引
|
||||
|
||||
如果您使用Luckysheet遇到了问题,按以下步骤来寻找答案
|
||||
|
||||
1. 使用多吉或者Google搜索常见技术问题
|
||||
2. Luckysheet相关的问题优先查看[Luckysheet官方文档](https://dream-num.github.io/LuckysheetDocs/zh/)(注意标注TODO的功能暂未实现)
|
||||
3. 搜索[常见问题列表](https://dream-num.github.io/LuckysheetDocs/zh/guide/FAQ.html)
|
||||
4. 搜索[官方论坛](https://support.qq.com/product/288322),看看有没有人已经遇到过
|
||||
5. 尝试自己检查或试验以找到答案
|
||||
6. 请尝试阅读源代码以找到答案,
|
||||
|
||||
如果以上方法都没有解决您的问题,可以考虑:
|
||||
|
||||
- 去[官方论坛](https://support.qq.com/product/288322)提问
|
||||
- 去Luckysheet官方微信群或者QQ群提问
|
||||
- 发现有明显问题的或者需求无法满足的,直接提交[issues](https://github.com/mengshukeji/Luckysheet/issues)
|
||||
|
||||
> 推荐阅读 [提问的智慧](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md)
|
||||
|
||||
同时,我们强烈推荐您帮助我们丰富Luckysheet社区
|
||||
|
||||
- 如果您发现文档或者代码有问题,您可以通过提交PR来贡献。所有合理的改动、优化、修正,或者文档的修正、更新相关的提交都会被接受
|
||||
- 当您有了一部分使用或者二次开发Luckysheet的经验,我们鼓励您通过博文分享出来
|
||||
@@ -1,614 +0,0 @@
|
||||
# 单元格
|
||||
|
||||
## 基本单元格
|
||||
|
||||
单元格是Luckysheet中最基本的单位,每个单元格都会保存为一个对象,一个工作表的数据则会保存为一个由单元格对象组成的二维数组,并存入当前工作表的 `luckysheetfile[i].data`中。
|
||||
|
||||
单元格对象包含以下单元格属性
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>属性值</td>
|
||||
<td>全称</td>
|
||||
<td><div style="width:100px">说明</div></td>
|
||||
<td>值示例</td>
|
||||
<td>Aspose方法或者属性</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ct</td>
|
||||
<td>celltype</td>
|
||||
<td>单元格值格式:文本、时间等</td>
|
||||
<td><code>{
|
||||
"fa": "General",
|
||||
"t": "g"
|
||||
}</code><a href="#cellStyle">单元格值格式</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bg</td>
|
||||
<td>background</td>
|
||||
<td>背景颜色</td>
|
||||
<td>#fff000</td>
|
||||
<td>setBackgroundColor</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ff</td>
|
||||
<td>fontfamily</td>
|
||||
<td>字体</td>
|
||||
<td>0 Times New Roman、 1 Arial、2 Tahoma 、3 Verdana、4 微软雅黑、5 宋体(Song)、6 黑体(ST Heiti)、7 楷体(ST Kaiti)、 8 仿宋(ST FangSong)、9 新宋体(ST Song)、10 华文新魏、11 华文行楷、12 华文隶书</td>
|
||||
<td>Style.Font object's Name property.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fc</td>
|
||||
<td>fontcolor</td>
|
||||
<td>字体颜色</td>
|
||||
<td>#fff000</td>
|
||||
<td>Style.Font object's Color property</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bl</td>
|
||||
<td>bold</td>
|
||||
<td>粗体</td>
|
||||
<td>0 常规 、 1加粗</td>
|
||||
<td>Style.Font object's IsBold property to true.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>it</td>
|
||||
<td>italic</td>
|
||||
<td>斜体</td>
|
||||
<td>0 常规 、 1 斜体</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fs</td>
|
||||
<td>fontsize</td>
|
||||
<td>字体大小</td>
|
||||
<td>14</td>
|
||||
<td>Style.Font object's Size property.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>cl</td>
|
||||
<td>cancelline</td>
|
||||
<td>删除线</td>
|
||||
<td>0 常规 、 1 删除线</td>
|
||||
<td>Style.Font object's Underline property</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>un</td>
|
||||
<td>underline</td>
|
||||
<td>下划线</td>
|
||||
<td>0 无 、 1 有</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>vt</td>
|
||||
<td>verticaltype</td>
|
||||
<td>垂直对齐</td>
|
||||
<td>0 中间、1 上、2下</td>
|
||||
<td>setVerticalAlignment</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ht</td>
|
||||
<td>horizontaltype</td>
|
||||
<td>水平对齐</td>
|
||||
<td>0 居中、1 左、2右</td>
|
||||
<td>setHorizontalAlignment</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mc</td>
|
||||
<td>mergecell</td>
|
||||
<td>合并单元格</td>
|
||||
<td>主单元格{ r:0, c:0, rs: 2, cs:2 },辅单元格{ r:0, c:0 },<a href="#mergeCell">合并单元格案例</a></td>
|
||||
<td>Merge</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tr</td>
|
||||
<td>textrotate</td>
|
||||
<td>竖排文字</td>
|
||||
<td>3</td>
|
||||
<td>setRotationAngle</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>rt</td>
|
||||
<td>rotatetext</td>
|
||||
<td>文字旋转角度</td>
|
||||
<td>介于0~180之间的整数,包含0和180</td>
|
||||
<td>setRotationAngle</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>tb</td>
|
||||
<td>textbeak</td>
|
||||
<td>文本换行</td>
|
||||
<td>0 截断、1溢出、2 自动换行</td>
|
||||
<td>2:setTextWrapped <br> 0和1:IsTextWrapped = true</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>v</td>
|
||||
<td>value</td>
|
||||
<td>原始值</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>m</td>
|
||||
<td>monitor</td>
|
||||
<td>显示值</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>f</td>
|
||||
<td>function</td>
|
||||
<td>公式</td>
|
||||
<td></td>
|
||||
<td>setFormula <br> setArrayFormula <br> workbook.calculateFormula();</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ps</td>
|
||||
<td>comment</td>
|
||||
<td>批注</td>
|
||||
<td>
|
||||
<code>
|
||||
{<br>
|
||||
height: 140,//批注框高度 <br>
|
||||
width: 73,//批注框宽度 <br>
|
||||
left: 75,//批注框距离左边工作表边缘位置 <br>
|
||||
top: 22,//批注框距离上边工作表边缘位置 <br>
|
||||
isshow: true,//是否显示批注<br>
|
||||
value: "jhbk"//批注内容<br>
|
||||
}
|
||||
</code>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
一个规范的单元格对象如下:
|
||||
|
||||
```json
|
||||
{
|
||||
"ct": { //单元格值格式
|
||||
"fa": "General", //格式名称为自动格式
|
||||
"t": "n" //格式类型为数字类型
|
||||
},
|
||||
"v": 233, //内容的原始值为 233
|
||||
"m": 233, //内容的显示值为 233
|
||||
"bg": "#f6b26b", //背景为 "#f6b26b"
|
||||
"ff": 1, // 字体为 "Arial"
|
||||
"fc": "#990000", //字体颜色为 "#990000"
|
||||
"bl": 1, //字体加粗
|
||||
"it": 1, //字体斜体
|
||||
"fs": 9, //字体大小为 9px
|
||||
"cl": 1, //启用删除线
|
||||
"ht": 0, //水平居中
|
||||
"vt": 0, //垂直居中
|
||||
"tr": 2, //文字旋转 -45°
|
||||
"tb": 2, //文本自动换行
|
||||
"ps": { //批注
|
||||
"left": 92, //批注框左边距
|
||||
"top": 10, //批注框上边距
|
||||
"width": 91, //批注框宽度
|
||||
"height": 48, //批注框高度
|
||||
"value": "I am a comment", //批注内容
|
||||
"isshow": true //批注框为显示状态
|
||||
},
|
||||
"f": "=SUM(233)" //单元格是一个求和公式
|
||||
}
|
||||
```
|
||||
|
||||
### 为什么会有原始值 `v` 和显示值 `m` 的区分?
|
||||
|
||||
Luckysheet在存储数字类型的内容时,支持多种格式转换,所以需要保留原始值来做更多处理,比如同样一个数字`1`,设置成百分比格式就是`"100%"`,设置成两位小数数字就是`"1.00"`,
|
||||
|
||||
还有一个原因是日期和时间格式的内容原始值会存储为一个数字,默认情况下,Luckysheet把`1900-1-1 0:00:00`存储为`1`,把`1900-1-1 0:00:00`以后的每一个时刻存储为该时刻与`1900-1-1 0:00:00`这个时刻的差值(以天为单位)。比如`44127`就表示`2020-10-23`这一天。
|
||||
|
||||
以下是特殊格式的例子:
|
||||
|
||||
百分比 `100%`
|
||||
```json
|
||||
{
|
||||
"ct": {
|
||||
"fa": "0%",
|
||||
"t": "n"
|
||||
},
|
||||
"v": 1,
|
||||
"m": "100%"
|
||||
}
|
||||
```
|
||||
|
||||
小数 `1.00`
|
||||
```json
|
||||
{
|
||||
"ct": {
|
||||
"fa": "##0.00",
|
||||
"t": "n"
|
||||
},
|
||||
"v": 1,
|
||||
"m": "1.00"
|
||||
}
|
||||
```
|
||||
|
||||
日期 `2020-10-23`
|
||||
```json
|
||||
{
|
||||
"ct": {
|
||||
"fa": "yyyy-MM-dd",
|
||||
"t": "d"
|
||||
},
|
||||
"v": 44127,
|
||||
"m": "2020-10-23"
|
||||
}
|
||||
```
|
||||
|
||||
## 合并单元格<div id='mergeCell'></div>
|
||||
|
||||
设置一个合并单元格,需要处理两个地方,一是单元格对象中设置`mc`属性,二是在`config`中设置`merge`。
|
||||
|
||||
比如,将"A1:B2"单元格合并为一个单元格
|
||||
|
||||
- 第一步:先设置四个单元格的参数
|
||||
```json
|
||||
[
|
||||
[{
|
||||
"m": "merge cell",
|
||||
"ct": {
|
||||
"fa": "General",
|
||||
"t": "g"
|
||||
},
|
||||
"v": "merge cell",
|
||||
"mc": { //合并单元格必备属性
|
||||
"r": 0, //主单元格的行号
|
||||
"c": 0, //主单元格的列号
|
||||
"rs": 2, //合并单元格占的行数
|
||||
"cs": 2 //合并单元格占的列数
|
||||
}
|
||||
}, {
|
||||
"mc": {
|
||||
"r": 0, //主单元格的行号
|
||||
"c": 0, //主单元格的列号
|
||||
}
|
||||
}],
|
||||
[{
|
||||
"mc": {
|
||||
"r": 0, //主单元格的行号
|
||||
"c": 0, //主单元格的列号
|
||||
}
|
||||
}, {
|
||||
"mc": {
|
||||
"r": 0, //主单元格的行号
|
||||
"c": 0, //主单元格的列号
|
||||
}
|
||||
}]
|
||||
]
|
||||
```
|
||||
|
||||
合并单元格的关键属性是`mc`,主单元格是选区范围中左上角的单元格,包含4个属性 r/c/rs/cs ,分别表示 row/column/rowspan/columnspan,在这里,就表示从主单元格A1(row 0 column 0)开始到右边2行下方2列的单元格进行合并,选区范围中的其他单元格则只需要设置主单元格位置即可。
|
||||
|
||||
- 第二步:再设置`config.merge`
|
||||
```json
|
||||
{
|
||||
"0_0": {
|
||||
"r": 0,
|
||||
"c": 0,
|
||||
"rs": 2,
|
||||
"cs": 2
|
||||
}
|
||||
}
|
||||
```
|
||||
对象中的key为 `r + '_' + c` 的拼接值,value同主单元格的`mc`设置: r:行数,c:列数,rs:合并的行数,cs:合并的列数
|
||||
|
||||
> merge 详细参考:[表格数据config](/zh/guide/data.html#config)
|
||||
|
||||
## 含边框单元格
|
||||
|
||||
单元格的边框设置与合并单元格类似,需要在`config`中设置`borderInfo`,区别在于不需要设置单元格对象。
|
||||
加入
|
||||
|
||||
比如,将"A1"单元格设置一个黑色细实线的全部边框
|
||||
|
||||
设置`config.borderInfo`为
|
||||
```json
|
||||
{
|
||||
"rangeType": "range",
|
||||
"borderType": "border-all",
|
||||
"color": "#000",
|
||||
"style": "1",
|
||||
"range": [
|
||||
{
|
||||
"row": [ 0, 0 ],
|
||||
"column": [0, 0]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
而其单元格对象不需要增加设置,如下只是基础的内容和格式设置
|
||||
```json
|
||||
[
|
||||
[
|
||||
{
|
||||
"m": "borderCell",
|
||||
"ct": {
|
||||
"fa": "General",
|
||||
"t": "g"
|
||||
},
|
||||
"v": "borderCell"
|
||||
}
|
||||
]
|
||||
]
|
||||
```
|
||||
|
||||
> borderInfo 详细参考:[config.borderInfo](/zh/guide/sheet.html#config-borderinfo)
|
||||
|
||||
## 简化的单元格数据
|
||||
|
||||
特别强调的是,表格初始化的时候,采用的是`r/c/v`对象组成的一维数组格式,其中`v`的值一般是设置为单元格对象。为了节约后台的存储空间,`v`的值支持简写格式,直接写为一个字符串即可,渲染进Luckysheet后自动识别为自动格式即,`"ct": { "fa": "General", "t": "n" }`
|
||||
|
||||
以下为初始化3个单元格信息,第三个单元格即为简写格式:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"r": 0,
|
||||
"c": 0,
|
||||
"v": {
|
||||
"f": "=MAX(A7:A9)",
|
||||
"ct": {
|
||||
"fa": "General",
|
||||
"t": "n"
|
||||
},
|
||||
"v": 100,
|
||||
"m": "100"
|
||||
}
|
||||
},
|
||||
{
|
||||
"r": 0,
|
||||
"c": 1,
|
||||
"v": {
|
||||
"f": "=SUM(A2)",
|
||||
"bg": "#fff000",
|
||||
"v": 12,
|
||||
"m": "12"
|
||||
}
|
||||
},
|
||||
{
|
||||
"r": 0,
|
||||
"c": 2,
|
||||
"v": "value 2"
|
||||
}
|
||||
]
|
||||
```
|
||||
> 了解 [celldata的使用](/zh/guide/data.html#celldata)
|
||||
|
||||
## 单元格值格式<div id='cellStyle'></div>
|
||||
|
||||
值格式即为单元格对象中 `ct` 的设置,
|
||||
|
||||
如下为自动格式的单元格
|
||||
|
||||
```json
|
||||
{
|
||||
"ct": {
|
||||
"fa": "General",
|
||||
"t": "g"
|
||||
},
|
||||
"m": "2424",
|
||||
"v": 2424
|
||||
}
|
||||
```
|
||||
|
||||
|参数|说明|值|
|
||||
| ------------ | ------------ | ------------ |
|
||||
|fa|Format格式的定义串| 如"General"|
|
||||
|t|Type类型|如"g"|
|
||||
|
||||
|
||||
### 可选择的设置如下
|
||||
|
||||
| 格式 | ct.fa | ct.t | m 值示例 |备注 |
|
||||
|----------|----------|-------------------------|------------------------- |------------------------- |
|
||||
| 自动 | General | g/n | Luckysheet |自动格式,也是默认的格式;单元格内容为数字时,`m`的值为`'n'`|
|
||||
| 纯文本 | @ | s | Luckysheet ||
|
||||
| <br><br><br>**数字格式** | | | | |
|
||||
| 整数 | 0 | n | 1235 | 0位小数 ||
|
||||
| 数字一位小数 | 0.0 | n | 1234.6 | 点后面0的个数就代表小数位数,如果原始数字位数大,设置位数小时会做四舍五入 |
|
||||
| 数字两位小数 | 0.00 | n | 1234.56 ||
|
||||
| 百分比整数 | 0% | n | 123456% |也支持 #0% 的用法|
|
||||
| 百分比 | 0.00% | n | 123456.00% |也支持 #0.00% 的用法,点后面0的个数就代表小数位数|
|
||||
| 科学计数 | 0.00E+00 | n | 1.23E+03 ||
|
||||
| 科学计数 | ##0.0E+0 | n | 1.2E+3 ||
|
||||
| 分数 | # ?/? | n | 1234 5/9 ||
|
||||
| 分数 | # ??/?? | n | 1234 14/25 ||
|
||||
| 万元 | w | n |12万3456||
|
||||
| 万元2位小数 | w0.00 | n |12万3456.00||
|
||||
| 会计 | ¥(0.00) | n ||
|
||||
| 更多数字格式 | #,##0 | n | 1,235 ||
|
||||
| 更多数字格式 | #,##0.00 | n | 1,234.56 ||
|
||||
| 更多数字格式 | `#,##0_);(#,##0)` | n | 1,235 ||
|
||||
| 更多数字格式 | `#,##0_);[Red](#,##0)` | n | 1,235 ||
|
||||
| 更多数字格式 | `#,##0.00_);(#,##0.00)` | n | 1,234.56 ||
|
||||
| 更多数字格式 | `#,##0.00_);[Red](#,##0.00)` | n | 1,234.56 ||
|
||||
| 更多数字格式 | $#,##0_);($#,##0) | n | $1,235 ||
|
||||
| 更多数字格式 | `$#,##0_);[Red]($#,##0)` | n | $1,235 ||
|
||||
| 更多数字格式 | $#,##0.00_);($#,##0.00) | n | $1,234.56 ||
|
||||
| 更多数字格式 | `$#,##0.00_);[Red]($#,##0.00)` | n | $1,234.56 ||
|
||||
| 更多数字格式 | _($* #,##0_);_(...($* "-"_);_(@_) | n | $ 1,235 ||
|
||||
| 更多数字格式 | _(* #,##0_);_(*..._(* "-"_);_(@_) | n | 1,235 ||
|
||||
| 更多数字格式 | _($* #,##0.00_);_(...($* "-"_);_(@_) | n | $ 1,234.56 ||
|
||||
| 更多数字格式 | _(* #,##0.00_);...* "-"??_);_(@_) | n | 1,234.56 ||
|
||||
| <br><br><br>**时间日期格式** | | | | |
|
||||
| 时间 | hh:mm AM/PM | d |10:23 AM||
|
||||
| 时间24H | hh:mm | d |10:23||
|
||||
| 日期时间 | yyyy-MM-dd hh:mm AM/PM | d |2020-07-29 10:23 AM||
|
||||
| 日期时间24H | yyyy-MM-dd hh:mm | d |2020-07-29 10:23||
|
||||
| 日期 | yyyy-MM-dd | d | 1930-08-05 ||
|
||||
| 日期 | yyyy/MM/dd | d | 1930/8/5 ||
|
||||
| 日期 | yyyy"年"M"月"d"日" | d | 1930年8月5日 ||
|
||||
| 日期 | MM-dd | d | 08-05 ||
|
||||
| 日期 | M-d | d | 8-5 ||
|
||||
| 日期 | M"月"d"日" | d | 8月5日 ||
|
||||
| 日期 | h:mm:ss | d | 13:30:30 ||
|
||||
| 日期 | h:mm | d | 13:30 ||
|
||||
| 日期 | AM/PM hh:mm | d | 下午01:30 ||
|
||||
| 日期 | AM/PM h:mm | d | 下午1:30 ||
|
||||
| 日期 | AM/PM h:mm:ss | d | 下午1:30:30 ||
|
||||
| 日期 | MM-dd AM/PM hh:mm | d | 下08-05 下午01:30 ||
|
||||
| <br><br><br>**货币格式** | | | | |
|
||||
| 货币:人民币 | "¥" 0.00 | n | ¥ 123.00 |也支持 ¥ #.00 或者 ¥0.00|
|
||||
| 货币:美元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:欧元 | "€" 0.00 | n | € 123.00 ||
|
||||
| 货币:英镑 | "£" 0.00 | n | £ 123.00 ||
|
||||
| 货币:港元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:日元 | "¥" 0.00 | n | ¥ 123.00 ||
|
||||
| 货币:阿尔巴尼亚列克 | "Lek" 0.00 | n | Lek 123.00 ||
|
||||
| 货币:阿尔及利亚第纳尔 | "din" 0.00 | n | din 123.00 ||
|
||||
| 货币:阿富汗尼 | "Af" 0.00 | n | Af 123.00 ||
|
||||
| 货币:阿根廷比索 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:阿拉伯联合酋长国迪拉姆 | "dh" 0.00 | n | dh 123.00 ||
|
||||
| 货币:阿鲁巴弗罗林 | "Afl" 0.00 | n | Afl 123.00 ||
|
||||
| 货币:阿曼里亚尔 | "Rial" 0.00 | n | Rial 123.00 ||
|
||||
| 货币:阿塞拜疆马纳特 | "?" 0.00 | n | ? 123.00 ||
|
||||
| 货币:埃及镑 | "£" 0.00 | n | £ 123.00 ||
|
||||
| 货币:埃塞俄比亚比尔 | "Birr" 0.00 | n | Birr 123.00 ||
|
||||
| 货币:安哥拉宽扎 | "Kz" 0.00 | n | Kz 123.00 ||
|
||||
| 货币:澳大利亚元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:澳门元 | "MOP" 0.00 | n | MOP 123.00 ||
|
||||
| 货币:巴巴多斯元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:巴布亚新几内亚基那 | "PGK" 0.00 | n | PGK 123.00 ||
|
||||
| 货币:巴哈马元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:巴基斯坦卢比 | "Rs" 0.00 | n | Rs 123.00 ||
|
||||
| 货币:巴拉圭瓜拉尼 | "Gs" 0.00 | n | Gs 123.00 ||
|
||||
| 货币:巴林第纳尔 | "din" 0.00 | n | din 123.00 ||
|
||||
| 货币:巴拿马巴波亚 | "B/" 0.00 | n | B/ 123.00 ||
|
||||
| 货币:巴西里亚伊 | "R$" 0.00 | n | R$ 123.00 ||
|
||||
| 货币:白俄罗斯卢布 | "р" 0.00 | n | р 123.00 ||
|
||||
| 货币:百慕大元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:保加利亚列弗 | "lev" 0.00 | n | lev 123.00 ||
|
||||
| 货币:冰岛克朗 | "kr" 0.00 | n | kr 123.00 ||
|
||||
| 货币:波黑可兑换马克 | "KM" 0.00 | n | KM 123.00 ||
|
||||
| 货币:波兰兹罗提 | "z?" 0.00 | n | z? 123.00 ||
|
||||
| 货币:玻利维亚诺 | "Bs" 0.00 | n | Bs 123.00 ||
|
||||
| 货币:伯利兹元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:博茨瓦纳普拉 | "P" 0.00 | n | P 123.00 ||
|
||||
| 货币:不丹努扎姆 | "Nu" 0.00 | n | Nu 123.00 ||
|
||||
| 货币:布隆迪法郎 | "FBu" 0.00 | n | FBu 123.00 ||
|
||||
| 货币:朝鲜圆 | "?KP" 0.00 | n | ?KP 123.00 ||
|
||||
| 货币:丹麦克朗 | "kr" 0.00 | n | kr 123.00 ||
|
||||
| 货币:东加勒比元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:多米尼加比索 | "RD$" 0.00 | n | RD$ 123.00 ||
|
||||
| 货币:俄国卢布 | "?" 0.00 | n | ? 123.00 ||
|
||||
| 货币:厄立特里亚纳克法 | "Nfk" 0.00 | n | Nfk 123.00 ||
|
||||
| 货币:非洲金融共同体法郎 | "CFA" 0.00 | n | CFA 123.00 ||
|
||||
| 货币:菲律宾比索 | "?" 0.00 | n | ? 123.00 ||
|
||||
| 货币:斐济元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:佛得角埃斯库多 | "CVE" 0.00 | n | CVE 123.00 ||
|
||||
| 货币:福克兰群岛镑 | "£" 0.00 | n | £ 123.00 ||
|
||||
| 货币:冈比亚达拉西 | "GMD" 0.00 | n | GMD 123.00 ||
|
||||
| 货币:刚果法郎 | "FrCD" 0.00 | n | FrCD 123.00 ||
|
||||
| 货币:哥伦比亚比索 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:哥斯达黎加科朗 | "?" 0.00 | n | ? 123.00 ||
|
||||
| 货币:古巴比索 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:古巴可兑换比索 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:圭亚那元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:哈萨克斯坦坚戈 | "?" 0.00 | n | ? 123.00 ||
|
||||
| 货币:海地古德 | "HTG" 0.00 | n | HTG 123.00 ||
|
||||
| 货币:韩元 | "?" 0.00 | n | ? 123.00 ||
|
||||
| 货币:荷属安的列斯盾 | "NAf." 0.00 | n | NAf. 123.00 ||
|
||||
| 货币:洪都拉斯拉伦皮拉 | "L" 0.00 | n | L 123.00 ||
|
||||
| 货币:吉布提法郎 | "Fdj" 0.00 | n | Fdj 123.00 ||
|
||||
| 货币:吉尔吉斯斯坦索姆 | "KGS" 0.00 | n | KGS 123.00 ||
|
||||
| 货币:几内亚法郎 | "FG" 0.00 | n | FG 123.00 ||
|
||||
| 货币:加拿大元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:加纳塞地 | "GHS" 0.00 | n | GHS 123.00 ||
|
||||
| 货币:柬埔寨瑞尔 | "Riel" 0.00 | n | Riel 123.00 ||
|
||||
| 货币:捷克克朗 | "K?" 0.00 | n | K? 123.00 ||
|
||||
| 货币:津巴布韦元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:卡塔尔里亚尔 | "Rial" 0.00 | n | Rial 123.00 ||
|
||||
| 货币:开曼群岛元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:科摩罗法郎 | "CF" 0.00 | n | CF 123.00 ||
|
||||
| 货币:科威特第纳尔 | "din" 0.00 | n | din 123.00 ||
|
||||
| 货币:克罗地亚库纳 | "kn" 0.00 | n | kn 123.00 ||
|
||||
| 货币:肯尼亚先令 | "Ksh" 0.00 | n | Ksh 123.00 ||
|
||||
| 货币:莱索托洛蒂 | "LSL" 0.00 | n | LSL 123.00 ||
|
||||
| 货币:老挝基普 | "?" 0.00 | n | ? 123.00 ||
|
||||
| 货币:黎巴嫩镑 | "L£" 0.00 | n | L£ 123.00 ||
|
||||
| 货币:立陶宛立特 | "Lt" 0.00 | n | Lt 123.00 ||
|
||||
| 货币:利比亚第纳尔 | "din" 0.00 | n | din 123.00 ||
|
||||
| 货币:利比亚元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:卢旺达法郎 | "RF" 0.00 | n | RF 123.00 ||
|
||||
| 货币:罗马尼亚列伊 | "RON" 0.00 | n | RON 123.00 ||
|
||||
| 货币:马达加斯加阿里亚里 | "Ar" 0.00 | n | Ar 123.00 ||
|
||||
| 货币:马尔代夫拉菲亚 | "Rf" 0.00 | n | Rf 123.00 ||
|
||||
| 货币:马拉维克瓦查 | "MWK" 0.00 | n | MWK 123.00 ||
|
||||
| 货币:马来西亚林吉特 | "RM" 0.00 | n | RM 123.00 ||
|
||||
| 货币:马其顿戴第纳尔 | "din" 0.00 | n | din 123.00 ||
|
||||
| 货币:毛里求斯卢比 | "MURs" 0.00 | n | MURs 123.00 ||
|
||||
| 货币:毛里塔尼亚乌吉亚 | "MRO" 0.00 | n | MRO 123.00 ||
|
||||
| 货币:蒙古图格里克 | "?" 0.00 | n | ? 123.00 ||
|
||||
| 货币:孟加拉塔卡 | "?" 0.00 | n | ? 123.00 ||
|
||||
| 货币:秘鲁新索尔 | "S/" 0.00 | n | S/ 123.00 ||
|
||||
| 货币:缅甸开亚特 | "K" 0.00 | n | K 123.00 ||
|
||||
| 货币:摩尔多瓦列伊 | "MDL" 0.00 | n | MDL 123.00 ||
|
||||
| 货币:摩洛哥迪拉姆 | "dh" 0.00 | n | dh 123.00 ||
|
||||
| 货币:莫桑比克梅蒂卡尔 | "MTn" 0.00 | n | MTn 123.00 ||
|
||||
| 货币:墨西哥比索 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:纳米比亚元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:南非兰特 | "R" 0.00 | n | R 123.00 ||
|
||||
| 货币:南苏丹镑 | "£" 0.00 | n | £ 123.00 ||
|
||||
| 货币:尼加拉瓜科多巴 | "C$" 0.00 | n | C$ 123.00 ||
|
||||
| 货币:尼泊尔卢比 | "Rs" 0.00 | n | Rs 123.00 ||
|
||||
| 货币:尼日利亚奈拉 | "?" 0.00 | n | ? 123.00 ||
|
||||
| 货币:挪威克朗 | "kr" 0.00 | n | kr 123.00 ||
|
||||
| 货币:乔治亚拉瑞 | "GEL" 0.00 | n | GEL 123.00 ||
|
||||
| 货币:人民币(离岸) | "¥" 0.00 | n | ¥ 123.00 ||
|
||||
| 货币:瑞典克朗 | "kr" 0.00 | n | kr 123.00 ||
|
||||
| 货币:瑞士法郎 | "CHF" 0.00 | n | CHF 123.00 ||
|
||||
| 货币:塞尔维亚第纳尔 | "din" 0.00 | n | din 123.00 ||
|
||||
| 货币:塞拉利昂利昂 | "SLL" 0.00 | n | SLL 123.00 ||
|
||||
| 货币:塞舌尔卢比 | "SCR" 0.00 | n | SCR 123.00 ||
|
||||
| 货币:沙特里亚尔 | "Rial" 0.00 | n | Rial 123.00 ||
|
||||
| 货币:圣多美多布拉 | "Db" 0.00 | n | Db 123.00 ||
|
||||
| 货币:圣赫勒拿群岛磅 | "£" 0.00 | n | £ 123.00 ||
|
||||
| 货币:斯里兰卡卢比 | "Rs" 0.00 | n | Rs 123.00 ||
|
||||
| 货币:斯威士兰里兰吉尼 | "SZL" 0.00 | n | SZL 123.00 ||
|
||||
| 货币:苏丹镑 | "SDG" 0.00 | n | SDG 123.00 ||
|
||||
| 货币:苏里南元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:所罗门群岛元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:索马里先令 | "SOS" 0.00 | n | SOS 123.00 ||
|
||||
| 货币:塔吉克斯坦索莫尼 | "Som" 0.00 | n | Som 123.00 ||
|
||||
| 货币:太平洋法郎 | "FCFP" 0.00 | n | FCFP 123.00 ||
|
||||
| 货币:泰国铢 | "?" 0.00 | n | ? 123.00 ||
|
||||
| 货币:坦桑尼亚先令 | "TSh" 0.00 | n | TSh 123.00 ||
|
||||
| 货币:汤加潘加 | "T$" 0.00 | n | T$ 123.00 ||
|
||||
| 货币:特立尼达和多巴哥元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:突尼斯第纳尔 | "din" 0.00 | n | din 123.00 ||
|
||||
| 货币:土耳其里拉 | "?" 0.00 | n | ? 123.00 ||
|
||||
| 货币:瓦努阿图瓦图 | "VUV" 0.00 | n | VUV 123.00 ||
|
||||
| 货币:危地马拉格查尔 | "Q" 0.00 | n | Q 123.00 ||
|
||||
| 货币:委内瑞拉博利瓦 | "Bs" 0.00 | n | Bs 123.00 ||
|
||||
| 货币:文莱元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:乌干达先令 | "UGX" 0.00 | n | UGX 123.00 ||
|
||||
| 货币:乌克兰格里夫尼亚 | "грн." 0.00 | n | грн. 123.00 ||
|
||||
| 货币:乌拉圭比索 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:乌兹别克斯坦苏姆 | "so?m" 0.00 | n | so?m 123.00 ||
|
||||
| 货币:西萨摩亚塔拉 | "WST" 0.00 | n | WST 123.00 ||
|
||||
| 货币:新加坡元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:新台币 | "NT$" 0.00 | n | NT$ 123.00 ||
|
||||
| 货币:新西兰元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:匈牙利福林 | "Ft" 0.00 | n | Ft 123.00 ||
|
||||
| 货币:叙利亚镑 | "£" 0.00 | n | £ 123.00 ||
|
||||
| 货币:牙买加元 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:亚美尼亚德拉姆 | "Dram" 0.00 | n | Dram 123.00 ||
|
||||
| 货币:也门里亚尔 | "Rial" 0.00 | n | Rial 123.00 ||
|
||||
| 货币:伊拉克第纳尔 | "din" 0.00 | n | din 123.00 ||
|
||||
| 货币:伊朗里亚尔 | "Rial" 0.00 | n | Rial 123.00 ||
|
||||
| 货币:以色列新谢克尔 | "?" 0.00 | n | ? 123.00 ||
|
||||
| 货币:印度卢比 | "?" 0.00 | n | ? 123.00 ||
|
||||
| 货币:印度尼西亚卢比 | "Rp" 0.00 | n | Rp 123.00 ||
|
||||
| 货币:约旦第纳尔 | "din" 0.00 | n | din 123.00 ||
|
||||
| 货币:越南盾 | "?" 0.00 | n | ? 123.00 ||
|
||||
| 货币:赞比亚克瓦查 | "ZMW" 0.00 | n | ZMW 123.00 ||
|
||||
| 货币:直布罗陀镑 | "£" 0.00 | n | £ 123.00 ||
|
||||
| 货币:智利比索 | "$" 0.00 | n | $ 123.00 ||
|
||||
| 货币:中非金融合作法郎 | "FCFA" 0.00 | n | FCFA 123.00 ||
|
||||
|
||||
以上配置参考了[Aspose.Cells](https://docs.aspose.com/display/cellsnet/List+of+Supported+Number+Formats#ListofSupportedNumberFormats-Aspose.Cells)
|
||||
@@ -1,222 +0,0 @@
|
||||
|
||||
# 贡献指南
|
||||
|
||||
欢迎!我们很高兴您能来到这里,并非常期待您能有兴趣参与 Luckysheet 贡献。当然,在您参与 Luckysheet 贡献之前,请确保通读以下全文:
|
||||
|
||||
## 我们的行为准则
|
||||
|
||||
1. 我们保证尊重所有参与贡献的人,不限于提出问题、文档和代码贡献、解决bug以及其它贡献的人;
|
||||
|
||||
2. 我们有义务遵守当地法律法规,所有的附带法律风险的行为我们都是拒绝的;
|
||||
3. 我们反对任何参与者存在贬损评论、人身攻击、骚扰或侮辱他人以及其他非专业行为;
|
||||
4. 我们有权并有责任删除或编辑与此行为准则不符的内容,不限于代码、Issues、wiki、文档以及其它。不遵守行为准则的参与者可能会被移除团队;
|
||||
5. 我们接受任何人的监督,任何人可通过问题反馈,向我们报告发现的与此行为准则不符的事实存在。
|
||||
|
||||
## 如何参与贡献?
|
||||
|
||||
* 贡献文档:浏览文档可以加深您对 Luckysheet 的了解,一旦发现文档写得不清晰或逻辑混乱的地方,可以订正、修改、补充,您可以通过 [中文论坛](https://support.qq.com/products/288322)或者 [谷歌论坛](https://groups.google.com/g/luckysheet)给予反馈
|
||||
* 贡献代码:欢迎大家为 Luckysheet 社区贡献代码,欢迎您认领Open状态的 [Issues](https://github.com/mengshukeji/Luckysheet/issues) 和未完成的特性,提交PR,成为贡献者之一如果您在使用过程中发现有些功能无法满足您的需求或出现问题,请在Issues中记录
|
||||
* 参与Issue讨论:您可以在任一 [Issues](https://github.com/mengshukeji/Luckysheet/issues) 下发表您的建议
|
||||
* Review代码:您可以在 [Github](https://github.com/mengshukeji/Luckysheet)上看到所有贡献者提交的PR,您可以Review他们的代码并发表您的建议
|
||||
|
||||
|
||||
## 如何提交 Issues
|
||||
|
||||
在您提交特性/改进前,应该注意以下几点:
|
||||
|
||||
* 请先确认该特性/改进是否被其他人已经提交
|
||||
* 一个通俗易懂的标题来阐述你提交的Bug/提交特性/改进
|
||||
* 如果是Bug则详细描述该bug产生的原因,如果能够复现,请尽量提供完整的重现步骤
|
||||
* 如果是特性,那么该特性应该有广泛的适用性,适用于大部分用户,最好能够提供详尽的设计文档
|
||||
* 如果是改进,尽可能描述清楚此改进所带来的益处
|
||||
|
||||
具体步骤:
|
||||
|
||||
* 创建 [Issues](https://github.com/mengshukeji/Luckysheet/issues) ,描述清楚问题
|
||||
* 如果你要解决该issue则将issue assign到自己名下,如果你仅仅是提交Bug/特性/改进,并没有时间去贡献代码,则assignne设置为空
|
||||
* 如果是比较大的特性/改进,尽量先输出设计文档,走 [Luckysheet RFC](https://github.com/mengshukeji/Luckysheet-rfcs) 流程,供其他人review
|
||||
|
||||
## 如何认领 Issues
|
||||
|
||||
在 Luckysheet 的 [Issues](https://github.com/mengshukeji/Luckysheet/issues) 列表中,有很多由其他人创建的issue并未被修复,如果你感兴趣的话,可以认领这些issue。认领步骤如下:
|
||||
|
||||
* 在该issue下留言,表达想认领该任务的想法,另注明 **@I can solve it** 即可
|
||||
* 如果提交者没有意见,则将该issue assign到自己名下并及时更新进度
|
||||
* 如果是比较大的特性,尽量先输出设计文档,走 [Luckysheet RFC](https://github.com/mengshukeji/Luckysheet-rfcs) 流程,供其他人review
|
||||
* 开发代码并提交代码至github
|
||||
|
||||
|
||||
## 如何提交代码
|
||||
|
||||
1. fork 到自己的仓库
|
||||
|
||||
进入 [Luckysheet](https://github.com/mengshukeji/Luckysheet) 的Github页面 ,点击右上角按钮 Fork 进行 Fork。
|
||||
|
||||
2. git clone 到本地
|
||||
|
||||
```shell
|
||||
git clone https://github.com/<your_github_name>/Luckysheet.git
|
||||
```
|
||||
|
||||
3. 上游建立连接
|
||||
|
||||
```shell
|
||||
|
||||
cd Luckysheet
|
||||
git remote add upstream https://github.com/mengshukeji/Luckysheet.git
|
||||
```
|
||||
4. 创建开发分支
|
||||
|
||||
```shell
|
||||
git checkout -b dev
|
||||
```
|
||||
|
||||
5. 修改提交代码
|
||||
|
||||
```shell
|
||||
git add .
|
||||
npm run commit
|
||||
git push origin dev
|
||||
```
|
||||
|
||||
6. 同步代码,将最新代码同步到本地
|
||||
|
||||
```shell
|
||||
git fetch upstream
|
||||
git rebase upstream/master
|
||||
```
|
||||
|
||||
7. 如果有冲突(没有可以忽略)
|
||||
|
||||
```shell
|
||||
git status # 查看冲突文件,并修改冲突
|
||||
git add .
|
||||
git rebase --continue
|
||||
```
|
||||
提交git rebase --continue命令的时候,如果弹出vim提示编辑commit信息,则可以添加你的修改,然后保存退出
|
||||
> vim命令请参考阅读[vim](https://www.runoob.com/linux/linux-vim.html)
|
||||
|
||||
8. 提交分支代码
|
||||
|
||||
```shell
|
||||
git push origin dev
|
||||
```
|
||||
|
||||
如果提示需要先pull 可以先拉取在提交
|
||||
```shell
|
||||
git pull origin dev
|
||||
git push origin dev
|
||||
```
|
||||
若弹出vim提示编辑commit信息,可以直接通过vim命令退出
|
||||
> vim命令请参考阅读[vim](https://www.runoob.com/linux/linux-vim.html)
|
||||
|
||||
9. 提交pr
|
||||
去自己github仓库对应fork的项目,切换到刚刚创建修改的分支,点击new pull request,并添加上对应的描述,最后点击Create pull request进行提交
|
||||
|
||||
## 代码规范
|
||||
|
||||
> 一般性的代码规范示例
|
||||
|
||||
* 保持块深度最小。尽可能避免嵌套If条件
|
||||
```js
|
||||
// CORRECT
|
||||
if (!comparison) return
|
||||
|
||||
if (variable) {
|
||||
for (const item of items) {}
|
||||
} else if (variable2) {
|
||||
// Do something here
|
||||
}
|
||||
|
||||
// INCORRECT
|
||||
if (comparison) {
|
||||
if (variable) {
|
||||
for (const item in items) {}
|
||||
} else if (variable2) {
|
||||
// Do something here
|
||||
}
|
||||
} else {
|
||||
return
|
||||
}
|
||||
```
|
||||
|
||||
* 不要使用操作数进行链比较
|
||||
```js
|
||||
// CORRECT
|
||||
|
||||
if (cb) cb()
|
||||
if (!cb || (cb === fn)) cb()
|
||||
|
||||
// INCORRECT
|
||||
|
||||
cb && cb()
|
||||
(!cb || (cb === fn)) && cb()
|
||||
```
|
||||
|
||||
* 所有变量都应该按字母顺序在块的开头声明
|
||||
```js
|
||||
// CORRECT
|
||||
function foo () {
|
||||
const foo = 'bar'
|
||||
const bar = 'foo'
|
||||
|
||||
if (conditional) {}
|
||||
|
||||
...
|
||||
|
||||
return foo
|
||||
}
|
||||
|
||||
// INCORRECT
|
||||
|
||||
function foo () {
|
||||
const foo = 'bar'
|
||||
|
||||
if (conditional) {}
|
||||
|
||||
const bar = 'foo'
|
||||
|
||||
...
|
||||
|
||||
return foo
|
||||
}
|
||||
```
|
||||
|
||||
* 尽快返回
|
||||
```js
|
||||
// CORRECT
|
||||
if (condition) return 'foo'
|
||||
if (condition2) return 'bar'
|
||||
// Return must have a blank line above
|
||||
return 'fizz'
|
||||
|
||||
// INCORRECT
|
||||
const variable = ''
|
||||
|
||||
if (condition) {
|
||||
variable = 'foo'
|
||||
} else if (condition2) {
|
||||
variable = 'bar'
|
||||
} else {
|
||||
variable = 'fizz'
|
||||
}
|
||||
|
||||
return variable
|
||||
```
|
||||
|
||||
## 如何贡献文档
|
||||
|
||||
## 如何成为Luckysheet Committer
|
||||
|
||||
任何人只要对 Luckysheet 项目做了贡献,那您就是官方承认的 Luckysheet 项目的Contributor了,从Contributor成长为Committer并没有一个确切的标准, 也没有任何预期的时间表,但是Committer的候选人一般都是长期活跃的贡献者,成为Committer并没有要求必须有巨大的架构改进贡献, 或者多少行的代码贡献,贡献代码、贡献文档、参与邮件列表的讨论、帮助回答问题等等都提升自己影响力的方式。
|
||||
|
||||
潜在贡献清单(无特定顺序):
|
||||
|
||||
* 提交自己发现的Bug、特性、改进到issue
|
||||
* 更新官方文档使项目的文档是最近的、撰写 Luckysheet 的最佳实践、特性剖析的各种对用户有用的文档
|
||||
* 执行测试并报告测试结果,性能测试与其他MQ的性能对比测试等
|
||||
* 审查(Review)其他人的工作(包括代码和非代码)并发表你自己的建议
|
||||
* 指导新加入的贡献者,熟悉社区流程
|
||||
* 发表关于 Luckysheet 的博客
|
||||
* 有利于 Luckysheet 社区发展的任何贡献
|
||||
* ......
|
||||
@@ -1,33 +0,0 @@
|
||||
# 教程与资源
|
||||
|
||||
开源软件离不开社区的贡献,这里将会列举出社区提供的教程、学习资料及配套解决方案。
|
||||
|
||||
如果您写了或者发现了优秀的教程想要推荐给我们,请直接[编辑此页](https://github.com/mengshukeji/Luckysheet/edit/master/docs/zh/guide/resource.md)提交PR。
|
||||
|
||||
## 博客
|
||||
- [Luckysheet如何初始化含合并单元格的数据](https://www.cnblogs.com/DuShuSir/p/13272397.html)
|
||||
- [Luckysheet如何把表格里的数据保存到数据库](https://www.cnblogs.com/DuShuSir/p/13857874.html)
|
||||
- [本地HTML采用cdn加载方式引入Luckysheet的案例](https://www.cnblogs.com/DuShuSir/p/13859103.html)
|
||||
- [Luckysheet基础用法,使用loadUrl加载服务端数据](https://blog.csdn.net/DCDC2020/article/details/108486525)
|
||||
- [Luckysheet 导入与导出实现 - Java后台处理](https://blog.csdn.net/u014632228/article/details/109738221)
|
||||
|
||||
## 前端案例
|
||||
|
||||
### 社区案例
|
||||
- [luckysheet-vue-importAndExport](https://github.com/oy-paddy/luckysheet-vue-importAndExport/tree/master/)
|
||||
|
||||
## 后端案例
|
||||
|
||||
### 官方案例
|
||||
- [Java 后台 Luckysheet Server](https://github.com/mengshukeji/LuckysheetServer)
|
||||
|
||||
### 社区案例
|
||||
- [Luckysheet保存与恢复](https://gitee.com/ichiva/luckysheet-saved-in-recovery)(Java版)
|
||||
- [基于Luckysheet实现的协同编辑在线表格](https://github.com/DilemmaVi/ecsheet)(Java版)
|
||||
- [简易的Express服务端示例 个人应用模板](https://github.com/TitanRGB/Luckysheet-ExpressReact-Example) (Node-Express版)
|
||||
- [使用.net core 3.1和Npoi 制作基于LuckSheet的基础导出](https://gitee.com/xiong-kangli/luck-sheet_.-net-core)(.NET 版本)
|
||||
- [go语言版本的协同编辑](https://github.com/fandypeng/excel2config)(Go 版本)
|
||||
|
||||
## 学习资料
|
||||
|
||||
- [如何从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)
|
||||
@@ -1,302 +0,0 @@
|
||||
const gulp = require('gulp');
|
||||
// gulp core function
|
||||
const { src, dest, series, parallel, watch } = require('gulp');
|
||||
// gulp compress js
|
||||
const uglify = require('gulp-uglify');
|
||||
// gulp judgment
|
||||
const gulpif = require('gulp-if');
|
||||
// gulp compress css
|
||||
const cleanCSS = require('gulp-clean-css');
|
||||
// Delete Files
|
||||
const del = require('delete');
|
||||
// Refresh the browser in real time
|
||||
const browserSync = require('browser-sync').create();
|
||||
const reload = browserSync.reload;
|
||||
// proxy
|
||||
const { createProxyMiddleware } = require('http-proxy-middleware');
|
||||
// According to html reference, files are merged
|
||||
// const useref = require('gulp-useref');
|
||||
// File merge
|
||||
const concat = require('gulp-concat');
|
||||
// rollup packaging, processing es6 modules
|
||||
const { rollup } = require('rollup');
|
||||
// rollup looks for node_modules module
|
||||
const { nodeResolve } = require('@rollup/plugin-node-resolve');
|
||||
// rollup converts commonjs module to es6 module
|
||||
const commonjs = require('@rollup/plugin-commonjs');
|
||||
// rollup code compression
|
||||
const terser = require('rollup-plugin-terser').terser;
|
||||
// rollup babel plugin, support the latest ES grammar
|
||||
const babel = require('@rollup/plugin-babel').default;
|
||||
// const gulpBabel = require('gulp-babel');
|
||||
// Distinguish development and production environments
|
||||
const production = process.env.NODE_ENV === 'production' ? true : false;
|
||||
|
||||
const pkg = require('./package.json');
|
||||
const banner = `/*! @preserve
|
||||
* ${pkg.name}
|
||||
* version: ${pkg.version}
|
||||
* https://github.com/mengshukeji/Luckysheet
|
||||
*/`;
|
||||
|
||||
// uglify js Compression configuration https://github.com/mishoo/UglifyJS#minify-options
|
||||
const uglifyOptions = {
|
||||
compress: {
|
||||
drop_console: true
|
||||
}
|
||||
}
|
||||
|
||||
// babel config
|
||||
const babelConfig = {
|
||||
compact:false,
|
||||
babelHelpers: 'bundled',
|
||||
exclude: 'node_modules/**', // Only compile our source code
|
||||
plugins: [
|
||||
],
|
||||
presets: [
|
||||
['@babel/preset-env', {
|
||||
useBuiltIns: 'usage',
|
||||
corejs: 3,
|
||||
targets: {
|
||||
chrome: 58,
|
||||
ie: 11
|
||||
}
|
||||
}]
|
||||
]
|
||||
};
|
||||
|
||||
// file handler paths
|
||||
const paths = {
|
||||
// static resources,contains index.html, fonts and images,and extension plugins dependency
|
||||
staticHtml: ['src/*.html'],
|
||||
staticFonts: ['src/fonts/**'],
|
||||
staticAssets: ['src/assets/**'],
|
||||
staticImages: ['src/plugins/images/*.png'],
|
||||
staticExpendPlugins: ['src/expendPlugins/**', '!src/expendPlugins/**/plugin.js'],
|
||||
staticDemoData: ['src/demoData/*.js'],
|
||||
staticCssImages: ['src/css/**','!src/css/*.css'],
|
||||
|
||||
// static resources dest
|
||||
destStaticHtml: ['dist'],
|
||||
destStaticFonts: ['dist/fonts'],
|
||||
destStaticAssets: ['dist/assets'],
|
||||
destStaticImages: ['dist/plugins/images'],
|
||||
destStaticExpendPlugins: ['dist/expendPlugins'],
|
||||
destStaticDemoData: ['dist/demoData'],
|
||||
destStaticCssImages: ['dist/css'],
|
||||
|
||||
//core es module
|
||||
core: ['src/**/*.js','!src/demoData/*.js','src/expendPlugins/**/plugin.js','!src/plugins/js/*.js'],
|
||||
|
||||
//plugins src
|
||||
pluginsCss: ['src/plugins/css/*.css'],
|
||||
plugins: ['src/plugins/*.css'],
|
||||
css:['src/css/*.css','node_modules/flatpickr/dist/themes/light.css'],
|
||||
pluginsJs:[
|
||||
'node_modules/jquery/dist/jquery.min.js',
|
||||
'node_modules/uuid/dist/umd/uuid.min.js',
|
||||
'src/plugins/js/clipboard.min.js',
|
||||
'src/plugins/js/spectrum.min.js',
|
||||
'src/plugins/js/jquery-ui.min.js',
|
||||
'src/plugins/js/jquery.mousewheel.min.js',
|
||||
// 'src/plugins/js/numeral.min.js',
|
||||
'src/plugins/js/html2canvas.min.js',
|
||||
'src/plugins/js/localforage.min.js',
|
||||
'src/plugins/js/lodash.min.js',
|
||||
'src/plugins/js/jstat.min.js',
|
||||
'src/plugins/js/crypto-api.min.js',
|
||||
'src/plugins/js/jquery.sPage.min.js'
|
||||
],
|
||||
|
||||
//plugins concat
|
||||
concatPluginsCss: 'pluginsCss.css',
|
||||
concatPlugins: 'plugins.css',
|
||||
concatCss: 'luckysheet.css',
|
||||
concatPluginsJs: 'plugin.js',
|
||||
|
||||
//plugins dest
|
||||
destPluginsCss: ['dist/plugins/css'],
|
||||
destPlugins: ['dist/plugins'],
|
||||
destCss: ['dist/css'],
|
||||
destPluginsJs: ['dist/plugins/js'],
|
||||
|
||||
// Package directory
|
||||
dist: 'dist',
|
||||
};
|
||||
|
||||
// Clear the dist directory
|
||||
function clean() {
|
||||
return del([paths.dist]);
|
||||
}
|
||||
|
||||
// proxy middleware
|
||||
const apiProxy = createProxyMiddleware('/luckysheet/', {
|
||||
target: 'http://luckysheet.lashuju.com/', // set your server address
|
||||
changeOrigin: true, // for vhosted sites
|
||||
ws: true, // proxy websockets
|
||||
});
|
||||
|
||||
// Static server
|
||||
function serve(done) {
|
||||
browserSync.init({
|
||||
server: {
|
||||
baseDir: paths.dist,
|
||||
middleware: [apiProxy],//proxy
|
||||
},
|
||||
ghostMode: false, //默认true,滚动和表单在任何设备上输入将被镜像到所有设备里,会影响本地的协同编辑消息,故关闭
|
||||
}, done)
|
||||
}
|
||||
|
||||
// Monitoring file changes
|
||||
function watcher(done) {
|
||||
watch(paths.core,{ delay: 500 }, series(core, reloadBrowser));
|
||||
|
||||
// watch plugins and css
|
||||
watch(paths.pluginsCss,{ delay: 500 }, series(pluginsCss, reloadBrowser));
|
||||
watch(paths.plugins,{ delay: 500 }, series(plugins, reloadBrowser));
|
||||
watch(paths.css,{ delay: 500 }, series(css, reloadBrowser));
|
||||
watch(paths.pluginsJs,{ delay: 500 }, series(pluginsJs, reloadBrowser));
|
||||
|
||||
// watch static
|
||||
watch(paths.staticHtml,{ delay: 500 }, series(copyStaticHtml, reloadBrowser));
|
||||
watch(paths.staticFonts,{ delay: 500 }, series(copyStaticFonts, reloadBrowser));
|
||||
watch(paths.staticAssets,{ delay: 500 }, series(copyStaticAssets, reloadBrowser));
|
||||
watch(paths.staticImages,{ delay: 500 }, series(copyStaticImages, reloadBrowser));
|
||||
watch(paths.staticExpendPlugins,{ delay: 500 }, series(copyStaticExpendPlugins, reloadBrowser));
|
||||
watch(paths.staticDemoData,{ delay: 500 }, series(copyStaticDemoData, reloadBrowser));
|
||||
watch(paths.staticCssImages,{ delay: 500 }, series(copyStaticCssImages, reloadBrowser));
|
||||
|
||||
done();
|
||||
}
|
||||
|
||||
// Refresh browser
|
||||
function reloadBrowser(done) {
|
||||
reload();
|
||||
|
||||
done();
|
||||
}
|
||||
|
||||
//Package the core code
|
||||
async function core_rollup() {
|
||||
const bundle = await rollup({
|
||||
input: 'src/index.js',
|
||||
plugins: [
|
||||
nodeResolve(), // tells Rollup how to find date-fns in node_modules
|
||||
commonjs(), // converts date-fns to ES modules
|
||||
// postcss({
|
||||
// plugins: [],
|
||||
// extract: true,
|
||||
// // minimize: isProductionEnv,
|
||||
// }),
|
||||
production && terser(), // minify, but only in production
|
||||
babel(babelConfig)
|
||||
],
|
||||
});
|
||||
|
||||
bundle.write({
|
||||
file: 'dist/luckysheet.umd.js',
|
||||
format: 'umd',
|
||||
name: 'luckysheet',
|
||||
sourcemap: true,
|
||||
inlineDynamicImports:true,
|
||||
banner: banner
|
||||
});
|
||||
|
||||
if(production){
|
||||
bundle.write({
|
||||
file: 'dist/luckysheet.esm.js',
|
||||
format: 'esm',
|
||||
name: 'luckysheet',
|
||||
sourcemap: true,
|
||||
inlineDynamicImports:true,
|
||||
banner: banner
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async function core() {
|
||||
|
||||
await require('esbuild').buildSync({
|
||||
format: 'iife',
|
||||
globalName: 'luckysheet',
|
||||
entryPoints: ['src/index.js'],
|
||||
bundle: true,
|
||||
minify: production,
|
||||
banner: { js: banner },
|
||||
target: ['es2015'],
|
||||
sourcemap: true,
|
||||
outfile: 'dist/luckysheet.umd.js',
|
||||
})
|
||||
}
|
||||
|
||||
// According to the build tag in html, package js and css
|
||||
function pluginsCss() {
|
||||
return src(paths.pluginsCss)
|
||||
.pipe(concat(paths.concatPluginsCss))
|
||||
.pipe(gulpif(production, cleanCSS()))
|
||||
.pipe(dest(paths.destPluginsCss))
|
||||
|
||||
}
|
||||
|
||||
function plugins() {
|
||||
return src(paths.plugins)
|
||||
.pipe(concat(paths.concatPlugins))
|
||||
.pipe(gulpif(production, cleanCSS()))
|
||||
.pipe(dest(paths.destPlugins));
|
||||
}
|
||||
|
||||
function css() {
|
||||
return src(paths.css)
|
||||
.pipe(concat(paths.concatCss))
|
||||
.pipe(gulpif(production, cleanCSS()))
|
||||
.pipe(dest(paths.destCss));
|
||||
}
|
||||
|
||||
function pluginsJs() {
|
||||
return src(paths.pluginsJs)
|
||||
.pipe(concat(paths.concatPluginsJs))
|
||||
.pipe(gulpif(production, uglify(uglifyOptions)))
|
||||
.pipe(dest(paths.destPluginsJs));
|
||||
}
|
||||
|
||||
// Copy static resources
|
||||
function copyStaticHtml(){
|
||||
return src(paths.staticHtml)
|
||||
.pipe(dest(paths.destStaticHtml));
|
||||
}
|
||||
function copyStaticFonts(){
|
||||
return src(paths.staticFonts)
|
||||
.pipe(dest(paths.destStaticFonts));
|
||||
}
|
||||
function copyStaticAssets(){
|
||||
return src(paths.staticAssets)
|
||||
.pipe(dest(paths.destStaticAssets));
|
||||
}
|
||||
function copyStaticImages(){
|
||||
return src(paths.staticImages)
|
||||
.pipe(dest(paths.destStaticImages));
|
||||
}
|
||||
function copyStaticExpendPlugins(){
|
||||
return src(paths.staticExpendPlugins)
|
||||
.pipe(dest(paths.destStaticExpendPlugins));
|
||||
}
|
||||
function copyStaticDemoData(){
|
||||
return src(paths.staticDemoData)
|
||||
.pipe(dest(paths.destStaticDemoData));
|
||||
// .pipe(gulpBabel({
|
||||
// presets: ['@babel/env']
|
||||
// }))
|
||||
// .pipe(gulp.dest('dist'));
|
||||
}
|
||||
function copyStaticCssImages(){
|
||||
return src(paths.staticCssImages)
|
||||
.pipe(dest(paths.destStaticCssImages));
|
||||
}
|
||||
|
||||
const dev = series(clean, parallel(pluginsCss, plugins, css, pluginsJs, copyStaticHtml, copyStaticFonts, copyStaticAssets, copyStaticImages, copyStaticExpendPlugins, copyStaticDemoData, copyStaticCssImages, core), watcher, serve);
|
||||
const build = series(clean, parallel(pluginsCss, plugins, css, pluginsJs, copyStaticHtml, copyStaticFonts, copyStaticAssets, copyStaticImages, copyStaticExpendPlugins, copyStaticDemoData, copyStaticCssImages, core));
|
||||
|
||||
exports.dev = dev;
|
||||
exports.build = build;
|
||||
exports.default = dev;
|
||||
@@ -1,67 +0,0 @@
|
||||
{
|
||||
"name": "luckysheet",
|
||||
"version": "2.1.13",
|
||||
"main": "dist/luckysheet.cjs.js",
|
||||
"module": "dist/luckysheet.esm.js",
|
||||
"browser": "dist/luckysheet.umd.js",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.3",
|
||||
"@babel/preset-env": "^7.12.1",
|
||||
"@babel/runtime-corejs3": "^7.12.1",
|
||||
"@commitlint/cli": "^9.1.1",
|
||||
"@commitlint/config-conventional": "^9.1.1",
|
||||
"@rollup/plugin-babel": "^5.2.1",
|
||||
"@rollup/plugin-commonjs": "^13.0.0",
|
||||
"@rollup/plugin-node-resolve": "^8.0.1",
|
||||
"browser-sync": "^2.26.7",
|
||||
"commitizen": "^4.1.2",
|
||||
"cross-env": "^7.0.2",
|
||||
"delete": "^1.1.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-babel": "^8.0.0",
|
||||
"gulp-clean-css": "^4.3.0",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-if": "^3.0.0",
|
||||
"gulp-uglify": "^3.0.2",
|
||||
"gulp-useref": "^4.0.1",
|
||||
"http-proxy-middleware": "^1.0.6",
|
||||
"prettier": "2.8.8",
|
||||
"rollup": "^2.32.1",
|
||||
"rollup-plugin-terser": "^6.1.0",
|
||||
"standard-version": "^8.0.2",
|
||||
"uuid": "^8.3.2",
|
||||
"vuepress": "^1.5.0",
|
||||
"vuepress-plugin-baidu-autopush": "^1.0.1",
|
||||
"vuepress-plugin-code-copy": "^1.0.6",
|
||||
"vuepress-plugin-seo": "^0.1.4",
|
||||
"vuepress-plugin-sitemap": "^2.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.12.1",
|
||||
"dayjs": "^1.9.6",
|
||||
"esbuild": "^0.11.6",
|
||||
"escape-html": "^1.0.3",
|
||||
"flatpickr": "^4.6.6",
|
||||
"jquery": "^2.2.4",
|
||||
"numeral": "^2.0.6",
|
||||
"pako": "^1.0.11"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "cross-env NODE_ENV=production gulp build",
|
||||
"dev": "cross-env NODE_ENV=development gulp dev",
|
||||
"docs:dev": "vuepress dev docs",
|
||||
"docs:build": "vuepress build docs",
|
||||
"commit": "git-cz",
|
||||
"release": "standard-version",
|
||||
"prettier": "npx prettier --check .",
|
||||
"prettier:fix": "npx prettier -w ."
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,539 +0,0 @@
|
||||
/* Logo 字体 */
|
||||
@font-face {
|
||||
font-family: "iconfont logo";
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-family: "iconfont logo";
|
||||
font-size: 160px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* tabs */
|
||||
.nav-tabs {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-more {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#tabs {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
#tabs li {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
border-bottom: 2px solid transparent;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-bottom: -1px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
|
||||
#tabs .active {
|
||||
border-bottom-color: #f00;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.tab-container .content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 页面布局 */
|
||||
.main {
|
||||
padding: 30px 100px;
|
||||
width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.main .logo {
|
||||
color: #333;
|
||||
text-align: left;
|
||||
margin-bottom: 30px;
|
||||
line-height: 1;
|
||||
height: 110px;
|
||||
margin-top: -50px;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.main .logo a {
|
||||
font-size: 160px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.helps {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.helps pre {
|
||||
padding: 20px;
|
||||
margin: 10px 0;
|
||||
border: solid 1px #e7e1cd;
|
||||
background-color: #fffdef;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.icon_lists {
|
||||
width: 100% !important;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.icon_lists li {
|
||||
width: 100px;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 20px;
|
||||
text-align: center;
|
||||
list-style: none !important;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.icon_lists li .code-name {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.icon_lists .icon {
|
||||
display: block;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
font-size: 42px;
|
||||
margin: 10px auto;
|
||||
color: #333;
|
||||
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
|
||||
-moz-transition: font-size 0.25s linear, width 0.25s linear;
|
||||
transition: font-size 0.25s linear, width 0.25s linear;
|
||||
}
|
||||
|
||||
.icon_lists .icon:hover {
|
||||
font-size: 100px;
|
||||
}
|
||||
|
||||
.icon_lists .svg-icon {
|
||||
/* 通过设置 font-size 来改变图标大小 */
|
||||
width: 1em;
|
||||
/* 图标和文字相邻时,垂直对齐 */
|
||||
vertical-align: -0.15em;
|
||||
/* 通过设置 color 来改变 SVG 的颜色/fill */
|
||||
fill: currentColor;
|
||||
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
|
||||
normalize.css 中也包含这行 */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.icon_lists li .name,
|
||||
.icon_lists li .code-name {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* markdown 样式 */
|
||||
.markdown {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.markdown img {
|
||||
vertical-align: middle;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
color: #404040;
|
||||
font-weight: 500;
|
||||
line-height: 40px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.markdown h2,
|
||||
.markdown h3,
|
||||
.markdown h4,
|
||||
.markdown h5,
|
||||
.markdown h6 {
|
||||
color: #404040;
|
||||
margin: 1.6em 0 0.6em 0;
|
||||
font-weight: 500;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.markdown h1 {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.markdown h2 {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.markdown h3 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.markdown h4 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.markdown h5 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown h6 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown hr {
|
||||
height: 1px;
|
||||
border: 0;
|
||||
background: #e9e9e9;
|
||||
margin: 16px 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.markdown p {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.markdown>p,
|
||||
.markdown>blockquote,
|
||||
.markdown>.highlight,
|
||||
.markdown>ol,
|
||||
.markdown>ul {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.markdown ul>li {
|
||||
list-style: circle;
|
||||
}
|
||||
|
||||
.markdown>ul li,
|
||||
.markdown blockquote ul>li {
|
||||
margin-left: 20px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.markdown>ul li p,
|
||||
.markdown>ol li p {
|
||||
margin: 0.6em 0;
|
||||
}
|
||||
|
||||
.markdown ol>li {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
.markdown>ol li,
|
||||
.markdown blockquote ol>li {
|
||||
margin-left: 20px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.markdown code {
|
||||
margin: 0 3px;
|
||||
padding: 0 5px;
|
||||
background: #eee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.markdown strong,
|
||||
.markdown b {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown>table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0px;
|
||||
empty-cells: show;
|
||||
border: 1px solid #e9e9e9;
|
||||
width: 95%;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.markdown>table th {
|
||||
white-space: nowrap;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown>table th,
|
||||
.markdown>table td {
|
||||
border: 1px solid #e9e9e9;
|
||||
padding: 8px 16px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.markdown>table th {
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
.markdown blockquote {
|
||||
font-size: 90%;
|
||||
color: #999;
|
||||
border-left: 4px solid #e9e9e9;
|
||||
padding-left: 0.8em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.markdown blockquote p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.markdown .anchor {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.markdown .waiting {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.markdown h1:hover .anchor,
|
||||
.markdown h2:hover .anchor,
|
||||
.markdown h3:hover .anchor,
|
||||
.markdown h4:hover .anchor,
|
||||
.markdown h5:hover .anchor,
|
||||
.markdown h6:hover .anchor {
|
||||
opacity: 1;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.markdown>br,
|
||||
.markdown>p>br {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
background: white;
|
||||
padding: 0.5em;
|
||||
color: #333333;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-meta {
|
||||
color: #969896;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-strong,
|
||||
.hljs-emphasis,
|
||||
.hljs-quote {
|
||||
color: #df5000;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-type {
|
||||
color: #a71d5d;
|
||||
}
|
||||
|
||||
.hljs-literal,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-attribute {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-name {
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-attr,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
color: #55a532;
|
||||
background-color: #eaffea;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
color: #bd2c00;
|
||||
background-color: #ffecec;
|
||||
}
|
||||
|
||||
.hljs-link {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* 代码高亮 */
|
||||
/* PrismJS 1.15.0
|
||||
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
|
||||
/**
|
||||
* prism.js default theme for JavaScript, CSS and HTML
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
* @author Lea Verou
|
||||
*/
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: black;
|
||||
background: none;
|
||||
text-shadow: 0 1px white;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre)>code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #f5f2f0;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre)>code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: slategray;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #905;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #690;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #9a6e3a;
|
||||
background: hsla(0, 0%, 100%, .5);
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #07a;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.class-name {
|
||||
color: #DD4A68;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
@@ -1,779 +0,0 @@
|
||||
{
|
||||
"id": "1990368",
|
||||
"name": "lucksheet",
|
||||
"font_family": "iconfont",
|
||||
"css_prefix_text": "luckysheet-iconfont-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "17878780",
|
||||
"name": "链接",
|
||||
"font_class": "lianjie",
|
||||
"unicode": "e7f8",
|
||||
"unicode_decimal": 59384
|
||||
},
|
||||
{
|
||||
"icon_id": "17612330",
|
||||
"name": "打印区域",
|
||||
"font_class": "dayinquyu",
|
||||
"unicode": "e7f5",
|
||||
"unicode_decimal": 59381
|
||||
},
|
||||
{
|
||||
"icon_id": "17612331",
|
||||
"name": "打印页面配置",
|
||||
"font_class": "dayinyemianpeizhi",
|
||||
"unicode": "e7f6",
|
||||
"unicode_decimal": 59382
|
||||
},
|
||||
{
|
||||
"icon_id": "17612332",
|
||||
"name": "打印标题",
|
||||
"font_class": "dayinbiaoti",
|
||||
"unicode": "e7f7",
|
||||
"unicode_decimal": 59383
|
||||
},
|
||||
{
|
||||
"icon_id": "17600443",
|
||||
"name": "分页预览",
|
||||
"font_class": "fenyeyulan",
|
||||
"unicode": "e7f2",
|
||||
"unicode_decimal": 59378
|
||||
},
|
||||
{
|
||||
"icon_id": "17600444",
|
||||
"name": "普通",
|
||||
"font_class": "putong",
|
||||
"unicode": "e7f3",
|
||||
"unicode_decimal": 59379
|
||||
},
|
||||
{
|
||||
"icon_id": "17600445",
|
||||
"name": "页面布局",
|
||||
"font_class": "yemianbuju",
|
||||
"unicode": "e7f4",
|
||||
"unicode_decimal": 59380
|
||||
},
|
||||
{
|
||||
"icon_id": "17597312",
|
||||
"name": "表格锁定",
|
||||
"font_class": "biaogesuoding",
|
||||
"unicode": "e7ee",
|
||||
"unicode_decimal": 59374
|
||||
},
|
||||
{
|
||||
"icon_id": "17444514",
|
||||
"name": "转到",
|
||||
"font_class": "zhuandao1",
|
||||
"unicode": "e7f1",
|
||||
"unicode_decimal": 59377
|
||||
},
|
||||
{
|
||||
"icon_id": "17444503",
|
||||
"name": "右箭头",
|
||||
"font_class": "youjiantou",
|
||||
"unicode": "e7ed",
|
||||
"unicode_decimal": 59373
|
||||
},
|
||||
{
|
||||
"icon_id": "17444507",
|
||||
"name": "菜单",
|
||||
"font_class": "caidan2",
|
||||
"unicode": "e7ef",
|
||||
"unicode_decimal": 59375
|
||||
},
|
||||
{
|
||||
"icon_id": "17444508",
|
||||
"name": "替换",
|
||||
"font_class": "tihuan",
|
||||
"unicode": "e7f0",
|
||||
"unicode_decimal": 59376
|
||||
},
|
||||
{
|
||||
"icon_id": "17392794",
|
||||
"name": "冻结",
|
||||
"font_class": "dongjie1",
|
||||
"unicode": "e7e1",
|
||||
"unicode_decimal": 59361
|
||||
},
|
||||
{
|
||||
"icon_id": "17392795",
|
||||
"name": "剪",
|
||||
"font_class": "jian1",
|
||||
"unicode": "e7e2",
|
||||
"unicode_decimal": 59362
|
||||
},
|
||||
{
|
||||
"icon_id": "17392796",
|
||||
"name": "加",
|
||||
"font_class": "jia1",
|
||||
"unicode": "e7e3",
|
||||
"unicode_decimal": 59363
|
||||
},
|
||||
{
|
||||
"icon_id": "17392797",
|
||||
"name": "溢出",
|
||||
"font_class": "yichu1",
|
||||
"unicode": "e7e4",
|
||||
"unicode_decimal": 59364
|
||||
},
|
||||
{
|
||||
"icon_id": "17392798",
|
||||
"name": "升序",
|
||||
"font_class": "shengxu1",
|
||||
"unicode": "e7e5",
|
||||
"unicode_decimal": 59365
|
||||
},
|
||||
{
|
||||
"icon_id": "17392799",
|
||||
"name": "内框线",
|
||||
"font_class": "neikuangxian",
|
||||
"unicode": "e7e6",
|
||||
"unicode_decimal": 59366
|
||||
},
|
||||
{
|
||||
"icon_id": "17392800",
|
||||
"name": "清除筛选",
|
||||
"font_class": "qingchushaixuan",
|
||||
"unicode": "e7e7",
|
||||
"unicode_decimal": 59367
|
||||
},
|
||||
{
|
||||
"icon_id": "17392801",
|
||||
"name": "文本向上",
|
||||
"font_class": "wenbenxiangshang",
|
||||
"unicode": "e7e8",
|
||||
"unicode_decimal": 59368
|
||||
},
|
||||
{
|
||||
"icon_id": "17392802",
|
||||
"name": "降序",
|
||||
"font_class": "jiangxu1",
|
||||
"unicode": "e7e9",
|
||||
"unicode_decimal": 59369
|
||||
},
|
||||
{
|
||||
"icon_id": "17392803",
|
||||
"name": "内框横线",
|
||||
"font_class": "neikuanghengxian",
|
||||
"unicode": "e7ea",
|
||||
"unicode_decimal": 59370
|
||||
},
|
||||
{
|
||||
"icon_id": "17392804",
|
||||
"name": "内框竖线",
|
||||
"font_class": "neikuangshuxian",
|
||||
"unicode": "e7eb",
|
||||
"unicode_decimal": 59371
|
||||
},
|
||||
{
|
||||
"icon_id": "17392805",
|
||||
"name": "自定义排序",
|
||||
"font_class": "zidingyipaixu",
|
||||
"unicode": "e7ec",
|
||||
"unicode_decimal": 59372
|
||||
},
|
||||
{
|
||||
"icon_id": "16746498",
|
||||
"name": "logo2",
|
||||
"font_class": "logo2",
|
||||
"unicode": "e7df",
|
||||
"unicode_decimal": 59359
|
||||
},
|
||||
{
|
||||
"icon_id": "16746532",
|
||||
"name": "logo",
|
||||
"font_class": "logo",
|
||||
"unicode": "e7e0",
|
||||
"unicode_decimal": 59360
|
||||
},
|
||||
{
|
||||
"icon_id": "16730159",
|
||||
"name": "文本倾斜",
|
||||
"font_class": "wenbenqingxie1",
|
||||
"unicode": "e7de",
|
||||
"unicode_decimal": 59358
|
||||
},
|
||||
{
|
||||
"icon_id": "16728412",
|
||||
"name": "加粗",
|
||||
"font_class": "jiacu",
|
||||
"unicode": "e7d9",
|
||||
"unicode_decimal": 59353
|
||||
},
|
||||
{
|
||||
"icon_id": "16728080",
|
||||
"name": "搜索",
|
||||
"font_class": "sousuo",
|
||||
"unicode": "e78a",
|
||||
"unicode_decimal": 59274
|
||||
},
|
||||
{
|
||||
"icon_id": "16728081",
|
||||
"name": "关闭",
|
||||
"font_class": "guanbi",
|
||||
"unicode": "e78b",
|
||||
"unicode_decimal": 59275
|
||||
},
|
||||
{
|
||||
"icon_id": "16728082",
|
||||
"name": "下一个",
|
||||
"font_class": "xiayige",
|
||||
"unicode": "e78c",
|
||||
"unicode_decimal": 59276
|
||||
},
|
||||
{
|
||||
"icon_id": "16728083",
|
||||
"name": "下拉",
|
||||
"font_class": "xiala",
|
||||
"unicode": "e78d",
|
||||
"unicode_decimal": 59277
|
||||
},
|
||||
{
|
||||
"icon_id": "16728084",
|
||||
"name": "文本颜色",
|
||||
"font_class": "wenbenyanse",
|
||||
"unicode": "e78e",
|
||||
"unicode_decimal": 59278
|
||||
},
|
||||
{
|
||||
"icon_id": "16728085",
|
||||
"name": "上一个",
|
||||
"font_class": "shangyige",
|
||||
"unicode": "e78f",
|
||||
"unicode_decimal": 59279
|
||||
},
|
||||
{
|
||||
"icon_id": "16728086",
|
||||
"name": "数据透视",
|
||||
"font_class": "shujutoushi",
|
||||
"unicode": "e790",
|
||||
"unicode_decimal": 59280
|
||||
},
|
||||
{
|
||||
"icon_id": "16728087",
|
||||
"name": "填充",
|
||||
"font_class": "tianchong",
|
||||
"unicode": "e791",
|
||||
"unicode_decimal": 59281
|
||||
},
|
||||
{
|
||||
"icon_id": "16728088",
|
||||
"name": "增加小数位",
|
||||
"font_class": "zengjiaxiaoshuwei",
|
||||
"unicode": "e792",
|
||||
"unicode_decimal": 59282
|
||||
},
|
||||
{
|
||||
"icon_id": "16728089",
|
||||
"name": "编辑2",
|
||||
"font_class": "bianji2",
|
||||
"unicode": "e793",
|
||||
"unicode_decimal": 59283
|
||||
},
|
||||
{
|
||||
"icon_id": "16728090",
|
||||
"name": "截屏",
|
||||
"font_class": "jieping",
|
||||
"unicode": "e794",
|
||||
"unicode_decimal": 59284
|
||||
},
|
||||
{
|
||||
"icon_id": "16728092",
|
||||
"name": "减小小数位",
|
||||
"font_class": "jianxiaoxiaoshuwei",
|
||||
"unicode": "e796",
|
||||
"unicode_decimal": 59286
|
||||
},
|
||||
{
|
||||
"icon_id": "16728093",
|
||||
"name": "菜单",
|
||||
"font_class": "caidan",
|
||||
"unicode": "e797",
|
||||
"unicode_decimal": 59287
|
||||
},
|
||||
{
|
||||
"icon_id": "16728094",
|
||||
"name": "数据库",
|
||||
"font_class": "shujuku",
|
||||
"unicode": "e798",
|
||||
"unicode_decimal": 59288
|
||||
},
|
||||
{
|
||||
"icon_id": "16728095",
|
||||
"name": "无边框",
|
||||
"font_class": "wubiankuang",
|
||||
"unicode": "e799",
|
||||
"unicode_decimal": 59289
|
||||
},
|
||||
{
|
||||
"icon_id": "16728096",
|
||||
"name": "编辑",
|
||||
"font_class": "bianji",
|
||||
"unicode": "e79a",
|
||||
"unicode_decimal": 59290
|
||||
},
|
||||
{
|
||||
"icon_id": "16728097",
|
||||
"name": "清除样式",
|
||||
"font_class": "qingchuyangshi",
|
||||
"unicode": "e79b",
|
||||
"unicode_decimal": 59291
|
||||
},
|
||||
{
|
||||
"icon_id": "16728099",
|
||||
"name": "删除",
|
||||
"font_class": "shanchu",
|
||||
"unicode": "e79c",
|
||||
"unicode_decimal": 59292
|
||||
},
|
||||
{
|
||||
"icon_id": "16728100",
|
||||
"name": "文本居中对齐",
|
||||
"font_class": "wenbenjuzhongduiqi",
|
||||
"unicode": "e79d",
|
||||
"unicode_decimal": 59293
|
||||
},
|
||||
{
|
||||
"icon_id": "16728101",
|
||||
"name": "打印",
|
||||
"font_class": "dayin",
|
||||
"unicode": "e79e",
|
||||
"unicode_decimal": 59294
|
||||
},
|
||||
{
|
||||
"icon_id": "16728102",
|
||||
"name": "文本分割",
|
||||
"font_class": "wenbenfenge",
|
||||
"unicode": "e79f",
|
||||
"unicode_decimal": 59295
|
||||
},
|
||||
{
|
||||
"icon_id": "16728103",
|
||||
"name": "函数‘",
|
||||
"font_class": "hanshu",
|
||||
"unicode": "e7a0",
|
||||
"unicode_decimal": 59296
|
||||
},
|
||||
{
|
||||
"icon_id": "16728104",
|
||||
"name": "降序",
|
||||
"font_class": "jiangxu",
|
||||
"unicode": "e7a1",
|
||||
"unicode_decimal": 59297
|
||||
},
|
||||
{
|
||||
"icon_id": "16728105",
|
||||
"name": "顶部对齐",
|
||||
"font_class": "dingbuduiqi",
|
||||
"unicode": "e7a2",
|
||||
"unicode_decimal": 59298
|
||||
},
|
||||
{
|
||||
"icon_id": "16728106",
|
||||
"name": "图片",
|
||||
"font_class": "tupian",
|
||||
"unicode": "e7a3",
|
||||
"unicode_decimal": 59299
|
||||
},
|
||||
{
|
||||
"icon_id": "16728107",
|
||||
"name": "向下90",
|
||||
"font_class": "xiangxia90",
|
||||
"unicode": "e7a4",
|
||||
"unicode_decimal": 59300
|
||||
},
|
||||
{
|
||||
"icon_id": "16728108",
|
||||
"name": "竖排文字",
|
||||
"font_class": "shupaiwenzi",
|
||||
"unicode": "e7a5",
|
||||
"unicode_decimal": 59301
|
||||
},
|
||||
{
|
||||
"icon_id": "16728109",
|
||||
"name": "全加边框",
|
||||
"font_class": "quanjiabiankuang",
|
||||
"unicode": "e7a6",
|
||||
"unicode_decimal": 59302
|
||||
},
|
||||
{
|
||||
"icon_id": "16728110",
|
||||
"name": "升序",
|
||||
"font_class": "shengxu",
|
||||
"unicode": "e7a7",
|
||||
"unicode_decimal": 59303
|
||||
},
|
||||
{
|
||||
"icon_id": "16728111",
|
||||
"name": "裁剪",
|
||||
"font_class": "caijian",
|
||||
"unicode": "e7a8",
|
||||
"unicode_decimal": 59304
|
||||
},
|
||||
{
|
||||
"icon_id": "16728112",
|
||||
"name": "金额",
|
||||
"font_class": "jine",
|
||||
"unicode": "e7a9",
|
||||
"unicode_decimal": 59305
|
||||
},
|
||||
{
|
||||
"icon_id": "16728113",
|
||||
"name": "菜单1",
|
||||
"font_class": "caidan1",
|
||||
"unicode": "e7aa",
|
||||
"unicode_decimal": 59306
|
||||
},
|
||||
{
|
||||
"icon_id": "16728114",
|
||||
"name": "取消合并",
|
||||
"font_class": "quxiaohebing",
|
||||
"unicode": "e7ab",
|
||||
"unicode_decimal": 59307
|
||||
},
|
||||
{
|
||||
"icon_id": "16728115",
|
||||
"name": "文本下划线",
|
||||
"font_class": "wenbenxiahuaxian",
|
||||
"unicode": "e7ac",
|
||||
"unicode_decimal": 59308
|
||||
},
|
||||
{
|
||||
"icon_id": "16728116",
|
||||
"name": "上边框",
|
||||
"font_class": "shangbiankuang",
|
||||
"unicode": "e7ad",
|
||||
"unicode_decimal": 59309
|
||||
},
|
||||
{
|
||||
"icon_id": "16728117",
|
||||
"name": "定位",
|
||||
"font_class": "dingwei",
|
||||
"unicode": "e7ae",
|
||||
"unicode_decimal": 59310
|
||||
},
|
||||
{
|
||||
"icon_id": "16728118",
|
||||
"name": "四周加边框",
|
||||
"font_class": "sizhoujiabiankuang",
|
||||
"unicode": "e7af",
|
||||
"unicode_decimal": 59311
|
||||
},
|
||||
{
|
||||
"icon_id": "16728119",
|
||||
"name": "侧边栏收起",
|
||||
"font_class": "cebianlanshouqi",
|
||||
"unicode": "e7b0",
|
||||
"unicode_decimal": 59312
|
||||
},
|
||||
{
|
||||
"icon_id": "16728120",
|
||||
"name": "合并",
|
||||
"font_class": "hebing",
|
||||
"unicode": "e7b1",
|
||||
"unicode_decimal": 59313
|
||||
},
|
||||
{
|
||||
"icon_id": "16728121",
|
||||
"name": "向上倾斜",
|
||||
"font_class": "xiangshangqingxie",
|
||||
"unicode": "e7b2",
|
||||
"unicode_decimal": 59314
|
||||
},
|
||||
{
|
||||
"icon_id": "16728122",
|
||||
"name": "水平对齐",
|
||||
"font_class": "shuipingduiqi",
|
||||
"unicode": "e7b3",
|
||||
"unicode_decimal": 59315
|
||||
},
|
||||
{
|
||||
"icon_id": "16728123",
|
||||
"name": "文本删除线",
|
||||
"font_class": "wenbenshanchuxian",
|
||||
"unicode": "e7b4",
|
||||
"unicode_decimal": 59316
|
||||
},
|
||||
{
|
||||
"icon_id": "16728124",
|
||||
"name": "文本右对齐",
|
||||
"font_class": "wenbenyouduiqi",
|
||||
"unicode": "e7b5",
|
||||
"unicode_decimal": 59317
|
||||
},
|
||||
{
|
||||
"icon_id": "16728125",
|
||||
"name": "前进",
|
||||
"font_class": "qianjin",
|
||||
"unicode": "e7b6",
|
||||
"unicode_decimal": 59318
|
||||
},
|
||||
{
|
||||
"icon_id": "16728126",
|
||||
"name": "图表",
|
||||
"font_class": "tubiao",
|
||||
"unicode": "e7b7",
|
||||
"unicode_decimal": 59319
|
||||
},
|
||||
{
|
||||
"icon_id": "16728127",
|
||||
"name": "右边框",
|
||||
"font_class": "youbiankuang",
|
||||
"unicode": "e7b8",
|
||||
"unicode_decimal": 59320
|
||||
},
|
||||
{
|
||||
"icon_id": "16728128",
|
||||
"name": "百分号",
|
||||
"font_class": "baifenhao",
|
||||
"unicode": "e7b9",
|
||||
"unicode_decimal": 59321
|
||||
},
|
||||
{
|
||||
"icon_id": "16728129",
|
||||
"name": "格式刷",
|
||||
"font_class": "geshishua",
|
||||
"unicode": "e7ba",
|
||||
"unicode_decimal": 59322
|
||||
},
|
||||
{
|
||||
"icon_id": "16728130",
|
||||
"name": "保存",
|
||||
"font_class": "baocun",
|
||||
"unicode": "e7bb",
|
||||
"unicode_decimal": 59323
|
||||
},
|
||||
{
|
||||
"icon_id": "16728131",
|
||||
"name": "数据验证",
|
||||
"font_class": "shujuyanzheng",
|
||||
"unicode": "e7bc",
|
||||
"unicode_decimal": 59324
|
||||
},
|
||||
{
|
||||
"icon_id": "16728132",
|
||||
"name": "截断",
|
||||
"font_class": "jieduan",
|
||||
"unicode": "e7bd",
|
||||
"unicode_decimal": 59325
|
||||
},
|
||||
{
|
||||
"icon_id": "16728133",
|
||||
"name": "格式条件",
|
||||
"font_class": "geshitiaojian",
|
||||
"unicode": "e7be",
|
||||
"unicode_decimal": 59326
|
||||
},
|
||||
{
|
||||
"icon_id": "16728134",
|
||||
"name": "自动换行",
|
||||
"font_class": "zidonghuanhang",
|
||||
"unicode": "e7bf",
|
||||
"unicode_decimal": 59327
|
||||
},
|
||||
{
|
||||
"icon_id": "16728135",
|
||||
"name": "侧边栏展开",
|
||||
"font_class": "cebianlanzhankai",
|
||||
"unicode": "e7c0",
|
||||
"unicode_decimal": 59328
|
||||
},
|
||||
{
|
||||
"icon_id": "16728136",
|
||||
"name": "筛选2",
|
||||
"font_class": "shaixuan2",
|
||||
"unicode": "e7c1",
|
||||
"unicode_decimal": 59329
|
||||
},
|
||||
{
|
||||
"icon_id": "16728137",
|
||||
"name": "向下倾斜",
|
||||
"font_class": "xiangxiaqingxie",
|
||||
"unicode": "e7c2",
|
||||
"unicode_decimal": 59330
|
||||
},
|
||||
{
|
||||
"icon_id": "16728138",
|
||||
"name": "溢出",
|
||||
"font_class": "yichu",
|
||||
"unicode": "e7c3",
|
||||
"unicode_decimal": 59331
|
||||
},
|
||||
{
|
||||
"icon_id": "16728139",
|
||||
"name": "垂直合并",
|
||||
"font_class": "chuizhihebing",
|
||||
"unicode": "e7c4",
|
||||
"unicode_decimal": 59332
|
||||
},
|
||||
{
|
||||
"icon_id": "16728140",
|
||||
"name": "文本分散对齐",
|
||||
"font_class": "wenbenfensanduiqi",
|
||||
"unicode": "e7c5",
|
||||
"unicode_decimal": 59333
|
||||
},
|
||||
{
|
||||
"icon_id": "16728141",
|
||||
"name": "左边框",
|
||||
"font_class": "zuobiankuang",
|
||||
"unicode": "e7c6",
|
||||
"unicode_decimal": 59334
|
||||
},
|
||||
{
|
||||
"icon_id": "16728142",
|
||||
"name": "分页查看",
|
||||
"font_class": "fenyechakan",
|
||||
"unicode": "e7c7",
|
||||
"unicode_decimal": 59335
|
||||
},
|
||||
{
|
||||
"icon_id": "16728143",
|
||||
"name": "运行",
|
||||
"font_class": "yunhang",
|
||||
"unicode": "e7c8",
|
||||
"unicode_decimal": 59336
|
||||
},
|
||||
{
|
||||
"icon_id": "16728144",
|
||||
"name": "列",
|
||||
"font_class": "lie",
|
||||
"unicode": "e7c9",
|
||||
"unicode_decimal": 59337
|
||||
},
|
||||
{
|
||||
"icon_id": "16728145",
|
||||
"name": "全屏",
|
||||
"font_class": "quanping",
|
||||
"unicode": "e7ca",
|
||||
"unicode_decimal": 59338
|
||||
},
|
||||
{
|
||||
"icon_id": "16728146",
|
||||
"name": "筛选",
|
||||
"font_class": "shaixuan",
|
||||
"unicode": "e7cb",
|
||||
"unicode_decimal": 59339
|
||||
},
|
||||
{
|
||||
"icon_id": "16728147",
|
||||
"name": "更新",
|
||||
"font_class": "gengxin",
|
||||
"unicode": "e7cc",
|
||||
"unicode_decimal": 59340
|
||||
},
|
||||
{
|
||||
"icon_id": "16728148",
|
||||
"name": "清除",
|
||||
"font_class": "qingchu",
|
||||
"unicode": "e7cd",
|
||||
"unicode_decimal": 59341
|
||||
},
|
||||
{
|
||||
"icon_id": "16728149",
|
||||
"name": "行",
|
||||
"font_class": "hang",
|
||||
"unicode": "e7ce",
|
||||
"unicode_decimal": 59342
|
||||
},
|
||||
{
|
||||
"icon_id": "16728150",
|
||||
"name": "注释",
|
||||
"font_class": "zhushi",
|
||||
"unicode": "e7cf",
|
||||
"unicode_decimal": 59343
|
||||
},
|
||||
{
|
||||
"icon_id": "16728151",
|
||||
"name": "剪",
|
||||
"font_class": "jian",
|
||||
"unicode": "e7d0",
|
||||
"unicode_decimal": 59344
|
||||
},
|
||||
{
|
||||
"icon_id": "16728152",
|
||||
"name": "计算",
|
||||
"font_class": "jisuan",
|
||||
"unicode": "e7d1",
|
||||
"unicode_decimal": 59345
|
||||
},
|
||||
{
|
||||
"icon_id": "16728153",
|
||||
"name": "加",
|
||||
"font_class": "jia",
|
||||
"unicode": "e7d2",
|
||||
"unicode_decimal": 59346
|
||||
},
|
||||
{
|
||||
"icon_id": "16728154",
|
||||
"name": "底部对齐",
|
||||
"font_class": "dibuduiqi",
|
||||
"unicode": "e7d3",
|
||||
"unicode_decimal": 59347
|
||||
},
|
||||
{
|
||||
"icon_id": "16728155",
|
||||
"name": "向上90",
|
||||
"font_class": "xiangshang90",
|
||||
"unicode": "e7d4",
|
||||
"unicode_decimal": 59348
|
||||
},
|
||||
{
|
||||
"icon_id": "16728156",
|
||||
"name": "无选装",
|
||||
"font_class": "wuxuanzhuang",
|
||||
"unicode": "e7d5",
|
||||
"unicode_decimal": 59349
|
||||
},
|
||||
{
|
||||
"icon_id": "16728157",
|
||||
"name": "显示隐藏网格",
|
||||
"font_class": "xianshiyincangwangge",
|
||||
"unicode": "e7d6",
|
||||
"unicode_decimal": 59350
|
||||
},
|
||||
{
|
||||
"icon_id": "16728158",
|
||||
"name": "冻结",
|
||||
"font_class": "dongjie",
|
||||
"unicode": "e7d7",
|
||||
"unicode_decimal": 59351
|
||||
},
|
||||
{
|
||||
"icon_id": "16728159",
|
||||
"name": "文本左对齐",
|
||||
"font_class": "wenbenzuoduiqi",
|
||||
"unicode": "e7d8",
|
||||
"unicode_decimal": 59352
|
||||
},
|
||||
{
|
||||
"icon_id": "16728161",
|
||||
"name": "后退",
|
||||
"font_class": "houtui",
|
||||
"unicode": "e7da",
|
||||
"unicode_decimal": 59354
|
||||
},
|
||||
{
|
||||
"icon_id": "16728162",
|
||||
"name": "水平合并",
|
||||
"font_class": "shuipinghebing",
|
||||
"unicode": "e7db",
|
||||
"unicode_decimal": 59355
|
||||
},
|
||||
{
|
||||
"icon_id": "16728163",
|
||||
"name": "下边框",
|
||||
"font_class": "xiabiankuang",
|
||||
"unicode": "e7dc",
|
||||
"unicode_decimal": 59356
|
||||
},
|
||||
{
|
||||
"icon_id": "16728164",
|
||||
"name": "设置",
|
||||
"font_class": "shezhi",
|
||||
"unicode": "e7dd",
|
||||
"unicode_decimal": 59357
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,356 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<!--
|
||||
2013-9-30: Created.
|
||||
-->
|
||||
<svg>
|
||||
<metadata>
|
||||
Created by iconfont
|
||||
</metadata>
|
||||
<defs>
|
||||
|
||||
<font id="iconfont" horiz-adv-x="1024" >
|
||||
<font-face
|
||||
font-family="iconfont"
|
||||
font-weight="500"
|
||||
font-stretch="normal"
|
||||
units-per-em="1024"
|
||||
ascent="896"
|
||||
descent="-128"
|
||||
/>
|
||||
<missing-glyph />
|
||||
|
||||
<glyph glyph-name="lianjie" unicode="" d="M771.584 644.266667c-49.066667 51.2-132.266667 51.2-181.333333 0l-74.666667-76.8c-8.533333-8.533333-8.533333-23.466667 0-32 8.533333-8.533333 21.333333-8.533333 29.866667 0l74.666666 76.8c34.133333 34.133333 87.466667 34.133333 121.6 0 34.133333-34.133333 34.133333-89.6 0-123.733334l-121.6-123.733333c-34.133333-34.133333-87.466667-34.133333-121.6 0-8.533333 8.533333-21.333333 8.533333-29.866666 0-8.533333-8.533333-8.533333-23.466667 0-32 49.066667-51.2 132.266667-51.2 181.333333 0l121.6 123.733333c51.2 53.333333 51.2 136.533333 0 187.733334zM477.184 232.533333l-74.666667-76.8c-34.133333-34.133333-87.466667-34.133333-121.6 0-34.133333 34.133333-34.133333 89.6 0 123.733334l121.6 123.733333c34.133333 34.133333 87.466667 34.133333 121.6 0 8.533333-8.533333 21.333333-8.533333 29.866667 0 8.533333 8.533333 8.533333 23.466667 0 32-49.066667 51.2-132.266667 51.2-181.333333 0l-121.6-123.733333c-51.2-51.2-49.066667-134.4 0-185.6 49.066667-51.2 132.266667-51.2 181.333333 0l74.666667 76.8c8.533333 8.533333 8.533333 23.466667 0 32-8.533333 6.4-21.333333 6.4-29.866667-2.133334z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="dayinquyu" unicode="" d="M727.04 189.781333a11.946667 11.946667 0 0 0 8.704-3.754666 13.312 13.312 0 0 0 3.626667-9.130667V85.333333H583.253333v91.52c0 3.413333 1.28 6.741333 3.626667 9.173334a11.946667 11.946667 0 0 0 8.661333 3.754666zM362.666667 170.666667v-42.666667h-128v42.666667h128z m128 0v-42.666667h-42.666667v42.666667h42.666667z m301.696 143.957333a18.773333 18.773333 0 0 0 18.304-19.2v-117.205333c0-10.581333-8.277333-19.2-18.346667-19.2h-28.458667v11.434666c-0.128 21.333333-16.554667 38.570667-36.778666 38.570667h-131.498667c-20.224 0-36.693333-17.237333-36.778667-38.570667v-11.477333h-28.458666a18.858667 18.858667 0 0 0-18.346667 19.2v117.248c0 10.581333 8.277333 19.2 18.346667 19.2zM256 362.666667v-128H213.333333v128h42.666667z m411.477333-85.845334H567.04a12.586667 12.586667 0 0 1-12.245333-12.8c0.042667-7.125333 5.546667-12.885333 12.245333-12.842666h100.394667a12.586667 12.586667 0 0 1 12.202666 12.8c0 7.082667-5.504 12.8-12.202666 12.8zM723.072 384a14.506667 14.506667 0 0 0 14.165333-14.805333v-35.84H585.386667v35.84a14.506667 14.506667 0 0 0 14.165333 14.805333zM768 533.333333v-128h-42.666667v128h42.666667z m-512 42.666667v-128H213.333333v128h42.666667zM768 682.666667v-64h-42.666667V640h-64V682.666667H768zM362.666667 682.666667v-42.666667H256v-21.333333H213.333333V682.666667h149.333334z m213.333333 0v-42.666667h-128V682.666667h128z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="dayinyemianpeizhi" unicode="" d="M635.477333 682.666667H388.522667c-15.530667 0-28.16-13.226667-28.288-29.610667v-71.68h303.530666v71.68c0 16.298667-12.586667 29.568-28.288 29.568V682.666667z m7.978667-388.48H380.586667a23.893333 23.893333 0 0 1-17.365334-7.509334 26.581333 26.581333 0 0 1-7.253333-18.261333V85.333333h312.149333v183.125334a26.581333 26.581333 0 0 1-7.253333 18.218666 23.893333 23.893333 0 0 1-17.365333 7.509334z m130.602667 249.728H250.069333c-20.224 0-36.736-17.28-36.736-38.4v-234.410667c0-21.162667 16.512-38.442667 36.693334-38.442667h56.96v22.912c0.213333 42.666667 33.109333 77.184 73.557333 77.098667h262.912c40.448 0.085333 73.386667-34.389333 73.557333-77.098667v-22.912h56.917334c20.224 0 36.736 17.28 36.736 38.4V505.514667c-0.042667 21.290667-16.426667 38.485333-36.608 38.442666z m-249.813334-126.933334H323.498667c-13.44 0-24.405333 11.434667-24.490667 25.642667a25.173333 25.173333 0 0 0 24.490667 25.685333h200.746666c13.44 0 24.490667-11.52 24.490667-25.685333 0-14.08-11.050667-25.6-24.490667-25.6v-0.042667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="dayinbiaoti" unicode="" d="M727.04 189.781333a11.946667 11.946667 0 0 0 8.704-3.754666 13.312 13.312 0 0 0 3.626667-9.130667V85.333333H583.253333v91.52c0 3.413333 1.28 6.741333 3.626667 9.173334a11.946667 11.946667 0 0 0 8.661333 3.754666zM768 682.666667v-277.333334h-42.666667V640H256v-469.333333h234.666667v-42.666667H213.333333V682.666667h554.666667z m24.362667-368.042667a18.773333 18.773333 0 0 0 18.304-19.2v-117.205333c0-10.581333-8.277333-19.2-18.346667-19.2h-28.458667v11.434666c-0.128 21.333333-16.554667 38.570667-36.778666 38.570667h-131.498667c-20.224 0-36.693333-17.237333-36.778667-38.570667v-11.477333h-28.458666a18.858667 18.858667 0 0 0-18.346667 19.2v117.248c0 10.581333 8.277333 19.2 18.346667 19.2z m-124.885334-37.802667H567.04a12.586667 12.586667 0 0 1-12.245333-12.8c0.042667-7.125333 5.546667-12.885333 12.245333-12.842666h100.394667a12.586667 12.586667 0 0 1 12.202666 12.8c0 7.082667-5.504 12.8-12.202666 12.8zM723.072 384a14.506667 14.506667 0 0 0 14.165333-14.805333v-35.84H585.386667v35.84a14.506667 14.506667 0 0 0 14.165333 14.805333zM341.333333 554.666667h298.666667v-42.666667H341.333333zM341.333333 469.333333h170.666667v-42.666666H341.333333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="fenyeyulan" unicode="" d="M810.666667 682.666667v-597.333334H213.333333V682.666667h597.333334z m-42.666667-42.666667H256v-512h512V640zM256 384h256v-42.666667H256zM554.666667 640v-298.666667h-42.666667V640zM405.333333 640v-298.666667h-42.666666V640z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="putong" unicode="" d="M256 640h554.666667v-42.666667H256zM298.666667 640v-554.666667H256V640zM810.666667 640v-554.666667h-42.666667V640zM469.333333 640v-554.666667h-42.666666V640zM640 640v-554.666667h-42.666667V640zM256 469.333333h554.666667v-42.666666H256zM256 298.666667h554.666667v-42.666667H256zM256 128h554.666667v-42.666667H256z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="yemianbuju" unicode="" d="M810.666667 682.666667v-42.666667h-170.709334L640 128h170.666667v-42.666667h-213.333334V682.666667h213.333334z m-384 0l-0.042667-554.666667H426.666667v-42.666667H213.333333v42.666667h170.624L384 640H213.333333V682.666667h213.333334z m106.666666-512v-85.333334h-42.666666v85.333334h42.666666z m0 170.666666v-85.333333h-42.666666v85.333333h42.666666z m0 170.666667v-85.333333h-42.666666V512h42.666666z m0 170.666667v-85.333334h-42.666666V682.666667h42.666666z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="biaogesuoding" unicode="" d="M810.666667 682.666667v-597.333334H213.333333V682.666667h597.333334zM341.333333 512.128H256V128h85.333333V512.128z m426.666667 0H383.872V128H768V512.128z m-149.333333-21.461333a64 64 0 0 0 63.701333-57.856L682.666667 426.666667v-64h42.666666v-213.333334h-298.666666v213.333334h42.666666V426.666667a64 64 0 0 0 57.856 63.701333L533.333333 490.666667h85.333334z m64-170.666667h-213.333334v-128h213.333334v128z m-106.666667-21.333333a21.333333 21.333333 0 0 0 21.333333-21.333334v-42.666666a21.333333 21.333333 0 1 0-42.666666 0v42.666666a21.333333 21.333333 0 0 0 21.333333 21.333334z m42.666667 149.333333h-85.333334a21.333333 21.333333 0 0 1-20.992-17.493333L512 426.666667v-64h128V426.666667a21.333333 21.333333 0 0 1-13.909333 20.010666l-3.584 0.981334-3.84 0.341333zM768 640H383.872v-85.290667L768 554.666667V640zM341.333333 640H256v-85.333333l85.333333 0.042666V640z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="zhuandao1" unicode="" d="M804.992 201.941333l-84.650667 84.224c-7.552 7.509333-21.930667 8.448-26.026666-1.365333-1.066667-2.602667-1.365333-10.026667-1.365334-10.026667v-56.874666H406.442667a69.034667 69.034667 0 0 0-69.205334 68.778666 69.034667 69.034667 0 0 0 69.205334 68.821334h259.84a128.341333 128.341333 0 0 1 128.597333 127.829333 128.384 128.384 0 0 1-128.554667 127.914667H411.946667A101.632 101.632 0 0 1 213.333333 581.674667a101.632 101.632 0 1 1 198.613334-29.525334h254.378666a69.034667 69.034667 0 0 0 69.162667-68.821333 69.034667 69.034667 0 0 0-69.162667-68.778667H406.442667a128.341333 128.341333 0 0 1-128.597334-127.872 128.341333 128.341333 0 0 1 128.597334-127.872h286.506666v-54.016s0-8.277333 1.408-11.52c4.053333-9.813333 18.432-10.24 25.984-2.730666l84.650667 84.181333a19.2 19.2 0 0 1 0 27.221333zM314.88 539.776a42.069333 42.069333 0 0 0-42.112 41.898667c0 23.082667 18.858667 41.856 42.112 41.856 23.210667 0 42.112-18.773333 42.112-41.856a42.069333 42.069333 0 0 0-42.112-41.898667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="youjiantou" unicode="" d="M682.666667 384l-341.333334-341.333333V725.333333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="caidan2" unicode="" d="M213.333333 426.666667h597.333334v-85.333334H213.333333zM213.333333 682.666667h597.333334v-85.333334H213.333333zM213.333333 170.666667h597.333334v-85.333334H213.333333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="tihuan" unicode="" d="M768 465.066667H280.405333l-4.394666 0.554666c-5.461333 0.853333-6.570667 1.749333-12.885334 6.528l-2.986666 5.376c-6.4 11.946667-5.376 13.738667 2.986666 28.885334L440.618667 682.666667l34.218666-34.048-136.362666-135.424H768v-48.170667z m-7.594667-163.242667L585.472 128l-34.261333 34.048 136.362666 135.424H258.048v48.170667h484.096c10.453333 0 19.882667-6.272 23.893333-15.872a25.6 25.6 0 0 0-5.632-27.989334z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="dongjie1" unicode="" d="M809.557333 682.069333v-595.626666H213.930667V682.069333h595.626666zM256.426667 322.389333v-193.408l193.365333 0.042667-193.365333 193.365333z m510.549333 40.618667h-234.026667v-234.026667h234.026667v234.026667z m-276.565333 0H276.053333l214.357334-214.4v214.4z m276.565333 276.522667h-234.026667v-233.984h234.026667V639.530667zM256.426667 609.450667v-203.946667l203.904 0.042667-203.946667 203.946666z m233.984 30.08H286.592l203.861333-203.861334V639.573333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="jian1" unicode="" d="M213.333333 426.666667h597.333334v-85.333334H213.333333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="jia1" unicode="" d="M213.333333 426.666667h597.333334v-85.333334H213.333333zM554.666667 682.666667v-597.333334h-85.333334V682.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="yichu1" unicode="" d="M300.288 85.333333H213.333333V682.666667h86.954667v-279.978667h441.898667l-91.306667 85.845333 26.624 26.112L810.666667 384l-133.162667-130.688-26.624 26.154667 91.306667 85.845333-441.898667 0.042667zM530.688 682.666667h42.666667v-242.688h-42.666667V682.666667z m0-354.688h42.666667V85.333333h-42.666667v242.688z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="shengxu1" unicode="" d="M684.757333 482.944v-290.645333a20.650667 20.650667 0 0 0-6.4-15.274667 23.04 23.04 0 0 0-16-6.357333 22.229333 22.229333 0 0 0-22.4 21.632V482.944L550.4 398.08a22.528 22.528 0 0 0-15.872-6.442667 22.613333 22.613333 0 0 0-15.914667 6.442667 20.650667 20.650667 0 0 0-6.613333 15.061333c0 5.674667 2.389333 11.093333 6.613333 15.061334l126.72 120.064a22.485333 22.485333 0 0 0 15.658667 6.4 23.594667 23.594667 0 0 0 16.128-5.546667l126.72-120.064c4.309333-3.84 6.826667-9.301333 6.826667-15.061333a20.266667 20.266667 0 0 0-6.826667-15.061334 23.04 23.04 0 0 0-15.914667-6.272 23.04 23.04 0 0 0-15.872 6.272l-87.296 84.010667zM229.930667 213.333333h265.472c9.173333 0 16.597333-9.472 16.597333-21.12s-7.424-21.12-16.597333-21.12H229.930667c-9.173333 0-16.597333 9.472-16.597334 21.12 0 11.690667 7.424 21.12 16.597334 21.12z m1.152 170.666667h177.792c9.813333 0 17.792-9.429333 17.792-21.12s-7.936-21.12-17.792-21.12H231.168c-9.813333 0-17.792 9.429333-17.792 21.12 0 11.648 7.978667 21.12 17.792 21.12z m264.362666 170.666667H229.845333C220.757333 554.666667 213.333333 545.194667 213.333333 533.546667s7.424-21.12 16.597334-21.12h265.472c9.173333 0 16.597333 9.472 16.597333 21.12S504.576 554.666667 495.402667 554.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="neikuangxian" unicode="" d="M213.333333 384h554.666667v-42.666667H213.333333zM512 640v-554.666667h-42.666667V640zM213.333333 469.333333h42.666667v-42.666666H213.333333zM213.333333 298.666667h42.666667v-42.666667H213.333333zM213.333333 554.666667h42.666667v-42.666667H213.333333zM213.333333 213.333333h42.666667v-42.666666H213.333333zM725.333333 469.333333h42.666667v-42.666666h-42.666667zM725.333333 298.666667h42.666667v-42.666667h-42.666667zM725.333333 554.666667h42.666667v-42.666667h-42.666667zM725.333333 213.333333h42.666667v-42.666666h-42.666667zM725.333333 128h42.666667v-42.666667h-42.666667zM725.333333 640h42.666667v-42.666667h-42.666667zM213.333333 128h42.666667v-42.666667H213.333333zM213.333333 640h42.666667v-42.666667H213.333333zM384 128h42.666667v-42.666667H384zM384 640h42.666667v-42.666667H384zM554.666667 128h42.666666v-42.666667h-42.666666zM554.666667 640h42.666666v-42.666667h-42.666666zM298.666667 128h42.666666v-42.666667H298.666667zM298.666667 640h42.666666v-42.666667H298.666667zM640 128h42.666667v-42.666667h-42.666667zM640 640h42.666667v-42.666667h-42.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="qingchushaixuan" unicode="" d="M214.016 173.568h593.92v-42.410667H214.016v42.410667z m578.048 312.106667l-180.693333 181.077333A53.376 53.376 0 0 1 573.738667 682.666667a45.653333 45.653333 0 0 1-32.64-13.226667l-313.941334-314.965333c-18.56-18.602667-17.322667-50.261333 2.688-70.4l68.010667-68.096h298.24l198.698667 199.338666c18.56 18.602667 17.322667 50.261333-2.730667 70.357334z m-213.546667-227.242667H315.434667L259.84 314.112c-3.968 4.010667-4.053333 9.088-2.730667 10.453333L430.08 497.92l193.92-193.92-45.44-45.568z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="wenbenxiangshang" unicode="" d="M192 400.213333l213.333333 77.653334v0.64l1.621334-0.042667L554.666667 532.224v-45.354667l-106.666667-38.826666v-152.405334l106.666667-38.826666v-45.354667l-147.498667 53.674667-1.834667 0.042666v0.64l-213.333333 77.610667V400.213333z m46.634667-28.416L405.333333 311.125333v121.386667l-166.698666-60.714667zM597.333333 559.829333l90.496 90.538667 90.538667-90.538667-30.165333-30.165333-37.802667 37.76V106.666667h-42.666667V569.898667l-40.234666-40.234667L597.333333 559.829333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="jiangxu1" unicode="" d="M684.757333 242.389333V533.034667a20.650667 20.650667 0 0 1-6.4 15.274666 23.04 23.04 0 0 1-16 6.357334 22.229333 22.229333 0 0 1-22.4-21.632v-290.645334L550.4 327.253333a22.528 22.528 0 0 1-15.872 6.442667 22.613333 22.613333 0 0 1-15.914667-6.442667 20.650667 20.650667 0 0 1-6.613333-15.061333c0-5.674667 2.389333-11.093333 6.613333-15.061333l126.72-120.064a22.485333 22.485333 0 0 1 15.658667-6.4 23.594667 23.594667 0 0 1 16.128 5.546666l126.72 120.064c4.309333 3.84 6.826667 9.301333 6.826667 15.061334a20.266667 20.266667 0 0 1-6.826667 15.061333 23.04 23.04 0 0 1-15.914667 6.272 23.04 23.04 0 0 1-15.872-6.272l-87.296-84.010667zM229.930667 213.333333h265.472c9.173333 0 16.597333-9.472 16.597333-21.12s-7.424-21.12-16.597333-21.12H229.930667c-9.173333 0-16.597333 9.472-16.597334 21.12 0 11.690667 7.424 21.12 16.597334 21.12z m1.152 170.666667h177.792c9.813333 0 17.792-9.429333 17.792-21.12s-7.936-21.12-17.792-21.12H231.168c-9.813333 0-17.792 9.429333-17.792 21.12 0 11.648 7.978667 21.12 17.792 21.12z m264.362666 170.666667H229.845333C220.757333 554.666667 213.333333 545.237333 213.333333 533.546667c0-11.648 7.424-21.12 16.597334-21.12h265.472c9.173333 0 16.597333 9.472 16.597333 21.12S504.576 554.666667 495.402667 554.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="neikuanghengxian" unicode="" d="M213.333333 384h554.666667v-42.666667H213.333333zM213.333333 469.333333h42.666667v-42.666666H213.333333zM213.333333 298.666667h42.666667v-42.666667H213.333333zM213.333333 554.666667h42.666667v-42.666667H213.333333zM213.333333 213.333333h42.666667v-42.666666H213.333333zM725.333333 469.333333h42.666667v-42.666666h-42.666667zM469.333333 469.333333h42.666667v-42.666666h-42.666667zM725.333333 298.666667h42.666667v-42.666667h-42.666667zM469.333333 298.666667h42.666667v-42.666667h-42.666667zM725.333333 554.666667h42.666667v-42.666667h-42.666667zM469.333333 554.666667h42.666667v-42.666667h-42.666667zM725.333333 213.333333h42.666667v-42.666666h-42.666667zM469.333333 213.333333h42.666667v-42.666666h-42.666667zM725.333333 128h42.666667v-42.666667h-42.666667zM725.333333 640h42.666667v-42.666667h-42.666667zM213.333333 128h42.666667v-42.666667H213.333333zM213.333333 640h42.666667v-42.666667H213.333333zM384 128h42.666667v-42.666667H384zM384 640h42.666667v-42.666667H384zM554.666667 128h42.666666v-42.666667h-42.666666zM554.666667 640h42.666666v-42.666667h-42.666666zM298.666667 128h42.666666v-42.666667H298.666667zM298.666667 640h42.666666v-42.666667H298.666667zM469.333333 128h42.666667v-42.666667h-42.666667zM469.333333 640h42.666667v-42.666667h-42.666667zM640 128h42.666667v-42.666667h-42.666667zM640 640h42.666667v-42.666667h-42.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="neikuangshuxian" unicode="" d="M213.333333 469.333333h42.666667v-42.666666H213.333333zM213.333333 298.666667h42.666667v-42.666667H213.333333zM213.333333 554.666667h42.666667v-42.666667H213.333333zM213.333333 213.333333h42.666667v-42.666666H213.333333zM725.333333 469.333333h42.666667v-42.666666h-42.666667zM725.333333 298.666667h42.666667v-42.666667h-42.666667zM725.333333 554.666667h42.666667v-42.666667h-42.666667zM725.333333 213.333333h42.666667v-42.666666h-42.666667zM725.333333 128h42.666667v-42.666667h-42.666667zM725.333333 640h42.666667v-42.666667h-42.666667zM725.333333 384h42.666667v-42.666667h-42.666667zM213.333333 128h42.666667v-42.666667H213.333333zM213.333333 640h42.666667v-42.666667H213.333333zM213.333333 384h42.666667v-42.666667H213.333333zM384 128h42.666667v-42.666667H384zM384 640h42.666667v-42.666667H384zM384 384h42.666667v-42.666667H384zM554.666667 128h42.666666v-42.666667h-42.666666zM554.666667 640h42.666666v-42.666667h-42.666666zM554.666667 384h42.666666v-42.666667h-42.666666zM298.666667 128h42.666666v-42.666667H298.666667zM298.666667 640h42.666666v-42.666667H298.666667zM298.666667 384h42.666666v-42.666667H298.666667zM469.333333 128h42.666667v-42.666667h-42.666667zM469.333333 640h42.666667v-42.666667h-42.666667zM469.333333 384h42.666667v-42.666667h-42.666667zM640 128h42.666667v-42.666667h-42.666667zM640 640h42.666667v-42.666667h-42.666667zM640 384h42.666667v-42.666667h-42.666667zM512 640v-554.666667h-42.666667V640z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="zidingyipaixu" unicode="" d="M704 640a21.333333 21.333333 0 0 0 21.333333-21.333333v-469.333334a21.333333 21.333333 0 1 0-42.666666 0v469.333334c0 11.776 9.472 21.333333 21.333333 21.333333zM512 512c11.776 0 21.333333-7.68 21.333333-17.194667v-221.610666c0-9.514667-9.472-17.194667-21.333333-17.194667-11.776 0-21.333333 7.68-21.333333 17.194667V494.805333c0 4.565333 2.218667 8.96 6.186666 12.16A24.32 24.32 0 0 0 512 512zM320 640a21.333333 21.333333 0 0 0 21.333333-21.333333v-469.333334a21.333333 21.333333 0 1 0-42.666666 0v469.333334c0 11.776 9.472 21.333333 21.333333 21.333333z m283.562667-368.896a21.333333 21.333333 0 0 0 30.165333-30.165333l-106.666667-106.666667a21.333333 21.333333 0 0 0-30.165333 0l-106.666667 106.666667a21.333333 21.333333 0 0 0 30.165334 30.165333L512 179.498667l91.605333 91.562666z m0.298666 225.834667a21.333333 21.333333 0 0 1 30.165334 30.165333l-106.666667 106.666667a21.333333 21.333333 0 0 1-30.165333 0l-106.666667-106.666667a21.333333 21.333333 0 0 1 30.165333-30.165333l91.562667 91.562666 91.605333-91.562666z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="logo2" unicode="" d="M1023.168 764.64c0-234.4-190.016-424.416-424.416-424.416 0 234.4 190.016 424.416 424.416 424.416zM131.36-127.168c0 234.4 190.016 424.416 424.416 424.416 0-234.4-190.016-424.416-424.416-424.416zM929.696-33.696c-182.784 0-330.944 148.16-330.944 330.944 182.752 0 330.944-148.16 330.944-330.944zM494.848 896H0v-494.848h494.848zM558.016 814.624H81.376v-476.64h476.64zM558.304 731.584H164.384v-393.92h393.92z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="logo" unicode="" d="M1023.168 764.64c0-234.4-190.016-424.416-424.416-424.416 0 234.4 190.016 424.416 424.416 424.416zM131.36-127.168c0 234.4 190.016 424.416 424.416 424.416 0-234.4-190.016-424.416-424.416-424.416zM929.696-33.696c-182.784 0-330.944 148.16-330.944 330.944 182.752 0 330.944-148.16 330.944-330.944zM494.848 896H0v-494.848h494.848zM558.016 814.624H81.376v-476.64h476.64zM558.304 731.584H164.384v-393.92h393.92zM1678.08 160v64h-247.04V616.96H1356.8V160h321.28z m177.568-8.96c40.96 0 75.52 17.28 103.68 51.84V160h72.96V490.88h-72.96v-202.24c-6.4-23.68-17.28-42.24-32-56.32-14.72-13.44-30.08-20.48-46.08-20.48-25.6 0-43.52 6.4-55.04 18.56-11.52 12.8-16.64 32-16.64 58.88v201.6h-72.96v-206.08c0-88.96 39.68-133.76 119.04-133.76z m407.936 0c42.88 0 77.44 10.88 103.04 32 26.24 21.76 43.52 55.04 51.2 99.84h-72.32c-5.76-48-32.64-72.32-81.28-72.32-28.16 0-49.28 10.24-63.36 30.08-15.36 20.48-22.4 49.28-22.4 85.76 0 35.84 7.68 64 23.04 83.84 15.36 20.48 36.48 30.08 63.36 30.08 21.76 0 39.68-5.12 53.12-15.36 12.8-10.24 21.76-25.6 26.24-46.72h72.32c-6.4 41.6-23.04 72.32-49.28 92.8-25.6 19.2-59.52 28.8-102.4 28.8-51.84 0-92.16-17.28-120.96-51.84-26.88-31.36-40.32-72.32-40.32-122.24 0-51.2 13.44-92.8 40.96-124.8 28.16-33.28 67.84-49.92 119.04-49.92z m292.128 8.96v115.84l33.28 31.36 115.84-147.2h93.44l-159.36 193.92 146.56 136.96h-94.08l-135.68-131.2V625.92h-72.96V160h72.96z m404.096-126.72l179.2 457.6h-79.36l-83.84-235.52-87.68 235.52h-79.36l131.2-323.2-58.24-134.4h78.08z m357.408 117.76c99.2 0 149.12 35.2 149.12 105.6 0 29.44-13.44 53.12-39.68 69.76-17.92 12.16-46.08 22.4-83.2 31.36-33.28 8.32-55.04 14.72-65.92 19.2-17.92 7.68-26.24 17.28-26.24 27.52 0 12.8 5.12 21.76 16.64 27.52 9.6 5.76 24.32 8.32 43.52 8.32 22.4 0 39.04-3.2 49.92-10.24 10.24-6.4 17.92-18.56 23.04-35.2h71.04c-7.68 70.4-55.68 104.96-142.72 104.96-40.96 0-73.6-8.32-98.56-26.24-25.6-16.64-37.76-40.32-37.76-71.04 0-28.8 12.8-51.2 38.4-67.2 16-10.24 43.52-19.84 82.56-28.8 33.28-7.68 55.04-13.44 65.28-18.56 19.2-8.96 28.8-21.12 28.8-36.48 0-26.88-25.6-40.96-76.8-40.96-24.32 0-41.6 4.48-52.48 12.16-10.88 8.96-18.56 23.68-22.4 44.8h-71.04c7.04-77.44 56.32-116.48 148.48-116.48z m286.976 8.96v184.96c0 28.16 6.4 50.56 19.84 68.48 12.8 17.92 30.72 26.88 53.76 26.88 24.96 0 43.52-7.68 56.32-23.68 10.88-14.72 16.64-36.48 16.64-64.64v-192h72.96v204.8c0 44.16-9.6 77.44-28.16 99.84-19.84 23.68-49.92 35.2-90.24 35.2-21.12 0-39.68-3.84-55.68-12.16-17.92-8.96-33.28-22.4-45.44-40.96v179.2h-72.96V160h72.96z m447.648-8.96c44.16 0 80.64 12.8 110.08 37.76 23.04 20.48 38.4 46.72 46.08 77.44h-72.96c-8.96-18.56-18.56-32-29.44-40.32-14.08-10.24-32-15.36-54.4-15.36-26.24 0-46.72 8.32-60.8 24.32-14.08 16-22.4 39.68-24.96 70.4h247.68c0 59.52-13.44 106.24-39.68 139.52-28.8 37.12-70.4 55.04-124.8 55.04-49.28 0-88.32-16.64-116.48-50.56-29.44-33.28-43.52-74.24-43.52-123.52 0-55.04 15.36-97.92 46.08-129.28 28.8-30.08 67.84-45.44 117.12-45.44z m85.12 209.28h-170.24c4.48 26.24 13.44 46.08 26.88 59.52 14.08 14.08 32.64 20.48 56.96 20.48 51.2 0 80-26.24 86.4-80z m285.088-209.28c44.16 0 80.64 12.8 110.08 37.76 23.04 20.48 38.4 46.72 46.08 77.44h-72.96c-8.96-18.56-18.56-32-29.44-40.32-14.08-10.24-32-15.36-54.4-15.36-26.24 0-46.72 8.32-60.8 24.32-14.08 16-22.4 39.68-24.96 70.4h247.68c0 59.52-13.44 106.24-39.68 139.52-28.8 37.12-70.4 55.04-124.8 55.04-49.28 0-88.32-16.64-116.48-50.56-29.44-33.28-43.52-74.24-43.52-123.52 0-55.04 15.36-97.92 46.08-129.28 28.8-30.08 67.84-45.44 117.12-45.44z m85.12 209.28h-170.24c4.48 26.24 13.44 46.08 26.88 59.52 14.08 14.08 32.64 20.48 56.96 20.48 51.2 0 80-26.24 86.4-80z m310.016-200.32v60.16h-43.52c-7.68 0-12.8 1.92-16.64 5.76-3.84 4.48-5.12 10.24-5.12 17.92v186.88h73.6v60.16h-73.6V597.76l-72.96-30.08v-76.8h-59.52v-60.16h59.52v-186.88c0-26.88 6.4-46.72 19.2-60.8 13.44-15.36 34.56-23.04 63.36-23.04h55.68z" horiz-adv-x="4864" />
|
||||
|
||||
|
||||
<glyph glyph-name="wenbenqingxie1" unicode="" d="M469.333333 640h170.666667v-42.666667h-170.666667zM573.738667 611.413333l-81.493334-462.208-41.984 7.381334 81.493334 462.208zM384 170.666667h170.666667v-42.666667H384z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="jiacu" unicode="" d="M298.666667 682.666667h224a174.208 174.208 0 0 0 141.952-275.242667A174.208 174.208 0 0 0 572.458667 85.333333H298.666667V682.666667z m273.792-348.458667l-174.250667 0.042667v-149.333334h174.250667a74.666667 74.666667 0 0 1 6.101333 149.077334l-6.101333 0.213333zM398.208 583.125333v-149.333333h124.458667a74.666667 74.666667 0 0 1 6.144 149.077333l-6.144 0.256H398.208z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="sousuo" unicode="" d="M664.832 261.376l128.554667-128.597333a21.333333 21.333333 0 1 0-30.165334-30.165334l-128.597333 128.597334a256 256 0 1 0 30.165333 30.165333zM469.333333 213.333333a213.333333 213.333333 0 1 1 0 426.666667 213.333333 213.333333 0 0 1 0-426.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="guanbi" unicode="" d="M119.808 715.946667l60.330667 60.245333 724.053333-724.053333-60.330667-60.330667zM843.946667 776.192l60.245333-60.330667-724.053333-724.053333-60.330667 60.330667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="xiayige" unicode="" d="M512 213.333333L170.666667 554.666667h682.666666z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="xiala" unicode="" d="M149.930667 451.669333l60.330666 60.330667 362.069334-362.069333L512 89.6zM813.738667 512l60.330666-60.330667L512 89.6l-60.330667 60.330667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="wenbenyanse" unicode="" d="M549.546667 640l194.133333-533.333333h-45.354667l-77.653333 213.333333H421.632l-77.653333-213.333333H298.666667L492.757333 640h56.789334z m-28.416-46.634667L437.162667 362.666667h167.978666l-84.010666 230.698666z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="shangyige" unicode="" d="M512 554.666667l341.333333-341.333334H170.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="shujutoushi" unicode="" d="M256 533.333333v-298.666666l256-149.333334 256 149.333334v298.666666L512 682.666667 256 533.333333zM725.333333 256l-213.333333-128-213.333333 128V512l213.333333 128 213.333333-128v-256z m-189.354666-40.021333a18.645333 18.645333 0 0 0-18.645334-18.645334 18.304 18.304 0 0 0-18.688 18.645334V360.533333l-130.645333 75.349334a18.645333 18.645333 0 0 0 4.565333 34.133333 18.304 18.304 0 0 0 14.08-2.005333l130.688-74.666667 129.578667 74.666667a18.304 18.304 0 0 0 25.386667-6.698667 18.645333 18.645333 0 0 0-6.784-25.386667l-129.536-74.666666v-145.237334z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="tianchong" unicode="" d="M730.24 333.824l-253.44-253.44-217.173333 217.258667 253.44 253.44 217.173333-217.258667z m-72.405333 0.042667L512.981333 478.72l-180.992-180.992 144.810667-144.853333 181.034667 181.034666zM520.533333 597.333333v-230.4H469.333333V546.176H392.533333v-179.626667H341.333333V597.333333zM699.733333 341.333333c48.768 0 88.32-37.802667 88.32-84.48 0-46.634667-39.552-84.48-88.32-84.48" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="zengjiaxiaoshuwei" unicode="" d="M533.333333 106.666667m-42.666666 0a42.666667 42.666667 0 1 1 85.333333 0 42.666667 42.666667 0 1 1-85.333333 0ZM682.666667 341.333333a85.333333 85.333333 0 0 1-85.333334-85.333333v-85.333333a85.333333 85.333333 0 1 1 170.666667 0V256a85.333333 85.333333 0 0 1-85.333333 85.333333z m0-42.666666a42.666667 42.666667 0 0 0 42.666666-42.666667v-85.333333a42.666667 42.666667 0 1 0-85.333333 0V256a42.666667 42.666667 0 0 0 42.666667 42.666667zM367.829333 96.298667l90.538667 90.538666L367.786667 277.333333l-30.165334-30.165333 37.76-37.802667H256v-42.666666h121.898667l-40.234667-40.234667 30.165333-30.165333zM490.666667 682.666667a85.333333 85.333333 0 0 1-85.333334-85.333334v-85.333333a85.333333 85.333333 0 1 1 170.666667 0V597.333333a85.333333 85.333333 0 0 1-85.333333 85.333334z m0-42.666667a42.666667 42.666667 0 0 0 42.666666-42.666667v-85.333333a42.666667 42.666667 0 1 0-85.333333 0V597.333333a42.666667 42.666667 0 0 0 42.666667 42.666667zM682.666667 682.666667a85.333333 85.333333 0 0 1-85.333334-85.333334v-85.333333a85.333333 85.333333 0 1 1 170.666667 0V597.333333a85.333333 85.333333 0 0 1-85.333333 85.333334z m0-42.666667a42.666667 42.666667 0 0 0 42.666666-42.666667v-85.333333a42.666667 42.666667 0 0 0-85.333333 0V597.333333a42.666667 42.666667 0 0 0 42.666667 42.666667zM341.333333 448m-42.666666 0a42.666667 42.666667 0 1 1 85.333333 0 42.666667 42.666667 0 1 1-85.333333 0Z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="bianji2" unicode="" d="M810.581333 382.634667V128a42.666667 42.666667 0 0 0-42.666666-42.666667H298.666667a42.666667 42.666667 0 0 0-42.666667 42.666667V640a42.666667 42.666667 0 0 0 42.666667 42.666667h234.624v-42.666667H320a21.333333 21.333333 0 0 1-21.333333-21.333333v-469.333334a21.333333 21.333333 0 0 1 21.333333-21.333333h426.581333a21.333333 21.333333 0 0 1 21.333334 21.333333V384h0.042666a21.333333 21.333333 0 1 0 42.581334-1.365333z m-285.056 2.432l241.365334 241.365333a21.333333 21.333333 0 0 0 30.165333-30.165333l-241.365333-241.365334a21.333333 21.333333 0 0 0-30.165334 30.165334zM533.290667 640V682.666667a21.333333 21.333333 0 0 0 21.333333-21.333334c0-11.776-10.069333-21.333333-21.333333-21.333333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="jieping" unicode="" d="M590.848 328.96l-265.386667 306.645333a28.245333 28.245333 0 0 0 3.2 40.149334 29.141333 29.141333 0 0 0 40.789334-3.242667l267.946666-309.674667a124.885333 124.885333 0 0 0 144.213334-34.474666 125.141333 125.141333 0 0 0-16.042667-176.256 125.141333 125.141333 0 0 0-176.341333 14.805333 125.013333 125.013333 0 0 0 1.621333 162.048z m40.149333-18.133333c-18.602667-15.701333-29.312-38.826667-29.312-63.189334 0-45.909333 37.461333-83.157333 83.754667-83.157333a83.413333 83.413333 0 0 1 83.712 83.157333 83.413333 83.413333 0 0 1-83.712 83.114667c-15.189333 0-29.44-4.010667-41.685333-11.008a28.458667 28.458667 0 0 0-12.757334-8.96v0.042667z m-150.698666 52.565333l-38.229334-44.16a29.653333 29.653333 0 0 0-0.768-0.810667 124.885333 124.885333 0 0 0-6.528-151.509333 125.141333 125.141333 0 0 0-176.341333-14.805333C205.226667 196.693333 198.101333 275.626667 242.346667 328.362667a124.928 124.928 0 0 0 156.416 28.544l38.528 44.501333c9.514667-17.237333 24.746667-30.634667 43.008-37.973333z m105.6 122.026667a85.632 85.632 0 0 1-43.818667 37.12l129.749333 150.016a29.141333 29.141333 0 0 0 40.789334 3.242666 28.245333 28.245333 0 0 0 3.2-40.149333l-129.92-150.186667z m-300.8-301.44c35.413333-29.738667 88.064-25.301333 117.546666 9.813333a83.413333 83.413333 0 0 1-10.666666 117.546667 83.456 83.456 0 0 1-117.589334-9.856 83.456 83.456 0 0 1 10.709334-117.504z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="jianxiaoxiaoshuwei" unicode="" d="M533.333333 448m-42.666666 0a42.666667 42.666667 0 1 1 85.333333 0 42.666667 42.666667 0 1 1-85.333333 0ZM341.333333 106.666667m-42.666666 0a42.666667 42.666667 0 1 1 85.333333 0 42.666667 42.666667 0 1 1-85.333333 0ZM346.496 501.632L256 592.213333 346.496 682.666667l30.165333-30.165334-37.717333-37.802666h119.424v-42.666667H336.469333l40.192-40.234667-30.165333-30.165333zM682.666667 682.666667a85.333333 85.333333 0 0 1-85.333334-85.333334v-85.333333a85.333333 85.333333 0 1 1 170.666667 0V597.333333a85.333333 85.333333 0 0 1-85.333333 85.333334z m0-42.666667a42.666667 42.666667 0 0 0 42.666666-42.666667v-85.333333a42.666667 42.666667 0 0 0-85.333333 0V597.333333a42.666667 42.666667 0 0 0 42.666667 42.666667zM490.666667 341.333333a85.333333 85.333333 0 0 1-85.333334-85.333333v-85.333333a85.333333 85.333333 0 1 1 170.666667 0v85.333333a85.333333 85.333333 0 0 1-85.333333 85.333333z m0-42.666666a42.666667 42.666667 0 0 0 42.666666-42.666667v-85.333333a42.666667 42.666667 0 0 0-85.333333 0v85.333333a42.666667 42.666667 0 0 0 42.666667 42.666667zM682.666667 341.333333a85.333333 85.333333 0 0 1-85.333334-85.333333v-85.333333a85.333333 85.333333 0 1 1 170.666667 0v85.333333a85.333333 85.333333 0 0 1-85.333333 85.333333z m0-42.666666a42.666667 42.666667 0 0 0 42.666666-42.666667v-85.333333a42.666667 42.666667 0 0 0-85.333333 0v85.333333a42.666667 42.666667 0 0 0 42.666667 42.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="caidan" unicode="" d="M256 682.666667h192a42.666667 42.666667 0 0 0 42.666667-42.666667v-192a42.666667 42.666667 0 0 0-42.666667-42.666667H256a42.666667 42.666667 0 0 0-42.666667 42.666667V640a42.666667 42.666667 0 0 0 42.666667 42.666667z m21.333333-42.666667a21.333333 21.333333 0 0 1-21.333333-21.333333V469.333333a21.333333 21.333333 0 0 1 21.333333-21.333333H426.666667a21.333333 21.333333 0 0 1 21.333333 21.333333V618.666667A21.333333 21.333333 0 0 1 426.666667 640H277.333333z m298.666667 42.666667H768a42.666667 42.666667 0 0 0 42.666667-42.666667v-192a42.666667 42.666667 0 0 0-42.666667-42.666667h-192a42.666667 42.666667 0 0 0-42.666667 42.666667V640a42.666667 42.666667 0 0 0 42.666667 42.666667z m21.333333-42.666667a21.333333 21.333333 0 0 1-21.333333-21.333333V469.333333a21.333333 21.333333 0 0 1 21.333333-21.333333h149.333334a21.333333 21.333333 0 0 1 21.333333 21.333333V618.666667a21.333333 21.333333 0 0 1-21.333333 21.333333H597.333333z m-21.333333-277.333333H768a42.666667 42.666667 0 0 0 42.666667-42.666667V128a42.666667 42.666667 0 0 0-42.666667-42.666667h-192a42.666667 42.666667 0 0 0-42.666667 42.666667v192a42.666667 42.666667 0 0 0 42.666667 42.666667z m21.333333-42.666667a21.333333 21.333333 0 0 1-21.333333-21.333333v-149.333334a21.333333 21.333333 0 0 1 21.333333-21.333333h149.333334a21.333333 21.333333 0 0 1 21.333333 21.333333V298.666667a21.333333 21.333333 0 0 1-21.333333 21.333333H597.333333z m-341.333333 42.666667h192a42.666667 42.666667 0 0 0 42.666667-42.666667V128a42.666667 42.666667 0 0 0-42.666667-42.666667H256a42.666667 42.666667 0 0 0-42.666667 42.666667v192a42.666667 42.666667 0 0 0 42.666667 42.666667z m21.333333-42.666667a21.333333 21.333333 0 0 1-21.333333-21.333333v-149.333334a21.333333 21.333333 0 0 1 21.333333-21.333333H426.666667a21.333333 21.333333 0 0 1 21.333333 21.333333V298.666667a21.333333 21.333333 0 0 1-21.333333 21.333333H277.333333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="shujuku" unicode="" d="M256 682.666667h512a42.666667 42.666667 0 0 0 42.666667-42.666667v-85.333333a42.666667 42.666667 0 0 0-42.666667-42.666667H256a42.666667 42.666667 0 0 0-42.666667 42.666667V640a42.666667 42.666667 0 0 0 42.666667 42.666667z m21.333333-42.666667a21.333333 21.333333 0 0 1-21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333333-21.333333h469.333334a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-469.333334zM256 490.666667h512a42.666667 42.666667 0 0 0 42.666667-42.666667v-85.333333a42.666667 42.666667 0 0 0-42.666667-42.666667H256a42.666667 42.666667 0 0 0-42.666667 42.666667v85.333333a42.666667 42.666667 0 0 0 42.666667 42.666667z m21.333333-42.666667a21.333333 21.333333 0 0 1-21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333333-21.333333h469.333334a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-469.333334z m405.333334-21.333333h21.333333a21.333333 21.333333 0 1 0 0-42.666667H682.666667a21.333333 21.333333 0 1 0 0 42.666667zM256 298.666667h512a42.666667 42.666667 0 0 0 42.666667-42.666667v-85.333333a42.666667 42.666667 0 0 0-42.666667-42.666667H256a42.666667 42.666667 0 0 0-42.666667 42.666667v85.333333a42.666667 42.666667 0 0 0 42.666667 42.666667z m21.333333-42.666667a21.333333 21.333333 0 0 1-21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333333-21.333333h469.333334a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-469.333334z m405.333334-21.333333h21.333333a21.333333 21.333333 0 1 0 0-42.666667H682.666667a21.333333 21.333333 0 1 0 0 42.666667z m0 384h21.333333a21.333333 21.333333 0 1 0 0-42.666667H682.666667a21.333333 21.333333 0 1 0 0 42.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="wubiankuang" unicode="" d="M384 85.333333v42.666667h42.666667v-42.666667zM554.666667 85.333333v42.666667h42.666666v-42.666667zM298.666667 85.333333v42.666667h42.666666v-42.666667zM469.333333 85.333333v42.666667h42.666667v-42.666667zM640 85.333333v42.666667h42.666667v-42.666667zM384 341.333333v42.666667h42.666667v-42.666667zM384 597.333333V640h42.666667v-42.666667zM554.666667 597.333333V640h42.666666v-42.666667zM298.666667 597.333333V640h42.666666v-42.666667zM469.333333 597.333333V640h42.666667v-42.666667zM640 597.333333V640h42.666667v-42.666667zM725.333333 597.333333V640h42.666667v-42.666667zM213.333333 597.333333V640h42.666667v-42.666667zM554.666667 341.333333v42.666667h42.666666v-42.666667zM298.666667 341.333333v42.666667h42.666666v-42.666667zM469.333333 341.333333v42.666667h42.666667v-42.666667zM640 341.333333v42.666667h42.666667v-42.666667zM725.333333 85.333333v42.666667h42.666667v-42.666667zM213.333333 85.333333v42.666667h42.666667v-42.666667zM725.333333 256v42.666667h42.666667v-42.666667zM213.333333 256v42.666667h42.666667v-42.666667zM725.333333 426.666667v42.666666h42.666667v-42.666666zM213.333333 426.666667v42.666666h42.666667v-42.666666zM725.333333 170.666667v42.666666h42.666667v-42.666666zM213.333333 170.666667v42.666666h42.666667v-42.666666zM725.333333 341.333333v42.666667h42.666667v-42.666667zM213.333333 341.333333v42.666667h42.666667v-42.666667zM725.333333 512V554.666667h42.666667v-42.666667zM213.333333 512V554.666667h42.666667v-42.666667zM469.333333 256v42.666667h42.666667v-42.666667zM469.333333 426.666667v42.666666h42.666667v-42.666666zM469.333333 170.666667v42.666666h42.666667v-42.666666zM469.333333 341.333333v42.666667h42.666667v-42.666667zM469.333333 512V554.666667h42.666667v-42.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="bianji" unicode="" d="M642.56 532.266667l-170.88-170.88 37.76-22.613334 22.613333-37.717333 170.88 170.88-60.373333 60.330667z m30.208 30.165333l60.330667-60.330667 15.104 15.061334a21.333333 21.333333 0 0 1 0 30.165333l-30.165334 30.165333a21.333333 21.333333 0 0 1-30.165333 0l-15.104-15.104v0.042667z m-231.253333-231.253333l-10.112-10.112v-60.330667h60.330666l10.112 10.112-22.613333 37.717333-37.717333 22.613334z m291.584 291.584l60.373333-60.330667a42.666667 42.666667 0 0 0 0-60.330667l-284.032-284.032H388.736V338.773333l284.032 283.989334a42.666667 42.666667 0 0 0 60.330667 0zM554.666667 661.333333a21.333333 21.333333 0 0 0-21.333334-21.333333h-256c-11.818667 0-21.333333-9.472-21.333333-21.162667v-469.674666c0-11.434667 9.557333-21.162667 21.333333-21.162667h469.333334c11.818667 0 21.333333 9.472 21.333333 21.162667V320a21.333333 21.333333 0 1 0 42.666667 0v-191.872c0-23.637333-19.2-42.794667-42.453334-42.794667H255.786667A42.624 42.624 0 0 0 213.333333 128.085333V639.872C213.333333 663.509333 232.533333 682.666667 255.829333 682.666667H533.333333a21.333333 21.333333 0 0 0 21.333334-21.333334z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="qingchuyangshi" unicode="" d="M214.016 173.568h593.92v-42.410667H214.016v42.410667z m578.048 312.106667l-180.693333 181.077333A53.376 53.376 0 0 1 573.738667 682.666667a45.653333 45.653333 0 0 1-32.64-13.226667l-313.941334-314.965333c-18.56-18.602667-17.322667-50.261333 2.688-70.4l68.010667-68.096h298.24l198.698667 199.338666c18.56 18.602667 17.322667 50.261333-2.730667 70.357334z m-213.546667-227.242667H315.434667L259.84 314.112c-3.968 4.010667-4.053333 9.088-2.730667 10.453333L430.08 497.92l193.92-193.92-45.44-45.568z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="shanchu" unicode="" d="M320 554.666667v-426.581334A42.666667 42.666667 0 0 1 362.581333 85.333333h298.88a42.666667 42.666667 0 0 1 42.538667 42.794667V554.666667h42.666667a21.333333 21.333333 0 1 1 0 42.666666h-469.333334a21.333333 21.333333 0 0 1 0-42.666666h42.666667zM426.666667 661.333333c0 11.776 9.642667 21.333333 21.248 21.333334h128.170666c11.690667 0 21.248-9.472 21.248-21.333334 0-11.776-9.642667-21.333333-21.248-21.333333h-128.170666A21.248 21.248 0 0 0 426.666667 661.333333zM362.666667 533.504A21.333333 21.333333 0 0 0 384.128 554.666667h255.701333c11.904 0 21.504-9.728 21.504-21.162667v-384.341333a21.333333 21.333333 0 0 0-21.504-21.162667H384.128c-11.733333 0-21.290667 9.386667-21.461333 21.162667V533.504z m42.666666-42.837333a21.290667 21.290667 0 1 0 42.666667 0v-298.666667a21.290667 21.290667 0 1 0-42.666667 0v298.666667z m85.333334 0a21.290667 21.290667 0 1 0 42.666666 0v-298.666667a21.290667 21.290667 0 1 0-42.666666 0v298.666667z m85.333333 0a21.290667 21.290667 0 1 0 42.666667 0v-298.666667a21.290667 21.290667 0 1 0-42.666667 0v298.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="wenbenjuzhongduiqi" unicode="" d="M234.666667 597.333333h554.666666a21.333333 21.333333 0 1 0 0-42.666666h-554.666666a21.333333 21.333333 0 1 0 0 42.666666zM341.333333 469.333333h341.333334a21.333333 21.333333 0 1 0 0-42.666666H341.333333a21.333333 21.333333 0 0 0 0 42.666666z m-106.666666-128h554.666666a21.333333 21.333333 0 1 0 0-42.666666h-554.666666a21.333333 21.333333 0 0 0 0 42.666666zM341.333333 213.333333h341.333334a21.333333 21.333333 0 1 0 0-42.666666H341.333333a21.333333 21.333333 0 0 0 0 42.666666z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="dayin" unicode="" d="M743.125333 554.666667c35.669333 0 64.384-28.885333 67.285334-65.024l0.256-6.101334V213.333333h-149.76v42.666667H768V483.541333c0 14.592-9.514667 26.154667-21.333333 28.16L743.168 512H280.874667c-12.16 0-22.784-10.24-24.576-24.149333l-0.298667-4.266667V256h127.36v-42.666667H213.333333V483.541333c0 36.906667 26.794667 67.712 61.653334 70.826667L280.874667 554.666667h462.250666zM682.666667 682.666667H341.333333v-170.666667h341.333334V682.666667z m-42.666667-42.666667v-85.333333H384V640h256zM682.666667 341.333333v-256H341.333333v256h341.333334z m-42.666667-42.666666H384v-170.666667h256v170.666667zM341.333333 469.333333h128v-42.666666H341.333333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="wenbenfenge" unicode="" d="M544.896 506.282667h110.762667v-46.933334c6.698667-6.613333 15.658667-6.613333 22.357333 0l84.949333 55.125334c6.698667 4.437333 6.698667 13.226667 0 19.84l-84.906666 57.386666c-6.741333 6.613333-15.701333 6.613333-22.4 0v-41.258666h-133.12l-89.429334-154.453334H343.722667v-0.128h-22.698667c-11.178667 0-22.357333-11.050667-22.357333-22.058666 0-11.050667 11.178667-22.058667 22.357333-22.058667h134.101333l-0.085333 0.128h0.426667l89.386666 154.453333h0.042667z m133.12-198.954667a15.061333 15.061333 0 0 1-22.314667 0v-43.690667h-66.133333l-67.029333 110.293334-22.357334-44.117334s62.592-103.68 67.072-110.293333h88.448V174.933333a15.061333 15.061333 0 0 1 22.314667 0l84.949333 55.168c6.698667 4.437333 6.698667 13.226667 0 19.84l-84.906666 57.386667h-0.042667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="hanshu" unicode="" d="M771.072 504.746667a6.698667 6.698667 0 0 1-0.512 9.514666 6.997333 6.997333 0 0 1-4.48 1.749334h-61.354667c-1.962667 0-3.84-0.853333-5.12-2.346667l-103.893333-122.709333a6.698667 6.698667 0 0 0-11.392 1.621333l-53.674667 119.381333a6.656 6.656 0 0 1-6.144 4.010667H381.866667l0.853333 3.968 6.741333 35.712c8.874667 46.933333 32.085333 68.864 72.533334 68.864 15.658667 0 29.994667-1.450667 41.258666-4.010667l11.861334 56.490667a197.888 197.888 0 0 1-46.464 5.12c-87.296 0-132.224-37.418667-148.650667-124.458667l-7.978667-41.813333H229.632a6.698667 6.698667 0 0 1-6.613333-5.376l-9.130667-43.818667a6.826667 6.826667 0 0 1 6.570667-8.106666h79.786666l-75.264-363.52a6.826667 6.826667 0 0 1 6.570667-8.234667H287.573333c3.242667 0 5.973333 2.346667 6.570667 5.418667l75.861333 366.165333h114.773334l57.685333-117.546667a6.570667 6.570667 0 0 0-1.024-7.381333l-152.746667-171.690667a6.826667 6.826667 0 0 1 5.12-11.264h61.44c2.005333 0 3.882667 0.853333 5.162667 2.389334l104.576 123.989333a6.826667 6.826667 0 0 0 11.392-1.493333l55.594667-120.661334a6.741333 6.741333 0 0 1 6.186666-3.968h54.613334a6.784 6.784 0 0 1 6.101333 9.770667L618.325333 328.533333a6.698667 6.698667 0 0 0 1.066667 7.466667l151.722667 168.661333-0.042667 0.042667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="jiangxu" unicode="" d="M430.848 229.802667H366.592V659.925333a6.656 6.656 0 0 1-6.741333 6.528h-47.36a6.656 6.656 0 0 1-6.741334-6.528v-430.122666H241.493333c-5.674667 0-8.874667-6.314667-5.333333-10.538667l94.72-115.2a6.912 6.912 0 0 1 10.624 0l94.72 115.2c3.413333 4.224 0.298667 10.538667-5.376 10.538667zM582.442667 89.301333l20.992 61.098667h103.68l21.205333-61.098667h43.690667L672.64 362.666667h-34.688l-99.370667-273.365334h43.861334z m112.896 97.877334h-79.872l39.552 119.424h0.768l39.552-119.466667zM742.570667 409.301333v39.168h-124.288l124.288 203.093334V682.666667h-169.685334v-36.949334h119.04l-123.904-201.941333v-34.474667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="dingbuduiqi" unicode="" d="M298.666667 512h426.666666v-42.666667H298.666667zM416 368.170667l90.496 90.496 90.538667-90.496-30.165334-30.165334-37.802666 37.717334v-290.090667h-42.666667v292.565333l-40.234667-40.192-30.165333 30.165334z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="tupian" unicode="" d="M810.666667 682.666667v-597.333334H213.333333V682.666667h597.333334z m-42.666667-263.381334l-233.984-190.890666-118.613333 98.218666L256 191.36V128h512v291.285333zM768 640H256v-392.704l159.146667 134.954667 119.04-98.602667L768 474.325333V640zM384 554.666667a42.666667 42.666667 0 1 0 0-85.333334 42.666667 42.666667 0 0 0 0 85.333334z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="xiangxia90" unicode="" d="M789.333333 367.786667l-213.333333-77.653334v-0.64l-1.621333 0.042667L426.666667 235.776v45.354667l106.666666 38.826666V472.362667l-106.666666 38.826666V556.544l147.498666-53.674667 1.834667-0.042666v-0.64l213.333333-77.610667v-56.789333z m-46.634666 28.416L576 456.874667v-121.386667l166.698667 60.714667zM384 208.170667l-90.496-90.538667-90.538667 90.538667 30.165334 30.165333 37.802666-37.76V661.333333h42.666667v-463.232l40.234667 40.234667 30.165333-30.165333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="shupaiwenzi" unicode="" d="M636.757333 597.333333l77.653334-213.333333h0.64l-0.042667-1.621333 53.76-147.712h-45.354667l-38.826666 106.666666h-152.405334l-38.826666-106.666666H448l53.674667 147.498666 0.042666 1.834667h0.64l77.610667 213.333333h56.789333z m-28.416-46.634666L547.669333 384h121.386667l-60.714667 166.698667zM394.368 197.504L303.786667 106.965333 213.333333 197.546667l30.165334 30.165333 37.802666-37.76V650.666667h42.666667v-463.232l40.234667 40.234666 30.165333-30.165333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="quanjiabiankuang" unicode="" d="M213.333333 85.333333V640h42.666667v-554.666667zM725.333333 85.333333V640h42.666667v-554.666667zM469.333333 85.333333V640h42.666667v-554.666667zM213.333333 640h554.666667v-42.666667H213.333333zM213.333333 384h554.666667v-42.666667H213.333333zM213.333333 128h554.666667v-42.666667H213.333333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="shengxu" unicode="" d="M430.848 538.24H366.592v-430.165333a6.656 6.656 0 0 0-6.741333-6.485334h-47.36a6.656 6.656 0 0 0-6.741334 6.485334V538.24H241.493333c-5.674667 0-8.874667 6.314667-5.333333 10.538667l94.72 115.2a6.912 6.912 0 0 0 10.624 0l94.72-115.2c3.413333-4.224 0.298667-10.538667-5.376-10.538667zM582.442667 409.301333l20.992 61.098667h103.68l21.205333-61.098667h43.690667L672.64 682.666667h-34.688l-99.370667-273.365334h43.861334z m112.896 97.877334h-79.872l39.552 119.424h0.768l39.552-119.466667zM742.570667 89.301333v39.168h-124.288l124.288 203.093334V362.666667h-169.685334v-36.949334h119.04l-123.904-201.941333v-34.474667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="caijian" unicode="" d="M341.333333 682.666667h42.666667v-469.333334H341.333333zM810.666667 256v-42.666667H341.333333v42.666667zM682.666667 85.333333h-42.666667V554.666667h42.666667zM213.333333 512V554.666667h469.333334v-42.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="jine" unicode="" d="M658.816 640l34.986667-24.490667-124.629334-177.92h119.04v-42.666666h-149.333333v-85.333334h149.333333v-42.666666h-149.333333v-128h-42.666667v128h-149.333333v42.666666h149.333333v85.333334h-149.333333v42.666666h119.04L341.333333 615.509333 376.32 640l141.226667-201.728L658.816 640z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="caidan1" unicode="" d="M256 256h85.333333a42.666667 42.666667 0 0 0 42.666667-42.666667v-85.333333a42.666667 42.666667 0 0 0-42.666667-42.666667H256a42.666667 42.666667 0 0 0-42.666667 42.666667v85.333333a42.666667 42.666667 0 0 0 42.666667 42.666667z m21.333333-42.666667a21.333333 21.333333 0 0 1-21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333333-21.333333h42.666667a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-42.666667zM682.666667 682.666667h85.333333a42.666667 42.666667 0 0 0 42.666667-42.666667v-85.333333a42.666667 42.666667 0 0 0-42.666667-42.666667h-85.333333a42.666667 42.666667 0 0 0-42.666667 42.666667V640a42.666667 42.666667 0 0 0 42.666667 42.666667z m21.333333-42.666667a21.333333 21.333333 0 0 1-21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333333-21.333333h42.666667a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-42.666667zM469.333333 256h85.333334a42.666667 42.666667 0 0 0 42.666666-42.666667v-85.333333a42.666667 42.666667 0 0 0-42.666666-42.666667h-85.333334a42.666667 42.666667 0 0 0-42.666666 42.666667v85.333333a42.666667 42.666667 0 0 0 42.666666 42.666667z m21.333334-42.666667a21.333333 21.333333 0 0 1-21.333334-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333334-21.333333h42.666666a21.333333 21.333333 0 0 1 21.333334 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333334 21.333333h-42.666666zM469.333333 682.666667h85.333334a42.666667 42.666667 0 0 0 42.666666-42.666667v-85.333333a42.666667 42.666667 0 0 0-42.666666-42.666667h-85.333334a42.666667 42.666667 0 0 0-42.666666 42.666667V640a42.666667 42.666667 0 0 0 42.666666 42.666667z m21.333334-42.666667a21.333333 21.333333 0 0 1-21.333334-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333334-21.333333h42.666666a21.333333 21.333333 0 0 1 21.333334 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333334 21.333333h-42.666666z m192-384h85.333333a42.666667 42.666667 0 0 0 42.666667-42.666667v-85.333333a42.666667 42.666667 0 0 0-42.666667-42.666667h-85.333333a42.666667 42.666667 0 0 0-42.666667 42.666667v85.333333a42.666667 42.666667 0 0 0 42.666667 42.666667z m21.333333-42.666667a21.333333 21.333333 0 0 1-21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333333-21.333333h42.666667a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-42.666667zM469.333333 469.333333h85.333334a42.666667 42.666667 0 0 0 42.666666-42.666666v-85.333334a42.666667 42.666667 0 0 0-42.666666-42.666666h-85.333334a42.666667 42.666667 0 0 0-42.666666 42.666666v85.333334a42.666667 42.666667 0 0 0 42.666666 42.666666z m21.333334-42.666666a21.333333 21.333333 0 0 1-21.333334-21.333334v-42.666666a21.333333 21.333333 0 0 1 21.333334-21.333334h42.666666a21.333333 21.333333 0 0 1 21.333334 21.333334v42.666666a21.333333 21.333333 0 0 1-21.333334 21.333334h-42.666666zM256 469.333333h85.333333a42.666667 42.666667 0 0 0 42.666667-42.666666v-85.333334a42.666667 42.666667 0 0 0-42.666667-42.666666H256a42.666667 42.666667 0 0 0-42.666667 42.666666v85.333334a42.666667 42.666667 0 0 0 42.666667 42.666666z m426.666667 0h85.333333a42.666667 42.666667 0 0 0 42.666667-42.666666v-85.333334a42.666667 42.666667 0 0 0-42.666667-42.666666h-85.333333a42.666667 42.666667 0 0 0-42.666667 42.666666v85.333334a42.666667 42.666667 0 0 0 42.666667 42.666666z m21.333333-42.666666a21.333333 21.333333 0 0 1-21.333333-21.333334v-42.666666a21.333333 21.333333 0 0 1 21.333333-21.333334h42.666667a21.333333 21.333333 0 0 1 21.333333 21.333334v42.666666a21.333333 21.333333 0 0 1-21.333333 21.333334h-42.666667z m-426.666667 0a21.333333 21.333333 0 0 1-21.333333-21.333334v-42.666666a21.333333 21.333333 0 0 1 21.333333-21.333334h42.666667a21.333333 21.333333 0 0 1 21.333333 21.333334v42.666666a21.333333 21.333333 0 0 1-21.333333 21.333334h-42.666667zM256 682.666667h85.333333a42.666667 42.666667 0 0 0 42.666667-42.666667v-85.333333a42.666667 42.666667 0 0 0-42.666667-42.666667H256a42.666667 42.666667 0 0 0-42.666667 42.666667V640a42.666667 42.666667 0 0 0 42.666667 42.666667z m21.333333-42.666667a21.333333 21.333333 0 0 1-21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333333-21.333333h42.666667a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-42.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="quxiaohebing" unicode="" d="M810.666667 682.666667v-597.333334H213.333333V682.666667h597.333334z m-42.666667-42.666667H256v-512h512V640zM533.333333 682.666667v-170.666667h-42.666666V682.666667zM405.333333 469.333333v-213.333333h-42.666666v213.333333zM533.333333 490.666667v-213.333334h-42.666666v213.333334zM661.333333 490.666667v-213.333334h-42.666666v213.333334zM533.333333 298.666667v-170.666667h-42.666666v170.666667zM810.666667 512v-256H213.333333V512h597.333334z m-42.666667-42.666667H256v-170.666666h512v170.666666z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="wenbenxiahuaxian" unicode="" d="M362.666667 640v-298.666667a149.333333 149.333333 0 0 1 298.453333-8.192L661.333333 341.333333V640h42.666667v-298.666667a192 192 0 0 0-383.786667-9.045333L320 341.333333V640h42.666667zM256 128m21.333333 0l469.333334 0q21.333333 0 21.333333-21.333333l0 0q0-21.333333-21.333333-21.333334l-469.333334 0q-21.333333 0-21.333333 21.333334l0 0q0 21.333333 21.333333 21.333333ZM256 640m21.333333 0l128 0q21.333333 0 21.333334-21.333333l0 0q0-21.333333-21.333334-21.333334l-128 0q-21.333333 0-21.333333 21.333334l0 0q0 21.333333 21.333333 21.333333ZM597.333333 640m21.333334 0l128 0q21.333333 0 21.333333-21.333333l0 0q0-21.333333-21.333333-21.333334l-128 0q-21.333333 0-21.333334 21.333334l0 0q0 21.333333 21.333334 21.333333Z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="shangbiankuang" unicode="" d="M213.333333 640h554.666667v-42.666667H213.333333zM213.333333 469.333333h42.666667v-42.666666H213.333333zM213.333333 298.666667h42.666667v-42.666667H213.333333zM213.333333 554.666667h42.666667v-42.666667H213.333333zM213.333333 384h42.666667v-42.666667H213.333333zM213.333333 213.333333h42.666667v-42.666666H213.333333zM469.333333 469.333333h42.666667v-42.666666h-42.666667zM725.333333 469.333333h42.666667v-42.666666h-42.666667zM725.333333 298.666667h42.666667v-42.666667h-42.666667zM725.333333 554.666667h42.666667v-42.666667h-42.666667zM725.333333 384h42.666667v-42.666667h-42.666667zM725.333333 213.333333h42.666667v-42.666666h-42.666667zM725.333333 128h42.666667v-42.666667h-42.666667zM469.333333 298.666667h42.666667v-42.666667h-42.666667zM469.333333 554.666667h42.666667v-42.666667h-42.666667zM469.333333 384h42.666667v-42.666667h-42.666667zM469.333333 213.333333h42.666667v-42.666666h-42.666667zM213.333333 128h42.666667v-42.666667H213.333333zM384 128h42.666667v-42.666667H384zM554.666667 128h42.666666v-42.666667h-42.666666zM298.666667 128h42.666666v-42.666667H298.666667zM469.333333 128h42.666667v-42.666667h-42.666667zM640 128h42.666667v-42.666667h-42.666667zM384 384h42.666667v-42.666667H384zM554.666667 384h42.666666v-42.666667h-42.666666zM298.666667 384h42.666666v-42.666667H298.666667zM469.333333 384h42.666667v-42.666667h-42.666667zM640 384h42.666667v-42.666667h-42.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="dingwei" unicode="" d="M618.666667 172.416V234.666667a21.333333 21.333333 0 1 0 42.666666 0v-62.250667a128.128 128.128 0 0 1 104.917334 104.917333H704a21.333333 21.333333 0 1 0 0 42.666667h62.250667a128.128 128.128 0 0 1-104.917334 104.874667V362.666667a21.333333 21.333333 0 1 0-42.666666 0v62.208a128.085333 128.085333 0 0 1-104.874667-104.874667H576a21.333333 21.333333 0 0 0 0-42.666667h-62.208a128.128 128.128 0 0 1 104.874667-104.917333z m149.333333 296.96a213.12 213.12 0 0 1-42.666667 24.874667V618.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-426.666667a21.333333 21.333333 0 0 1-21.333333-21.333333v-341.333334a21.333333 21.333333 0 0 1 21.333333-21.333333h153.6c2.986667-14.848 7.594667-29.098667 13.482667-42.666667H256a42.666667 42.666667 0 0 0-42.666667 42.666667V640a42.666667 42.666667 0 0 0 42.666667 42.666667h469.333333a42.666667 42.666667 0 0 0 42.666667-42.666667v-170.666667zM640 128a170.666667 170.666667 0 1 0 0 341.333333 170.666667 170.666667 0 0 0 0-341.333333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="sizhoujiabiankuang" unicode="" d="M213.333333 85.333333V640h42.666667v-554.666667zM725.333333 85.333333V640h42.666667v-554.666667zM213.333333 640h554.666667v-42.666667H213.333333zM213.333333 128h554.666667v-42.666667H213.333333zM384 341.333333v42.666667h42.666667v-42.666667zM554.666667 341.333333v42.666667h42.666666v-42.666667zM298.666667 341.333333v42.666667h42.666666v-42.666667zM469.333333 341.333333v42.666667h42.666667v-42.666667zM640 341.333333v42.666667h42.666667v-42.666667zM469.333333 256v42.666667h42.666667v-42.666667zM469.333333 426.666667v42.666666h42.666667v-42.666666zM469.333333 170.666667v42.666666h42.666667v-42.666666zM469.333333 341.333333v42.666667h42.666667v-42.666667zM469.333333 512V554.666667h42.666667v-42.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="cebianlanshouqi" unicode="" d="M256 576a21.333333 21.333333 0 0 0 21.333333 21.333333h469.333334a21.333333 21.333333 0 1 0 0-42.666666h-469.333334a21.290667 21.290667 0 0 0-21.333333 21.333333zM256 384c0 11.776 9.6 21.333333 21.461333 21.333333h277.077334a21.333333 21.333333 0 1 0 0-42.666666H277.504A21.333333 21.333333 0 0 0 256 384z m0-192a21.333333 21.333333 0 0 0 21.333333 21.333333h469.333334a21.333333 21.333333 0 1 0 0-42.666666h-469.333334a21.290667 21.290667 0 0 0-21.333333 21.333333z m368.896 283.562667a21.333333 21.333333 0 0 0 30.165333 30.165333l106.666667-106.666667a21.333333 21.333333 0 0 0 0-30.165333l-106.666667-106.666667a21.333333 21.333333 0 0 0-30.165333 30.165334L716.501333 384l-91.562666 91.605333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="hebing" unicode="" d="M810.666667 682.666667v-597.333334H213.333333V682.666667h597.333334z m-42.666667-42.666667H256v-512h512V640zM389.162667 469.333333l90.538666-90.496-90.538666-90.538666-30.165334 30.165333 37.802667 37.845333-119.466667-0.042666v42.666666l121.856 0.042667-40.192 40.192 30.165334 30.165333zM645.162667 469.333333L554.666667 378.837333l90.496-90.538666 30.165333 30.165333-37.76 37.845333 119.466667-0.042666v42.666666l-121.856 0.042667 40.149333 40.192-30.165333 30.165333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="xiangshangqingxie" unicode="" d="M290.944 606.634667l205.738667-95.914667 0.469333 0.426667 1.109333-1.152 142.506667-66.432-32.128-32.085334-102.826667 47.957334-107.818666-107.733334 48-102.912-32.085334-32.042666-66.346666 142.250666-1.28 1.28 0.469333 0.512-96 205.696 40.192 40.149334z m12.885333-53.034667l74.965334-160.810667 85.845333 85.845334L303.786667 553.6zM690.432 432.896h128v-128h-42.666667v53.418667l-325.845333-325.802667-30.165333 30.165333 327.552 327.552h-56.874667v42.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="shuipingduiqi" unicode="" d="M725.333333 362.666667H298.666667v42.666666h426.666666zM426.666667 261.504l90.496 90.496 90.538666-90.496-30.165333-30.165333-39.936 39.850666v-121.557333h-42.666667v119.765333l-38.101333-38.058666-30.165333 30.165333zM426.666667 506.837333l90.496-90.538666 90.538666 90.538666-30.165333 30.165334-39.936-39.893334V618.666667h-42.666667v-119.765334l-38.101333 38.101334-30.165333-30.165334z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="wenbenshanchuxian" unicode="" d="M298.666667 640h426.666666v-42.666667H298.666667zM533.290667 341.333333l0.042666-192h-42.666666l-0.042667 192h42.666667z m0.042666 277.333334l-0.042666-234.666667h-42.666667l0.042667 234.666667h42.666666zM320 640v-85.333333h-42.666667V640zM746.666667 640v-85.333333h-42.666667V640zM256 426.666667h512v-42.666667H256zM426.666667 170.666667h170.666666v-42.666667h-170.666666z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="wenbenyouduiqi" unicode="" d="M234.666667 597.333333h554.666666a21.333333 21.333333 0 1 0 0-42.666666h-554.666666a21.333333 21.333333 0 1 0 0 42.666666z m213.333333-128h341.333333a21.333333 21.333333 0 1 0 0-42.666666h-341.333333a21.333333 21.333333 0 0 0 0 42.666666z m-213.333333-128h554.666666a21.333333 21.333333 0 1 0 0-42.666666h-554.666666a21.333333 21.333333 0 0 0 0 42.666666z m213.333333-128h341.333333a21.333333 21.333333 0 1 0 0-42.666666h-341.333333a21.333333 21.333333 0 0 0 0 42.666666z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="qianjin" unicode="" d="M287.018667 476.672h310.997333v-42.666667H286.72l84.48-84.437333a21.333333 21.333333 0 1 0-30.208-30.165333l-120.746667 120.704a21.248 21.248 0 0 0 0 30.165333l120.746667 120.661333a21.333333 21.333333 0 0 0 30.165333-30.165333L287.018667 476.672z m524.330666-213.333333a213.333333 213.333333 0 0 1-213.333333 213.333333v-42.666667a170.666667 170.666667 0 0 0 170.666667-170.666666h42.666666z m0 0h-42.666666v-64a21.333333 21.333333 0 1 1 42.666666 0v64z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="tubiao" unicode="" d="M256 682.666667H213.333333v-597.333334h597.333334v42.666667H256zM490.666667 552.533333V341.333333h185.6c-19.2-72.533333-85.333333-128-164.266667-128-93.866667 0-170.666667 76.8-170.666667 170.666667 0 87.466667 66.133333 157.866667 149.333334 168.533333M512 597.333333c-117.333333 0-213.333333-96-213.333333-213.333333s96-213.333333 213.333333-213.333333 213.333333 96 213.333333 213.333333h-192V597.333333H512zM618.666667 635.733333c83.2-14.933333 134.4-74.666667 147.2-166.4H618.666667V635.733333m-42.666667 46.933334v-256H810.666667c0 149.333333-85.333333 256-234.666667 256z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="youbiankuang" unicode="" d="M768 640v-554.666667h-42.666667V640zM597.333333 640v-42.666667h-42.666666V640zM426.666667 640v-42.666667H384V640zM682.666667 640v-42.666667h-42.666667V640zM512 640v-42.666667h-42.666667V640zM341.333333 640v-42.666667H298.666667V640zM597.333333 384v-42.666667h-42.666666v42.666667zM597.333333 128v-42.666667h-42.666666v42.666667zM426.666667 128v-42.666667H384v42.666667zM682.666667 128v-42.666667h-42.666667v42.666667zM512 128v-42.666667h-42.666667v42.666667zM341.333333 128v-42.666667H298.666667v42.666667zM256 128v-42.666667H213.333333v42.666667zM426.666667 384v-42.666667H384v42.666667zM682.666667 384v-42.666667h-42.666667v42.666667zM512 384v-42.666667h-42.666667v42.666667zM341.333333 384v-42.666667H298.666667v42.666667zM256 640v-42.666667H213.333333V640zM256 469.333333v-42.666666H213.333333v42.666666zM256 298.666667v-42.666667H213.333333v42.666667zM256 554.666667v-42.666667H213.333333V554.666667zM256 384v-42.666667H213.333333v42.666667zM256 213.333333v-42.666666H213.333333v42.666666zM512 469.333333v-42.666666h-42.666667v42.666666zM512 298.666667v-42.666667h-42.666667v42.666667zM512 554.666667v-42.666667h-42.666667V554.666667zM512 384v-42.666667h-42.666667v42.666667zM512 213.333333v-42.666666h-42.666667v42.666666z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="baifenhao" unicode="" d="M653.525333 682.666667l36.949334-21.333334-320-554.24-36.949334 21.333334L653.525333 682.666667zM682.666667 426.666667c71.68 0 128-67.626667 128-149.333334S754.346667 128 682.666667 128s-128 67.626667-128 149.333333 56.32 149.333333 128 149.333334z m0-42.666667c-46.165333 0-85.333333-46.976-85.333334-106.666667s39.168-106.666667 85.333334-106.666666c46.165333 0 85.333333 46.976 85.333333 106.666666s-39.168 106.666667-85.333333 106.666667zM341.333333 661.333333c71.68 0 128-67.626667 128-149.333333s-56.32-149.333333-128-149.333333S213.333333 430.293333 213.333333 512s56.32 149.333333 128 149.333333z m0-42.666666C295.168 618.666667 256 571.690667 256 512s39.168-106.666667 85.333333-106.666667c46.165333 0 85.333333 46.976 85.333334 106.666667s-39.168 106.666667-85.333334 106.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="geshishua" unicode="" d="M725.333333 682.666667v-85.333334h85.333334v-234.666666h-298.666667V298.666667h21.333333v-213.333334h-85.333333v213.333334h21.333333v106.666666h298.666667V554.666667h-42.666667v-85.333334H213.333333V682.666667h512z m-42.666666-42.666667H256v-128h426.666667V640z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="baocun" unicode="" d="M341.333333 640H277.333333a21.333333 21.333333 0 0 1-21.333333-21.333333v-469.333334a21.333333 21.333333 0 0 1 21.333333-21.333333h469.333334a21.333333 21.333333 0 0 1 21.333333 21.333333v469.333334a21.333333 21.333333 0 0 1-21.333333 21.333333H682.666667v-213.333333a42.666667 42.666667 0 0 0-42.666667-42.666667H384a42.666667 42.666667 0 0 0-42.666667 42.666667V640zM256 682.666667h512a42.666667 42.666667 0 0 0 42.666667-42.666667v-512a42.666667 42.666667 0 0 0-42.666667-42.666667H256a42.666667 42.666667 0 0 0-42.666667 42.666667V640a42.666667 42.666667 0 0 0 42.666667 42.666667z m128-42.666667v-192a21.333333 21.333333 0 0 1 21.333333-21.333333h213.333334a21.333333 21.333333 0 0 1 21.333333 21.333333V640H384z m192-42.666667a21.333333 21.333333 0 0 0 21.333333-21.333333v-85.333333a21.333333 21.333333 0 0 0-42.666666 0v85.333333a21.333333 21.333333 0 0 0 21.333333 21.333333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="shujuyanzheng" unicode="" d="M764.330667 303.829333l30.165333-30.165333L734.165333 213.333333l60.330667-60.330666-30.165333-30.165334-60.330667 60.330667-60.330667-60.330667-30.165333 30.165334L673.834667 213.333333l-60.330667 60.330667 30.165333 30.165333 60.330667-60.330666 60.330667 60.330666zM725.333333 384v-42.666667H256v-128h256v-42.666666H213.333333v213.333333h512z m47.829334 209.664l30.165333-30.165333L682.666667 442.88l-30.165334-30.165333-90.496 90.453333 30.165334 30.208 60.330666-60.330667 120.661334 120.661334zM725.333333 640v-42.666667H256v-128h256v-42.666666H213.333333V640h512z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="jieduan" unicode="" d="M767.829333 682.666667h42.496v-597.333334h-42.496zM767.146667 342.784h-384v42.496h384v-42.496zM213.333333 682.666667h84.992v-597.333334H213.333333V682.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="geshitiaojian" unicode="" d="M810.666667 682.666667v-597.333334H213.333333V682.666667h597.333334z m-42.666667-320h-106.666667V128H768v234.666667z m-405.376 0h-106.666667V128h106.666667v234.666667z m256.042667-86.784L445.482667 128H618.666667v147.882667z m0 162.346666l-213.376-179.968v-108.885333l213.376 179.072v109.781333z m0 163.669334l-213.333334-179.029334v-108.885333l213.333334 179.072V601.898667zM768 640h-103.936l-2.730667-2.304V405.333333H768V640zM362.666667 640H256v-234.666667h106.666667V640z m235.008 0H405.333333v-161.408L597.674667 640z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="zidonghuanhang" unicode="" d="M213.333333 682.666667h85.12v-597.333334H213.333333V682.666667z m225.450667-477.44l25.557333 21.333333-72.362666 63.786667 72.362666 63.872-25.557333 21.248-93.610667-80.853334h4.266667-4.266667l93.610667-89.386666zM768 682.666667h42.581333v-597.333334H768zM540.928 528.725333H391.978667v-42.581333h148.949333c59.605333 0 106.410667-38.314667 106.410667-85.12s-46.805333-85.12-106.410667-85.12H391.978667v-42.581333h148.949333c85.12 0 157.482667 55.338667 157.482667 127.701333s-72.362667 127.701333-157.44 127.701333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="cebianlanzhankai" unicode="" d="M256 576a21.333333 21.333333 0 0 0 21.333333 21.333333h469.333334a21.333333 21.333333 0 1 0 0-42.666666h-469.333334a21.290667 21.290667 0 0 0-21.333333 21.333333z m192-192c0 11.776 9.557333 21.333333 21.461333 21.333333h277.034667a21.333333 21.333333 0 1 0 0-42.666666h-277.034667a21.333333 21.333333 0 0 0-21.461333 21.333333zM256 192a21.333333 21.333333 0 0 0 21.333333 21.333333h469.333334a21.333333 21.333333 0 1 0 0-42.666666h-469.333334a21.290667 21.290667 0 0 0-21.333333 21.333333z m143.061333 283.562667L307.541333 384l91.605334-91.562667a21.333333 21.333333 0 0 0-30.165334-30.165333l-106.666666 106.666667a21.333333 21.333333 0 0 0 0 30.165333l106.666666 106.666667a21.333333 21.333333 0 0 0 30.165334-30.165334z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="shaixuan2" unicode="" d="M736 682.666667H328.533333C288 682.666667 256 650.666667 256 610.133333c0-17.066667 6.4-34.133333 17.066667-46.933333 0-2.133333 2.133333-2.133333 2.133333-4.266667l160-160v-168.533333c0-6.4 2.133333-10.666667 6.4-14.933333l145.066667-123.733334c4.266667-2.133333 8.533333-4.266667 12.8-4.266666 6.4 0 10.666667 2.133333 14.933333 6.4 4.266667 4.266667 4.266667 10.666667 4.266667 14.933333V392.533333l170.666666 166.4 2.133334 2.133334c10.666667 12.8 17.066667 29.866667 17.066666 46.933333 0 42.666667-32 74.666667-72.533333 74.666667z m23.466667-93.866667s-2.133333-2.133333 0 0l-172.8-172.8c-4.266667-4.266667-6.4-8.533333-6.4-14.933333v-251.733334l-104.533334 87.466667V405.333333c0 6.4-2.133333 10.666667-6.4 14.933334l-162.133333 166.4-2.133333 2.133333c-6.4 6.4-8.533333 12.8-8.533334 21.333333 0 17.066667 14.933333 32 32 32h407.466667c17.066667 0 32-14.933333 32-32 0-8.533333-4.266667-14.933333-8.533333-21.333333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="xiangxiaqingxie" unicode="" d="M755.968 583.722667l-95.914667-205.738667 0.426667-0.469333-1.152-1.109334-66.432-142.506666-32.085333 32.128 47.957333 102.826666-107.733333 107.818667-102.912-48-32.042667 32.085333 142.250667 66.346667 1.28 1.28 0.512-0.469333 205.696 96 40.149333-40.192z m-53.034667-12.885334l-160.810666-74.965333 85.845333-85.845333 74.965333 160.810666zM582.229333 184.234667v-128h-128v42.666666h53.418667l-325.802667 325.845334 30.165334 30.165333 327.552-327.552v56.874667h42.666666z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="yichu" unicode="" d="M256 682.666667h85.333333v-597.333334H256zM711.466667 253.312l-26.154667 26.154667 89.6 85.845333H256v37.376h518.954667l-89.6 85.845333 26.112 26.112L842.154667 384zM573.354667 682.666667h42.666666v-242.688h-42.666666V682.666667z m0-354.688h42.666666V85.333333h-42.666666v242.688z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="chuizhihebing" unicode="" d="M810.666667 682.666667v-597.333334H213.333333V682.666667h597.333334z m-42.666667-42.666667H256v-512h512V640zM640 682.666667v-597.333334h-42.666667V682.666667zM426.666667 682.666667v-597.333334H384V682.666667zM597.034667 304.170667l-90.538667-90.538667L416 304.213333l30.165333 30.165334 37.802667-37.76V544h42.666667v-249.898667l40.234666 40.234667 30.165334-30.165333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="wenbenfensanduiqi" unicode="" d="M234.666667 597.333333h554.666666a21.333333 21.333333 0 1 0 0-42.666666h-554.666666a21.333333 21.333333 0 1 0 0 42.666666z m0-128h554.666666a21.333333 21.333333 0 1 0 0-42.666666h-554.666666a21.333333 21.333333 0 0 0 0 42.666666z m0-128h554.666666a21.333333 21.333333 0 1 0 0-42.666666h-554.666666a21.333333 21.333333 0 0 0 0 42.666666z m0-128h554.666666a21.333333 21.333333 0 1 0 0-42.666666h-554.666666a21.333333 21.333333 0 0 0 0 42.666666z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="zuobiankuang" unicode="" d="M213.333333 85.333333V640h42.666667v-554.666667zM384 85.333333v42.666667h42.666667v-42.666667zM554.666667 85.333333v42.666667h42.666666v-42.666667zM298.666667 85.333333v42.666667h42.666666v-42.666667zM469.333333 85.333333v42.666667h42.666667v-42.666667zM640 85.333333v42.666667h42.666667v-42.666667zM384 341.333333v42.666667h42.666667v-42.666667zM554.666667 341.333333v42.666667h42.666666v-42.666667zM298.666667 341.333333v42.666667h42.666666v-42.666667zM469.333333 341.333333v42.666667h42.666667v-42.666667zM640 341.333333v42.666667h42.666667v-42.666667zM469.333333 256v42.666667h42.666667v-42.666667zM469.333333 426.666667v42.666666h42.666667v-42.666666zM469.333333 170.666667v42.666666h42.666667v-42.666666zM469.333333 341.333333v42.666667h42.666667v-42.666667zM469.333333 512V554.666667h42.666667v-42.666667zM384 597.333333V640h42.666667v-42.666667zM554.666667 597.333333V640h42.666666v-42.666667zM298.666667 597.333333V640h42.666666v-42.666667zM469.333333 597.333333V640h42.666667v-42.666667zM640 597.333333V640h42.666667v-42.666667zM725.333333 597.333333V640h42.666667v-42.666667zM725.333333 85.333333v42.666667h42.666667v-42.666667zM725.333333 256v42.666667h42.666667v-42.666667zM725.333333 426.666667v42.666666h42.666667v-42.666666zM725.333333 170.666667v42.666666h42.666667v-42.666666zM725.333333 341.333333v42.666667h42.666667v-42.666667zM725.333333 512V554.666667h42.666667v-42.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="fenyechakan" unicode="" d="M810.666667 682.666667v-42.666667h-170.709334L640 128h170.666667v-42.666667h-213.333334V682.666667h213.333334z m-384 0l-0.042667-554.666667H426.666667v-42.666667H213.333333v42.666667h170.624L384 640H213.333333V682.666667h213.333334z m106.666666-512v-85.333334h-42.666666v85.333334h42.666666z m0 170.666666v-85.333333h-42.666666v85.333333h42.666666z m0 170.666667v-85.333333h-42.666666V512h42.666666z m0 170.666667v-85.333334h-42.666666V682.666667h42.666666z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="yunhang" unicode="" d="M268.032 372.565333l60.373333 60.330667 211.2-211.2-60.373333-60.330667zM780.928 583.765333l60.373333-60.330666-331.904-331.861334-60.330666 60.330667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="lie" unicode="" d="M234.666667 64v597.333333h42.666666v-597.333333zM405.333333 64v597.333333h42.666667v-597.333333zM576 64v597.333333h42.666667v-597.333333zM746.666667 64v597.333333h42.666666v-597.333333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="quanping" unicode="" d="M810.666667 682.666667v-597.333334H213.333333V682.666667h597.333334z m-42.666667-42.666667H256v-512h512V640zM341.333333 298.666667v-85.376L426.666667 213.333333v-42.666666H298.666667v128h42.666666z m384 0v-128h-128v42.666666h85.376L682.666667 298.666667h42.666666z m-298.666666 298.666666v-42.666666l-85.333334 0.042666V469.333333H298.666667V597.333333h128z m298.666666 0v-128h-42.666666l0.042666 85.333334H597.333333V597.333333h128z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="shaixuan" unicode="" d="M736 682.666667H328.533333C288 682.666667 256 650.666667 256 610.133333c0-17.066667 6.4-34.133333 17.066667-46.933333 0-2.133333 2.133333-2.133333 2.133333-4.266667l160-160v-168.533333c0-6.4 2.133333-10.666667 6.4-14.933333l145.066667-123.733334c4.266667-2.133333 8.533333-4.266667 12.8-4.266666 6.4 0 10.666667 2.133333 14.933333 6.4 4.266667 4.266667 4.266667 10.666667 4.266667 14.933333V392.533333l170.666666 166.4 2.133334 2.133334c10.666667 12.8 17.066667 29.866667 17.066666 46.933333 0 42.666667-32 74.666667-72.533333 74.666667z m23.466667-93.866667s-2.133333-2.133333 0 0l-172.8-172.8c-4.266667-4.266667-6.4-8.533333-6.4-14.933333v-251.733334l-104.533334 87.466667V405.333333c0 6.4-2.133333 10.666667-6.4 14.933334l-162.133333 166.4-2.133333 2.133333c-6.4 6.4-8.533333 12.8-8.533334 21.333333 0 17.066667 14.933333 32 32 32h407.466667c17.066667 0 32-14.933333 32-32 0-8.533333-4.266667-14.933333-8.533333-21.333333zM688.213333 517.589333l-101.546666-101.589333c-4.266667-4.266667-6.4-8.533333-6.4-14.933333v-251.733334l-104.533334 87.466667V405.333333c0 6.4-2.133333 10.666667-6.4 14.933334L403.626667 487.68l284.586666 29.909333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="gengxin" unicode="" d="M358.101333 640A298.666667 298.666667 0 0 1 512 85.333333a21.333333 21.333333 0 1 1 0 42.666667A256 256 0 0 0 405.333333 616.789333V532.906667A21.333333 21.333333 0 0 1 426.666667 512c11.776 0 21.333333 9.130667 21.333333 20.906667V661.76a20.565333 20.565333 0 0 1-6.229333 14.634667l0.042666 0.128A20.650667 20.650667 0 0 1 427.050667 682.666667H298.24a21.333333 21.333333 0 0 1-20.906667-21.333334c0-11.776 9.173333-21.333333 20.906667-21.333333h59.818667z m307.797334-512A298.666667 298.666667 0 0 1 512 682.666667a21.333333 21.333333 0 0 1 0-42.666667 256 256 0 0 0 106.666667-488.789333V235.093333A21.333333 21.333333 0 0 1 597.333333 256c-11.776 0-21.333333-9.130667-21.333333-20.906667v-128.810666a20.48 20.48 0 0 1 6.229333-14.634667l-0.042666-0.170667a20.650667 20.650667 0 0 1 14.762666-6.144h128.768a21.333333 21.333333 0 0 1 20.949334 21.333334c0 11.776-9.173333 21.333333-20.906667 21.333333h-59.861333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="qingchu" unicode="" d="M330.965333 625.365333l422.4-422.4-60.330666-60.330666-422.4 422.4zM753.365333 565.034667l-422.4-422.4-60.330666 60.330666 422.4 422.4z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="hang" unicode="" d="M213.333333 640h597.333334v-42.666667H213.333333zM213.333333 469.333333h597.333334v-42.666666H213.333333zM213.333333 298.666667h597.333334v-42.666667H213.333333zM213.333333 128h597.333334v-42.666667H213.333333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="zhushi" unicode="" d="M352 405.333333a32 32 0 1 1 64 0 32 32 0 0 1-64 0z m128 0a32 32 0 1 1 64 0 32 32 0 0 1-64 0z m128 0a32 32 0 1 1 64 0 32 32 0 0 1-64 0zM768 597.333333H256c-23.466667 0-42.666667-19.2-42.666667-42.666666v-298.666667c0-23.466667 19.2-42.666667 42.666667-42.666667h106.666667v-128l128 128H768c23.466667 0 42.666667 19.2 42.666667 42.666667V554.666667c0 23.466667-19.2 42.666667-42.666667 42.666666z m0-320c0-12.8-8.533333-21.333333-21.333333-21.333333H469.333333l-64-64V256h-128c-12.8 0-21.333333 8.533333-21.333333 21.333333v256c0 12.8 8.533333 21.333333 21.333333 21.333334h469.333334c12.8 0 21.333333-8.533333 21.333333-21.333334v-256z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="jian" unicode="" d="M213.333333 426.666667h597.333334v-85.333334H213.333333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="jisuan" unicode="" d="M774.058667 682.666667v-42.666667H310.784l236.288-256-236.330667-256h463.317334v-42.666667H213.333333l275.669334 298.666667L213.333333 682.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="jia" unicode="" d="M213.333333 426.666667h597.333334v-85.333334H213.333333zM554.666667 682.666667v-597.333334h-85.333334V682.666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="dibuduiqi" unicode="" d="M725.333333 170.666667H298.666667v42.666666h426.666666zM608 314.496l-90.496-90.496-90.538667 90.496 30.165334 30.165333 37.802666-37.717333V597.034667h42.666667v-292.565334l40.234667 40.192 30.165333-30.165333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="xiangshang90" unicode="" d="M789.333333 400.213333l-213.333333 77.653334v0.64l-1.621333-0.042667L426.666667 532.224v-45.354667l106.666666-38.826666v-152.405334l-106.666666-38.826666v-45.354667l147.498666 53.674667 1.834667 0.042666v0.64l213.333333 77.610667V400.213333z m-46.634666-28.416L576 311.125333v121.386667l166.698667-60.714667zM384 559.829333L293.504 650.368 202.965333 559.786667l30.165334-30.165334 37.802666 37.76V106.666667h42.666667V569.898667l40.234667-40.234667L384 559.829333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="wuxuanzhuang" unicode="" d="M549.546667 682.666667l77.653333-213.333334h0.64l-0.042667-1.621333 53.76-147.712h-45.354666l-38.826667 106.666667h-152.405333l-38.826667-106.666667H360.789333l53.674667 147.498667 0.042667 1.834666h0.64l77.610666 213.333334h56.789334z m-28.416-46.634667L460.458667 469.333333h121.386666l-60.714666 166.698667zM709.162667 277.333333l90.538666-90.496-90.538666-90.538666-30.165334 30.165333 37.76 37.802667H256v42.666666h463.232l-40.234667 40.234667 30.165334 30.165333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="xianshiyincangwangge" unicode="" d="M256 640h554.666667v-42.666667H256zM298.666667 640v-554.666667H256V640zM810.666667 640v-554.666667h-42.666667V640zM469.333333 640v-554.666667h-42.666666V640zM640 640v-554.666667h-42.666667V640zM256 469.333333h554.666667v-42.666666H256zM256 298.666667h554.666667v-42.666667H256zM256 128h554.666667v-42.666667H256z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="dongjie" unicode="" d="M256.426667 639.573333h255.317333v-553.130666H256.426667zM809.557333 682.069333v-595.626666H213.930667V682.069333h595.626666z m-42.538666-42.538666H256.426667v-510.549334h510.549333V639.573333zM490.453333 639.573333h42.538667v-510.592h-42.538667zM256.426667 363.008v42.538667h510.592v-42.538667zM256.384 669.738667l264.192-264.192-30.122667-30.08-264.192 264.192 30.122667 30.08z m-30.122667-317.184l30.122667 30.122666 264.192-264.192-30.122667-30.08-264.192 264.149334z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="wenbenzuoduiqi" unicode="" d="M234.666667 597.333333h554.666666a21.333333 21.333333 0 1 0 0-42.666666h-554.666666a21.333333 21.333333 0 1 0 0 42.666666z m0-128h341.333333a21.333333 21.333333 0 0 0 0-42.666666h-341.333333a21.333333 21.333333 0 0 0 0 42.666666z m0-128h554.666666a21.333333 21.333333 0 1 0 0-42.666666h-554.666666a21.333333 21.333333 0 0 0 0 42.666666z m0-128h341.333333a21.333333 21.333333 0 0 0 0-42.666666h-341.333333a21.333333 21.333333 0 0 0 0 42.666666z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="houtui" unicode="" d="M737.664 476.672H426.666667v-42.666667h311.296l-84.48-84.437333a21.333333 21.333333 0 0 1 30.208-30.165333l120.746666 120.704a21.290667 21.290667 0 0 1 0 30.165333l-120.746666 120.661333a21.333333 21.333333 0 0 1-30.165334-30.165333l84.138667-84.096zM213.333333 263.338667a213.333333 213.333333 0 0 0 213.333334 213.333333v-42.666667a170.666667 170.666667 0 0 1-170.666667-170.666666H213.333333z m0 0h42.666667v-64a21.333333 21.333333 0 0 0-42.666667 0v64z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="shuipinghebing" unicode="" d="M810.666667 682.666667v-597.333334H213.333333V682.666667h597.333334z m-42.666667-42.666667H256v-512h512V640zM810.666667 512v-256H213.333333V512h597.333334z m-42.666667-42.666667H256v-170.666666h512v170.666666zM581.162667 469.333333l90.538666-90.496-90.538666-90.538666-30.165334 30.165333 37.76 37.802667H341.333333v42.666666h249.898667l-40.234667 40.234667 30.165334 30.165333z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="xiabiankuang" unicode="" d="M768 85.333333H213.333333v42.666667h554.666667zM768 256h-42.666667v42.666667h42.666667zM768 426.666667h-42.666667v42.666666h42.666667zM768 170.666667h-42.666667v42.666666h42.666667zM768 341.333333h-42.666667v42.666667h42.666667zM768 512h-42.666667V554.666667h42.666667zM512 256h-42.666667v42.666667h42.666667zM256 256H213.333333v42.666667h42.666667zM256 426.666667H213.333333v42.666666h42.666667zM256 170.666667H213.333333v42.666666h42.666667zM256 341.333333H213.333333v42.666667h42.666667zM256 512H213.333333V554.666667h42.666667zM256 597.333333H213.333333V640h42.666667zM512 426.666667h-42.666667v42.666666h42.666667zM512 170.666667h-42.666667v42.666666h42.666667zM512 341.333333h-42.666667v42.666667h42.666667zM512 512h-42.666667V554.666667h42.666667zM768 597.333333h-42.666667V640h42.666667zM597.333333 597.333333h-42.666666V640h42.666666zM426.666667 597.333333H384V640h42.666667zM682.666667 597.333333h-42.666667V640h42.666667zM512 597.333333h-42.666667V640h42.666667zM341.333333 597.333333H298.666667V640h42.666666zM597.333333 341.333333h-42.666666v42.666667h42.666666zM426.666667 341.333333H384v42.666667h42.666667zM682.666667 341.333333h-42.666667v42.666667h42.666667zM512 341.333333h-42.666667v42.666667h42.666667zM341.333333 341.333333H298.666667v42.666667h42.666666z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="shezhi" unicode="" d="M794.496 470.314667a112.341333 112.341333 0 0 0-72.917333 53.034666 108.074667 108.074667 0 0 0-9.941334 88.234667 13.781333 13.781333 0 0 1-4.394666 14.592 299.392 299.392 0 0 1-95.616 55.424 14.421333 14.421333 0 0 1-15.146667-3.584 113.578667 113.578667 0 0 0-84.48-35.968 113.578667 113.578667 0 0 0-82.858667 35.157333 14.421333 14.421333 0 0 1-16.768 4.394667 298.154667 298.154667 0 0 1-95.573333-55.808 13.781333 13.781333 0 0 1-4.394667-14.634667c9.344-29.354667 5.717333-61.269333-9.984-87.808a112.341333 112.341333 0 0 0-72.96-53.034666 13.909333 13.909333 0 0 1-10.752-11.050667 281.856 281.856 0 0 1 0-109.610667c1.024-5.504 5.290667-9.813333 10.752-11.008a112.341333 112.341333 0 0 0 72.96-52.650666c15.786667-26.666667 19.413333-58.709333 9.941334-88.192a13.781333 13.781333 0 0 1 4.352-14.634667 299.392 299.392 0 0 1 95.658666-55.424h4.778667c3.882667 0 7.637333 1.578667 10.325333 4.394667a114.773333 114.773333 0 0 0 166.229334 0c4.096-5.546667 11.648-7.424 17.92-4.394667a298.666667 298.666667 0 0 1 97.194666 55.04c4.266667 3.541333 6.016 9.301333 4.394667 14.592a108.074667 108.074667 0 0 0 8.362667 88.618667 112.341333 112.341333 0 0 0 72.96 52.650666 13.909333 13.909333 0 0 1 10.709333 11.008 280.32 280.32 0 0 1 0 109.653334 14.336 14.336 0 0 1-10.752 11.008z m-26.709333-105.173334a136.106667 136.106667 0 0 1-79.658667-60.928 131.285333 131.285333 0 0 1-13.568-97.322666 259.114667 259.114667 0 0 0-69.717333-39.552A135.552 135.552 0 0 1 512 206.890667a137.941333 137.941333 0 0 1-92.842667-39.552 258.304 258.304 0 0 0-69.717333 39.552 129.664 129.664 0 0 1-14.762667 96.938666 136.106667 136.106667 0 0 1-78.506666 61.312 239.189333 239.189333 0 0 0 0 79.061334A136.106667 136.106667 0 0 1 335.872 505.173333c16.896 29.525333 21.76 64.426667 13.525333 97.365334a258.730667 258.730667 0 0 0 69.717334 39.552c25.386667-23.125333 58.453333-35.968 92.842666-36.010667a136.064 136.064 0 0 1 92.842667 36.010667c25.173333-9.472 48.682667-22.826667 69.717333-39.594667a131.285333 131.285333 0 0 1 14.336-96.896 136.106667 136.106667 0 0 1 79.701334-60.928c4.394667-26.197333 4.394667-52.906667 0-79.104l-0.810667-0.426667h0.042667zM513.706667 525.653333a119.466667 119.466667 0 1 1 0-238.933333 119.466667 119.466667 0 0 1 0 238.933333z m0-199.125333a79.658667 79.658667 0 1 0 0 159.36 79.658667 79.658667 0 0 0 0-159.36z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
|
||||
|
||||
</font>
|
||||
</defs></svg>
|
||||
|
Before Width: | Height: | Size: 85 KiB |
@@ -1,70 +0,0 @@
|
||||
/**
|
||||
* The default luckysheet config object.
|
||||
*/
|
||||
export default {
|
||||
container: "luckysheet", //容器的ID
|
||||
loading:{}, //自定义loading
|
||||
column: 60, //空表格默认的列数量
|
||||
row: 84, //空表格默认的行数据量
|
||||
allowCopy: true, //是否允许拷贝
|
||||
showtoolbar: true, //是否第二列显示工具栏
|
||||
showinfobar: true, //是否显示顶部名称栏
|
||||
showsheetbar: true, //是否显示底部表格名称区域
|
||||
showstatisticBar: true, //是否显示底部计数栏
|
||||
pointEdit: false, //是否是编辑器插入表格模式
|
||||
pointEditUpdate: null, //编辑器表格更新函数
|
||||
pointEditZoom: 1, //编辑器表格编辑时缩放比例
|
||||
// menu: "undo|redo|freezenrow|freezencolumn|download|share|chart|pivot",
|
||||
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]
|
||||
title: "Luckysheet Demo", //表格的名称
|
||||
userInfo:false,// 右上角的用户信息展示样式,支持 1. boolean类型:false:不展示,true:展示默认 '<i style="font-size:16px;color:#ff6a00;" class="fa fa-taxi" aria-hidden="true"></i> rabbit' ,2. HTML模板字符串或者普通字符串,如:'<i style="font-size:16px;color:#ff6a00;" class="fa fa-taxi" aria-hidden="true"></i> Lucky'或者'用户名', 3. 对象格式,设置 userImage:用户头像地址 和 userName:用户名 4. 不设置或者设置undefined同设置false
|
||||
userMenuItem: [{url:"www.baidu.com", "icon":'<i class="fa fa-folder" aria-hidden="true"></i>', "name":"我的表格"}, {url:"www.baidu.com", "icon":'<i class="fa fa-sign-out" aria-hidden="true"></i>', "name":"退出登陆"}], //点击右上角的用户信息弹出的菜单
|
||||
myFolderUrl: "www.baidu.com", //左上角<返回按钮的链接
|
||||
config: {}, //表格行高、列宽、合并单元格、公式等设置
|
||||
fullscreenmode: true, //是否全屏模式,非全屏模式下,标记框不会强制选中。
|
||||
devicePixelRatio: window.devicePixelRatio, //设备比例,比例越大表格分标率越高
|
||||
allowEdit: true, //是否允许前台编辑
|
||||
loadUrl: "", // 配置loadUrl的地址,luckysheet会通过ajax请求表格数据,默认载入status为1的sheet数据中的所有data,其余的sheet载入除data字段外的所有字段
|
||||
loadSheetUrl: "", //配置loadSheetUrl的地址,参数为gridKey(表格主键) 和 index(sheet主键合集,格式为[1,2,3]),返回的数据为sheet的data字段数据集合
|
||||
gridKey: "", // 表格唯一标识符
|
||||
updateUrl: "", //表格数据的更新地址
|
||||
updateImageUrl: "", //缩略图的更新地址
|
||||
allowUpdate: false, //是否允许编辑后的后台更新
|
||||
functionButton: "", //右上角功能按钮,例如'<button id="" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;">下载</button> <button id="" class="btn btn-primary btn-danger" style=" padding:3px 6px; font-size: 12px; margin-right: 10px;">分享</button> <button id="luckysheet-share-btn-title" class="btn btn-primary btn-danger" style=" padding:3px 6px; font-size: 12px; margin-right: 10px;">秀数据</button>'
|
||||
showConfigWindowResize: true, //图表和数据透视表的配置会在右侧弹出,设置弹出后表格是否会自动缩进
|
||||
enableAddRow: true,//允许添加行
|
||||
enableAddBackTop: true,//允许回到顶部
|
||||
// enablePage: false,//允许加载下一页
|
||||
autoFormatw: false, //自动格式化超过4位数的数字为 亿万格式 例:true or "true" or "TRUE"
|
||||
accuracy: undefined, //设置传输来的数值的精确位数,小数点后n位 传参数为数字或数字字符串,例: "0" 或 0
|
||||
pageInfo:{
|
||||
'queryExps':'',
|
||||
'reportId':'',
|
||||
'fields':'',
|
||||
'mobile':'',
|
||||
'frezon':'',
|
||||
'currentPage':'',
|
||||
"totalPage":10,
|
||||
"pageUrl":"",
|
||||
},
|
||||
editMode: false, //是否为编辑模式
|
||||
beforeCreateDom: null,//表格创建之前的方法
|
||||
fireMousedown: null, //单元格数据下钻
|
||||
lang: 'en', //language
|
||||
plugins: [], //plugins, e.g. ['chart']
|
||||
forceCalculation:false,//强制刷新公式,公式较多会有性能问题,慎用
|
||||
rowHeaderWidth: 46,
|
||||
columnHeaderHeight: 20,
|
||||
defaultColWidth:73,
|
||||
defaultRowHeight:19,
|
||||
defaultFontSize:10,
|
||||
limitSheetNameLength:true, //是否限制工作表名的长度
|
||||
defaultSheetNameMaxLength:31, //默认工作表名称的最大长度
|
||||
sheetFormulaBar:true, //是否显示公式栏
|
||||
showtoolbarConfig:{}, //自定义工具栏
|
||||
showsheetbarConfig:{}, //自定义底部sheet页
|
||||
showstatisticBarConfig:{}, //自定义计数栏
|
||||
cellRightClickConfig:{}, //自定义单元格右键菜单
|
||||
sheetRightClickConfig:{}, //自定义底部sheet页右击菜单
|
||||
imageUpdateMethodConfig:{}, //自定义图片同步方式
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
import menuButton from './menuButton';
|
||||
import formula from '../global/formula';
|
||||
import Store from '../store';
|
||||
import flatpickr from 'flatpickr'
|
||||
import dayjs from "dayjs";
|
||||
import { update, datenum_local } from '../global/format';
|
||||
import { setCellValue, setCellFormat } from '../global/api';
|
||||
|
||||
const fitFormat = (formatStr) => {
|
||||
let dateFormat = formatStr.replace(/y/g, 'Y');
|
||||
dateFormat = dateFormat.replace(/d/g, 'D');
|
||||
dateFormat = dateFormat.replace(/h/g, 'H');
|
||||
|
||||
dateFormat = dateFormat.replace(/上午\/下午/g, 'A');
|
||||
dateFormat = dateFormat.replace(/上午/g, 'A');
|
||||
dateFormat = dateFormat.replace(/下午/g, 'A');
|
||||
|
||||
dateFormat = dateFormat.replace(/AM\/PM/g, 'A');
|
||||
dateFormat = dateFormat.replace(/AM/g, 'A');
|
||||
dateFormat = dateFormat.replace(/PM/g, 'A');
|
||||
dateFormat = dateFormat.replace(/\"/g, '');
|
||||
|
||||
if (dateFormat.includes('A')) {
|
||||
dateFormat = dateFormat.replace(/H/g, 'h');
|
||||
}
|
||||
return dateFormat
|
||||
}
|
||||
|
||||
const cellDatePickerCtrl = {
|
||||
cellFocus: function (r, c, cell) {
|
||||
let row = Store.visibledatarow[r],
|
||||
row_pre = r == 0 ? 0 : Store.visibledatarow[r - 1];
|
||||
let col = Store.visibledatacolumn[c],
|
||||
col_pre = c == 0 ? 0 : Store.visibledatacolumn[c - 1];
|
||||
|
||||
let margeset = menuButton.mergeborer(Store.flowdata, r, c);
|
||||
let type = cell.ct.fa || 'YYYY-MM-DD';
|
||||
let defaultDate = update('yyyy-MM-dd hh:mm:ss', cell.v);
|
||||
let dateFormat = fitFormat(type);
|
||||
let enableTime = false;
|
||||
let noCalendar = false;
|
||||
let enableSeconds = false;
|
||||
let time_24hr = true;
|
||||
let hasChineseTime = false;
|
||||
|
||||
|
||||
if (!!margeset) {
|
||||
row = margeset.row[1];
|
||||
row_pre = margeset.row[0];
|
||||
|
||||
col = margeset.column[1];
|
||||
col_pre = margeset.column[0];
|
||||
}
|
||||
|
||||
$(".cell-date-picker").show().css({
|
||||
width: col - col_pre + 1,
|
||||
height: row - row_pre + 1,
|
||||
left: col_pre,
|
||||
top: row_pre
|
||||
})
|
||||
|
||||
if (/[上午下午]/.test(type)) {
|
||||
hasChineseTime = true
|
||||
}
|
||||
if (/[Hhms]/.test(dateFormat)) {
|
||||
enableTime = true;
|
||||
}
|
||||
if (!/[YMD]/.test(dateFormat)) {
|
||||
noCalendar = true;
|
||||
}
|
||||
if (/s/.test(dateFormat)) {
|
||||
enableSeconds = true;
|
||||
}
|
||||
if (/A/.test(dateFormat)) {
|
||||
time_24hr = false;
|
||||
}
|
||||
|
||||
const fp = flatpickr('#luckysheet-input-box', {
|
||||
allowInput: false,
|
||||
noCalendar,
|
||||
enableSeconds,
|
||||
enableTime,
|
||||
dateFormat,
|
||||
time_24hr,
|
||||
defaultDate,
|
||||
onClose() {
|
||||
setTimeout(() => {
|
||||
fp.destroy()
|
||||
}, 0);
|
||||
},
|
||||
parseDate: (datestr, format) => {
|
||||
return dayjs(datestr).toDate();
|
||||
},
|
||||
formatDate: (date, format, locale) => {
|
||||
if (hasChineseTime) {
|
||||
return dayjs(date).format(format).replace('AM', '上午').replace('PM', '下午')
|
||||
}
|
||||
return dayjs(date).format(format);
|
||||
},
|
||||
onChange: function (selectedDates, dateStr) {
|
||||
let currentVal = datenum_local(new Date(selectedDates))
|
||||
$("#luckysheet-rich-text-editor").html(dateStr);
|
||||
setCellValue(r, c, currentVal, { isRefresh: false })
|
||||
setCellFormat(r, c, 'ct', cell.ct)
|
||||
if (!enableTime) {
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("#luckysheet-input-box").click();
|
||||
},
|
||||
}
|
||||
|
||||
export default cellDatePickerCtrl;
|
||||
@@ -1,201 +0,0 @@
|
||||
import Store from '../store';
|
||||
import { replaceHtml,transformRangeToAbsolute,openSelfModel } from '../utils/util';
|
||||
import { modelHTML } from './constant';
|
||||
import sheetmanage from './sheetmanage';
|
||||
import menuButton from './menuButton';
|
||||
import {checkProtectionNotEnable} from './protection';
|
||||
import { jfrefreshgrid } from '../global/refresh';
|
||||
import locale from '../locale/locale';
|
||||
import { setcellvalue } from '../global/setdata';
|
||||
|
||||
|
||||
let isInitialCellFormatModel = false;
|
||||
|
||||
function initialCellFormatModelEvent(){
|
||||
const _locale = locale();
|
||||
const local_cellFormat = _locale.cellFormat;
|
||||
|
||||
$("#luckysheet-cellFormat-confirm").click(function(){
|
||||
let locked = $("#luckysheet-protection-check-locked").is(':checked');
|
||||
let hidden = $("#luckysheet-protection-check-hidden").is(':checked');
|
||||
|
||||
locked = locked==true?1:0;
|
||||
hidden = hidden==true?1:0;
|
||||
|
||||
let d = recycleSeletion(
|
||||
function(cell, r, c, data){
|
||||
if(cell==null){
|
||||
setcellvalue(r, c, data, {
|
||||
lo:locked,
|
||||
hi:hidden
|
||||
});
|
||||
}
|
||||
else{
|
||||
cell.lo = locked;
|
||||
cell.hi = hidden;
|
||||
}
|
||||
},
|
||||
function(){
|
||||
alert(local_cellFormat.sheetDataIsNullAlert);
|
||||
}
|
||||
);
|
||||
|
||||
jfrefreshgrid(d, undefined, undefined, false);
|
||||
|
||||
$("#luckysheet-cellFormat-config").hide();
|
||||
$("#luckysheet-modal-dialog-mask").hide();
|
||||
});
|
||||
}
|
||||
|
||||
function recycleSeletion(cycleFunction, dataIsNullFunction){
|
||||
if(Store.luckysheet_select_save != null && Store.luckysheet_select_save.length > 0){
|
||||
let sheetFile = sheetmanage.getSheetByIndex(), data=sheetFile.data;
|
||||
if(data!=null){
|
||||
|
||||
for(let i=0;i<Store.luckysheet_select_save.length;i++){
|
||||
let selection = Store.luckysheet_select_save[i];
|
||||
let row = selection.row, column = selection.column;
|
||||
for(let r=row[0];r<=row[1];r++){
|
||||
for(let c=column[0];c<=column[1];c++){
|
||||
let cell;
|
||||
|
||||
let margeset = menuButton.mergeborer(data, r, c);
|
||||
if (!!margeset) {
|
||||
// row = margeset.row[1];
|
||||
// row_pre = margeset.row[0];
|
||||
let row_index = margeset.row[2];
|
||||
// row_index_ed = margeset.row[3];
|
||||
|
||||
// col = margeset.column[1];
|
||||
// col_pre = margeset.column[0];
|
||||
let col_index = margeset.column[2];
|
||||
// col_index_ed = margeset.column[3];
|
||||
|
||||
cell = data[row_index][col_index];
|
||||
}
|
||||
else{
|
||||
cell = data[r][c];
|
||||
}
|
||||
|
||||
// if(cell.lo==null || cell.lo==1){
|
||||
// locked = true;
|
||||
// lockedCount++;
|
||||
// }
|
||||
|
||||
// if(cell.hi==1){
|
||||
// hidden = true;
|
||||
// hiddenCount++;
|
||||
// }
|
||||
|
||||
// count++;
|
||||
|
||||
cycleFunction(cell, r, c, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
// locked = true;
|
||||
dataIsNullFunction();
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
function initialCellFormatModel(){
|
||||
if(isInitialCellFormatModel){
|
||||
return;
|
||||
}
|
||||
|
||||
isInitialCellFormatModel = true;
|
||||
const _locale = locale();
|
||||
const local_cellFormat = _locale.cellFormat;
|
||||
const locale_button = _locale.button;
|
||||
|
||||
//Password input initial
|
||||
$("body").append(replaceHtml(modelHTML, {
|
||||
"id": "luckysheet-cellFormat-config",
|
||||
"addclass": "luckysheet-cellFormat-config",
|
||||
"title": local_cellFormat.cellFormatTitle,
|
||||
"content": `
|
||||
<div class="luckysheet-cellFormat-menu-c">
|
||||
<div class="luckysheet-cellFormat-menu luckysheet-cellFormat-menu-active" id="luckysheet-cellFormat-protection">
|
||||
${local_cellFormat.protection}
|
||||
</div>
|
||||
</div>
|
||||
<div id="luckysheet-cellFormat-protection-content" class="luckysheet-cellFormat-content">
|
||||
<div class="luckysheet-cellFormat-protection">
|
||||
<p>
|
||||
${local_cellFormat.protectionTips}
|
||||
</p>
|
||||
<label for="luckysheet-protection-check-locked"><input id="luckysheet-protection-check-locked" name="luckysheet-protection-check-locked" type="checkbox">${local_cellFormat.locked}</label><span>部分选中</span>
|
||||
<br/>
|
||||
<label for="luckysheet-protection-check-hidden"><input id="luckysheet-protection-check-hidden" name="luckysheet-protection-check-hidden" type="checkbox">${local_cellFormat.hidden}</label><span>全部选中</span>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
"botton": `<button id="luckysheet-cellFormat-confirm" class="btn btn-primary">${locale_button.confirm}</button>
|
||||
<button class="btn btn-default luckysheet-model-close-btn">${locale_button.cancel}</button>`,
|
||||
"style": "z-index:100003"
|
||||
}));
|
||||
|
||||
initialCellFormatModelEvent();
|
||||
}
|
||||
|
||||
export function openCellFormatModel(){
|
||||
initialCellFormatModel();
|
||||
|
||||
const _locale = locale();
|
||||
const local_cellFormat = _locale.cellFormat;
|
||||
const locale_button = _locale.button;
|
||||
|
||||
$("#luckysheet-rightclick-menu").hide();
|
||||
|
||||
if(!checkProtectionNotEnable(Store.currentSheetIndex)){
|
||||
return;
|
||||
}
|
||||
|
||||
let locked =false, hidden=false;
|
||||
let lockedCount=0, hiddenCount=0, count=0;
|
||||
if(Store.luckysheet_select_save != null && Store.luckysheet_select_save.length > 0){
|
||||
recycleSeletion(
|
||||
function(cell){
|
||||
// let cell = data[r][c];
|
||||
if(cell==null || cell.lo==null || cell.lo==1){
|
||||
locked = true;
|
||||
lockedCount++;
|
||||
}
|
||||
|
||||
if(cell!=null && cell.hi==1){
|
||||
hidden = true;
|
||||
hiddenCount++;
|
||||
}
|
||||
|
||||
count++;
|
||||
},
|
||||
function(){
|
||||
locked = true;
|
||||
}
|
||||
);
|
||||
}
|
||||
else{
|
||||
alert(local_cellFormat.selectionIsNullAlert);
|
||||
return;
|
||||
}
|
||||
|
||||
let tipsLock="", tipshidden="";
|
||||
if(locked){
|
||||
tipsLock = lockedCount==count?local_cellFormat.tipsAll:local_cellFormat.tipsPart;
|
||||
}
|
||||
|
||||
if(hidden){
|
||||
tipshidden = hiddenCount==count?local_cellFormat.tipsAll:local_cellFormat.tipsPart;
|
||||
}
|
||||
|
||||
$("#luckysheet-protection-check-locked").prop('checked',locked).parent().next().html(tipsLock);
|
||||
$("#luckysheet-protection-check-hidden").prop('checked',hidden).parent().next().html(tipshidden);
|
||||
|
||||
|
||||
openSelfModel("luckysheet-cellFormat-config");
|
||||
}
|
||||
@@ -1,766 +0,0 @@
|
||||
import sheetmanage from './sheetmanage';
|
||||
import server from './server';
|
||||
import pivotTable from './pivotTable';
|
||||
import conditionformat from './conditionformat';
|
||||
import luckysheetPostil from './postil';
|
||||
import imageCtrl from './imageCtrl';
|
||||
import dataVerificationCtrl from './dataVerificationCtrl';
|
||||
import hyperlinkCtrl from './hyperlinkCtrl';
|
||||
import {zoomRefreshView,zoomNumberDomBind} from './zoom';
|
||||
import { createFilter, createFilterOptions, labelFilterOptionState } from './filter';
|
||||
import formula from '../global/formula';
|
||||
import json from '../global/json';
|
||||
import cleargridelement from '../global/cleargridelement';
|
||||
import {
|
||||
jfrefreshgrid,
|
||||
jfrefreshgridall,
|
||||
jfrefreshrange,
|
||||
jfrefreshgrid_rhcw,
|
||||
jfrefreshgrid_adRC,
|
||||
jfrefreshgrid_deleteCell,
|
||||
jfrefreshgrid_pastcut,
|
||||
luckysheetrefreshgrid
|
||||
} from '../global/refresh';
|
||||
import { getSheetIndex } from '../methods/get';
|
||||
import Store from '../store';
|
||||
import { selectHightlightShow } from './select';
|
||||
import method from '../global/method';
|
||||
|
||||
function formulaHistoryHanddler(ctr, type="redo"){
|
||||
if(ctr==null){
|
||||
return;
|
||||
}
|
||||
|
||||
let data = ctr.data;
|
||||
if(type=="undo"){
|
||||
data = ctr.curdata;
|
||||
}
|
||||
for(let s = 0; s < ctr.range.length; s++){
|
||||
let st_r = ctr.range[s].row[0];
|
||||
let ed_r = ctr.range[s].row[1];
|
||||
let st_c = ctr.range[s].column[0];
|
||||
let ed_c = ctr.range[s].column[1];
|
||||
|
||||
for(let r = st_r;r < ed_r + 1; r++){
|
||||
for(let c = st_c; c < ed_c +1; c++){
|
||||
if(r > data.length - 1){
|
||||
break;
|
||||
}
|
||||
// formula.execFunctionExist.push({ "r": r, "c": c, "i": ctr.sheetIndex });
|
||||
if(data[r][c] == null || data[r][c].f==null || data[r][c].f==""){
|
||||
formula.delFunctionGroup(r,c,ctr.sheetIndex);
|
||||
}
|
||||
else if(data[r][c] != null && data[r][c].f!=null && data[r][c].f.length>0){
|
||||
formula.insertUpdateFunctionGroup(r,c,ctr.sheetIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const controlHistory = {
|
||||
redo: function (e) {
|
||||
if (Store.jfredo.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
let ctr = Store.jfredo.pop();
|
||||
Store.jfundo.push(ctr);
|
||||
Store.clearjfundo = false;
|
||||
|
||||
if (sheetmanage.hasSheet(ctr.sheetIndex) && Store.currentSheetIndex != ctr.sheetIndex) {
|
||||
sheetmanage.changeSheetExec(ctr.sheetIndex);
|
||||
}
|
||||
|
||||
// formula.execFunctionExist = [];
|
||||
|
||||
if (ctr.type == "datachange") {
|
||||
//如果有单元格为null,则对应公式应该删除
|
||||
formulaHistoryHanddler(ctr);
|
||||
|
||||
let allParam = {
|
||||
"cfg": ctr.config,
|
||||
"RowlChange": ctr.RowlChange,
|
||||
"cdformat": ctr.cdformat,
|
||||
"dataVerification": ctr.dataVerification,
|
||||
"dynamicArray": ctr.dynamicArray,
|
||||
"hyperlink": ctr.hyperlink,
|
||||
}
|
||||
//防止协同编辑时选区错误
|
||||
server.saveParam("mv", Store.currentSheetIndex, ctr.dataRange);
|
||||
// jfrefreshgrid(ctr.data, ctr.range, allParam);
|
||||
|
||||
/* ⚠️ 这个🌶️ dataRange表示的才是数据更新的位置 */
|
||||
jfrefreshgrid(ctr.data, ctr.dataRange, allParam);
|
||||
|
||||
// formula.execFunctionGroup(null, null, null, null, ctr.data);//取之前的数据
|
||||
}
|
||||
else if (ctr.type == "pasteCut") {
|
||||
let s = {
|
||||
"sheetIndex": ctr.source["sheetIndex"],
|
||||
"data": ctr.source["curData"],
|
||||
"curData": ctr.source["data"],
|
||||
"config": ctr.source["curConfig"],
|
||||
"curConfig": ctr.source["config"],
|
||||
"cdformat": ctr.source["curCdformat"],
|
||||
"curCdformat": ctr.source["cdformat"],
|
||||
"dataVerification": ctr.source["curDataVerification"],
|
||||
"curDataVerification": ctr.source["dataVerification"],
|
||||
"range": ctr.source["range"]
|
||||
}
|
||||
let t = {
|
||||
"sheetIndex": ctr.target["sheetIndex"],
|
||||
"data": ctr.target["curData"],
|
||||
"curData": ctr.target["data"],
|
||||
"config": ctr.target["curConfig"],
|
||||
"curConfig": ctr.target["config"],
|
||||
"cdformat": ctr.target["curCdformat"],
|
||||
"curCdformat": ctr.target["cdformat"],
|
||||
"dataVerification": ctr.target["curDataVerification"],
|
||||
"curDataVerification": ctr.target["dataVerification"],
|
||||
"range": ctr.target["range"]
|
||||
}
|
||||
jfrefreshgrid_pastcut(s, t, ctr.RowlChange);
|
||||
}
|
||||
else if (ctr.type == "rangechange") {
|
||||
//如果有单元格为null,则对应公式应该删除
|
||||
formulaHistoryHanddler(ctr);
|
||||
|
||||
jfrefreshrange(ctr.data, ctr.range, ctr.cdformat);
|
||||
// formula.execFunctionGroup(null, null, null, null, ctr.data);//取之前的数据
|
||||
}
|
||||
else if (ctr.type == "resize") {
|
||||
Store.config = ctr.config;
|
||||
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].config = Store.config;
|
||||
|
||||
if(ctr.ctrlType == "resizeR"){
|
||||
server.saveParam("cg", ctr.sheetIndex, ctr.config["rowlen"], { "k": "rowlen" });
|
||||
}
|
||||
else if(ctr.ctrlType == "resizeC"){
|
||||
server.saveParam("cg", ctr.sheetIndex, ctr.config["columnlen"], { "k": "columnlen" });
|
||||
}
|
||||
|
||||
let images = $.extend(true, {}, ctr.images);
|
||||
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].images = images;
|
||||
server.saveParam("all", ctr.sheetIndex, images, { "k": "images" });
|
||||
imageCtrl.images = images;
|
||||
imageCtrl.allImagesShow();
|
||||
|
||||
jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length);
|
||||
}
|
||||
else if (ctr.type == "cellRowChange") {
|
||||
jfrefreshgridall(ctr.data[0].length, ctr.data.length, ctr.data, ctr.config, ctr.range, ctr.ctrlType, ctr.ctrlValue, ctr.cdformat);
|
||||
}
|
||||
else if (ctr.type == "extend") {
|
||||
jfrefreshgridall(ctr.data[0].length, ctr.data.length, ctr.data, ctr.config, ctr.range, "dele", ctr.ctrlValue);
|
||||
}
|
||||
else if (ctr.type == "dele") {
|
||||
let ctrlValue1 = $.extend(true, {}, ctr.ctrlValue);
|
||||
ctrlValue1.restore = true;
|
||||
jfrefreshgridall(ctr.data[0].length, ctr.data.length, ctr.data, ctr.config, ctr.range, "extend", ctrlValue1);
|
||||
}
|
||||
else if (ctr.type == "addRC") { //增加行列撤销操作
|
||||
let ctrlValue = $.extend(true, {}, ctr.ctrlValue);
|
||||
if(ctrlValue.direction == "rightbottom"){
|
||||
ctrlValue.index = ctrlValue.index + 1;
|
||||
}
|
||||
|
||||
jfrefreshgrid_adRC(
|
||||
ctr.data,
|
||||
ctr.config,
|
||||
"delRC",
|
||||
ctrlValue,
|
||||
ctr.calc,
|
||||
ctr.filterObj,
|
||||
ctr.cf,
|
||||
ctr.af,
|
||||
ctr.freezen,
|
||||
ctr.dataVerification,
|
||||
ctr.hyperlink
|
||||
);
|
||||
}
|
||||
else if (ctr.type == "delRC") { //删除行列撤销操作
|
||||
let ctrlValue = $.extend(true, {}, ctr.ctrlValue);
|
||||
ctrlValue.restore = true;
|
||||
ctrlValue.direction = "lefttop";
|
||||
|
||||
jfrefreshgrid_adRC(
|
||||
ctr.data,
|
||||
ctr.config,
|
||||
"addRC",
|
||||
ctrlValue,
|
||||
ctr.calc,
|
||||
ctr.filterObj,
|
||||
ctr.cf,
|
||||
ctr.af,
|
||||
ctr.freezen,
|
||||
ctr.dataVerification,
|
||||
ctr.hyperlink
|
||||
);
|
||||
}
|
||||
else if (ctr.type == "deleteCell") { //删除单元格撤销操作
|
||||
jfrefreshgrid_deleteCell(
|
||||
ctr.data,
|
||||
ctr.config,
|
||||
ctr.ctrl,
|
||||
ctr.calc,
|
||||
ctr.filterObj,
|
||||
ctr.cf,
|
||||
ctr.dataVerification,
|
||||
ctr.hyperlink
|
||||
);
|
||||
}
|
||||
else if (ctr.type == "showHidRows") { // 隐藏、显示行 撤销操作
|
||||
//config
|
||||
Store.config = ctr.config;
|
||||
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].config = ctr.config;
|
||||
|
||||
server.saveParam("cg", ctr.sheetIndex, ctr.config["rowhidden"], { "k": "rowhidden" });
|
||||
|
||||
//行高、列宽 刷新
|
||||
jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length);
|
||||
}
|
||||
else if (ctr.type == "showHidCols") { // 隐藏、显示列 撤销操作
|
||||
//config
|
||||
Store.config = ctr.config;
|
||||
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].config = ctr.config;
|
||||
|
||||
server.saveParam("cg", ctr.sheetIndex, ctr.config["colhidden"], { "k": "colhidden" });
|
||||
|
||||
//行高、列宽 刷新
|
||||
jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length);
|
||||
}
|
||||
else if (ctr.type == "datachangeAll") {
|
||||
formula.execFunctionGroup();
|
||||
jfrefreshgridall(ctr.data[0].length, ctr.data.length, ctr.data, null, ctr.range, "datachangeAll", ctr.ctrlValue);
|
||||
}
|
||||
else if (ctr.type == "datachangeAll_filter_clear") {
|
||||
createFilterOptions(ctr.filter_save);
|
||||
|
||||
$("#luckysheet-filter-options-sheet" + Store.currentSheetIndex + " .luckysheet-filter-options").each(function(i){
|
||||
let $top = $(this);
|
||||
let item = ctr.optiongroups[i];
|
||||
labelFilterOptionState($top, item.optionstate, item.rowhidden, item.caljs, false, item.st_r, item.ed_r, item.cindex, item.st_c, item.ed_c);
|
||||
});
|
||||
|
||||
server.saveParam("fsr", Store.currentSheetIndex, { "filter": ctr.optiongroups, "filter_select": ctr.filter_save });
|
||||
|
||||
//config
|
||||
Store.config = ctr.config;
|
||||
Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config;
|
||||
|
||||
if(Store.config["rowhidden"] == null){
|
||||
Store.config["rowhidden"] = {};
|
||||
}
|
||||
|
||||
server.saveParam("cg", Store.currentSheetIndex, Store.config["rowhidden"], { "k": "rowhidden" });
|
||||
|
||||
//行高、列宽 刷新
|
||||
jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length);
|
||||
|
||||
$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide();
|
||||
}
|
||||
else if (ctr.type == "datachangeAll_filter") {
|
||||
let $top = $("#luckysheet-filter-options-sheet" + Store.currentSheetIndex + " .luckysheet-filter-options").eq(ctr["optionsindex"]);
|
||||
let st_r = $top.data("str"),
|
||||
ed_r = $top.data("edr"),
|
||||
cindex = $top.data("cindex"),
|
||||
st_c = $top.data("stc"),
|
||||
ed_c = $top.data("edc");
|
||||
|
||||
labelFilterOptionState($top, json.hasKey(ctr.rowhidenPre), ctr.rowhidenPre, ctr.caljs, true, st_r, ed_r, cindex, st_c, ed_c);
|
||||
|
||||
//config
|
||||
Store.config = ctr.config;
|
||||
Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config;
|
||||
|
||||
if(Store.config["rowhidden"] == null){
|
||||
Store.config["rowhidden"] = {};
|
||||
}
|
||||
|
||||
server.saveParam("cg", Store.currentSheetIndex, Store.config["rowhidden"], { "k": "rowhidden" });
|
||||
|
||||
//行高、列宽 刷新
|
||||
jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length);
|
||||
|
||||
$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide();
|
||||
}
|
||||
else if (ctr.type == "filtershow") {
|
||||
$('#luckysheet-filter-selected-sheet' + ctr.sheetIndex + ', #luckysheet-filter-options-sheet' + ctr.sheetIndex).remove();
|
||||
|
||||
if(server.allowUpdate){
|
||||
server.saveParam("all", ctr.sheetIndex, null, { "k": "filter_select" });
|
||||
}
|
||||
}
|
||||
else if(ctr.type == "pivotTable_change"){
|
||||
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].pivotTable = ctr.pivotTable;
|
||||
|
||||
pivotTable.getCellData(ctr.sheetIndex);
|
||||
pivotTable.initialPivotManage(true);
|
||||
|
||||
pivotTable.refreshPivotTable();
|
||||
}
|
||||
else if (ctr.type == "addSheet") {
|
||||
sheetmanage.deleteSheet(ctr.index);
|
||||
sheetmanage.changeSheetExec(ctr.currentSheetIndex);
|
||||
$("#luckysheet-input-box").removeAttr("style");
|
||||
$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide();
|
||||
}
|
||||
else if (ctr.type == "copySheet") {
|
||||
sheetmanage.deleteSheet(ctr.index);
|
||||
sheetmanage.changeSheetExec(ctr.copyindex);
|
||||
}
|
||||
else if (ctr.type == "deleteSheet") {
|
||||
let isDupName = false;
|
||||
|
||||
for(let i = 0; i < Store.luckysheetfile.length; i++){
|
||||
if(Store.luckysheetfile[i].name == ctr.name){
|
||||
isDupName = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!isDupName){
|
||||
sheetmanage.createSheetbydata(ctr, "isrenew");
|
||||
$("#luckysheet-input-box").removeAttr("style");
|
||||
$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide();
|
||||
}
|
||||
}
|
||||
else if (ctr.type == "sheetName") {
|
||||
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].name = ctr.oldtxt;
|
||||
$("#luckysheet-sheets-item" + ctr.sheetIndex).find(".luckysheet-sheets-item-name").html(ctr.oldtxt);
|
||||
|
||||
server.saveParam("all", ctr.sheetIndex, ctr.oldtxt, { "k": "name" });
|
||||
}
|
||||
else if (ctr.type == "sheetColor") {
|
||||
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].color = ctr.oldcolor;
|
||||
|
||||
let luckysheetcurrentSheetitem = $("#luckysheet-sheets-item" + ctr.sheetIndex);
|
||||
luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").remove();
|
||||
|
||||
if(ctr.oldcolor != null){
|
||||
luckysheetcurrentSheetitem.append('<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: ' + ctr.oldcolor + ';"></div>');
|
||||
}
|
||||
|
||||
server.saveParam("all", ctr.sheetIndex, ctr.oldcolor, { "k": "color" });
|
||||
}
|
||||
else if (ctr.type == "mergeChange") {
|
||||
let allParam = {
|
||||
"cfg": ctr.config,
|
||||
calc: ctr.calc,
|
||||
hyperlink: ctr.hyperlink,
|
||||
}
|
||||
|
||||
jfrefreshgrid(ctr.data, ctr.range, allParam);
|
||||
}
|
||||
else if (ctr.type == "updateDataVerification"){
|
||||
dataVerificationCtrl.ref(ctr.currentDataVerification, ctr.historyDataVerification, ctr.sheetIndex);
|
||||
}
|
||||
else if (ctr.type == "updateDataVerificationOfCheckbox"){
|
||||
dataVerificationCtrl.refOfCheckbox(ctr.currentDataVerification, ctr.historyDataVerification, ctr.sheetIndex, ctr.data, ctr.range);
|
||||
}
|
||||
else if (ctr.type == "updateHyperlink"){
|
||||
hyperlinkCtrl.ref(ctr.currentHyperlink, ctr.historyHyperlink, ctr.sheetIndex, ctr.data, ctr.range);
|
||||
}
|
||||
else if (ctr.type == "updateCF"){
|
||||
let historyRules = ctr["data"]["historyRules"];
|
||||
|
||||
for(let i = 0; i < historyRules.length; i++){
|
||||
//条件规则
|
||||
let sheetIndex = historyRules[i]["sheetIndex"];
|
||||
Store.luckysheetfile[getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"] = historyRules[i]["luckysheet_conditionformat_save"];
|
||||
|
||||
if(server.allowUpdate){
|
||||
server.saveParam("all", sheetIndex, historyRules[i]["luckysheet_conditionformat_save"], { "k": "luckysheet_conditionformat_save" });
|
||||
}
|
||||
}
|
||||
|
||||
//刷新一次表格
|
||||
conditionformat.ref();
|
||||
}
|
||||
else if (ctr.type == "updateAF"){
|
||||
let historyRules = ctr["data"]["historyRules"];
|
||||
|
||||
let index = getSheetIndex(ctr["sheetIndex"]);
|
||||
|
||||
Store.luckysheetfile[index]["luckysheet_alternateformat_save"] = $.extend(true, [], historyRules);
|
||||
|
||||
setTimeout(function () {
|
||||
luckysheetrefreshgrid();
|
||||
}, 1);
|
||||
}
|
||||
else if (ctr.type == "borderChange"){
|
||||
if(ctr.config["borderInfo"] == null){
|
||||
server.saveParam("cg", ctr.sheetIndex, [], { "k": "borderInfo" });
|
||||
}
|
||||
else{
|
||||
server.saveParam("cg", ctr.sheetIndex, ctr.config["borderInfo"], { "k": "borderInfo" });
|
||||
}
|
||||
|
||||
Store.config = ctr.config;
|
||||
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].config = Store.config;
|
||||
|
||||
setTimeout(function () {
|
||||
luckysheetrefreshgrid();
|
||||
}, 1);
|
||||
}
|
||||
else if (ctr.type == "postil"){
|
||||
luckysheetPostil.ref(ctr.data, ctr.rc);
|
||||
|
||||
for(let i = 0; i < ctr.rc.length; i++){
|
||||
let r = ctr.rc[i].split("_")[0];
|
||||
let c = ctr.rc[i].split("_")[1];
|
||||
|
||||
if(ctr.data[r][c] != null && ctr.data[r][c].ps != null){
|
||||
luckysheetPostil.buildPs(r, c, ctr.data[r][c].ps);
|
||||
}
|
||||
else{
|
||||
luckysheetPostil.buildPs(r, c, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ctr.type == "imageCtrl"){
|
||||
imageCtrl.images = $.extend(true, {}, ctr.images);
|
||||
imageCtrl.allImagesShow();
|
||||
imageCtrl.ref();
|
||||
}
|
||||
else if (ctr.type=="zoomChange"){
|
||||
Store.zoomRatio = ctr.zoomRatio;
|
||||
server.saveParam("all", ctr.sheetIndex, ctr.zoomRatio, { "k": "zoomRatio" });
|
||||
zoomNumberDomBind();
|
||||
zoomRefreshView();
|
||||
}
|
||||
|
||||
cleargridelement(e);
|
||||
if (ctr.range) {
|
||||
//使用深复制
|
||||
Store.luckysheet_select_save = $.extend(true, [],ctr.range);
|
||||
selectHightlightShow();
|
||||
}
|
||||
Store.clearjfundo = true;
|
||||
|
||||
// 撤销的时候curdata 跟 data 数据要调换一下
|
||||
let newCtr = {...ctr, ...{data: ctr.curdata, curdata: ctr.data}}
|
||||
// 钩子函数
|
||||
method.createHookFunction('updated', newCtr)
|
||||
|
||||
},
|
||||
undo: function () {
|
||||
if (Store.jfundo.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
let ctr = Store.jfundo.pop();
|
||||
Store.jfredo.push(ctr);
|
||||
Store.clearjfundo = false;
|
||||
|
||||
if (sheetmanage.hasSheet(ctr.sheetIndex) && Store.currentSheetIndex != ctr.sheetIndex) {
|
||||
sheetmanage.changeSheetExec(ctr.sheetIndex);
|
||||
}
|
||||
|
||||
if (ctr.type == "datachange") {
|
||||
formula.execFunctionGroup();
|
||||
|
||||
let allParam = {
|
||||
"cfg": ctr.curConfig,
|
||||
"RowlChange": ctr.RowlChange,
|
||||
"cdformat": ctr.curCdformat,
|
||||
"dataVerification": ctr.curDataVerification,
|
||||
"dynamicArray": ctr.curDynamicArray,
|
||||
"hyperlink": ctr.curHyperlink,
|
||||
}
|
||||
|
||||
formulaHistoryHanddler(ctr, "undo");
|
||||
|
||||
//防止协同编辑时选区错误
|
||||
server.saveParam("mv", Store.currentSheetIndex, ctr.range);
|
||||
jfrefreshgrid(ctr.curdata, ctr.range, allParam);
|
||||
}
|
||||
else if (ctr.type == "pasteCut") {
|
||||
jfrefreshgrid_pastcut(ctr.source, ctr.target, ctr.RowlChange);
|
||||
}
|
||||
else if (ctr.type == "rangechange") {
|
||||
// formula.execFunctionGroup();
|
||||
formulaHistoryHanddler(ctr, "undo");
|
||||
jfrefreshrange(ctr.curdata, ctr.range, ctr.curCdformat);
|
||||
}
|
||||
else if (ctr.type == "resize") {
|
||||
Store.config = ctr.curconfig;
|
||||
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].config = Store.config;
|
||||
|
||||
if(ctr.ctrlType == "resizeR"){
|
||||
server.saveParam("cg", ctr.sheetIndex, ctr.curconfig["rowlen"], { "k": "rowlen" });
|
||||
}
|
||||
else if(ctr.ctrlType == "resizeC"){
|
||||
server.saveParam("cg", ctr.sheetIndex, ctr.curconfig["columnlen"], { "k": "columnlen" });
|
||||
}
|
||||
|
||||
let images = $.extend(true, {}, ctr.curImages);
|
||||
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].images = images;
|
||||
server.saveParam("all", ctr.sheetIndex, images, { "k": "images" });
|
||||
imageCtrl.images = images;
|
||||
imageCtrl.allImagesShow();
|
||||
|
||||
jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length);
|
||||
}
|
||||
else if (ctr.type == "cellRowChange") {
|
||||
jfrefreshgridall(ctr.curdata[0].length, ctr.curdata.length, ctr.curdata, ctr.curconfig, ctr.currange, ctr.ctrlType, ctr.ctrlValue, ctr.curCdformat);
|
||||
}
|
||||
else if (ctr.type == "extend") {
|
||||
jfrefreshgridall(ctr.curdata[0].length, ctr.curdata.length, ctr.curdata, ctr.curconfig, ctr.currange, ctr.ctrlType, ctr.ctrlValue);
|
||||
}
|
||||
else if (ctr.type == "dele") {
|
||||
let ctrlValue1 = $.extend(true, {}, ctr.ctrlValue);
|
||||
ctrlValue1.restore = true;
|
||||
jfrefreshgridall(ctr.curdata[0].length, ctr.curdata.length, ctr.curdata, ctr.curconfig, ctr.currange, ctr.ctrlType, ctr.ctrlValue);
|
||||
}
|
||||
else if (ctr.type == "addRC") { //增加行列重做操作
|
||||
jfrefreshgrid_adRC(
|
||||
ctr.curData,
|
||||
ctr.curConfig,
|
||||
"addRC",
|
||||
ctr.ctrlValue,
|
||||
ctr.curCalc,
|
||||
ctr.curFilterObj,
|
||||
ctr.curCf,
|
||||
ctr.curAf,
|
||||
ctr.curFreezen,
|
||||
ctr.curDataVerification,
|
||||
ctr.curHyperlink
|
||||
);
|
||||
}
|
||||
else if (ctr.type == "delRC") { //删除行列重做操作
|
||||
jfrefreshgrid_adRC(
|
||||
ctr.curData,
|
||||
ctr.curConfig,
|
||||
"delRC",
|
||||
ctr.ctrlValue,
|
||||
ctr.curCalc,
|
||||
ctr.curFilterObj,
|
||||
ctr.curCf,
|
||||
ctr.curAf,
|
||||
ctr.curFreezen,
|
||||
ctr.curDataVerification,
|
||||
ctr.curHyperlink
|
||||
);
|
||||
}
|
||||
else if (ctr.type == "deleteCell") { //删除单元格重做操作
|
||||
jfrefreshgrid_deleteCell(
|
||||
ctr.curData,
|
||||
ctr.curConfig,
|
||||
ctr.ctrl,
|
||||
ctr.curCalc,
|
||||
ctr.curFilterObj,
|
||||
ctr.curCf,
|
||||
ctr.curDataVerification,
|
||||
ctr.curHyperlink
|
||||
);
|
||||
}
|
||||
else if (ctr.type == "showHidRows") { // 隐藏、显示行 重做操作
|
||||
//config
|
||||
Store.config = ctr.curconfig;
|
||||
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].config = ctr.curconfig;
|
||||
|
||||
server.saveParam("cg", ctr.sheetIndex, ctr.curconfig["rowhidden"], { "k": "rowhidden" });
|
||||
|
||||
//行高、列宽 刷新
|
||||
jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length);
|
||||
}
|
||||
else if (ctr.type == "showHidCols") { // 隐藏、显示列 重做操作
|
||||
//config
|
||||
Store.config = ctr.curconfig;
|
||||
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].config = ctr.curconfig;
|
||||
|
||||
server.saveParam("cg", ctr.sheetIndex, ctr.curconfig["colhidden"], { "k": "colhidden" });
|
||||
|
||||
//行高、列宽 刷新
|
||||
jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length);
|
||||
}
|
||||
else if (ctr.type == "datachangeAll") {
|
||||
formula.execFunctionGroup();
|
||||
jfrefreshgridall(ctr.curdata[0].length, ctr.curdata.length, ctr.curdata, null, ctr.currange, "datachangeAll", ctr.ctrlValue);
|
||||
}
|
||||
else if (ctr.type == "datachangeAll_filter_clear") {
|
||||
server.saveParam("fsc", Store.currentSheetIndex, null);
|
||||
|
||||
//config
|
||||
Store.config = ctr.curconfig;
|
||||
Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config;
|
||||
|
||||
server.saveParam("cg", Store.currentSheetIndex, {}, { "k": "rowhidden" });
|
||||
|
||||
//行高、列宽 刷新
|
||||
jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length);
|
||||
|
||||
|
||||
$("#luckysheet-filter-menu .luckysheet-filter-selected-input").hide().find("input").val();
|
||||
$("#luckysheet-filter-selected span").data("type", "0").data("type", null).text("无");
|
||||
|
||||
$('#luckysheet-filter-selected-sheet' + Store.currentSheetIndex + ', #luckysheet-filter-options-sheet' + Store.currentSheetIndex).remove();
|
||||
$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide();
|
||||
}
|
||||
else if (ctr.type == "datachangeAll_filter") {
|
||||
let $top = $("#luckysheet-filter-options-sheet" + Store.currentSheetIndex + " .luckysheet-filter-options").eq(ctr["optionsindex"]);
|
||||
let st_r = $top.data("str"),
|
||||
ed_r = $top.data("edr"),
|
||||
cindex = $top.data("cindex"),
|
||||
st_c = $top.data("stc"),
|
||||
ed_c = $top.data("edc");
|
||||
|
||||
labelFilterOptionState($top, json.hasKey(ctr.rowhidden), ctr.rowhidden, ctr.caljs, true, st_r, ed_r, cindex, st_c, ed_c);
|
||||
|
||||
//config
|
||||
Store.config = ctr.curconfig;
|
||||
Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].config = Store.config;
|
||||
|
||||
server.saveParam("cg", Store.currentSheetIndex, Store.config["rowhidden"], { "k": "rowhidden" });
|
||||
|
||||
//行高、列宽 刷新
|
||||
jfrefreshgrid_rhcw(Store.flowdata.length, Store.flowdata[0].length);
|
||||
|
||||
$("#luckysheet-filter-menu, #luckysheet-filter-submenu").hide();
|
||||
}
|
||||
else if (ctr.type == "filtershow") {
|
||||
Store.luckysheet_select_save = [ctr.filter_save];
|
||||
Store.filterchage = false;
|
||||
createFilter();
|
||||
Store.filterchage = true;
|
||||
server.saveParam("all", ctr.sheetIndex, ctr.filter_save, { "k": "filter_select" });
|
||||
}
|
||||
else if (ctr.type == "pivotTable_change") {
|
||||
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].pivotTable = ctr.pivotTablecur;
|
||||
pivotTable.getCellData(ctr.sheetIndex);
|
||||
pivotTable.initialPivotManage(true);
|
||||
pivotTable.refreshPivotTable();
|
||||
}
|
||||
else if (ctr.type == "addSheet") {
|
||||
sheetmanage.createSheetbydata(ctr.sheetconfig);
|
||||
$("#luckysheet-input-box").removeAttr("style");
|
||||
$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide();
|
||||
}
|
||||
else if (ctr.type == "copySheet") {
|
||||
sheetmanage.copySheet(ctr.copyindex);
|
||||
}
|
||||
else if (ctr.type == "deleteSheet") {
|
||||
sheetmanage.deleteSheet(ctr.index);
|
||||
|
||||
if (ctr.order == 0) {
|
||||
sheetmanage.changeSheetExec(Store.luckysheetfile[0].index);
|
||||
}
|
||||
else {
|
||||
sheetmanage.changeSheetExec(Store.luckysheetfile[ctr.order - 1].index);
|
||||
}
|
||||
|
||||
$("#luckysheet-input-box").removeAttr("style");
|
||||
$("#luckysheet-sheet-list, #luckysheet-rightclick-sheet-menu").hide();
|
||||
}
|
||||
else if (ctr.type == "sheetName") {
|
||||
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].name = ctr.txt;
|
||||
$("#luckysheet-sheets-item" + ctr.sheetIndex).find(".luckysheet-sheets-item-name").html(ctr.txt);
|
||||
|
||||
server.saveParam("all", ctr.sheetIndex, ctr.txt, { "k": "name" });
|
||||
}
|
||||
else if (ctr.type == "sheetColor") {
|
||||
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].color = ctr.color;
|
||||
|
||||
let luckysheetcurrentSheetitem = $("#luckysheet-sheets-item" + ctr.sheetIndex);
|
||||
luckysheetcurrentSheetitem.find(".luckysheet-sheets-item-color").remove();
|
||||
|
||||
if(ctr.color != null){
|
||||
luckysheetcurrentSheetitem.append('<div class="luckysheet-sheets-item-color" style=" position: absolute; width: 100%; height: 3px; bottom: 0px; left: 0px; background-color: ' + ctr.color + ';"></div>');
|
||||
}
|
||||
|
||||
server.saveParam("all", ctr.sheetIndex, ctr.color, { "k": "color" });
|
||||
}
|
||||
else if (ctr.type == "mergeChange") {
|
||||
let allParam = {
|
||||
"cfg": ctr.curConfig,
|
||||
calc: ctr.curCalc,
|
||||
hyperlink: ctr.curHyperlink,
|
||||
}
|
||||
|
||||
jfrefreshgrid(ctr.curData, ctr.range, allParam);
|
||||
}
|
||||
else if (ctr.type == "updateDataVerification"){
|
||||
dataVerificationCtrl.ref(ctr.historyDataVerification, ctr.currentDataVerification, ctr.sheetIndex);
|
||||
}
|
||||
else if (ctr.type == "updateDataVerificationOfCheckbox"){
|
||||
dataVerificationCtrl.refOfCheckbox(ctr.historyDataVerification, ctr.currentDataVerification, ctr.sheetIndex, ctr.curData, ctr.range);
|
||||
}
|
||||
else if (ctr.type == "updateHyperlink") {
|
||||
hyperlinkCtrl.ref(ctr.historyHyperlink, ctr.currentHyperlink, ctr.sheetIndex, ctr.curData, ctr.range);
|
||||
}
|
||||
else if (ctr.type == "updateCF"){
|
||||
let currentRules = ctr["data"]["currentRules"];
|
||||
|
||||
for(let i = 0; i < currentRules.length; i++){
|
||||
//条件规则
|
||||
let sheetIndex = currentRules[i]["sheetIndex"];
|
||||
Store.luckysheetfile[getSheetIndex(sheetIndex)]["luckysheet_conditionformat_save"] = currentRules[i]["luckysheet_conditionformat_save"];
|
||||
|
||||
if(server.allowUpdate){
|
||||
server.saveParam("all", sheetIndex, currentRules[i]["luckysheet_conditionformat_save"], { "k": "luckysheet_conditionformat_save" });
|
||||
}
|
||||
}
|
||||
|
||||
//刷新一次表格
|
||||
conditionformat.ref();
|
||||
}
|
||||
else if (ctr.type == "updateAF"){
|
||||
let currentRules = ctr["data"]["currentRules"];
|
||||
|
||||
let index = getSheetIndex(ctr["sheetIndex"]);
|
||||
|
||||
Store.luckysheetfile[index]["luckysheet_alternateformat_save"] = $.extend(true, [], currentRules);
|
||||
|
||||
setTimeout(function () {
|
||||
luckysheetrefreshgrid();
|
||||
}, 1);
|
||||
}
|
||||
else if (ctr.type == "borderChange"){
|
||||
server.saveParam("cg", ctr.sheetIndex, ctr.curconfig["borderInfo"], { "k": "borderInfo" });
|
||||
|
||||
Store.config = ctr.curconfig;
|
||||
Store.luckysheetfile[getSheetIndex(ctr.sheetIndex)].config = Store.config;
|
||||
|
||||
setTimeout(function () {
|
||||
luckysheetrefreshgrid();
|
||||
}, 1);
|
||||
}
|
||||
else if (ctr.type == "postil"){
|
||||
luckysheetPostil.ref(ctr.curdata, ctr.rc);
|
||||
|
||||
for(let i = 0; i < ctr.rc.length; i++){
|
||||
let r = ctr.rc[i].split("_")[0];
|
||||
let c = ctr.rc[i].split("_")[1];
|
||||
|
||||
if(ctr.curdata[r][c] != null && ctr.curdata[r][c].ps != null){
|
||||
luckysheetPostil.buildPs(r, c, ctr.curdata[r][c].ps);
|
||||
}
|
||||
else{
|
||||
luckysheetPostil.buildPs(r, c, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ctr.type == "imageCtrl"){
|
||||
imageCtrl.images = $.extend(true, {}, ctr.curImages);
|
||||
imageCtrl.allImagesShow();
|
||||
imageCtrl.ref();
|
||||
}
|
||||
else if (ctr.type=="zoomChange"){
|
||||
Store.zoomRatio = ctr.curZoomRatio;
|
||||
server.saveParam("all", ctr.sheetIndex, ctr.curZoomRatio, { "k": "zoomRatio" });
|
||||
zoomNumberDomBind();
|
||||
zoomRefreshView();
|
||||
}
|
||||
|
||||
if (ctr.range) {
|
||||
//使用深复制
|
||||
Store.luckysheet_select_save = $.extend(true, [],ctr.range);
|
||||
selectHightlightShow();
|
||||
}
|
||||
Store.clearjfundo = true;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
export default controlHistory;
|
||||
@@ -1,32 +0,0 @@
|
||||
import { chart } from '../expendPlugins/chart/plugin'
|
||||
import { print } from '../expendPlugins/print/plugin'
|
||||
import { exportXlsx } from '../expendPlugins/exportXlsx/plugin'
|
||||
|
||||
const pluginsObj = {
|
||||
'chart':chart,
|
||||
'print':print,
|
||||
'exportXlsx':exportXlsx
|
||||
}
|
||||
|
||||
const isDemo = true
|
||||
|
||||
/**
|
||||
* Register plugins
|
||||
*
|
||||
* plugins:[
|
||||
* {name:'chart'},
|
||||
* {name:'print'},
|
||||
* {name:'exportXlsx',config:{url:''}}
|
||||
* ]
|
||||
*/
|
||||
function initPlugins(plugins , options){
|
||||
if(plugins.length){
|
||||
plugins.forEach(plugin => {
|
||||
pluginsObj[plugin.name](options, plugin.config, isDemo)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
initPlugins
|
||||
}
|
||||
@@ -1,282 +0,0 @@
|
||||
import menuButton from './menuButton';
|
||||
import {luckysheetupdateCell} from './updateCell';
|
||||
import { keycode } from './constant';
|
||||
import {
|
||||
luckysheetMoveHighlightCell,
|
||||
} from './sheetMove';
|
||||
|
||||
import insertFormula from './insertFormula';
|
||||
import {
|
||||
rowLocation,
|
||||
colLocation,
|
||||
mouseposition
|
||||
} from '../global/location';
|
||||
import { isEditMode } from '../global/validate';
|
||||
import formula from '../global/formula';
|
||||
import tooltip from '../global/tooltip';
|
||||
import locale from '../locale/locale';
|
||||
import Store from '../store';
|
||||
|
||||
export function formulaBarInitial(){
|
||||
//公式栏处理
|
||||
|
||||
const _locale = locale();
|
||||
const locale_formula= _locale.formula;
|
||||
|
||||
$("#luckysheet-functionbox-cell").focus(function () {
|
||||
if(isEditMode()){//此模式下禁用公式栏
|
||||
return;
|
||||
}
|
||||
|
||||
if(Store.luckysheet_select_save.length > 0){
|
||||
let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1];
|
||||
|
||||
let row_index = last["row_focus"], col_index = last["column_focus"];
|
||||
|
||||
// let $input = $("#luckysheet-rich-text-editor"),value = $input.text();
|
||||
// if(value) {
|
||||
// formula.updatecell(row_index, col_index);
|
||||
// }
|
||||
luckysheetupdateCell(row_index, col_index, Store.flowdata, null, true);
|
||||
formula.rangeResizeTo = $("#luckysheet-functionbox-cell");
|
||||
}
|
||||
}).keydown(function (event) {
|
||||
if(isEditMode()){//此模式下禁用公式栏
|
||||
return;
|
||||
}
|
||||
|
||||
let ctrlKey = event.ctrlKey;
|
||||
let altKey = event.altKey;
|
||||
let shiftKey = event.shiftKey;
|
||||
let kcode = event.keyCode;
|
||||
let $inputbox = $("#luckysheet-input-box");
|
||||
|
||||
if (kcode == keycode.ENTER && parseInt($inputbox.css("top")) > 0) {
|
||||
if ($("#luckysheet-formula-search-c").is(":visible") && formula.searchFunctionCell != null) {
|
||||
formula.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active"));
|
||||
}
|
||||
else {
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
Store.luckysheet_select_save = [{ "row": [Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[0]], "column": [Store.luckysheetCellUpdate[1], Store.luckysheetCellUpdate[1]], "row_focus": Store.luckysheetCellUpdate[0], "column_focus": Store.luckysheetCellUpdate[1] }];
|
||||
luckysheetMoveHighlightCell("down", 1, "rangeOfSelect");
|
||||
//$("#luckysheet-functionbox-cell").blur();
|
||||
$("#luckysheet-rich-text-editor").focus();
|
||||
}
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (kcode == keycode.ESC && parseInt($inputbox.css("top")) > 0) {
|
||||
formula.dontupdate();
|
||||
luckysheetMoveHighlightCell("down", 0, "rangeOfSelect");
|
||||
//$("#luckysheet-functionbox-cell").blur();
|
||||
$("#luckysheet-rich-text-editor").focus();
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (kcode == keycode.F4 && parseInt($inputbox.css("top")) > 0) {
|
||||
formula.setfreezonFuc(event);
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (kcode == keycode.UP && parseInt($inputbox.css("top")) > 0) {
|
||||
if ($("#luckysheet-formula-search-c").is(":visible")) {
|
||||
let $up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").prev();
|
||||
if ($up.length == 0) {
|
||||
$up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").last();
|
||||
}
|
||||
$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active");
|
||||
$up.addClass("luckysheet-formula-search-item-active");
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
else if (kcode == keycode.DOWN && parseInt($inputbox.css("top")) > 0) {
|
||||
if ($("#luckysheet-formula-search-c").is(":visible")) {
|
||||
let $up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").next();
|
||||
if ($up.length == 0) {
|
||||
$up = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").first();
|
||||
}
|
||||
$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active");
|
||||
$up.addClass("luckysheet-formula-search-item-active");
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
else if (kcode == keycode.LEFT && parseInt($inputbox.css("top")) > 0) {
|
||||
formula.rangeHightlightselected($("#luckysheet-functionbox-cell"));
|
||||
}
|
||||
else if (kcode == keycode.RIGHT && parseInt($inputbox.css("top")) > 0) {
|
||||
formula.rangeHightlightselected($("#luckysheet-functionbox-cell"));
|
||||
}
|
||||
else if (!((kcode >= 112 && kcode <= 123) || kcode <= 46 || kcode == 144 || kcode == 108 || event.ctrlKey || event.altKey || (event.shiftKey && (kcode == 37 || kcode == 38 || kcode == 39 || kcode == 40))) || kcode == 8 || kcode == 32 || kcode == 46 || (event.ctrlKey && kcode == 86)) {
|
||||
formula.functionInputHanddler($("#luckysheet-rich-text-editor"), $("#luckysheet-functionbox-cell"), kcode);
|
||||
}
|
||||
}).click(function () {
|
||||
if(isEditMode()){//此模式下禁用公式栏
|
||||
return;
|
||||
}
|
||||
|
||||
formula.rangeHightlightselected($("#luckysheet-functionbox-cell"));
|
||||
});
|
||||
|
||||
//公式栏 取消(X)按钮
|
||||
$("#luckysheet-wa-functionbox-cancel").click(function () {
|
||||
if (!$(this).hasClass("luckysheet-wa-calculate-active")) {
|
||||
return;
|
||||
}
|
||||
//若有参数弹出框,隐藏
|
||||
if($("#luckysheet-search-formula-parm").is(":visible")){
|
||||
$("#luckysheet-search-formula-parm").hide();
|
||||
}
|
||||
//若有参数选取范围弹出框,隐藏
|
||||
if($("#luckysheet-search-formula-parm-select").is(":visible")){
|
||||
$("#luckysheet-search-formula-parm-select").hide();
|
||||
}
|
||||
|
||||
formula.dontupdate();
|
||||
luckysheetMoveHighlightCell("down", 0, "rangeOfSelect");
|
||||
});
|
||||
|
||||
//公式栏 确认()按钮
|
||||
$("#luckysheet-wa-functionbox-confirm").click(function () {
|
||||
if (!$(this).hasClass("luckysheet-wa-calculate-active")) {
|
||||
return;
|
||||
}
|
||||
//若有参数弹出框,隐藏
|
||||
if($("#luckysheet-search-formula-parm").is(":visible")){
|
||||
$("#luckysheet-search-formula-parm").hide();
|
||||
}
|
||||
//若有参数选取范围弹出框,隐藏
|
||||
if($("#luckysheet-search-formula-parm-select").is(":visible")){
|
||||
$("#luckysheet-search-formula-parm-select").hide();
|
||||
}
|
||||
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
luckysheetMoveHighlightCell("down", 0, "rangeOfSelect");
|
||||
});
|
||||
|
||||
//公式栏 fx按钮
|
||||
$("#luckysheet-wa-functionbox-fx").click(function () {
|
||||
//点击函数查找弹出框
|
||||
if(Store.luckysheet_select_save.length == 0){
|
||||
if(isEditMode()){
|
||||
alert(locale_formula.tipSelectCell);
|
||||
}
|
||||
else{
|
||||
tooltip.info(locale_formula.tipSelectCell,"");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1];
|
||||
|
||||
let row_index = last["row_focus"], col_index = last["column_focus"];
|
||||
|
||||
luckysheetupdateCell(row_index, col_index, Store.flowdata);
|
||||
|
||||
let cell = Store.flowdata[row_index][col_index];
|
||||
if(cell != null && cell.f != null){
|
||||
//单元格有计算
|
||||
let functionStr = formula.getfunctionParam(cell.f);
|
||||
if(functionStr.fn != null){
|
||||
//有函数公式
|
||||
insertFormula.formulaParmDialog(functionStr.fn, functionStr.param);
|
||||
}
|
||||
else{
|
||||
//无函数公式
|
||||
insertFormula.formulaListDialog();
|
||||
}
|
||||
}
|
||||
else{
|
||||
//单元格无计算
|
||||
$("#luckysheet-rich-text-editor").html('<span dir="auto" class="luckysheet-formula-text-color">=</span>');
|
||||
$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html());
|
||||
insertFormula.formulaListDialog();
|
||||
}
|
||||
|
||||
insertFormula.init();
|
||||
});
|
||||
|
||||
//公式选区操作
|
||||
$("#luckysheet-formula-functionrange").on("mousedown", ".luckysheet-copy", function (event) {
|
||||
formula.rangeMove = true;
|
||||
Store.luckysheet_scroll_status = true;
|
||||
formula.rangeMoveObj = $(this).parent();
|
||||
formula.rangeMoveIndex = $(this).parent().attr("rangeindex");
|
||||
|
||||
let mouse = mouseposition(event.pageX, event.pageY);
|
||||
let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft();
|
||||
let y = mouse[1] + $("#luckysheet-cell-main").scrollTop();
|
||||
$("#luckysheet-formula-functionrange-highlight-" + formula.rangeMoveIndex).find(".luckysheet-selection-copy-hc").css("opacity", 0.13);
|
||||
|
||||
let type = $(this).data("type");
|
||||
if (type == "top") {
|
||||
y += 3;
|
||||
}
|
||||
else if (type == "right") {
|
||||
x -= 3;
|
||||
}
|
||||
else if (type == "bottom") {
|
||||
y -= 3;
|
||||
}
|
||||
else if (type == "left") {
|
||||
x += 3;
|
||||
}
|
||||
|
||||
let row_index = rowLocation(y)[2];
|
||||
let col_index = colLocation(x)[2];
|
||||
|
||||
formula.rangeMovexy = [row_index, col_index];
|
||||
$("#luckysheet-sheettable").css("cursor", "move");
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
$("#luckysheet-formula-functionrange").on("mousedown", ".luckysheet-highlight", function (event) {
|
||||
formula.rangeResize = $(this).data("type");//开始状态resize
|
||||
formula.rangeResizeIndex = $(this).parent().attr("rangeindex");
|
||||
|
||||
let mouse = mouseposition(event.pageX, event.pageY),
|
||||
scrollLeft = $("#luckysheet-cell-main").scrollLeft(),
|
||||
scrollTop = $("#luckysheet-cell-main").scrollTop();
|
||||
let x = mouse[0] + scrollLeft;
|
||||
let y = mouse[1] + scrollTop;
|
||||
formula.rangeResizeObj = $(this).parent();
|
||||
$("#luckysheet-formula-functionrange-highlight-" + formula.rangeResizeIndex).find(".luckysheet-selection-copy-hc").css("opacity", 0.13);
|
||||
|
||||
if (formula.rangeResize == "lt") {
|
||||
x += 3;
|
||||
y += 3;
|
||||
}
|
||||
else if (formula.rangeResize == "lb") {
|
||||
x += 3;
|
||||
y -= 3;
|
||||
}
|
||||
else if (formula.rangeResize == "rt") {
|
||||
x -= 3;
|
||||
y += 3;
|
||||
}
|
||||
else if (formula.rangeResize == "rb") {
|
||||
x -= 3;
|
||||
y -= 3;
|
||||
}
|
||||
|
||||
let row_location = rowLocation(y),
|
||||
row = row_location[1],
|
||||
row_pre = row_location[0],
|
||||
row_index = row_location[2];
|
||||
let col_location = colLocation(x),
|
||||
col = col_location[1],
|
||||
col_pre = col_location[0],
|
||||
col_index = col_location[2];
|
||||
|
||||
let position = formula.rangeResizeObj.position();
|
||||
formula.rangeResizexy = [
|
||||
col_pre,
|
||||
row_pre,
|
||||
formula.rangeResizeObj.width(),
|
||||
formula.rangeResizeObj.height(),
|
||||
position.left + scrollLeft,
|
||||
position.top + scrollTop, col, row
|
||||
];
|
||||
formula.rangeResizeWinH = $("#luckysheet-cell-main")[0].scrollHeight;
|
||||
formula.rangeResizeWinW = $("#luckysheet-cell-main")[0].scrollWidth;
|
||||
Store.luckysheet_scroll_status = true;
|
||||
event.stopPropagation();
|
||||
});
|
||||
}
|
||||
@@ -1,365 +0,0 @@
|
||||
import { replaceHtml } from '../utils/util';
|
||||
import { getcellvalue } from '../global/getdata';
|
||||
import { luckysheetrefreshgrid } from '../global/refresh';
|
||||
import { rowLocation, colLocation, mouseposition } from '../global/location';
|
||||
import formula from '../global/formula';
|
||||
import tooltip from '../global/tooltip';
|
||||
import editor from '../global/editor';
|
||||
import { modelHTML } from './constant';
|
||||
import { selectHightlightShow } from './select';
|
||||
import server from './server';
|
||||
import sheetmanage from './sheetmanage';
|
||||
import luckysheetFreezen from './freezen';
|
||||
import menuButton from './menuButton';
|
||||
import { getSheetIndex } from '../methods/get';
|
||||
import locale from '../locale/locale';
|
||||
import Store from '../store';
|
||||
|
||||
const hyperlinkCtrl = {
|
||||
item: {
|
||||
linkType: 'external', //链接类型 external外部链接,internal内部链接
|
||||
linkAddress: '', //链接地址 网页地址或工作表单元格引用
|
||||
linkTooltip: '', //提示
|
||||
},
|
||||
hyperlink: null,
|
||||
createDialog: function(){
|
||||
let _this = this;
|
||||
|
||||
const _locale = locale();
|
||||
const hyperlinkText = _locale.insertLink;
|
||||
const toolbarText = _locale.toolbar;
|
||||
const buttonText = _locale.button;
|
||||
|
||||
$("#luckysheet-modal-dialog-mask").show();
|
||||
$("#luckysheet-insertLink-dialog").remove();
|
||||
|
||||
let sheetListOption = '';
|
||||
Store.luckysheetfile.forEach(item => {
|
||||
sheetListOption += `<option value="${item.name}">${item.name}</option>`;
|
||||
})
|
||||
|
||||
let content = `<div class="box">
|
||||
<div class="box-item">
|
||||
<label for="luckysheet-insertLink-dialog-linkText">${hyperlinkText.linkText}:</label>
|
||||
<input type="text" id="luckysheet-insertLink-dialog-linkText"/>
|
||||
</div>
|
||||
<div class="box-item">
|
||||
<label for="luckysheet-insertLink-dialog-linkType">${hyperlinkText.linkType}:</label>
|
||||
<select id="luckysheet-insertLink-dialog-linkType">
|
||||
<option value="external">${hyperlinkText.external}</option>
|
||||
<option value="internal">${hyperlinkText.internal}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="show-box show-box-external">
|
||||
<div class="box-item">
|
||||
<label for="luckysheet-insertLink-dialog-linkAddress">${hyperlinkText.linkAddress}:</label>
|
||||
<input type="text" id="luckysheet-insertLink-dialog-linkAddress" placeholder="${hyperlinkText.placeholder1}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="show-box show-box-internal">
|
||||
<div class="box-item">
|
||||
<label for="luckysheet-insertLink-dialog-linkSheet">${hyperlinkText.linkSheet}:</label>
|
||||
<select id="luckysheet-insertLink-dialog-linkSheet">
|
||||
${sheetListOption}
|
||||
</select>
|
||||
</div>
|
||||
<div class="box-item">
|
||||
<label for="luckysheet-insertLink-dialog-linkCell">${hyperlinkText.linkCell}:</label>
|
||||
<input type="text" id="luckysheet-insertLink-dialog-linkCell" value="A1" placeholder="${hyperlinkText.placeholder2}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-item">
|
||||
<label for="luckysheet-insertLink-dialog-linkTooltip">${hyperlinkText.linkTooltip}:</label>
|
||||
<input type="text" id="luckysheet-insertLink-dialog-linkTooltip" placeholder="${hyperlinkText.placeholder3}" />
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
$("body").append(replaceHtml(modelHTML, {
|
||||
"id": "luckysheet-insertLink-dialog",
|
||||
"addclass": "luckysheet-insertLink-dialog",
|
||||
"title": toolbarText.insertLink,
|
||||
"content": content,
|
||||
"botton": `<button id="luckysheet-insertLink-dialog-confirm" class="btn btn-primary">${buttonText.confirm}</button>
|
||||
<button class="btn btn-default luckysheet-model-close-btn">${buttonText.cancel}</button>`,
|
||||
"style": "z-index:100003"
|
||||
}));
|
||||
let $t = $("#luckysheet-insertLink-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 350).end(),
|
||||
myh = $t.outerHeight(),
|
||||
myw = $t.outerWidth();
|
||||
let winw = $(window).width(),
|
||||
winh = $(window).height();
|
||||
let scrollLeft = $(document).scrollLeft(),
|
||||
scrollTop = $(document).scrollTop();
|
||||
$("#luckysheet-insertLink-dialog").css({
|
||||
"left": (winw + scrollLeft - myw) / 2,
|
||||
"top": (winh + scrollTop - myh) / 3
|
||||
}).show();
|
||||
|
||||
_this.dataAllocation();
|
||||
},
|
||||
init: function (){
|
||||
let _this = this;
|
||||
|
||||
const _locale = locale();
|
||||
const hyperlinkText = _locale.insertLink;
|
||||
|
||||
//链接类型
|
||||
$(document).off("change.linkType").on("change.linkType", "#luckysheet-insertLink-dialog-linkType", function(e){
|
||||
let value = this.value;
|
||||
|
||||
$("#luckysheet-insertLink-dialog .show-box").hide();
|
||||
$("#luckysheet-insertLink-dialog .show-box-" + value).show();
|
||||
})
|
||||
|
||||
//确认按钮
|
||||
$(document).off("click.confirm").on("click.confirm", "#luckysheet-insertLink-dialog-confirm", function(e){
|
||||
let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1];
|
||||
let rowIndex = last.row_focus || last.row[0];
|
||||
let colIndex = last.column_focus || last.column[0];
|
||||
|
||||
//文本
|
||||
let linkText = $("#luckysheet-insertLink-dialog-linkText").val();
|
||||
|
||||
let linkType = $("#luckysheet-insertLink-dialog-linkType").val();
|
||||
let linkAddress = $("#luckysheet-insertLink-dialog-linkAddress").val();
|
||||
let linkSheet = $("#luckysheet-insertLink-dialog-linkSheet").val();
|
||||
let linkCell = $("#luckysheet-insertLink-dialog-linkCell").val();
|
||||
let linkTooltip = $("#luckysheet-insertLink-dialog-linkTooltip").val();
|
||||
|
||||
if(linkType == 'external'){
|
||||
if(!/^http[s]?:\/\//.test(linkAddress)){
|
||||
linkAddress = 'https://' + linkAddress;
|
||||
}
|
||||
|
||||
if(!/^http[s]?:\/\/([\w\-\.]+)+[\w-]*([\w\-\.\/\?%&=]+)?$/ig.test(linkAddress)){
|
||||
tooltip.info('<i class="fa fa-exclamation-triangle"></i>', hyperlinkText.tooltipInfo1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(!formula.iscelldata(linkCell)){
|
||||
tooltip.info('<i class="fa fa-exclamation-triangle"></i>', hyperlinkText.tooltipInfo2);
|
||||
return;
|
||||
}
|
||||
|
||||
linkAddress = linkSheet + "!" + linkCell;
|
||||
}
|
||||
|
||||
if(linkText == null || linkText.replace(/\s/g, '') == ''){
|
||||
linkText = linkAddress;
|
||||
}
|
||||
|
||||
let item = {
|
||||
linkType: linkType,
|
||||
linkAddress: linkAddress,
|
||||
linkTooltip: linkTooltip,
|
||||
}
|
||||
|
||||
let historyHyperlink = $.extend(true, {}, _this.hyperlink);
|
||||
let currentHyperlink = $.extend(true, {}, _this.hyperlink);
|
||||
|
||||
currentHyperlink[rowIndex + "_" + colIndex] = item;
|
||||
|
||||
let d = editor.deepCopyFlowData(Store.flowdata);
|
||||
let cell = d[rowIndex][colIndex];
|
||||
|
||||
if(cell == null){
|
||||
cell = {};
|
||||
}
|
||||
|
||||
cell.fc = 'rgb(0, 0, 255)';
|
||||
cell.un = 1;
|
||||
cell.v = cell.m = linkText;
|
||||
|
||||
d[rowIndex][colIndex] = cell;
|
||||
|
||||
_this.ref(
|
||||
historyHyperlink,
|
||||
currentHyperlink,
|
||||
Store.currentSheetIndex,
|
||||
d,
|
||||
[{ row: [rowIndex, rowIndex], column: [colIndex, colIndex] }]
|
||||
);
|
||||
|
||||
$("#luckysheet-modal-dialog-mask").hide();
|
||||
$("#luckysheet-insertLink-dialog").hide();
|
||||
})
|
||||
},
|
||||
dataAllocation: function(){
|
||||
let _this = this;
|
||||
|
||||
let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1];
|
||||
let rowIndex = last.row_focus || last.row[0];
|
||||
let colIndex = last.column_focus || last.column[0];
|
||||
|
||||
let hyperlink = _this.hyperlink || {};
|
||||
let item = hyperlink[rowIndex + "_" + colIndex] || {};
|
||||
|
||||
//文本
|
||||
let text = getcellvalue(rowIndex, colIndex, null, 'm');
|
||||
$("#luckysheet-insertLink-dialog-linkText").val(text);
|
||||
|
||||
//链接类型
|
||||
let linkType = item.linkType || 'external';
|
||||
$("#luckysheet-insertLink-dialog-linkType").val(linkType);
|
||||
|
||||
$("#luckysheet-insertLink-dialog .show-box").hide();
|
||||
$("#luckysheet-insertLink-dialog .show-box-" + linkType).show();
|
||||
|
||||
//链接地址
|
||||
let linkAddress = item.linkAddress || '';
|
||||
|
||||
if(linkType == 'external'){
|
||||
$("#luckysheet-insertLink-dialog-linkAddress").val(linkAddress);
|
||||
}
|
||||
else{
|
||||
if(formula.iscelldata(linkAddress)){
|
||||
let sheettxt = linkAddress.split("!")[0];
|
||||
let rangetxt = linkAddress.split("!")[1];
|
||||
|
||||
$("#luckysheet-insertLink-dialog-linkSheet").val(sheettxt);
|
||||
$("#luckysheet-insertLink-dialog-linkCell").val(rangetxt);
|
||||
}
|
||||
}
|
||||
|
||||
//提示
|
||||
let linkTooltip = item.linkTooltip || '';
|
||||
$("#luckysheet-insertLink-dialog-linkTooltip").val(linkTooltip);
|
||||
},
|
||||
cellFocus: function(r, c){
|
||||
let _this = this;
|
||||
|
||||
if(_this.hyperlink == null || _this.hyperlink[r + '_' + c] == null){
|
||||
return;
|
||||
}
|
||||
|
||||
let item = _this.hyperlink[r + '_' + c];
|
||||
|
||||
if(item.linkType == 'external'){
|
||||
window.open(item.linkAddress);
|
||||
}
|
||||
else{
|
||||
let cellrange = formula.getcellrange(item.linkAddress);
|
||||
let sheetIndex = cellrange.sheetIndex;
|
||||
let range = [{
|
||||
row: cellrange.row,
|
||||
column: cellrange.column
|
||||
}];
|
||||
|
||||
if(sheetIndex != Store.currentSheetIndex){
|
||||
$("#luckysheet-sheet-area div.luckysheet-sheets-item").removeClass("luckysheet-sheets-item-active");
|
||||
$("#luckysheet-sheets-item" + sheetIndex).addClass("luckysheet-sheets-item-active");
|
||||
|
||||
sheetmanage.changeSheet(sheetIndex);
|
||||
}
|
||||
|
||||
Store.luckysheet_select_save = range;
|
||||
selectHightlightShow(true);
|
||||
|
||||
let row_pre = cellrange.row[0] - 1 == -1 ? 0 : Store.visibledatarow[cellrange.row[0] - 1];
|
||||
let col_pre = cellrange.column[0] - 1 == -1 ? 0 : Store.visibledatacolumn[cellrange.column[0] - 1];
|
||||
|
||||
$("#luckysheet-scrollbar-x").scrollLeft(col_pre);
|
||||
$("#luckysheet-scrollbar-y").scrollTop(row_pre);
|
||||
}
|
||||
},
|
||||
overshow: function(event){
|
||||
let _this = this;
|
||||
|
||||
$("#luckysheet-hyperlink-overshow").remove();
|
||||
|
||||
if($(event.target).closest("#luckysheet-cell-main").length == 0){
|
||||
return;
|
||||
}
|
||||
|
||||
let mouse = mouseposition(event.pageX, event.pageY);
|
||||
let scrollLeft = $("#luckysheet-cell-main").scrollLeft();
|
||||
let scrollTop = $("#luckysheet-cell-main").scrollTop();
|
||||
let x = mouse[0] + scrollLeft;
|
||||
let y = mouse[1] + scrollTop;
|
||||
|
||||
if(luckysheetFreezen.freezenverticaldata != null && mouse[0] < (luckysheetFreezen.freezenverticaldata[0] - luckysheetFreezen.freezenverticaldata[2])){
|
||||
return;
|
||||
}
|
||||
|
||||
if(luckysheetFreezen.freezenhorizontaldata != null && mouse[1] < (luckysheetFreezen.freezenhorizontaldata[0] - luckysheetFreezen.freezenhorizontaldata[2])){
|
||||
return;
|
||||
}
|
||||
|
||||
let row_index = rowLocation(y)[2];
|
||||
let col_index = colLocation(x)[2];
|
||||
|
||||
let margeset = menuButton.mergeborer(Store.flowdata, row_index, col_index);
|
||||
if(!!margeset){
|
||||
row_index = margeset.row[2];
|
||||
col_index = margeset.column[2];
|
||||
}
|
||||
|
||||
if(_this.hyperlink == null || _this.hyperlink[row_index + "_" + col_index] == null){
|
||||
return;
|
||||
}
|
||||
|
||||
let item = _this.hyperlink[row_index + "_" + col_index];
|
||||
let linkTooltip = item.linkTooltip;
|
||||
|
||||
if(linkTooltip == null || linkTooltip.replace(/\s/g, '') == ''){
|
||||
linkTooltip = item.linkAddress;
|
||||
}
|
||||
|
||||
let row = Store.visibledatarow[row_index],
|
||||
row_pre = row_index - 1 == -1 ? 0 : Store.visibledatarow[row_index - 1];
|
||||
let col = Store.visibledatacolumn[col_index],
|
||||
col_pre = col_index - 1 == -1 ? 0 : Store.visibledatacolumn[col_index - 1];
|
||||
|
||||
if(!!margeset){
|
||||
row = margeset.row[1];
|
||||
row_pre = margeset.row[0];
|
||||
|
||||
col = margeset.column[1];
|
||||
col_pre = margeset.column[0];
|
||||
}
|
||||
|
||||
let html = `<div id="luckysheet-hyperlink-overshow" style="background:#fff;padding:5px 10px;border:1px solid #000;box-shadow:2px 2px #999;position:absolute;left:${col_pre}px;top:${row + 5}px;z-index:100;">
|
||||
<div>${linkTooltip}</div>
|
||||
<div>单击鼠标可以追踪</div>
|
||||
</div>`;
|
||||
|
||||
$(html).appendTo($("#luckysheet-cell-main"));
|
||||
},
|
||||
ref: function(historyHyperlink, currentHyperlink, sheetIndex, d, range){
|
||||
let _this = this;
|
||||
|
||||
if (Store.clearjfundo) {
|
||||
Store.jfundo.length = 0;
|
||||
|
||||
let redo = {};
|
||||
redo["type"] = "updateHyperlink";
|
||||
redo["sheetIndex"] = sheetIndex;
|
||||
redo["historyHyperlink"] = historyHyperlink;
|
||||
redo["currentHyperlink"] = currentHyperlink;
|
||||
redo["data"] = Store.flowdata;
|
||||
redo["curData"] = d;
|
||||
redo["range"] = range;
|
||||
Store.jfredo.push(redo);
|
||||
}
|
||||
|
||||
_this.hyperlink = currentHyperlink;
|
||||
Store.luckysheetfile[getSheetIndex(sheetIndex)].hyperlink = currentHyperlink;
|
||||
|
||||
Store.flowdata = d;
|
||||
editor.webWorkerFlowDataCache(Store.flowdata);//worker存数据
|
||||
Store.luckysheetfile[getSheetIndex(sheetIndex)].data = Store.flowdata;
|
||||
|
||||
//共享编辑模式
|
||||
if(server.allowUpdate){
|
||||
server.saveParam("all", sheetIndex, currentHyperlink, { "k": "hyperlink" });
|
||||
server.historyParam(Store.flowdata, sheetIndex, range[0]);
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
luckysheetrefreshgrid();
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
|
||||
export default hyperlinkCtrl;
|
||||
@@ -1,561 +0,0 @@
|
||||
import formula from '../global/formula';
|
||||
import editor from '../global/editor';
|
||||
import {luckysheetupdateCell} from './updateCell';
|
||||
import { modelHTML } from './constant';
|
||||
import { replaceHtml } from '../utils/util';
|
||||
import Store from '../store';
|
||||
import locale from '../locale/locale';
|
||||
|
||||
//if公式生成器
|
||||
const ifFormulaGenerator = {
|
||||
singleRangeFocus: false,
|
||||
init: function(){
|
||||
let _this = this;
|
||||
const _locale = locale();
|
||||
const locale_formula = _locale.formula;
|
||||
const locale_button = _locale.button;
|
||||
//点击选择单元格
|
||||
$(document).off("focus.IFcompareValue").on("focus.IFcompareValue", "#luckysheet-ifFormulaGenerator-dialog #compareValue", function(){
|
||||
$("#luckysheet-modal-dialog-mask").hide();
|
||||
_this.singleRangeFocus = true;
|
||||
});
|
||||
$(document).off("click.IFsingRange").on("click.IFsingRange", "#luckysheet-ifFormulaGenerator-dialog .singRange", function(){
|
||||
let value = $("#luckysheet-ifFormulaGenerator-dialog #compareValue").val().trim();
|
||||
|
||||
if(formula.iscelldata(value)){
|
||||
_this.singleRangeDialog(value);
|
||||
}
|
||||
else{
|
||||
_this.singleRangeDialog();
|
||||
}
|
||||
});
|
||||
$(document).off("click.IFsingRangeConfirm").on("click.IFsingRangeConfirm", "#luckysheet-ifFormulaGenerator-singleRange-confirm", function(){
|
||||
$("#luckysheet-formula-functionrange-select").hide();
|
||||
|
||||
$("#luckysheet-ifFormulaGenerator-singleRange-dialog").hide();
|
||||
$("#luckysheet-modal-dialog-mask").show();
|
||||
$("#luckysheet-ifFormulaGenerator-dialog").show();
|
||||
|
||||
let value = $(this).parents("#luckysheet-ifFormulaGenerator-singleRange-dialog").find("input").val().trim();
|
||||
$("#luckysheet-ifFormulaGenerator-dialog #compareValue").val(value);
|
||||
|
||||
_this.singleRangeFocus = false;
|
||||
});
|
||||
$(document).off("click.IFsingRangeCancel").on("click.IFsingRangeCancel", "#luckysheet-ifFormulaGenerator-singleRange-cancel", function(){
|
||||
$("#luckysheet-formula-functionrange-select").hide();
|
||||
|
||||
$("#luckysheet-ifFormulaGenerator-singleRange-dialog").hide();
|
||||
$("#luckysheet-modal-dialog-mask").show();
|
||||
$("#luckysheet-ifFormulaGenerator-dialog").show();
|
||||
|
||||
_this.singleRangeFocus = false;
|
||||
});
|
||||
$(document).off("click.IFsingRangeClose").on("click.IFsingRangeClose", "#luckysheet-ifFormulaGenerator-singleRange-dialog .luckysheet-modal-dialog-title-close", function(){
|
||||
$("#luckysheet-formula-functionrange-select").hide();
|
||||
|
||||
$("#luckysheet-modal-dialog-mask").show();
|
||||
$("#luckysheet-ifFormulaGenerator-dialog").show();
|
||||
|
||||
_this.singleRangeFocus = false;
|
||||
});
|
||||
|
||||
//点击选择范围
|
||||
$(document).off("click.IFmultiRange").on("click.IFmultiRange", "#luckysheet-ifFormulaGenerator-dialog .multiRange", function(){
|
||||
_this.multiRangeDialog();
|
||||
|
||||
_this.singleRangeFocus = false;
|
||||
});
|
||||
$(document).off("click.IFmultiRangeConfirm").on("click.IFmultiRangeConfirm", "#luckysheet-ifFormulaGenerator-multiRange-confirm", function(){
|
||||
$("#luckysheet-formula-functionrange-select").hide();
|
||||
$("#luckysheet-row-count-show").hide();
|
||||
$("#luckysheet-column-count-show").hide();
|
||||
|
||||
$("#luckysheet-ifFormulaGenerator-multiRange-dialog").hide();
|
||||
$("#luckysheet-modal-dialog-mask").show();
|
||||
$("#luckysheet-ifFormulaGenerator-dialog").show();
|
||||
|
||||
let value = $(this).parents("#luckysheet-ifFormulaGenerator-multiRange-dialog").find("input").val().trim();
|
||||
let cellrange = formula.getcellrange(value);
|
||||
let str_r = cellrange["row"][0],
|
||||
end_r = cellrange["row"][1],
|
||||
str_c = cellrange["column"][0],
|
||||
end_c = cellrange["column"][1];
|
||||
let d = editor.deepCopyFlowData(Store.flowdata);//取数据
|
||||
let arr = [];
|
||||
|
||||
//获取范围内所有数值
|
||||
for(let r = str_r; r <= end_r; r++){
|
||||
for(let c = str_c; c <= end_c; c++){
|
||||
if(d[r] != null && d[r][c] != null && d[r][c]["ct"] != null && d[r][c]["ct"]["t"] == "n"){
|
||||
arr.push(d[r][c]["v"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//从大到小排序
|
||||
for(let j = 0; j < arr.length; j++){
|
||||
for(let k = 0; k < arr.length - 1 - j; k++){
|
||||
if(arr[k] < arr[k + 1]){
|
||||
let temp = arr[k];
|
||||
arr[k] = arr[k + 1];
|
||||
arr[k + 1] = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let largeNum = arr[0];
|
||||
let smallNum = arr[arr.length - 1];
|
||||
|
||||
//赋值
|
||||
$("#luckysheet-ifFormulaGenerator-dialog #smallRange").val(smallNum);
|
||||
$("#luckysheet-ifFormulaGenerator-dialog #largeRange").val(largeNum);
|
||||
});
|
||||
$(document).off("click.IFmultiRangeCancel").on("click.IFmultiRangeCancel", "#luckysheet-ifFormulaGenerator-multiRange-cancel", function(){
|
||||
$("#luckysheet-formula-functionrange-select").hide();
|
||||
$("#luckysheet-row-count-show").hide();
|
||||
$("#luckysheet-column-count-show").hide();
|
||||
|
||||
$("#luckysheet-ifFormulaGenerator-multiRange-dialog").hide();
|
||||
$("#luckysheet-modal-dialog-mask").show();
|
||||
$("#luckysheet-ifFormulaGenerator-dialog").show();
|
||||
});
|
||||
$(document).off("click.IFmultiRangeClose").on("click.IFmultiRangeClose", "#luckysheet-ifFormulaGenerator-multiRange-dialog .luckysheet-modal-dialog-title-close", function(){
|
||||
$("#luckysheet-formula-functionrange-select").hide();
|
||||
$("#luckysheet-row-count-show").hide();
|
||||
$("#luckysheet-column-count-show").hide();
|
||||
|
||||
$("#luckysheet-modal-dialog-mask").show();
|
||||
$("#luckysheet-ifFormulaGenerator-dialog").show();
|
||||
});
|
||||
|
||||
//选择 划分方式
|
||||
$(document).on("change", "#DivisionMethod", function(){
|
||||
let value = $(this).find("option:selected").val();
|
||||
|
||||
if(value == "2"){
|
||||
$("#DivisionMethodVal").hide();
|
||||
}
|
||||
else{
|
||||
$("#DivisionMethodVal").show();
|
||||
}
|
||||
|
||||
$("#luckysheet-ifFormulaGenerator-dialog .ifList").empty();
|
||||
});
|
||||
|
||||
//点击 生成 按钮
|
||||
$(document).off("click.IFcreateBtn").on("click.IFcreateBtn", "#luckysheet-ifFormulaGenerator-dialog #createBtn", function(){
|
||||
let compareValue = $(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#compareValue").val().trim();
|
||||
if(compareValue == ""){
|
||||
_this.info(locale_formula.ifGenTipNotNullValue);
|
||||
return;
|
||||
}
|
||||
|
||||
let method = $(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#DivisionMethod option:selected").val();
|
||||
if(method == "2"){
|
||||
let itemHtml = '<div class="item">'+
|
||||
'<input type="number" class="smallNum formulaInputFocus"/>'+
|
||||
'<select class="operator">'+
|
||||
'<option value="0"> <= </option>'+
|
||||
'<option value="1"> < </option>'+
|
||||
'</select>'+
|
||||
'<span class="compareValue">'+ compareValue +'</span>'+
|
||||
'<select class="operator2">'+
|
||||
'<option value="0"> <= </option>'+
|
||||
'<option value="1" selected="selected"> < </option>'+
|
||||
'</select>'+
|
||||
'<input type="number" class="largeNum formulaInputFocus"/>'+
|
||||
'<span>'+locale_formula.ifGenTipLableTitile+':</span>'+
|
||||
'<input type="text" class="markText formulaInputFocus" value="">'+
|
||||
'<i class="fa fa-remove" aria-hidden="true"></i>'+
|
||||
'</div>';
|
||||
$("#luckysheet-ifFormulaGenerator-dialog .ifList").append(itemHtml);
|
||||
}
|
||||
else{
|
||||
let smallRange = $(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#smallRange").val().trim();
|
||||
let largeRange = $(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#largeRange").val().trim();
|
||||
let DivisionMethodVal = $(this).parents("#luckysheet-ifFormulaGenerator-dialog").find("#DivisionMethodVal").val().trim();
|
||||
|
||||
if(smallRange == "" || largeRange == ""){
|
||||
_this.info(locale_formula.ifGenTipRangeNotforNull);
|
||||
return;
|
||||
}
|
||||
else if(DivisionMethodVal == ""){
|
||||
_this.info(locale_formula.ifGenTipCutValueNotforNull);
|
||||
return;
|
||||
}
|
||||
|
||||
_this.getIfList(compareValue, smallRange, largeRange, method, DivisionMethodVal);
|
||||
}
|
||||
});
|
||||
|
||||
//点击 删除条件
|
||||
$(document).on("click", "#luckysheet-ifFormulaGenerator-dialog .item .fa-remove", function(){
|
||||
$(this).parents(".item").remove();
|
||||
});
|
||||
|
||||
//点击 确认 按钮
|
||||
$(document).off("click.IFconfirmBtn").on("click.IFconfirmBtn", "#luckysheet-ifFormulaGenerator-dialog-confirm", function(){
|
||||
let $item = $(this).parents("#luckysheet-ifFormulaGenerator-dialog").find(".ifList .item");
|
||||
let str = '';
|
||||
|
||||
$($item.toArray().reverse()).each(function(i, e){
|
||||
let smallNum = $(e).find(".smallNum").val().trim();
|
||||
let largeNum = $(e).find(".largeNum").val().trim();
|
||||
let operator = $(e).find(".operator option:selected").val();
|
||||
let operator2 = $(e).find(".operator2 option:selected").val();
|
||||
let compareValue = $(e).find(".compareValue").text();
|
||||
|
||||
let markText = $(e).find(".markText").val().trim();
|
||||
if(markText == ""){
|
||||
markText = locale_formula.ifGenTipLableTitile + (i + 1);
|
||||
}
|
||||
|
||||
if(smallNum == "" && largeNum == ""){
|
||||
return true;
|
||||
}
|
||||
|
||||
let s;
|
||||
if(operator == "0"){
|
||||
s = compareValue + ">=" + smallNum;
|
||||
}
|
||||
else{
|
||||
s = compareValue + ">" + smallNum;
|
||||
}
|
||||
|
||||
let l;
|
||||
if(operator2 == "0"){
|
||||
l = compareValue + "<=" + largeNum;
|
||||
}
|
||||
else{
|
||||
l = compareValue + "<" + largeNum;
|
||||
}
|
||||
|
||||
let a;
|
||||
if(i == 0 && largeNum == ""){
|
||||
a = s;
|
||||
}
|
||||
else if(i == ($item.length - 1) && smallNum == ""){
|
||||
a = l;
|
||||
}
|
||||
else{
|
||||
a = "and("+s+","+l+")";
|
||||
}
|
||||
|
||||
if(i == 0){
|
||||
str = 'if('+ a +',"'+ markText +'")';
|
||||
}
|
||||
else{
|
||||
str = 'if('+ a +',"'+ markText +'",'+ str +')';
|
||||
}
|
||||
})
|
||||
|
||||
if(str.length == 0){
|
||||
_this.info(locale_formula.ifGenTipNotGenCondition);
|
||||
return;
|
||||
}
|
||||
|
||||
$("#luckysheet-modal-dialog-mask").hide();
|
||||
$("#luckysheet-ifFormulaGenerator-dialog").hide();
|
||||
|
||||
let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1];
|
||||
let row_index = last["row_focus"],
|
||||
col_index = last["column_focus"];
|
||||
|
||||
luckysheetupdateCell(row_index, col_index, Store.flowdata);
|
||||
|
||||
$("#luckysheet-rich-text-editor").html("=" + str);
|
||||
$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html());
|
||||
|
||||
$("#luckysheet-wa-functionbox-confirm").click();
|
||||
});
|
||||
|
||||
//info
|
||||
$(document).on("click", "#luckysheet-ifFormulaGenerator-info .luckysheet-model-close-btn", function(){
|
||||
$("#luckysheet-modal-dialog-mask").show();
|
||||
});
|
||||
$(document).on("click", "#luckysheet-ifFormulaGenerator-info .luckysheet-modal-dialog-title-close", function(){
|
||||
$("#luckysheet-modal-dialog-mask").show();
|
||||
});
|
||||
},
|
||||
ifFormulaDialog: function(fp){
|
||||
let _this = this;
|
||||
|
||||
const _locale = locale();
|
||||
const locale_formula = _locale.formula;
|
||||
const locale_button = _locale.button;
|
||||
|
||||
$("#luckysheet-modal-dialog-mask").show();
|
||||
$("#luckysheet-ifFormulaGenerator-dialog").remove();
|
||||
|
||||
let compareValue = "";
|
||||
let ifListHtml = '';
|
||||
|
||||
if(!!fp){
|
||||
let arr = fp.split("if(");
|
||||
|
||||
for(let i = 1; i < arr.length; i++){
|
||||
let txt = arr[i].replace("and(","").replace(/\)/g,"").replace(/\"/g,"");
|
||||
let arr2 = txt.split(",");
|
||||
arr2 = _this.clearArr(arr2);
|
||||
|
||||
compareValue = _this.splitTxt(arr2[0])[0];
|
||||
|
||||
let smallNum, largeNum, markText;
|
||||
if(arr2.length == 3){
|
||||
smallNum = _this.splitTxt(arr2[0])[1];
|
||||
largeNum = _this.splitTxt(arr2[1])[2];
|
||||
markText = arr2[2];
|
||||
}
|
||||
else{
|
||||
smallNum = _this.splitTxt(arr2[0])[1];
|
||||
largeNum = _this.splitTxt(arr2[0])[2];
|
||||
markText = arr2[1];
|
||||
}
|
||||
|
||||
let itemHtml = '<div class="item">'+
|
||||
'<input type="number" class="smallNum formulaInputFocus" value="'+ smallNum +'"/>'+
|
||||
'<select class="operator">'+
|
||||
'<option value="0"> <= </option>'+
|
||||
'<option value="1"> < </option>'+
|
||||
'</select>'+
|
||||
'<span class="compareValue">'+ compareValue +'</span>'+
|
||||
'<select class="operator2">'+
|
||||
'<option value="0"> <= </option>'+
|
||||
'<option value="1" selected="selected"> < </option>'+
|
||||
'</select>'+
|
||||
'<input type="number" class="largeNum formulaInputFocus" value="'+ largeNum +'"/>'+
|
||||
'<span>'+locale_formula.ifGenTipLableTitile+':</span>'+
|
||||
'<input type="text" class="markText formulaInputFocus" value="'+ markText +'">'+
|
||||
'<i class="fa fa-remove" aria-hidden="true"></i>'+
|
||||
'</div>';
|
||||
ifListHtml += itemHtml;
|
||||
}
|
||||
}
|
||||
|
||||
let content = '<div class="ifAttr">'+
|
||||
'<div class="attrBox">'+
|
||||
'<label for="compareValue"> '+ locale_formula.ifGenCompareValueTitle +' </label>'+
|
||||
'<div class="inpBox">'+
|
||||
'<input id="compareValue" class="formulaInputFocus" value="'+ compareValue +'"/>'+
|
||||
'<i class="singRange fa fa-table" aria-hidden="true" title="'+ locale_formula.ifGenSelectCellTitle +'"></i>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div class="attrBox">'+
|
||||
'<label for="smallRange"> '+ locale_formula.ifGenRangeTitle +' </label>'+
|
||||
'<input type="number" id="smallRange" class="formulaInputFocus"/>'+
|
||||
'<span class="text"> '+ locale_formula.ifGenRangeTo +' </span>'+
|
||||
'<input type="number" id="largeRange" class="formulaInputFocus"/>'+
|
||||
'<div id="rangeAssess">'+
|
||||
'<span> '+ locale_formula.ifGenRangeEvaluate +' </span>'+
|
||||
'<i class="multiRange fa fa-table" aria-hidden="true" title="'+ locale_formula.ifGenSelectRangeTitle +'"></i>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div class="attrBox">'+
|
||||
'<label for="DivisionMethod"> '+ locale_formula.ifGenCutWay +' </label>'+
|
||||
'<select id="DivisionMethod">'+
|
||||
'<option value="0"> '+ locale_formula.ifGenCutSame +' </option>'+
|
||||
'<option value="1"> '+ locale_formula.ifGenCutNpiece +' </option>'+
|
||||
'<option value="2"> '+ locale_formula.ifGenCutCustom +' </option>'+
|
||||
'</select>'+
|
||||
'<input id="DivisionMethodVal" class="formulaInputFocus"/>'+
|
||||
'<div id="createBtn"> '+ locale_formula.ifGenCutSame +' </div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div class="ifList">'+ifListHtml+'</div>';
|
||||
|
||||
$("body").append(replaceHtml(modelHTML, {
|
||||
"id": "luckysheet-ifFormulaGenerator-dialog",
|
||||
"addclass": "luckysheet-ifFormulaGenerator-dialog",
|
||||
"title": locale_formula.ifGenerate,
|
||||
"content": content,
|
||||
"botton": '<button id="luckysheet-ifFormulaGenerator-dialog-confirm" class="btn btn-primary">'+locale_button.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+locale_button.cancel+'</button>',
|
||||
"style": "z-index:100003"
|
||||
}));
|
||||
let $t = $("#luckysheet-ifFormulaGenerator-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 590).end(),
|
||||
myh = $t.outerHeight(),
|
||||
myw = $t.outerWidth();
|
||||
let winw = $(window).width(), winh = $(window).height();
|
||||
let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop();
|
||||
$("#luckysheet-ifFormulaGenerator-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show();
|
||||
},
|
||||
clearArr: function(arr){
|
||||
for(let i = 0; i < arr.length; i++){
|
||||
if(arr[i] == "" || arr[i] == null || arr[i] == undefined){
|
||||
arr.splice(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return arr;
|
||||
},
|
||||
splitTxt: function(txt){
|
||||
let compareValue, smallNum, largeNum;
|
||||
|
||||
if(txt.indexOf(">=") != -1){
|
||||
compareValue = txt.split(">=")[0];
|
||||
smallNum = txt.split(">=")[1];
|
||||
|
||||
return [compareValue, smallNum, largeNum];
|
||||
}
|
||||
else if(txt.indexOf(">") != -1){
|
||||
compareValue = txt.split(">")[0];
|
||||
smallNum = txt.split(">")[1];
|
||||
|
||||
return [compareValue, smallNum, largeNum];
|
||||
}
|
||||
else if(txt.indexOf("<=") != -1){
|
||||
compareValue = txt.split("<=")[0];
|
||||
largeNum = txt.split("<=")[1];
|
||||
|
||||
return [compareValue, smallNum, largeNum];
|
||||
}
|
||||
else if(txt.indexOf("<") != -1){
|
||||
compareValue = txt.split("<")[0];
|
||||
largeNum = txt.split("<")[1];
|
||||
|
||||
return [compareValue, smallNum, largeNum];
|
||||
}
|
||||
},
|
||||
singleRangeDialog: function(value){
|
||||
$("#luckysheet-modal-dialog-mask").hide();
|
||||
$("#luckysheet-ifFormulaGenerator-dialog").hide();
|
||||
$("#luckysheet-ifFormulaGenerator-singleRange-dialog").remove();
|
||||
|
||||
const _locale = locale();
|
||||
const locale_formula = _locale.formula;
|
||||
const locale_button = _locale.button;
|
||||
|
||||
if(value == null){
|
||||
value = "";
|
||||
}
|
||||
|
||||
$("body").append(replaceHtml(modelHTML, {
|
||||
"id": "luckysheet-ifFormulaGenerator-singleRange-dialog",
|
||||
"addclass": "luckysheet-ifFormulaGenerator-singleRange-dialog",
|
||||
"title": locale_formula.ifGenTipSelectCell,
|
||||
"content": '<input readonly="readonly" placeholder="'+locale_formula.ifGenTipSelectCellPlace+'" value="'+ value +'">',
|
||||
"botton": '<button id="luckysheet-ifFormulaGenerator-singleRange-confirm" class="btn btn-primary">'+locale_button.confirm+'</button><button id="luckysheet-ifFormulaGenerator-singleRange-cancel" class="btn btn-default">'+locale_button.cancel+'</button>',
|
||||
"style": "z-index:100003"
|
||||
}));
|
||||
let $t = $("#luckysheet-ifFormulaGenerator-singleRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(),
|
||||
myh = $t.outerHeight(),
|
||||
myw = $t.outerWidth();
|
||||
let winw = $(window).width(), winh = $(window).height();
|
||||
let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop();
|
||||
$("#luckysheet-ifFormulaGenerator-singleRange-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show();
|
||||
},
|
||||
multiRangeDialog: function(){
|
||||
$("#luckysheet-modal-dialog-mask").hide();
|
||||
$("#luckysheet-ifFormulaGenerator-dialog").hide();
|
||||
$("#luckysheet-ifFormulaGenerator-multiRange-dialog").remove();
|
||||
|
||||
const _locale = locale();
|
||||
const locale_formula = _locale.formula;
|
||||
const locale_button = _locale.button;
|
||||
|
||||
$("body").append(replaceHtml(modelHTML, {
|
||||
"id": "luckysheet-ifFormulaGenerator-multiRange-dialog",
|
||||
"addclass": "luckysheet-ifFormulaGenerator-multiRange-dialog",
|
||||
"title": locale_formula.ifGenTipSelectRange,
|
||||
"content": '<input readonly="readonly" placeholder="'+locale_formula.ifGenTipSelectRangePlace+'" value="">',
|
||||
"botton": '<button id="luckysheet-ifFormulaGenerator-multiRange-confirm" class="btn btn-primary">'+locale_button.confirm+'</button><button id="luckysheet-ifFormulaGenerator-multiRange-cancel" class="btn btn-default">'+locale_button.cancel+'</button>',
|
||||
"style": "z-index:100003"
|
||||
}));
|
||||
let $t = $("#luckysheet-ifFormulaGenerator-multiRange-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(),
|
||||
myh = $t.outerHeight(),
|
||||
myw = $t.outerWidth();
|
||||
let winw = $(window).width(), winh = $(window).height();
|
||||
let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop();
|
||||
$("#luckysheet-ifFormulaGenerator-multiRange-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show();
|
||||
},
|
||||
getIfList: function(compareValue, smallRange, largeRange, method, methodVal){
|
||||
const locale_formula = locale().formula;
|
||||
|
||||
$("#luckysheet-ifFormulaGenerator-dialog .ifList").empty();
|
||||
|
||||
smallRange = parseInt(smallRange);
|
||||
largeRange = parseInt(largeRange);
|
||||
methodVal = parseInt(methodVal);
|
||||
|
||||
let arr = [];
|
||||
|
||||
if(method == "0"){
|
||||
let len = Math.ceil((largeRange - smallRange) / methodVal);
|
||||
for(let i = 0; i <= len; i++){
|
||||
let num = smallRange + methodVal * i;
|
||||
if(i == 0 || num >= largeRange){
|
||||
arr.push("");
|
||||
}
|
||||
else{
|
||||
arr.push(num);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if(method == "1"){
|
||||
let addnum = Math.ceil((largeRange - smallRange) / methodVal);
|
||||
for(let i = 0; i <= methodVal; i++){
|
||||
let num = smallRange + addnum * i;
|
||||
if(i == 0 || num >= largeRange){
|
||||
arr.push("");
|
||||
}
|
||||
else{
|
||||
arr.push(num);
|
||||
}
|
||||
}
|
||||
}
|
||||
for(let j = 0; j < arr.length - 1; j++){
|
||||
let markText;
|
||||
if(j == 0){
|
||||
markText = "小于" + arr[j + 1];
|
||||
}
|
||||
else if(j == arr.length - 2){
|
||||
markText = "大于等于" + arr[j];
|
||||
}
|
||||
else{
|
||||
markText = arr[j] + "到" + arr[j + 1];
|
||||
}
|
||||
|
||||
let itemHtml = '<div class="item">'+
|
||||
'<input type="number" class="smallNum formulaInputFocus" value="'+ arr[j] +'"/>'+
|
||||
'<select class="operator">'+
|
||||
'<option value="0"> <= </option>'+
|
||||
'<option value="1"> < </option>'+
|
||||
'</select>'+
|
||||
'<span class="compareValue">'+ compareValue +'</span>'+
|
||||
'<select class="operator2">'+
|
||||
'<option value="0"> <= </option>'+
|
||||
'<option value="1" selected="selected"> < </option>'+
|
||||
'</select>'+
|
||||
'<input type="number" class="largeNum formulaInputFocus" value="'+ arr[j + 1] +'"/>'+
|
||||
'<span>'+locale_formula.ifGenTipLableTitile+':</span>'+
|
||||
'<input type="text" class="markText formulaInputFocus" value="'+ markText +'">'+
|
||||
'<i class="fa fa-remove" aria-hidden="true"></i>'+
|
||||
'</div>';
|
||||
$("#luckysheet-ifFormulaGenerator-dialog .ifList").append(itemHtml);
|
||||
}
|
||||
},
|
||||
info: function(title){
|
||||
$("#luckysheet-modal-dialog-mask").show();
|
||||
$("#luckysheet-ifFormulaGenerator-info").remove();
|
||||
|
||||
const _locale = locale();
|
||||
const locale_button = _locale.button;
|
||||
|
||||
$("body").append(replaceHtml(modelHTML, {
|
||||
"id": "luckysheet-ifFormulaGenerator-info",
|
||||
"addclass": "",
|
||||
"title": title,
|
||||
"content": "",
|
||||
"botton": '<button class="btn btn-default luckysheet-model-close-btn"> '+locale_button.close+' </button>',
|
||||
"style": "z-index:100003"
|
||||
}));
|
||||
let $t = $("#luckysheet-ifFormulaGenerator-info").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(),
|
||||
myh = $t.outerHeight(),
|
||||
myw = $t.outerWidth();
|
||||
let winw = $(window).width(), winh = $(window).height();
|
||||
let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop();
|
||||
$("#luckysheet-ifFormulaGenerator-info").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show();
|
||||
}
|
||||
}
|
||||
|
||||
export default ifFormulaGenerator;
|
||||
@@ -1,21 +0,0 @@
|
||||
// 自定义图片的更新方法例如: customImageUpdate("POST", "http://127.0.0.1:8000/luckysheetimageprocess/", d)
|
||||
function customImageUpdate(method, url, obj) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const xhr = new XMLHttpRequest() || new ActiveXObject("Microsoft.XMLHTTP");
|
||||
xhr.open(method, url);
|
||||
xhr.send(JSON.stringify(obj)); // 发送 POST/GET 数据
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState == 4) {
|
||||
if (xhr.status == 200) {
|
||||
resolve(xhr.responseText);
|
||||
} else {
|
||||
reject("error");
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
export {
|
||||
customImageUpdate
|
||||
}
|
||||
@@ -1,642 +0,0 @@
|
||||
import {getFontStyleByCell, textTrim} from "../global/getdata";
|
||||
import {selectTextContent,selectTextContentCross,selectTextContentCollapse} from '../global/cursorPos';
|
||||
import locale from '../locale/locale';
|
||||
import Store from '../store';
|
||||
|
||||
export const inlineStyleAffectAttribute = {"bl":1, "it":1 , "ff":1, "cl":1, "un":1,"fs":1,"fc":1};
|
||||
export const inlineStyleAffectCssName = {"font-weight":1, "font-style":1 , "font-family":1, "text-decoration":1, "border-bottom":1,"font-size":1,"color":1};
|
||||
|
||||
export function isInlineStringCell(cell){
|
||||
let isIs = cell && cell.ct!=null && cell.ct.t=="inlineStr" && cell.ct.s!=null && cell.ct.s.length>0;
|
||||
return isIs;
|
||||
}
|
||||
|
||||
export function isInlineStringCT(ct){
|
||||
let isIs = ct!=null && ct.t=="inlineStr" && ct.s!=null && ct.s.length>0;
|
||||
return isIs;
|
||||
}
|
||||
|
||||
export function updateInlineStringFormat(cell, attr, value, $input){
|
||||
// let s = Store.inlineStringEditCache;
|
||||
var w = window.getSelection();
|
||||
var range;
|
||||
if(w.type=="None"){
|
||||
range = Store.inlineStringEditRange;
|
||||
}
|
||||
else{
|
||||
range = w.getRangeAt(0);
|
||||
}
|
||||
|
||||
|
||||
// if(isInlineStringCell(cell)){
|
||||
// if(Store.inlineStringEditCache==null){
|
||||
// Store.inlineStringEditCache = JSON.parse(JSON.stringify(cell.ct.s));
|
||||
// }
|
||||
// }
|
||||
// else{
|
||||
// Store.inlineStringEditCache = [{
|
||||
// v:cell.v
|
||||
// }];
|
||||
// }
|
||||
|
||||
let cac = range.commonAncestorContainer;
|
||||
let $textEditor;
|
||||
if(cac.id=="luckysheet-rich-text-editor"){
|
||||
$textEditor = $(cac);
|
||||
}
|
||||
else{
|
||||
$textEditor = $(cac).closest("#luckysheet-rich-text-editor");
|
||||
}
|
||||
let $functionbox = $(cac).closest("#luckysheet-functionbox-cell");
|
||||
|
||||
if($textEditor.length==0 && $functionbox.length==0 && Store.inlineStringEditRange!=null){
|
||||
range = Store.inlineStringEditRange;
|
||||
cac = range.commonAncestorContainer;
|
||||
if(cac.id=="luckysheet-rich-text-editor"){
|
||||
$textEditor = $(cac);
|
||||
}
|
||||
else{
|
||||
$textEditor = $(cac).closest("#luckysheet-rich-text-editor");
|
||||
}
|
||||
$functionbox = $(cac).closest("#luckysheet-functionbox-cell");
|
||||
}
|
||||
|
||||
if(range.collapsed===true){
|
||||
return;
|
||||
}
|
||||
|
||||
let endContainer = range.endContainer, startContainer = range.startContainer;
|
||||
let endOffset = range.endOffset, startOffset = range.startOffset;
|
||||
|
||||
if($textEditor.length>0){
|
||||
if(startContainer===endContainer){
|
||||
let span = startContainer.parentNode, spanIndex, inherit=false;
|
||||
|
||||
let content = span.innerText;
|
||||
|
||||
let fullContent = $textEditor.html();
|
||||
if(fullContent.substr(0,5) != "<span"){
|
||||
inherit = true;
|
||||
}
|
||||
|
||||
let left="" , mid="" , right="";
|
||||
let s1=0, s2=startOffset, s3 = endOffset, s4=content.length;
|
||||
left = content.substring(s1, s2);
|
||||
mid = content.substring(s2, s3);
|
||||
right = content.substring(s3, s4);
|
||||
|
||||
let cont = "";
|
||||
if(left!=""){
|
||||
let cssText = span.style.cssText;
|
||||
if(inherit){
|
||||
let box = $(span).closest("#luckysheet-input-box").get(0);
|
||||
if(box!=null){
|
||||
cssText = extendCssText(box.style.cssText, cssText);
|
||||
}
|
||||
}
|
||||
cont += "<span style='"+ cssText +"'>" + left + "</span>";
|
||||
}
|
||||
|
||||
if(mid!=""){
|
||||
// let styleObj = {};
|
||||
// styleObj[attr] = value;
|
||||
// let s = getFontStyleByCell(styleObj, undefined, undefined, false);
|
||||
// let ukey = textTrim(s.substr(0, s.indexOf(':')));
|
||||
// let uvalue = textTrim(s.substr(s.indexOf(':')+1));
|
||||
// uvalue = uvalue.substr(0, uvalue.length-1);
|
||||
// let cssText = span.style.cssText;
|
||||
// cssText = removeClassWidthCss(cssText, attr);
|
||||
|
||||
let cssText = getCssText(span.style.cssText, attr, value);
|
||||
|
||||
if(inherit){
|
||||
let box = $(span).closest("#luckysheet-input-box").get(0);
|
||||
if(box!=null){
|
||||
cssText = extendCssText(box.style.cssText, cssText);
|
||||
}
|
||||
}
|
||||
|
||||
cont += "<span style='"+ cssText +"'>" + mid + "</span>";
|
||||
}
|
||||
|
||||
if(right!=""){
|
||||
let cssText = span.style.cssText;
|
||||
if(inherit){
|
||||
let box = $(span).closest("#luckysheet-input-box").get(0);
|
||||
if(box!=null){
|
||||
cssText = extendCssText(box.style.cssText, cssText);
|
||||
}
|
||||
}
|
||||
cont += "<span style='"+ cssText +"'>" + right + "</span>";
|
||||
}
|
||||
|
||||
if(startContainer.parentNode.tagName=="SPAN"){
|
||||
spanIndex = $textEditor.find("span").index(span);
|
||||
$(span).replaceWith(cont);
|
||||
}
|
||||
else{
|
||||
spanIndex = 0;
|
||||
$(span).html(cont);
|
||||
}
|
||||
|
||||
|
||||
let seletedNodeIndex = 0;
|
||||
if(s1==s2){
|
||||
seletedNodeIndex = spanIndex;
|
||||
}
|
||||
else{
|
||||
seletedNodeIndex = spanIndex+1;
|
||||
}
|
||||
|
||||
selectTextContent($textEditor.find("span").get(seletedNodeIndex));
|
||||
}
|
||||
else{
|
||||
if(startContainer.parentNode.tagName=="SPAN" && endContainer.parentNode.tagName=="SPAN"){
|
||||
let startSpan = startContainer.parentNode, startSpanIndex;
|
||||
let endSpan = endContainer.parentNode, endSpanIndex;
|
||||
|
||||
startSpanIndex = $textEditor.find("span").index(startSpan);
|
||||
endSpanIndex = $textEditor.find("span").index(endSpan);
|
||||
|
||||
let startContent = startSpan.innerHTML, endContent = endSpan.innerHTML;
|
||||
let sleft="" , sright="", eleft="" , eright="";
|
||||
let s1=0, s2=startOffset, s3 = endOffset, s4=endContent.length;
|
||||
|
||||
sleft = startContent.substring(s1, s2);
|
||||
sright = startContent.substring(s2, startContent.length);
|
||||
|
||||
eleft = endContent.substring(0, s3);
|
||||
eright = endContent.substring(s3, s4);
|
||||
let spans = $textEditor.find("span");
|
||||
let replaceSpans = spans.slice(startSpanIndex, endSpanIndex+1);
|
||||
let cont = "";
|
||||
for(let i=0;i<startSpanIndex;i++){
|
||||
let span = spans.get(i), content = span.innerHTML;
|
||||
cont += "<span style='"+ span.style.cssText +"'>" + content + "</span>";
|
||||
}
|
||||
if(sleft!=""){
|
||||
cont += "<span style='"+ startSpan.style.cssText +"'>" + sleft + "</span>";
|
||||
}
|
||||
|
||||
if(sright!=""){
|
||||
let cssText = getCssText(startSpan.style.cssText, attr, value);
|
||||
cont += "<span style='"+ cssText +"'>" + sright + "</span>";
|
||||
}
|
||||
|
||||
if(startSpanIndex<endSpanIndex){
|
||||
for(let i=startSpanIndex+1;i<endSpanIndex;i++){
|
||||
let span = spans.get(i), content = span.innerHTML;
|
||||
let cssText = getCssText(span.style.cssText, attr, value);
|
||||
cont += "<span style='"+ cssText +"'>" + content + "</span>";
|
||||
}
|
||||
}
|
||||
|
||||
if(eleft!=""){
|
||||
let cssText = getCssText(endSpan.style.cssText, attr, value);
|
||||
cont += "<span style='"+ cssText +"'>" + eleft + "</span>";
|
||||
}
|
||||
|
||||
if(eright!=""){
|
||||
cont += "<span style='"+ endSpan.style.cssText +"'>" + eright + "</span>";
|
||||
}
|
||||
|
||||
for(let i=endSpanIndex+1;i<spans.length;i++){
|
||||
let span = spans.get(i), content = span.innerHTML;
|
||||
cont += "<span style='"+ span.style.cssText +"'>" + content + "</span>";
|
||||
}
|
||||
|
||||
$textEditor.html(cont);
|
||||
|
||||
// console.log(replaceSpans, cont);
|
||||
// replaceSpans.replaceWith(cont);
|
||||
|
||||
let startSeletedNodeIndex, endSeletedNodeIndex;
|
||||
if(s1==s2){
|
||||
startSeletedNodeIndex = startSpanIndex;
|
||||
endSeletedNodeIndex = endSpanIndex;
|
||||
}
|
||||
else{
|
||||
startSeletedNodeIndex = startSpanIndex+1;
|
||||
endSeletedNodeIndex = endSpanIndex+1;
|
||||
}
|
||||
|
||||
spans = $textEditor.find("span");
|
||||
|
||||
selectTextContentCross(spans.get(startSeletedNodeIndex), spans.get(endSeletedNodeIndex));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if($functionbox.length>0){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export function enterKeyControll(cell){
|
||||
var w = window.getSelection();
|
||||
|
||||
if(w.type=="None"){
|
||||
return
|
||||
}
|
||||
var range = w.getRangeAt(0);
|
||||
let cac = range.commonAncestorContainer;
|
||||
let $textEditor;
|
||||
if(cac.id=="luckysheet-rich-text-editor"){
|
||||
$textEditor = $(cac);
|
||||
}
|
||||
else{
|
||||
$textEditor = $(cac).closest("#luckysheet-rich-text-editor");
|
||||
}
|
||||
let $functionbox = $(cac).closest("#luckysheet-functionbox-cell");
|
||||
|
||||
// if(range.collapsed===true){
|
||||
// return;
|
||||
// }
|
||||
|
||||
let endContainer = range.endContainer, startContainer = range.startContainer;
|
||||
let endOffset = range.endOffset, startOffset = range.startOffset;
|
||||
|
||||
if($textEditor.length>0){
|
||||
let startSpan = startContainer.parentNode;
|
||||
if(startContainer.id=="luckysheet-rich-text-editor"){
|
||||
startSpan = $(startContainer).find("span");
|
||||
if(startSpan.length==0){
|
||||
// 在末尾换行操作会导致数据丢失(覆盖)
|
||||
startContainer.innerHTML = `<span>${startContainer.innerText}</span>`;
|
||||
startSpan = $(startContainer).find("span");
|
||||
}
|
||||
startSpan = startSpan.get(startSpan.length-1);
|
||||
startOffset = startSpan.innerHTML.length;
|
||||
}
|
||||
// let startSpanIndex = $textEditor.find("span").index(startSpan);
|
||||
if(range.collapsed===false){
|
||||
range.deleteContents();
|
||||
}
|
||||
|
||||
// 如果拷贝的内容为:pc&web ,那么innerHTML得到的值为:pc&web ,执行换行操作存在问题
|
||||
// let startContent = startSpan.innerHTML;
|
||||
let startContent = startSpan.innerText;
|
||||
let sleft="" , sright="";
|
||||
let s1=0, s2=startOffset;
|
||||
|
||||
sleft = startContent.substring(s1, s2);
|
||||
sright = startContent.substring(s2, startContent.length);
|
||||
|
||||
|
||||
let spanIndex,cont;
|
||||
if(startContainer.parentNode.tagName=="SPAN"){
|
||||
let textSpan = $textEditor.find("span");
|
||||
spanIndex = textSpan.index(startSpan);
|
||||
if((spanIndex==textSpan.length-1) && sright==""){
|
||||
let txt = textSpan[spanIndex].innerHTML;
|
||||
if(txt.substr(txt.length-1, 1)=="\n"){
|
||||
cont = "<span style='"+ startSpan.style.cssText +"'>" + sleft + "\n" + "</span>";
|
||||
}
|
||||
else{
|
||||
cont = "<span style='"+ startSpan.style.cssText +"'>" + sleft + "\n\n" + "</span>";
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
cont = "<span style='"+ startSpan.style.cssText +"'>" + sleft + "\n" + sright + "</span>";
|
||||
}
|
||||
|
||||
$(startSpan).replaceWith(cont);
|
||||
}
|
||||
else{
|
||||
// 这里不能取整个单元格的样式,因为如果设置了部分样式的话就会出问题
|
||||
// let cssText = getFontStyleByCell(cell);
|
||||
|
||||
let cssText = startSpan.style.cssText;
|
||||
|
||||
if(sright==""){
|
||||
cont = "<span style='"+ cssText +"'>" + sleft + "\n\n" + "</span>";
|
||||
}
|
||||
else{
|
||||
cont = "<span style='"+ cssText +"'>" + sleft + "\n" + sright + "</span>";
|
||||
}
|
||||
|
||||
if(startContainer.id=="luckysheet-rich-text-editor"){
|
||||
$(startSpan).replaceWith(cont);
|
||||
let textSpan = $textEditor.find("span");
|
||||
spanIndex = textSpan.length-1;
|
||||
startOffset = textSpan.get(spanIndex).innerHTML.length-1;
|
||||
}
|
||||
else{
|
||||
$(startSpan).html(cont);
|
||||
spanIndex = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
selectTextContentCollapse($textEditor.find("span").get(spanIndex), startOffset+1);
|
||||
|
||||
}
|
||||
else if($functionbox.length>0){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export function updateInlineStringFormatOutside(cell, key, value){
|
||||
if(cell.ct==null){
|
||||
return;
|
||||
}
|
||||
let s = cell.ct.s;
|
||||
if(s==null){
|
||||
return;
|
||||
}
|
||||
for(let i=0;i<s.length;i++){
|
||||
let item = s[i];
|
||||
item[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
export function convertSpanToShareString($dom){
|
||||
let styles = [], preStyleList, preStyleListString=null;
|
||||
for(let i=0;i<$dom.length;i++){
|
||||
let span = $dom.get(i);
|
||||
let styleList = convertCssToStyleList(span.style.cssText);
|
||||
|
||||
let curStyleListString = JSON.stringify(styleList);
|
||||
// let v = span.innerHTML;
|
||||
let v = span.innerText;
|
||||
v = v.replace(/\n/g, "\r\n");
|
||||
|
||||
if(curStyleListString==preStyleListString){
|
||||
preStyleList.v += v;
|
||||
}
|
||||
else{
|
||||
styleList.v = v;
|
||||
styles.push(styleList);
|
||||
|
||||
preStyleListString = curStyleListString;
|
||||
preStyleList = styleList;
|
||||
}
|
||||
}
|
||||
return styles;
|
||||
}
|
||||
|
||||
export function convertCssToStyleList(cssText){
|
||||
if(cssText==null || cssText.length==0){
|
||||
return {};
|
||||
}
|
||||
let cssTextArray = cssText.split(";");
|
||||
|
||||
|
||||
const _locale = locale();
|
||||
const locale_fontarray = _locale.fontarray;
|
||||
const locale_fontjson = _locale.fontjson;
|
||||
let styleList = {
|
||||
"ff":locale_fontarray[0], //font family
|
||||
"fc":"#000000",//font color
|
||||
"fs":10,//font size
|
||||
"cl":0,//strike
|
||||
"un":0,//underline
|
||||
"bl":0,//blod
|
||||
"it":0,//italic
|
||||
};
|
||||
cssTextArray.forEach(s => {
|
||||
s = s.toLowerCase();
|
||||
let key = textTrim(s.substr(0, s.indexOf(':')));
|
||||
let value = textTrim(s.substr(s.indexOf(':') + 1));
|
||||
if(key=="font-weight"){
|
||||
if(value=="bold"){
|
||||
styleList["bl"] = 1;
|
||||
}
|
||||
else{
|
||||
styleList["bl"] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(key=="font-style"){
|
||||
if(value=="italic"){
|
||||
styleList["it"] = 1;
|
||||
}
|
||||
else{
|
||||
styleList["it"] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(key=="font-family"){
|
||||
let ff = locale_fontjson[value];
|
||||
if(ff==null){
|
||||
styleList["ff"] = value;
|
||||
}
|
||||
else{
|
||||
styleList["ff"] = ff;
|
||||
}
|
||||
}
|
||||
|
||||
if(key=="font-size"){
|
||||
styleList["fs"] = parseInt(value);
|
||||
}
|
||||
|
||||
if(key=="color"){
|
||||
styleList["fc"] = value;
|
||||
}
|
||||
|
||||
if(key=="text-decoration"){
|
||||
styleList["cl"] = 1;
|
||||
}
|
||||
|
||||
if(key=="border-bottom"){
|
||||
styleList["un"] = 1;
|
||||
}
|
||||
|
||||
if(key=="lucky-strike"){
|
||||
styleList["cl"] = value;
|
||||
}
|
||||
|
||||
if(key=="lucky-underline"){
|
||||
styleList["un"] = value;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return styleList;
|
||||
}
|
||||
|
||||
const luckyToCssName = {
|
||||
"bl":"font-weight",
|
||||
"it":"font-style",
|
||||
"ff":"font-family",
|
||||
"fs":"font-size",
|
||||
"fc":"color",
|
||||
"cl":"text-decoration",
|
||||
"un":"border-bottom",
|
||||
}
|
||||
|
||||
function getClassWithcss(cssText, ukey){
|
||||
let cssTextArray = cssText.split(";");
|
||||
if(ukey==null || ukey.length==0){
|
||||
return cssText;
|
||||
}
|
||||
if(cssText.indexOf(ukey)>-1){
|
||||
for(let i=0;i<cssTextArray.length;i++){
|
||||
let s = cssTextArray[i];
|
||||
s = s.toLowerCase();
|
||||
let key = textTrim(s.substr(0, s.indexOf(':')));
|
||||
let value = textTrim(s.substr(s.indexOf(':') + 1));
|
||||
if(key==ukey){
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
function upsetClassWithCss(cssText, ukey, uvalue){
|
||||
let cssTextArray = cssText.split(";");
|
||||
let newCss = "";
|
||||
if(ukey==null || ukey.length==0){
|
||||
return cssText;
|
||||
}
|
||||
if(cssText.indexOf(ukey)>-1){
|
||||
for(let i=0;i<cssTextArray.length;i++){
|
||||
let s = cssTextArray[i];
|
||||
s = s.toLowerCase();
|
||||
let key = textTrim(s.substr(0, s.indexOf(':')));
|
||||
let value = textTrim(s.substr(s.indexOf(':') + 1));
|
||||
if(key==ukey){
|
||||
newCss += key + ":" + uvalue + ";";
|
||||
}
|
||||
else if(key.length>0){
|
||||
newCss += key + ":" + value + ";";
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(ukey.length>0){
|
||||
cssText += ukey + ":" + uvalue + ";";
|
||||
newCss = cssText;
|
||||
}
|
||||
|
||||
return newCss;
|
||||
}
|
||||
|
||||
function removeClassWidthCss(cssText, ukey){
|
||||
let cssTextArray = cssText.split(";");
|
||||
let newCss = "";
|
||||
let oUkey = ukey;
|
||||
if(ukey==null || ukey.length==0){
|
||||
return cssText;
|
||||
}
|
||||
if(ukey in luckyToCssName){
|
||||
ukey = luckyToCssName[ukey];
|
||||
}
|
||||
if(cssText.indexOf(ukey)>-1){
|
||||
for(let i=0;i<cssTextArray.length;i++){
|
||||
let s = cssTextArray[i];
|
||||
s = s.toLowerCase();
|
||||
let key = textTrim(s.substr(0, s.indexOf(':')));
|
||||
let value = textTrim(s.substr(s.indexOf(':') + 1));
|
||||
if(key==ukey || (oUkey=="cl" && key=="lucky-strike") || (oUkey=="un" && key=="lucky-underline") ){
|
||||
continue;
|
||||
}
|
||||
else if(key.length>0){
|
||||
newCss += key + ":" + value + ";";
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
newCss = cssText;
|
||||
}
|
||||
|
||||
return newCss;
|
||||
}
|
||||
|
||||
function getCssText(cssText, attr, value){
|
||||
let styleObj = {};
|
||||
styleObj[attr] = value;
|
||||
if(attr=="un"){
|
||||
let fontColor = getClassWithcss(cssText,"color");
|
||||
if(fontColor==""){
|
||||
fontColor = "#000000";
|
||||
}
|
||||
let fs = getClassWithcss(cssText,"font-size");
|
||||
if(fs==""){
|
||||
fs = 11;
|
||||
}
|
||||
fs = parseInt(fs);
|
||||
styleObj["_fontSize"] = fs;
|
||||
styleObj["_color"] = fontColor;
|
||||
}
|
||||
let s = getFontStyleByCell(styleObj, undefined, undefined, false);
|
||||
let ukey = textTrim(s.substr(0, s.indexOf(':')));
|
||||
let uvalue = textTrim(s.substr(s.indexOf(':')+1));
|
||||
uvalue = uvalue.substr(0, uvalue.length-1);
|
||||
// let cssText = span.style.cssText;
|
||||
cssText = removeClassWidthCss(cssText, attr);
|
||||
|
||||
cssText = upsetClassWithCss(cssText, ukey, uvalue);
|
||||
|
||||
return cssText;
|
||||
}
|
||||
|
||||
function extendCssText(origin, cover, isLimit=true){
|
||||
let originArray = origin.split(";");
|
||||
let coverArray = cover.split(";");
|
||||
let newCss = "";
|
||||
|
||||
let addKeyList = {};
|
||||
for(let i=0;i<originArray.length;i++){
|
||||
let so = originArray[i], isAdd=true;
|
||||
so = so.toLowerCase();
|
||||
let okey = textTrim(so.substr(0, so.indexOf(':')));
|
||||
|
||||
/* 不设置文字的大小,解决设置删除线等后字体变大的问题 */
|
||||
if(okey == "font-size"){
|
||||
continue;
|
||||
}
|
||||
|
||||
let ovalue = textTrim(so.substr(so.indexOf(':') + 1));
|
||||
|
||||
if(isLimit){
|
||||
if(!(okey in inlineStyleAffectCssName)){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
for(let a=0;a<coverArray.length;a++){
|
||||
let sc = coverArray[a];
|
||||
sc = sc.toLowerCase();
|
||||
let ckey = textTrim(sc.substr(0, sc.indexOf(':')));
|
||||
let cvalue = textTrim(sc.substr(sc.indexOf(':') + 1));
|
||||
|
||||
if(okey==ckey){
|
||||
newCss += ckey + ":" + cvalue + ";";
|
||||
isAdd = false;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(isAdd){
|
||||
newCss += okey + ":" + ovalue + ";";
|
||||
}
|
||||
|
||||
addKeyList[okey] = 1;
|
||||
}
|
||||
|
||||
for(let a=0;a<coverArray.length;a++){
|
||||
let sc = coverArray[a];
|
||||
sc = sc.toLowerCase();
|
||||
let ckey = textTrim(sc.substr(0, sc.indexOf(':')));
|
||||
let cvalue = textTrim(sc.substr(sc.indexOf(':') + 1));
|
||||
|
||||
if(isLimit){
|
||||
if(!(ckey in inlineStyleAffectCssName)){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(!(ckey in addKeyList)){
|
||||
newCss += ckey + ":" + cvalue + ";";
|
||||
}
|
||||
}
|
||||
|
||||
return newCss;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,490 +0,0 @@
|
||||
import { luckysheet_getcelldata } from '../function/func';
|
||||
// import functionlist from '../function/functionlist';
|
||||
// import Store.luckysheet_function from '../function/Store.luckysheet_function';
|
||||
import formula from '../global/formula';
|
||||
import { isRealNum, isRealNull } from '../global/validate';
|
||||
import { modelHTML } from './constant';
|
||||
import { luckysheet_count_show } from './select';
|
||||
import { replaceHtml, getObjType } from '../utils/util';
|
||||
import Store from '../store';
|
||||
import locale from '../locale/locale';
|
||||
|
||||
//插入函数
|
||||
const insertFormula = {
|
||||
init: function(){
|
||||
let _this = this;
|
||||
let _locale = locale();
|
||||
let locale_formulaMore = _locale.formulaMore;
|
||||
let locale_button = _locale.button;
|
||||
|
||||
$(document).off("keyup.fxSFLI").on("keyup.fxSFLI", "#searchFormulaListInput", function(){
|
||||
$("#formulaTypeList").empty();
|
||||
let txt = $(this).val().toUpperCase();
|
||||
let functionlist = Store.functionlist;
|
||||
|
||||
if(txt == ""){
|
||||
//若没有查找内容则根据类别筛选
|
||||
_this.formulaListByType($("#formulaTypeSelect option:selected").val());
|
||||
}
|
||||
else{
|
||||
for(let i = 0; i < functionlist.length; i++){
|
||||
if(/^[a-zA-Z]+$/.test(txt)){
|
||||
if(functionlist[i].n.indexOf(txt) != "-1"){
|
||||
$('<div class="listBox" name="'+ functionlist[i].n +'"><span>'+ functionlist[i].n +'</span><span>'+ functionlist[i].a +'</span></div>').appendTo($("#formulaTypeList"));
|
||||
}
|
||||
}
|
||||
else if(functionlist[i].a.indexOf(txt) != "-1"){
|
||||
$('<div class="listBox" name="'+ functionlist[i].n +'"><span>'+ functionlist[i].n +'</span><span>'+ functionlist[i].a +'</span></div>').appendTo($("#formulaTypeList"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#formulaTypeList .listBox:first-child").addClass("on"); //默认公式列表第一个为选中状态
|
||||
});
|
||||
|
||||
$(document).off("change.fxFormulaTS").on("change.fxFormulaTS", "#formulaTypeSelect", function(){
|
||||
let type = $("#formulaTypeSelect option:selected").val();
|
||||
_this.formulaListByType(type);
|
||||
});
|
||||
|
||||
$(document).off("click.fxListbox").on("click.fxListbox", "#formulaTypeList .listBox", function(){
|
||||
$(this).addClass("on").siblings().removeClass("on");
|
||||
});
|
||||
|
||||
//选择公式后弹出参数栏弹框
|
||||
$(document).off("click.fxFormulaCf").on("click.fxFormulaCf", "#luckysheet-search-formula-confirm", function(){
|
||||
let formula = $("#luckysheet-search-formula .listBox.on").attr("name");
|
||||
let formulaTxt = '<span dir="auto" class="luckysheet-formula-text-color">=</span><span dir="auto" class="luckysheet-formula-text-color">'+ formula.toUpperCase() +'</span><span dir="auto" class="luckysheet-formula-text-color">(</span><span dir="auto" class="luckysheet-formula-text-color">)</span>';
|
||||
|
||||
$("#luckysheet-rich-text-editor").html(formulaTxt);
|
||||
$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html());
|
||||
|
||||
_this.formulaParmDialog(formula);
|
||||
});
|
||||
|
||||
//公式参数框
|
||||
$(document).off("focus.fxParamInput").on("focus.fxParamInput", "#luckysheet-search-formula-parm .parmBox input", function(){
|
||||
let parmIndex = $(this).parents(".parmBox").index();
|
||||
formula.data_parm_index = parmIndex;
|
||||
|
||||
let formulatxt = $(this).parents("#luckysheet-search-formula-parm").find(".luckysheet-modal-dialog-title-text").text();
|
||||
let parmLen = Store.luckysheet_function[formulatxt].p.length;
|
||||
|
||||
let parmDetail, parmRepeat;
|
||||
if(parmIndex >= parmLen){
|
||||
parmDetail = Store.luckysheet_function[formulatxt].p[parmLen - 1].detail;
|
||||
parmRepeat = Store.luckysheet_function[formulatxt].p[parmLen - 1].repeat;
|
||||
}
|
||||
else{
|
||||
parmDetail = Store.luckysheet_function[formulatxt].p[parmIndex].detail;
|
||||
parmRepeat = Store.luckysheet_function[formulatxt].p[parmIndex].repeat;
|
||||
}
|
||||
|
||||
//参数选区显示,参数值显示
|
||||
_this.parmTxtShow($(this).val());
|
||||
|
||||
//计算结果
|
||||
_this.functionStrCompute();
|
||||
|
||||
//参数名称和释义切换
|
||||
$("#luckysheet-search-formula-parm .parmDetailsBox").empty();
|
||||
|
||||
let parmName = $(this).parents(".parmBox").find(".name").text();
|
||||
$('<span>'+ parmName +':</span><span>'+ parmDetail +'</span>').appendTo($("#luckysheet-search-formula-parm .parmDetailsBox"));
|
||||
|
||||
//公式参数可自增(参数自增最多5个)
|
||||
if(parmRepeat == "y"){
|
||||
let parmCount = $("#luckysheet-search-formula-parm .parmBox").length;
|
||||
|
||||
if(parmCount < 5 && parmIndex == (parmCount - 1)){
|
||||
$('<div class="parmBox"><div class="name">'+ locale_formulaMore.valueTitle +''+ (parmCount + 1) +'</div><div class="txt"><input class="formulaInputFocus" /><i class="fa fa-table" aria-hidden="true" title="'+locale_formulaMore.tipSelectDataRange+'"></i></div><div class="val">=</div></div>').appendTo($("#luckysheet-search-formula-parm .parmListBox"));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).off("blur.fxParamInput").on("blur.fxParamInput", "#luckysheet-search-formula-parm .parmBox input", function(){
|
||||
let txt = $(this).val();
|
||||
|
||||
if(formula.getfunctionParam(txt).fn == null && !formula.iscelldata(txt)){
|
||||
if(!isRealNum(txt) && txt != "" && txt.length <= 2 && txt.indexOf('"') != 0 && txt.lastIndexOf('"') != 0){
|
||||
txt = '"' + txt + '"';
|
||||
$(this).val(txt);
|
||||
|
||||
_this.parmTxtShow(txt);
|
||||
_this.functionStrCompute();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).off("keyup.fxParamInput").on("keyup.fxParamInput", "#luckysheet-search-formula-parm .parmBox input", function(){
|
||||
//参数选区显示,参数值显示
|
||||
_this.parmTxtShow($(this).val());
|
||||
|
||||
//计算结果
|
||||
_this.functionStrCompute();
|
||||
});
|
||||
|
||||
//点击图标选取数据范围
|
||||
$(document).off("click.fxParamI").on("click.fxParamI", "#luckysheet-search-formula-parm .parmBox i", function(){
|
||||
formula.data_parm_index = $(this).parents(".parmBox").index();
|
||||
|
||||
//选取范围弹出框
|
||||
$("#luckysheet-search-formula-parm").hide();
|
||||
$("#luckysheet-modal-dialog-mask").hide();
|
||||
|
||||
$("#luckysheet-search-formula-parm-select").remove();
|
||||
|
||||
if($(this).parents(".parmBox").find(".txt input").val() == ""){
|
||||
$("body").append(replaceHtml(modelHTML, {
|
||||
"id": "luckysheet-search-formula-parm-select",
|
||||
"addclass": "luckysheet-search-formula-parm-select",
|
||||
"title": locale_formulaMore.tipSelectDataRange,
|
||||
"content": "<input id='luckysheet-search-formula-parm-select-input' class='luckysheet-datavisual-range-container' style='font-size: 14px;padding:5px;max-width:none;' spellcheck='false' aria-label='"+ locale_formulaMore.tipDataRangeTile +"' readonly='true' placeholder='"+ locale_formulaMore.tipDataRangeTile +"'>",
|
||||
"botton": '<button id="luckysheet-search-formula-parm-select-confirm" class="btn btn-primary">'+locale_button.confirm+'</button>',
|
||||
"style": "z-index:100003"
|
||||
}));
|
||||
}
|
||||
else{
|
||||
$("body").append(replaceHtml(modelHTML, {
|
||||
"id": "luckysheet-search-formula-parm-select",
|
||||
"addclass": "luckysheet-search-formula-parm-select",
|
||||
"title": locale_formulaMore.tipSelectDataRange,
|
||||
"content": "<input id='luckysheet-search-formula-parm-select-input' class='luckysheet-datavisual-range-container' style='font-size: 14px;padding:5px;max-width:none;' spellcheck='false' aria-label='"+ locale_formulaMore.tipDataRangeTile +"' readonly='true' value='"+ $(this).parents(".parmBox").find(".txt input").val() +"'>",
|
||||
"botton": '<button id="luckysheet-search-formula-parm-select-confirm" class="btn btn-primary">'+locale_button.confirm+'</button>',
|
||||
"style": "z-index:100003"
|
||||
}));
|
||||
}
|
||||
|
||||
let $t = $("#luckysheet-search-formula-parm-select").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(),
|
||||
myh = $t.outerHeight(),
|
||||
myw = $t.outerWidth();
|
||||
let winw = $(window).width(), winh = $(window).height();
|
||||
let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop();
|
||||
$("#luckysheet-search-formula-parm-select").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show();
|
||||
|
||||
//参数选区虚线框
|
||||
_this.parmTxtShow($(this).parents(".parmBox").find(".txt input").val());
|
||||
});
|
||||
|
||||
//点击确定
|
||||
$(document).off("click.fxParamCf").on("click.fxParamCf", "#luckysheet-search-formula-parm-confirm", function(){
|
||||
$("#luckysheet-wa-functionbox-confirm").click();
|
||||
});
|
||||
|
||||
//选取范围后传回参数栏弹框
|
||||
$(document).off("click.fxParamSelectCf").on("click.fxParamSelectCf", "#luckysheet-search-formula-parm-select-confirm", function(){
|
||||
let parmIndex = $("#luckysheet-search-formula-parm-select-input").attr("data_parm_index");
|
||||
|
||||
$("#luckysheet-search-formula-parm-select").hide();
|
||||
$("#luckysheet-search-formula-parm").show();
|
||||
$("#luckysheet-search-formula-parm .parmBox").eq(parmIndex).find(".txt input").focus();
|
||||
});
|
||||
},
|
||||
formulaListDialog: function(){
|
||||
let _this = this;
|
||||
|
||||
let _locale = locale();
|
||||
let locale_formulaMore = _locale.formulaMore;
|
||||
let locale_button = _locale.button
|
||||
|
||||
$("#luckysheet-modal-dialog-mask").show();
|
||||
$("#luckysheet-search-formula").remove();
|
||||
|
||||
$("body").append(replaceHtml(modelHTML, {
|
||||
"id": "luckysheet-search-formula",
|
||||
"addclass": "luckysheet-search-formula",
|
||||
"title": "",
|
||||
"content": "<div class='inpbox'><label for='searchFormulaListInput'>"+ locale_formulaMore.findFunctionTitle +":</label><input class='formulaInputFocus' id='searchFormulaListInput' placeholder='"+ locale_formulaMore.tipInputFunctionName +"' spellcheck='false'/></div><div class='selbox'><label>"+locale_formulaMore.selectCategory+":</label><select id='formulaTypeSelect'><option value='0'>"+locale_formulaMore.Math+"</option><option value='1'>"+locale_formulaMore.Statistical+"</option><option value='2'>"+locale_formulaMore.Lookup+"</option><option value='3'>"+locale_formulaMore.luckysheet+"</option><option value='4'>"+locale_formulaMore.dataMining+"</option><option value='5'>"+locale_formulaMore.Database+"</option><option value='6'>"+locale_formulaMore.Date+"</option><option value='7'>"+locale_formulaMore.Filter+"</option><option value='8'>"+locale_formulaMore.Financial+"</option><option value='9'>"+locale_formulaMore.Engineering+"</option><option value='10'>"+locale_formulaMore.Logical+"</option><option value='11'>"+locale_formulaMore.Operator+"</option><option value='12'>"+locale_formulaMore.Text+"</option><option value='13'>"+locale_formulaMore.Parser+"</option><option value='14'>"+locale_formulaMore.Array+"</option><option value='-1'>"+locale_formulaMore.other+"</option></select></div><div class='listbox'><label>"+locale_formulaMore.selectFunctionTitle+":</label><div id='formulaTypeList'></div></div>",
|
||||
"botton": '<button id="luckysheet-search-formula-confirm" class="btn btn-primary">'+locale_button.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+locale_button.cancel+'</button>',
|
||||
"style": "z-index:100003"
|
||||
}));
|
||||
let $t = $("#luckysheet-search-formula").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(),
|
||||
myh = $t.outerHeight(),
|
||||
myw = $t.outerWidth();
|
||||
let winw = $(window).width(), winh = $(window).height();
|
||||
let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop();
|
||||
$("#luckysheet-search-formula").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3, "user-select": "none" }).show();
|
||||
|
||||
_this.formulaListByType("0"); //默认公式列表为类型0
|
||||
$("#searchFormulaListInput").focus();
|
||||
},
|
||||
formulaListByType: function(type){
|
||||
$("#formulaTypeList").empty();
|
||||
let functionlist = Store.functionlist;
|
||||
|
||||
for(let i = 0; i < functionlist.length; i++){
|
||||
if((type == "-1" && functionlist[i].t > 14) || functionlist[i].t == type){
|
||||
$('<div class="listBox" name="'+ functionlist[i].n +'"><span>'+ functionlist[i].n +'</span><span>'+ functionlist[i].a +'</span></div>').appendTo($("#formulaTypeList"));
|
||||
}
|
||||
}
|
||||
|
||||
$("#formulaTypeList .listBox:first-child").addClass("on"); //默认公式列表第一个为选中状态
|
||||
},
|
||||
formulaParmDialog: function(formulaTxt, parm){ //参数弹出框
|
||||
let parm_title = '',
|
||||
parm_content = '',
|
||||
parm_list_content = '';
|
||||
|
||||
let _locale = locale();
|
||||
let locale_formulaMore = _locale.formulaMore;
|
||||
let locale_button = _locale.button;
|
||||
let functionlist = Store.functionlist;
|
||||
|
||||
for(let i = 0; i < functionlist.length; i++){
|
||||
if(functionlist[i].n == formulaTxt.toUpperCase()){
|
||||
parm_title = functionlist[i].n;
|
||||
|
||||
for(let j = 0; j < functionlist[i].p.length; j++){
|
||||
if(parm == null){
|
||||
//无参数
|
||||
parm_list_content += '<div class="parmBox">'+
|
||||
'<div class="name">'+ functionlist[i].p[j].name +'</div>'+
|
||||
'<div class="txt">'+
|
||||
'<input class="formulaInputFocus" spellcheck="false"/>' +
|
||||
'<i class="fa fa-table" aria-hidden="true" title="'+locale_formulaMore.tipSelectDataRange+'"></i>'+
|
||||
'</div>'+
|
||||
'<div class="val">=</div>'+
|
||||
'</div>';
|
||||
}
|
||||
else{
|
||||
//有参数
|
||||
if(parm[j] == null){
|
||||
parm[j] = "";
|
||||
}
|
||||
|
||||
parm_list_content += '<div class="parmBox">'+
|
||||
'<div class="name">'+ functionlist[i].p[j].name +'</div>'+
|
||||
'<div class="txt">'+
|
||||
'<input class="formulaInputFocus" value="'+ parm[j] +'" spellcheck="false"/>'+
|
||||
'<i class="fa fa-table" aria-hidden="true" title="'+locale_formulaMore.tipSelectDataRange+'"></i>'+
|
||||
'</div>'+
|
||||
'<div class="val">=</div>'+
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
parm_content = '<div>'+
|
||||
'<div class="parmListBox">'+ parm_list_content +'</div>'+
|
||||
'<div class="formulaDetails">'+ functionlist[i].d +'</div>'+
|
||||
'<div class="parmDetailsBox"></div>'+
|
||||
'<div class="result">'+locale_formulaMore.calculationResult+' = <span></span></div>'+
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$("#luckysheet-search-formula").hide();
|
||||
$("#luckysheet-modal-dialog-mask").hide();
|
||||
|
||||
$("#luckysheet-search-formula-parm").remove();
|
||||
$("body").append(replaceHtml(modelHTML, {
|
||||
"id": "luckysheet-search-formula-parm",
|
||||
"addclass": "luckysheet-search-formula-parm",
|
||||
"title": parm_title,
|
||||
"content": parm_content,
|
||||
"botton": '<button id="luckysheet-search-formula-parm-confirm" class="btn btn-primary">'+locale_button.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+locale_button.cancel+'</button>',
|
||||
"style": "z-index:100003"
|
||||
}));
|
||||
let $t = $("#luckysheet-search-formula-parm").find(".luckysheet-modal-dialog-content").css("min-width", 300).end(),
|
||||
myh = $t.outerHeight(),
|
||||
myw = $t.outerWidth();
|
||||
let winw = $(window).width(), winh = $(window).height();
|
||||
let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop();
|
||||
$("#luckysheet-search-formula-parm").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show();
|
||||
|
||||
//参数栏第一个参数聚焦,显示选取虚线框
|
||||
$("#luckysheet-search-formula-parm .parmBox:eq(0) input").focus();
|
||||
|
||||
//遍历参数,有参数显示值,无显示空
|
||||
$("#luckysheet-search-formula-parm .parmBox").each(function(index,e){
|
||||
let parmtxt = $(e).find(".txt input").val();
|
||||
|
||||
if(formula.getfunctionParam(parmtxt).fn == null){ //参数不是公式
|
||||
if(formula.iscelldata(parmtxt)){ //参数是选区
|
||||
let txtdata = luckysheet_getcelldata(parmtxt).data;
|
||||
|
||||
if(getObjType(txtdata) == "array"){ //参数为多个单元格选区
|
||||
let txtArr = [];
|
||||
|
||||
for(let i = 0; i < txtdata.length; i++){
|
||||
for(let j = 0; j < txtdata[i].length; j++){
|
||||
let cell = txtdata[i][j];
|
||||
|
||||
if(cell == null || isRealNull(cell.v)){
|
||||
txtArr.push(null);
|
||||
}
|
||||
else{
|
||||
txtArr.push(cell.v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#luckysheet-search-formula-parm .parmBox").eq(index).find(".val").text(" = {"+ txtArr.join(",") +"}");
|
||||
}
|
||||
else{ //参数为单个单元格选区
|
||||
$("#luckysheet-search-formula-parm .parmBox").eq(index).find(".val").text(" = {"+ txtdata.v +"}");
|
||||
}
|
||||
}
|
||||
else{ //参数不是选区
|
||||
$("#luckysheet-search-formula-parm .parmBox").eq(index).find(".val").text(" = {"+ parmtxt +"}");
|
||||
}
|
||||
}
|
||||
else{ //参数是公式
|
||||
$("#luckysheet-search-formula-parm .parmBox").eq(index).find(".val").text(" = {"+ (new Function("return " + $.trim(formula.functionParserExe("=" + parmtxt)))()) +"}");
|
||||
}
|
||||
})
|
||||
|
||||
$("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove();
|
||||
formula.data_parm_index = 0;
|
||||
formula.rangestart = true;
|
||||
},
|
||||
parmTxtShow: function(parmtxt){
|
||||
if(formula.getfunctionParam(parmtxt).fn == null){ //参数不是公式
|
||||
if(formula.iscelldata(parmtxt)){ //参数是选区
|
||||
let cellrange = formula.getcellrange(parmtxt);
|
||||
let r1 = cellrange.row[0],
|
||||
r2 = cellrange.row[1],
|
||||
c1 = cellrange.column[0],
|
||||
c2 = cellrange.column[1];
|
||||
let row = Store.visibledatarow[r2],
|
||||
row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1];
|
||||
let col = Store.visibledatacolumn[c2],
|
||||
col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1];
|
||||
|
||||
$("#luckysheet-formula-functionrange-select").css({
|
||||
"left": col_pre,
|
||||
"width": col - col_pre - 1,
|
||||
"top": row_pre,
|
||||
"height": row - row_pre - 1
|
||||
}).show();
|
||||
$("#luckysheet-formula-help-c").hide();
|
||||
|
||||
luckysheet_count_show(col_pre, row_pre, col - col_pre - 1, row - row_pre - 1, cellrange.row, cellrange.column);
|
||||
|
||||
let txtdata = luckysheet_getcelldata(parmtxt).data;
|
||||
if(getObjType(txtdata) == "array"){ //参数为多个单元格选区
|
||||
let txtArr = [];
|
||||
|
||||
for(let i = 0; i < txtdata.length; i++){
|
||||
for(let j = 0; j < txtdata[i].length; j++){
|
||||
let cell = txtdata[i][j];
|
||||
|
||||
if(cell == null || isRealNull(cell.v)){
|
||||
txtArr.push(null);
|
||||
}
|
||||
else{
|
||||
txtArr.push(cell.v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#luckysheet-search-formula-parm .parmBox").eq(formula.data_parm_index).find(".val").text(" = {"+ txtArr.join(",") +"}");
|
||||
}
|
||||
else{ //参数为单个单元格选区
|
||||
$("#luckysheet-search-formula-parm .parmBox").eq(formula.data_parm_index).find(".val").text(" = {"+ txtdata.v +"}");
|
||||
}
|
||||
}
|
||||
else{ //参数不是选区
|
||||
$("#luckysheet-search-formula-parm .parmBox").eq(formula.data_parm_index).find(".val").text(" = {"+ parmtxt +"}");
|
||||
|
||||
$("#luckysheet-formula-functionrange-select").hide();
|
||||
}
|
||||
}
|
||||
else{
|
||||
//参数是公式
|
||||
let txt;
|
||||
for(let k = 0; k < formula.getfunctionParam(parmtxt).param.length; k++){
|
||||
if(formula.iscelldata(formula.getfunctionParam(parmtxt).param[k])){
|
||||
txt = formula.getfunctionParam(parmtxt).param[k];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
let cellrange = formula.getcellrange(txt);
|
||||
let r1 = cellrange.row[0],
|
||||
r2 = cellrange.row[1],
|
||||
c1 = cellrange.column[0],
|
||||
c2 = cellrange.column[1];
|
||||
let row = Store.visibledatarow[r2],
|
||||
row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1];
|
||||
let col = Store.visibledatacolumn[c2],
|
||||
col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1];
|
||||
|
||||
$("#luckysheet-formula-functionrange-select").css({
|
||||
"left": col_pre,
|
||||
"width": col - col_pre - 1,
|
||||
"top": row_pre,
|
||||
"height": row - row_pre - 1
|
||||
}).show();
|
||||
$("#luckysheet-formula-help-c").hide();
|
||||
|
||||
luckysheet_count_show(col_pre, row_pre, col - col_pre - 1, row - row_pre - 1, cellrange.row, cellrange.column);
|
||||
|
||||
$("#luckysheet-search-formula-parm .parmBox").eq(formula.data_parm_index).find(".val").text(" = {"+ (new Function("return " + $.trim(formula.functionParserExe("=" + parmtxt)))()) +"}");
|
||||
}
|
||||
},
|
||||
functionStrCompute: function(){
|
||||
let isVal = true; //参数不为空
|
||||
let parmValArr = []; //参数值集合
|
||||
let lvi = -1; //最后一个有值的参数索引
|
||||
|
||||
let formulatxt = $("#luckysheet-search-formula-parm").find(".luckysheet-modal-dialog-title-text").text();
|
||||
let p = Store.luckysheet_function[formulatxt].p;
|
||||
|
||||
$("#luckysheet-search-formula-parm .parmBox").each(function(i, e){
|
||||
let parmtxt = $(e).find(".txt input").val();
|
||||
|
||||
let parmRequire;
|
||||
if(i < p.length){
|
||||
parmRequire = p[i].require;
|
||||
}
|
||||
else{
|
||||
parmRequire = p[p.length - 1].require;
|
||||
}
|
||||
|
||||
if(parmtxt == "" && parmRequire == "m"){
|
||||
isVal = false;
|
||||
}
|
||||
|
||||
if(parmtxt != ""){
|
||||
lvi = i;
|
||||
}
|
||||
});
|
||||
|
||||
//单元格显示
|
||||
let functionHtmlTxt;
|
||||
if(lvi == -1){
|
||||
functionHtmlTxt = "=" + $("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text() + "()";
|
||||
}
|
||||
else if(lvi == 0){
|
||||
functionHtmlTxt = "=" + $("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text() + "(" + $("#luckysheet-search-formula-parm .parmBox").eq(0).find(".txt input").val() + ")";
|
||||
}
|
||||
else{
|
||||
for(let j = 0; j <= lvi; j++){
|
||||
parmValArr.push($("#luckysheet-search-formula-parm .parmBox").eq(j).find(".txt input").val());
|
||||
}
|
||||
|
||||
functionHtmlTxt = "=" + $("#luckysheet-search-formula-parm .luckysheet-modal-dialog-title-text").text() + "(" + parmValArr.join(",") + ")";
|
||||
}
|
||||
|
||||
let function_str = formula.functionHTMLGenerate(functionHtmlTxt);
|
||||
$("#luckysheet-rich-text-editor").html(function_str);
|
||||
$("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html());
|
||||
|
||||
if(isVal){ //公式计算
|
||||
let fp = $.trim(formula.functionParserExe($("#luckysheet-rich-text-editor").text()));
|
||||
|
||||
let result = null;
|
||||
|
||||
try {
|
||||
result = new Function("return " + fp)();
|
||||
}
|
||||
catch (e) {
|
||||
result = formula.error.n;
|
||||
}
|
||||
|
||||
$("#luckysheet-search-formula-parm .result span").text(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default insertFormula;
|
||||
@@ -1,984 +0,0 @@
|
||||
import luckysheetConfigsetting from './luckysheetConfigsetting';
|
||||
import menuButton from './menuButton';
|
||||
import conditionformat from './conditionformat';
|
||||
import server from './server';
|
||||
import {luckysheetupdateCell,setCenterInputPosition} from './updateCell';
|
||||
import { keycode } from './constant';
|
||||
import {
|
||||
luckysheetMoveHighlightCell,
|
||||
luckysheetMoveHighlightCell2,
|
||||
luckysheetMoveHighlightRange,
|
||||
luckysheetMoveHighlightRange2
|
||||
} from './sheetMove';
|
||||
import { selectHightlightShow, selectIsOverlap } from './select';
|
||||
import selection from './selection';
|
||||
import searchReplace from './searchReplace';
|
||||
import controlHistory from './controlHistory';
|
||||
import imageCtrl from './imageCtrl';
|
||||
|
||||
import {
|
||||
getByteLen,
|
||||
getNowDateTime,
|
||||
luckysheetactiveCell,
|
||||
} from '../utils/util';
|
||||
import { getSheetIndex } from '../methods/get';
|
||||
import { hasPartMC, isEditMode } from '../global/validate';
|
||||
import { luckysheetRangeLast } from '../global/cursorPos';
|
||||
import formula from '../global/formula';
|
||||
import cleargridelement from '../global/cleargridelement';
|
||||
import tooltip from '../global/tooltip';
|
||||
import locale from '../locale/locale';
|
||||
import {enterKeyControll} from './inlineString';
|
||||
import Store from '../store';
|
||||
|
||||
|
||||
let luckysheet_shiftkeydown = false;
|
||||
|
||||
function formulaMoveEvent(dir, ctrlKey, shiftKey, event){
|
||||
if ($("#luckysheet-formula-search-c").is(":visible") && (dir=="up" || dir=="down") ) {
|
||||
let $obj;
|
||||
if(dir=="down"){
|
||||
$obj = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").next();
|
||||
if ($obj.length == 0) {
|
||||
$obj = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").first();
|
||||
}
|
||||
}
|
||||
else if(dir=="up"){
|
||||
$obj = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active").prev();
|
||||
if ($obj.length == 0) {
|
||||
$obj = $("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").last();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item").removeClass("luckysheet-formula-search-item-active");
|
||||
$obj.addClass("luckysheet-formula-search-item-active");
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
else{
|
||||
if($("#luckysheet-formula-functionrange-select").is(":visible")){
|
||||
if(ctrlKey && shiftKey){
|
||||
luckysheetMoveHighlightRange2(dir, "rangeOfFormula");
|
||||
}
|
||||
else if(ctrlKey){
|
||||
luckysheetMoveHighlightCell2(dir, "rangeOfFormula");
|
||||
}
|
||||
else if(shiftKey){
|
||||
let dir_n = dir, step = 1;
|
||||
if(dir == 'up'){
|
||||
dir_n = 'down';
|
||||
step = -1;
|
||||
}
|
||||
if(dir == 'left'){
|
||||
dir_n = 'right';
|
||||
step = -1;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightRange(dir_n, step, "rangeOfFormula");
|
||||
}
|
||||
else{
|
||||
let dir_n = dir, step = 1;
|
||||
if(dir == 'up'){
|
||||
dir_n = 'down';
|
||||
step = -1;
|
||||
}
|
||||
if(dir == 'left'){
|
||||
dir_n = 'right';
|
||||
step = -1;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightCell(dir_n, step, "rangeOfFormula");
|
||||
}
|
||||
event.preventDefault();
|
||||
}
|
||||
else if(formula.israngeseleciton()){
|
||||
let anchor = $(window.getSelection().anchorNode);
|
||||
// console.log(anchor.parent().next().text());
|
||||
if(anchor.parent().next().text() == null || anchor.parent().next().text() == ""){
|
||||
let vText = $("#luckysheet-input-box #luckysheet-input-box-index").text();
|
||||
let range = formula.getcellrange(vText);
|
||||
|
||||
if(range == null){
|
||||
range = formula.getcellrange($("#luckysheet-input-box-index").text());
|
||||
}
|
||||
|
||||
let r1 = range["row"][0], r2 = range["row"][1];
|
||||
let c1 = range["column"][0], c2 = range["column"][1];
|
||||
|
||||
let row = Store.visibledatarow[r2],
|
||||
row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1];
|
||||
let col = Store.visibledatacolumn[c2],
|
||||
col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1];
|
||||
|
||||
formula.func_selectedrange = {
|
||||
"left": col_pre,
|
||||
"width": col - col_pre - 1,
|
||||
"top": row_pre,
|
||||
"height": row - row_pre - 1,
|
||||
"left_move": col_pre,
|
||||
"width_move": col - col_pre - 1,
|
||||
"top_move": row_pre,
|
||||
"height_move": row - row_pre - 1,
|
||||
"row": [r1, r2],
|
||||
"column": [c1, c2],
|
||||
"row_focus": r1,
|
||||
"column_focus": c1
|
||||
};
|
||||
|
||||
formula.rangeSetValue({ "row": [r1, r2], "column": [c1, c2] });
|
||||
|
||||
formula.rangestart = true;
|
||||
formula.rangedrag_column_start = false;
|
||||
formula.rangedrag_row_start = false;
|
||||
|
||||
if(ctrlKey && shiftKey){
|
||||
luckysheetMoveHighlightRange2(dir, "rangeOfFormula");
|
||||
}
|
||||
else if(ctrlKey){
|
||||
luckysheetMoveHighlightCell2(dir, "rangeOfFormula");
|
||||
}
|
||||
else if(shiftKey){
|
||||
let dir_n = dir, step = 1;
|
||||
if(dir == 'up'){
|
||||
dir_n = 'down';
|
||||
step = -1;
|
||||
}
|
||||
if(dir == 'left'){
|
||||
dir_n = 'right';
|
||||
step = -1;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightRange(dir_n, step, "rangeOfFormula");
|
||||
}
|
||||
else{
|
||||
let dir_n = dir, step = 1;
|
||||
if(dir == 'up'){
|
||||
dir_n = 'down';
|
||||
step = -1;
|
||||
}
|
||||
if(dir == 'left'){
|
||||
dir_n = 'right';
|
||||
step = -1;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightCell(dir_n, step, "rangeOfFormula");
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
}
|
||||
else if(!ctrlKey && !shiftKey){
|
||||
let anchor = $(window.getSelection().anchorNode);
|
||||
let anchorOffset = window.getSelection().anchorOffset;
|
||||
|
||||
if(dir == 'up'){
|
||||
if(anchor.parent().is("span") && anchor.parent().next().length == 0 && anchorOffset > 0){
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
luckysheetMoveHighlightCell("down", -1, "rangeOfSelect");
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
else if(anchor.is("#luckysheet-rich-text-editor") && anchor.context.childElementCount == anchorOffset){
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
luckysheetMoveHighlightCell("down", -1, "rangeOfSelect");
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchor.context.length == anchorOffset){
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
luckysheetMoveHighlightCell("down", -1, "rangeOfSelect");
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
else if(dir == 'down'){
|
||||
if(anchor.parent().is("span") && anchor.parent().next().length == 0 && anchorOffset > 0){
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
luckysheetMoveHighlightCell("down", 1, "rangeOfSelect");
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
else if(anchor.is("#luckysheet-rich-text-editor") && anchor.context.childElementCount == anchorOffset){
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
luckysheetMoveHighlightCell("down", 1, "rangeOfSelect");
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchor.context.length == anchorOffset){
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
luckysheetMoveHighlightCell("down", 1, "rangeOfSelect");
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
else if(dir == 'left'){
|
||||
if(anchor.parent().is("span") && anchor.parent().prev().length == 0 && anchorOffset == 0){
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
luckysheetMoveHighlightCell("right", -1, "rangeOfSelect");
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
else if(anchor.is("#luckysheet-rich-text-editor") && anchorOffset == 1){
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
luckysheetMoveHighlightCell("right", -1, "rangeOfSelect");
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchorOffset == 0){
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
luckysheetMoveHighlightCell("right", -1, "rangeOfSelect");
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
else{
|
||||
formula.rangeHightlightselected($("#luckysheet-rich-text-editor"));
|
||||
}
|
||||
}
|
||||
else if(dir == 'right'){
|
||||
if(anchor.parent().is("span") && anchor.parent().next().length == 0 && anchorOffset > 0){
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
luckysheetMoveHighlightCell("right", 1, "rangeOfSelect");
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
else if(anchor.is("#luckysheet-rich-text-editor") && anchor.context.childElementCount == anchorOffset){
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
luckysheetMoveHighlightCell("right", 1, "rangeOfSelect");
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
else if(anchor.parent().is("#luckysheet-rich-text-editor") && anchor.context.length == anchorOffset){
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
luckysheetMoveHighlightCell("right", 1, "rangeOfSelect");
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
else{
|
||||
formula.rangeHightlightselected($("#luckysheet-rich-text-editor"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function keyboardInitial(){
|
||||
const _locale = locale();
|
||||
const locale_drag = _locale.drag;
|
||||
|
||||
//单元格编辑输入
|
||||
$("#luckysheet-input-box").click(function () {
|
||||
formula.rangeHightlightselected($("#luckysheet-rich-text-editor"));
|
||||
}).add("#" + Store.container).on("keydown", function (event) {
|
||||
let ctrlKey = event.ctrlKey;
|
||||
let altKey = event.altKey;
|
||||
let shiftKey = event.shiftKey;
|
||||
let kcode = event.keyCode;
|
||||
|
||||
if ($("#luckysheet-modal-dialog-mask").is(":visible") || $(event.target).hasClass("luckysheet-mousedown-cancel") || $(event.target).hasClass("sp-input") || (parseInt($("#luckysheet-input-box").css("top")) > 0 && $(event.target).closest(".luckysheet-input-box").length > 0 && kcode != keycode.ENTER && kcode != keycode.TAB && kcode != keycode.UP && kcode != keycode.DOWN && kcode != keycode.LEFT && kcode != keycode.RIGHT)) {
|
||||
let anchor = $(window.getSelection().anchorNode);
|
||||
|
||||
if(anchor.parent().is("#luckysheet-helpbox-cell") || anchor.is("#luckysheet-helpbox-cell")){
|
||||
if(kcode == keycode.ENTER){
|
||||
let helpboxValue = $("#luckysheet-helpbox-cell").text();
|
||||
|
||||
if(formula.iscelldata(helpboxValue)){
|
||||
let cellrange = formula.getcellrange(helpboxValue);
|
||||
|
||||
Store.luckysheet_select_save = [{ "row": cellrange["row"], "column": cellrange["column"], "row_focus": cellrange["row"][0], "column_focus": cellrange["column"][0] }];
|
||||
selectHightlightShow();
|
||||
|
||||
$("#luckysheet-helpbox-cell").blur();
|
||||
|
||||
let scrollLeft = $("#luckysheet-cell-main").scrollLeft(),
|
||||
scrollTop = $("#luckysheet-cell-main").scrollTop();
|
||||
let winH = $("#luckysheet-cell-main").height(),
|
||||
winW = $("#luckysheet-cell-main").width();
|
||||
|
||||
let row = Store.visibledatarow[cellrange["row"][1]],
|
||||
row_pre = cellrange["row"][0] - 1 == -1 ? 0 : Store.visibledatarow[cellrange["row"][0] - 1];
|
||||
let col = Store.visibledatacolumn[cellrange["column"][1]],
|
||||
col_pre = cellrange["column"][0] - 1 == -1 ? 0 : Store.visibledatacolumn[cellrange["column"][0] - 1];
|
||||
|
||||
if (col - scrollLeft - winW + 20 > 0) {
|
||||
$("#luckysheet-scrollbar-x").scrollLeft(col - winW + 20);
|
||||
}
|
||||
else if (col_pre - scrollLeft - 20 < 0) {
|
||||
$("#luckysheet-scrollbar-x").scrollLeft(col_pre - 20);
|
||||
}
|
||||
|
||||
if (row - scrollTop - winH + 20 > 0) {
|
||||
$("#luckysheet-scrollbar-y").scrollTop(row - winH + 20);
|
||||
}
|
||||
else if (row_pre - scrollTop - 20 < 0) {
|
||||
$("#luckysheet-scrollbar-y").scrollTop(row_pre - 20);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ($("#luckysheet-modal-dialog-mask").is(":visible") || $(event.target).hasClass("luckysheet-mousedown-cancel") || $(event.target).hasClass("formulaInputFocus")) {
|
||||
return;
|
||||
}
|
||||
|
||||
let $inputbox = $("#luckysheet-input-box");
|
||||
|
||||
if((altKey || event.metaKey) && kcode == keycode.ENTER && parseInt($inputbox.css("top")) > 0){
|
||||
let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1];
|
||||
let row_index = last["row_focus"], col_index = last["column_focus"];
|
||||
enterKeyControll(Store.flowdata[row_index][col_index]);
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (kcode == keycode.ENTER && parseInt($inputbox.css("top")) > 0) {
|
||||
if ($("#luckysheet-formula-search-c").is(":visible") && formula.searchFunctionCell != null) {
|
||||
formula.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active"));
|
||||
}
|
||||
else {
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
Store.luckysheet_select_save = [{
|
||||
"row": [Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[0]],
|
||||
"column": [Store.luckysheetCellUpdate[1], Store.luckysheetCellUpdate[1]],
|
||||
"row_focus": Store.luckysheetCellUpdate[0],
|
||||
"column_focus": Store.luckysheetCellUpdate[1]
|
||||
}];
|
||||
luckysheetMoveHighlightCell("down", 1, "rangeOfSelect");
|
||||
}
|
||||
|
||||
//若有参数弹出框,隐藏
|
||||
if($("#luckysheet-search-formula-parm").is(":visible")){
|
||||
$("#luckysheet-search-formula-parm").hide();
|
||||
}
|
||||
//若有参数选取范围弹出框,隐藏
|
||||
if($("#luckysheet-search-formula-parm-select").is(":visible")){
|
||||
$("#luckysheet-search-formula-parm-select").hide();
|
||||
}
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (kcode == keycode.TAB) {
|
||||
if (parseInt($inputbox.css("top")) > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightCell("right", 1, "rangeOfSelect");
|
||||
event.preventDefault();
|
||||
}
|
||||
else if(kcode == keycode.F2){
|
||||
if (parseInt($inputbox.css("top")) > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1];
|
||||
|
||||
let row_index = last["row_focus"], col_index = last["column_focus"];
|
||||
|
||||
luckysheetupdateCell(row_index, col_index, Store.flowdata);
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (kcode == keycode.F4 && parseInt($inputbox.css("top")) > 0) {
|
||||
formula.setfreezonFuc(event);
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (kcode == keycode.ESC && parseInt($inputbox.css("top")) > 0) {
|
||||
formula.dontupdate();
|
||||
luckysheetMoveHighlightCell("down", 0, "rangeOfSelect");
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (kcode == keycode.ENTER) {
|
||||
if($(event.target).hasClass("formulaInputFocus") || $("#luckysheet-conditionformat-dialog").is(":visible")){
|
||||
return;
|
||||
}
|
||||
else if (String.fromCharCode(kcode) != null && $("#luckysheet-cell-selected").is(":visible")) {
|
||||
let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1];
|
||||
|
||||
let row_index = last["row_focus"], col_index = last["column_focus"];
|
||||
|
||||
luckysheetupdateCell(row_index, col_index, Store.flowdata);
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (ctrlKey || event.metaKey) {
|
||||
if (shiftKey) {
|
||||
if (!luckysheet_shiftkeydown) {
|
||||
Store.luckysheet_shiftpositon = $.extend(true, {}, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]);
|
||||
Store.luckysheet_shiftkeydown = true;
|
||||
}
|
||||
|
||||
//Ctrl + shift + 方向键 调整选区
|
||||
if (kcode == keycode.UP) {
|
||||
if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightRange2("up", "rangeOfSelect");
|
||||
}
|
||||
else if (kcode == keycode.DOWN) {
|
||||
if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightRange2("down", "rangeOfSelect");
|
||||
}
|
||||
else if (kcode == keycode.LEFT) {
|
||||
if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightRange2("left", "rangeOfSelect");
|
||||
}
|
||||
else if (kcode == keycode.RIGHT) {
|
||||
if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightRange2("right", "rangeOfSelect");
|
||||
}
|
||||
else if (kcode == 186 || kcode == 222) {
|
||||
let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1];
|
||||
let row_index = last["row_focus"],
|
||||
col_index = last["column_focus"];
|
||||
luckysheetupdateCell(row_index, col_index, Store.flowdata, true);
|
||||
|
||||
let value = getNowDateTime(2);
|
||||
$("#luckysheet-rich-text-editor").html(value);
|
||||
luckysheetRangeLast($("#luckysheet-rich-text-editor")[0]);
|
||||
formula.functionInputHanddler($("#luckysheet-functionbox-cell"), $("#luckysheet-rich-text-editor"), kcode);
|
||||
}
|
||||
}
|
||||
else if (kcode == 66) {//Ctrl + B 加粗
|
||||
$("#luckysheet-icon-bold").click();
|
||||
}
|
||||
else if (kcode == 67) {//Ctrl + C 复制
|
||||
if(imageCtrl.currentImgId != null){
|
||||
imageCtrl.copyImgItem(event);
|
||||
return;
|
||||
}
|
||||
|
||||
//复制时存在格式刷状态,取消格式刷
|
||||
if(menuButton.luckysheetPaintModelOn){
|
||||
menuButton.cancelPaintModel();
|
||||
}
|
||||
|
||||
if(Store.luckysheet_select_save.length == 0){
|
||||
return;
|
||||
}
|
||||
|
||||
//复制范围内包含部分合并单元格,提示
|
||||
if(Store.config["merge"] != null){
|
||||
let has_PartMC = false;
|
||||
|
||||
for(let s = 0; s < Store.luckysheet_select_save.length; s++){
|
||||
let r1 = Store.luckysheet_select_save[s].row[0],
|
||||
r2 = Store.luckysheet_select_save[s].row[1];
|
||||
let c1 = Store.luckysheet_select_save[s].column[0],
|
||||
c2 = Store.luckysheet_select_save[s].column[1];
|
||||
|
||||
has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2);
|
||||
|
||||
if(has_PartMC){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(has_PartMC){
|
||||
if(isEditMode()){
|
||||
alert(locale_drag.noMerge);
|
||||
}
|
||||
else{
|
||||
tooltip.info(locale_drag.noMerge, "");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//多重选区 有条件格式时 提示
|
||||
let cdformat = Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].luckysheet_conditionformat_save;
|
||||
if(Store.luckysheet_select_save.length > 1 && cdformat != null && cdformat.length > 0){
|
||||
let hasCF = false;
|
||||
|
||||
let cf_compute = conditionformat.getComputeMap();
|
||||
|
||||
label:
|
||||
for(let s = 0; s < Store.luckysheet_select_save.length; s++){
|
||||
if(hasCF){
|
||||
break;
|
||||
}
|
||||
|
||||
let r1 = Store.luckysheet_select_save[s].row[0],
|
||||
r2 = Store.luckysheet_select_save[s].row[1];
|
||||
let c1 = Store.luckysheet_select_save[s].column[0],
|
||||
c2 = Store.luckysheet_select_save[s].column[1];
|
||||
|
||||
for(let r = r1; r <= r2; r++){
|
||||
for(let c = c1; c <= c2; c++){
|
||||
if(conditionformat.checksCF(r, c, cf_compute) != null){
|
||||
hasCF = true;
|
||||
continue label;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(hasCF){
|
||||
if(isEditMode()){
|
||||
alert(locale_drag.noMulti);
|
||||
}
|
||||
else{
|
||||
tooltip.info(locale_drag.noMulti, "");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//多重选区 行不一样且列不一样时 提示
|
||||
if(Store.luckysheet_select_save.length > 1){
|
||||
let isSameRow = true,
|
||||
str_r = Store.luckysheet_select_save[0].row[0],
|
||||
end_r = Store.luckysheet_select_save[0].row[1];
|
||||
let isSameCol = true,
|
||||
str_c = Store.luckysheet_select_save[0].column[0],
|
||||
end_c = Store.luckysheet_select_save[0].column[1];
|
||||
|
||||
for(let s = 1; s < Store.luckysheet_select_save.length; s++){
|
||||
if(Store.luckysheet_select_save[s].row[0] != str_r || Store.luckysheet_select_save[s].row[1] != end_r){
|
||||
isSameRow = false;
|
||||
}
|
||||
if(Store.luckysheet_select_save[s].column[0] != str_c || Store.luckysheet_select_save[s].column[1] != end_c){
|
||||
isSameCol = false;
|
||||
}
|
||||
}
|
||||
|
||||
if((!isSameRow && !isSameCol) || selectIsOverlap()){
|
||||
if(isEditMode()){
|
||||
alert(locale_drag.noMulti);
|
||||
}
|
||||
else{
|
||||
tooltip.info(locale_drag.noMulti, "");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
selection.copy(event);
|
||||
|
||||
Store.luckysheet_paste_iscut = false;
|
||||
luckysheetactiveCell();
|
||||
|
||||
event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
else if (kcode == 70) {//Ctrl + F 查找
|
||||
searchReplace.createDialog(0);
|
||||
searchReplace.init();
|
||||
|
||||
$("#luckysheet-search-replace #searchInput input").focus();
|
||||
}
|
||||
else if (kcode == 72) {//Ctrl + H 替换
|
||||
searchReplace.createDialog(1);
|
||||
searchReplace.init();
|
||||
|
||||
$("#luckysheet-search-replace #searchInput input").focus();
|
||||
}
|
||||
else if (kcode == 73) {//Ctrl + I 斜体
|
||||
$("#luckysheet-icon-italic").click();
|
||||
}
|
||||
else if (kcode == 86) {//Ctrl + V 粘贴
|
||||
if (isEditMode() || Store.allowEdit === false){//此模式下禁用粘贴
|
||||
return;
|
||||
}
|
||||
|
||||
if($(event.target).hasClass("formulaInputFocus")){
|
||||
return;
|
||||
}
|
||||
|
||||
if(Store.luckysheet_select_save.length > 1){
|
||||
if(isEditMode()){
|
||||
alert(locale_drag.noPaste);
|
||||
}
|
||||
else{
|
||||
tooltip.info(locale_drag.noPaste, "");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
selection.isPasteAction = true;
|
||||
luckysheetactiveCell();
|
||||
|
||||
event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
else if (kcode == 88) {//Ctrl + X 剪切
|
||||
//复制时存在格式刷状态,取消格式刷
|
||||
if(menuButton.luckysheetPaintModelOn){
|
||||
menuButton.cancelPaintModel();
|
||||
}
|
||||
|
||||
if(Store.luckysheet_select_save.length == 0){
|
||||
return;
|
||||
}
|
||||
|
||||
//复制范围内包含部分合并单元格,提示
|
||||
if(Store.config["merge"] != null){
|
||||
let has_PartMC = false;
|
||||
|
||||
for(let s = 0; s < Store.luckysheet_select_save.length; s++){
|
||||
let r1 = Store.luckysheet_select_save[s].row[0],
|
||||
r2 = Store.luckysheet_select_save[s].row[1];
|
||||
let c1 = Store.luckysheet_select_save[s].column[0],
|
||||
c2 = Store.luckysheet_select_save[s].column[1];
|
||||
|
||||
has_PartMC = hasPartMC(Store.config, r1, r2, c1, c2);
|
||||
|
||||
if(has_PartMC){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(has_PartMC){
|
||||
if(luckysheetConfigsetting.editMode){
|
||||
alert(_locale_drag.noMerge);
|
||||
}
|
||||
else{
|
||||
tooltip.info(_locale_drag.noMerge, "");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//多重选区时 提示
|
||||
if(Store.luckysheet_select_save.length > 1){
|
||||
if(isEditMode()){
|
||||
alert(locale_drag.noMulti);
|
||||
}
|
||||
else{
|
||||
tooltip.info(locale_drag.noMulti, "");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
selection.copy(event);
|
||||
|
||||
Store.luckysheet_paste_iscut = true;
|
||||
luckysheetactiveCell();
|
||||
|
||||
event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
else if (kcode == 90) {//Ctrl + Z 撤销
|
||||
controlHistory.redo(event);
|
||||
luckysheetactiveCell();
|
||||
event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
else if (kcode == 89) {//Ctrl + Y 重做
|
||||
controlHistory.undo(event);
|
||||
luckysheetactiveCell();
|
||||
event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
else if (kcode == keycode.UP) {//Ctrl + up 调整单元格
|
||||
if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightCell2("up", "rangeOfSelect");
|
||||
}
|
||||
else if (kcode == keycode.DOWN) {//Ctrl + down 调整单元格
|
||||
if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightCell2("down", "rangeOfSelect");
|
||||
}
|
||||
else if (kcode == keycode.LEFT) {//Ctrl + top 调整单元格
|
||||
if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightCell2("left", "rangeOfSelect");
|
||||
}
|
||||
else if (kcode == keycode.RIGHT) {//Ctrl + right 调整单元格
|
||||
if (parseInt($inputbox.css("top")) > 0 || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightCell2("right", "rangeOfSelect");
|
||||
}
|
||||
else if (kcode == 186) {//Ctrl + ; 填充系统日期
|
||||
let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1];
|
||||
let row_index = last["row_focus"],
|
||||
col_index = last["column_focus"];
|
||||
luckysheetupdateCell(row_index, col_index, Store.flowdata, true);
|
||||
|
||||
let value = getNowDateTime(1);
|
||||
$("#luckysheet-rich-text-editor").html(value);
|
||||
luckysheetRangeLast($("#luckysheet-rich-text-editor")[0]);
|
||||
formula.functionInputHanddler($("#luckysheet-functionbox-cell"), $("#luckysheet-rich-text-editor"), kcode);
|
||||
}
|
||||
else if (kcode == 222) {//Ctrl + ' 填充系统时间
|
||||
let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1];
|
||||
let row_index = last["row_focus"],
|
||||
col_index = last["column_focus"];
|
||||
luckysheetupdateCell(row_index, col_index, Store.flowdata, true);
|
||||
|
||||
let value = getNowDateTime(2);
|
||||
$("#luckysheet-rich-text-editor").html(value);
|
||||
luckysheetRangeLast($("#luckysheet-rich-text-editor")[0]);
|
||||
formula.functionInputHanddler($("#luckysheet-functionbox-cell"), $("#luckysheet-rich-text-editor"), kcode);
|
||||
}
|
||||
else if (String.fromCharCode(kcode).toLocaleUpperCase() == "A") {//Ctrl + A 全选
|
||||
// $("#luckysheet-left-top").trigger("mousedown");
|
||||
// $(document).trigger("mouseup");
|
||||
$("#luckysheet-left-top").click()
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
else if (shiftKey && (kcode == keycode.UP || kcode == keycode.DOWN || kcode == keycode.LEFT || kcode == keycode.RIGHT || (altKey && (kcode == 53 || kcode == 101)))) {
|
||||
if (parseInt($inputbox.css("top")) > 0 || $(event.target).hasClass("formulaInputFocus")) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!luckysheet_shiftkeydown) {
|
||||
Store.luckysheet_shiftpositon = $.extend(true, {}, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]);
|
||||
Store.luckysheet_shiftkeydown = true;
|
||||
}
|
||||
|
||||
//shift + 方向键 调整选区
|
||||
if (kcode == keycode.UP) {
|
||||
if($("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")){
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightRange("down", -1, "rangeOfSelect");
|
||||
}
|
||||
else if (kcode == keycode.DOWN) {
|
||||
if($("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")){
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightRange("down", 1, "rangeOfSelect");
|
||||
}
|
||||
else if (kcode == keycode.LEFT) {
|
||||
if($("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")){
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightRange("right", -1, "rangeOfSelect");
|
||||
}
|
||||
else if (kcode == keycode.RIGHT) {
|
||||
if($("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")){
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightRange("right", 1, "rangeOfSelect");
|
||||
}
|
||||
else if (altKey && (kcode == 53 || kcode == 101)) {
|
||||
//Alt + Shift + 5(删除线)
|
||||
$("#luckysheet-icon-strikethrough").click();
|
||||
}
|
||||
// else if (altKey && (kcode == 54 || kcode == 102)) {
|
||||
// //Alt + Shift + 6(删除线)
|
||||
// $("#luckysheet-icon-underline").click();
|
||||
// }
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (kcode == keycode.ESC) {
|
||||
if(menuButton.luckysheetPaintModelOn){
|
||||
menuButton.cancelPaintModel();
|
||||
}
|
||||
else{
|
||||
cleargridelement(event);
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
selectHightlightShow();
|
||||
}
|
||||
else if (kcode == keycode.DELETE || kcode == keycode.BACKSPACE) {
|
||||
if(imageCtrl.currentImgId != null){
|
||||
imageCtrl.removeImgItem();
|
||||
}
|
||||
else{
|
||||
$("#luckysheet-delete-text").click();
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
else if(kcode == 8 && imageCtrl.currentImgId != null){
|
||||
imageCtrl.removeImgItem();
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (kcode == keycode.UP) {
|
||||
if (parseInt($inputbox.css("top")) > 0 || Store.luckysheet_cell_selected_move || Store.luckysheet_cell_selected_extend || $(event.target).hasClass("formulaInputFocus") || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightCell("down", -1, "rangeOfSelect");
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (kcode == keycode.DOWN) {
|
||||
if (parseInt($inputbox.css("top")) > 0 || Store.luckysheet_cell_selected_move || Store.luckysheet_cell_selected_extend || $(event.target).hasClass("formulaInputFocus") || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightCell("down", 1, "rangeOfSelect");
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (kcode == keycode.LEFT) {
|
||||
if (parseInt($inputbox.css("top")) > 0 || Store.luckysheet_cell_selected_move || Store.luckysheet_cell_selected_extend || $(event.target).hasClass("formulaInputFocus") || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightCell("right", -1, "rangeOfSelect");
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (kcode == keycode.RIGHT) {
|
||||
if (parseInt($inputbox.css("top")) > 0 || Store.luckysheet_cell_selected_move || Store.luckysheet_cell_selected_extend || $(event.target).hasClass("formulaInputFocus") || $("#luckysheet-singleRange-dialog").is(":visible") || $("#luckysheet-multiRange-dialog").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
|
||||
luckysheetMoveHighlightCell("right", 1, "rangeOfSelect");
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (!((kcode >= 112 && kcode <= 123) || kcode <= 46 || kcode == 144 || kcode == 108 || event.ctrlKey || event.altKey || (event.shiftKey && (kcode == 37 || kcode == 38 || kcode == 39 || kcode == 40))) || kcode == 8 || kcode == 32 || kcode == 46 || kcode == 0 || (event.ctrlKey && kcode == 86)) {
|
||||
if (String.fromCharCode(kcode) != null && $("#luckysheet-cell-selected").is(":visible") && (kcode != keycode.CAPSLOCK && kcode != keycode.WIN && kcode != 18)) {
|
||||
let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1];
|
||||
|
||||
let row_index = last["row_focus"], col_index = last["column_focus"];
|
||||
|
||||
luckysheetupdateCell(row_index, col_index, Store.flowdata, true);
|
||||
if(kcode == 8){
|
||||
$("#luckysheet-rich-text-editor").html("<br/>");
|
||||
}
|
||||
formula.functionInputHanddler($("#luckysheet-functionbox-cell"), $("#luckysheet-rich-text-editor"), kcode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
luckysheetactiveCell();
|
||||
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
//单元格编辑 keydown (公式 上下左右键移动)
|
||||
$("#" + Store.container).add("#luckysheet-input-box").keydown(function (event) {
|
||||
if ($("#luckysheet-modal-dialog-mask").is(":visible") || $(event.target).hasClass("luckysheet-mousedown-cancel") || $(event.target).hasClass("formulaInputFocus")) {
|
||||
return;
|
||||
}
|
||||
|
||||
let ctrlKey = event.ctrlKey;
|
||||
let altKey = event.altKey;
|
||||
let shiftKey = event.shiftKey;
|
||||
let kcode = event.keyCode;
|
||||
|
||||
let $inputbox = $("#luckysheet-input-box");
|
||||
if (kcode == keycode.ESC && parseInt($("#luckysheet-input-box").css("top")) > 0) {
|
||||
formula.dontupdate();
|
||||
luckysheetMoveHighlightCell("down", 0, "rangeOfSelect");
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (kcode == keycode.ENTER && parseInt($inputbox.css("top")) > 0) {
|
||||
if ($("#luckysheet-formula-search-c").is(":visible") && formula.searchFunctionCell != null) {
|
||||
formula.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active"));
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
else if(kcode == keycode.TAB && parseInt($inputbox.css("top")) > 0){
|
||||
if ($("#luckysheet-formula-search-c").is(":visible") && formula.searchFunctionCell != null) {
|
||||
formula.searchFunctionEnter($("#luckysheet-formula-search-c").find(".luckysheet-formula-search-item-active"));
|
||||
}
|
||||
else{
|
||||
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
|
||||
luckysheetMoveHighlightCell("right", 1, "rangeOfSelect");
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (kcode == keycode.F4 && parseInt($inputbox.css("top")) > 0) {
|
||||
formula.setfreezonFuc(event);
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (kcode == keycode.UP && parseInt($inputbox.css("top")) > 0) {
|
||||
formulaMoveEvent("up", ctrlKey, shiftKey,event);
|
||||
}
|
||||
else if (kcode == keycode.DOWN && parseInt($inputbox.css("top")) > 0) {
|
||||
formulaMoveEvent("down", ctrlKey, shiftKey,event);
|
||||
}
|
||||
else if (kcode == keycode.LEFT && parseInt($inputbox.css("top")) > 0) {
|
||||
formulaMoveEvent("left", ctrlKey, shiftKey,event);
|
||||
}
|
||||
else if (kcode == keycode.RIGHT && parseInt($inputbox.css("top")) > 0) {
|
||||
formulaMoveEvent("right", ctrlKey, shiftKey,event);
|
||||
}
|
||||
else if (!((kcode >= 112 && kcode <= 123) || kcode <= 46 || kcode == 144 || kcode == 108 || event.ctrlKey || event.altKey || (event.shiftKey && (kcode == 37 || kcode == 38 || kcode == 39 || kcode == 40 || kcode == keycode.WIN || kcode == keycode.WIN_R || kcode == keycode.MENU))) || kcode == 8 || kcode == 32 || kcode == 46 || (event.ctrlKey && kcode == 86)) {
|
||||
// if(event.target.id!="luckysheet-input-box" && event.target.id!="luckysheet-rich-text-editor"){
|
||||
formula.functionInputHanddler($("#luckysheet-functionbox-cell"), $("#luckysheet-rich-text-editor"), kcode);
|
||||
setCenterInputPosition(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1], Store.flowdata);
|
||||
// }
|
||||
|
||||
}
|
||||
}).keyup(function (e) {
|
||||
let kcode = e.keyCode;
|
||||
|
||||
if (!e.shiftKey && kcode == 16) {
|
||||
Store.luckysheet_shiftkeydown = false;
|
||||
Store.luckysheet_shiftpositon = null;
|
||||
}
|
||||
|
||||
//输入框中文输入后 shift 和 空格 处理
|
||||
if(parseInt($("#luckysheet-input-box").css("top")) > 0 && (kcode == 13 || kcode == 16 || kcode == 32)){
|
||||
// if(event.target.id=="luckysheet-input-box" || event.target.id=="luckysheet-rich-text-editor"){
|
||||
// formula.functionInputHanddler($("#luckysheet-functionbox-cell"), $("#luckysheet-rich-text-editor"), kcode);
|
||||
// }
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
//top workBook rename
|
||||
$("#luckysheet_info_detail_input").val(server.title).css("width", getByteLen(server.title) * 10).keydown(function(){
|
||||
let ctrlKey = event.ctrlKey;
|
||||
let altKey = event.altKey;
|
||||
let shiftKey = event.shiftKey;
|
||||
let kcode = event.keyCode;
|
||||
let $t = $(this);
|
||||
if(kcode == keycode.ENTER){
|
||||
$t.blur().change();
|
||||
}
|
||||
}).bind('input propertychange', function() {
|
||||
let $t = $(this);
|
||||
let inputlen = getByteLen($t.val())*10;
|
||||
let updatelen = $("#luckysheet_info_detail_update").outerWidth();
|
||||
let savelen = $("#luckysheet_info_detail_save").outerWidth();
|
||||
let userlen = $("#luckysheet_info_detail_user").parent().outerWidth()+60;
|
||||
let containerlen = $("#" + Store.container).outerWidth();
|
||||
let otherlen = 100;
|
||||
|
||||
let minuslen = containerlen- savelen - updatelen - userlen - otherlen;
|
||||
if(inputlen > minuslen){
|
||||
$("#luckysheet_info_detail_input").css("width", minuslen);
|
||||
}
|
||||
else{
|
||||
$("#luckysheet_info_detail_input").css("width", inputlen);
|
||||
}
|
||||
}).change(function(){
|
||||
server.saveParam("na", null, $(this).val());
|
||||
});
|
||||
|
||||
|
||||
// 右击菜单的input输入框 敲击Enter一样生效
|
||||
$("#" + Store.container).add("input.luckysheet-mousedown-cancel").keydown(function (event) {
|
||||
|
||||
const element = event.target.closest('.luckysheet-cols-menuitem');
|
||||
if (typeof(element) != 'undefined' && element != null && event.keyCode === 13){
|
||||
$(element).trigger('click');
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
/**
|
||||
* Monitor special variables
|
||||
*/
|
||||
import {createProxy} from '../utils/util';
|
||||
import Store from '../store/index';
|
||||
import method from '../global/method';
|
||||
import { getluckysheetfile } from '../methods/get'
|
||||
import { toJson } from '../global/api';
|
||||
|
||||
let undoTimer,redoTimer;
|
||||
function undoAccessible(len) {
|
||||
clearTimeout(undoTimer);
|
||||
undoTimer = setTimeout(() => {
|
||||
$('#luckysheet-icon-undo')[len ? 'removeClass' : 'addClass']('disabled');
|
||||
}, 10);
|
||||
}
|
||||
function redoAccessible(len) {
|
||||
clearTimeout(redoTimer);
|
||||
redoTimer = setTimeout(() => {
|
||||
$('#luckysheet-icon-redo')[len ? 'removeClass' : 'addClass']('disabled');
|
||||
}, 10);
|
||||
}
|
||||
|
||||
const initListener = function(){
|
||||
// createProxy(Store,['jfredo']);
|
||||
createProxy(Store, 'jfredo',(target, property, val, receiver)=>{
|
||||
if (property !== 'length') {
|
||||
// 钩子函数
|
||||
method.createHookFunction('updated',val)
|
||||
}
|
||||
undoAccessible(Store.jfredo.length);
|
||||
} );
|
||||
createProxy(Store, 'jfundo',(target, property, val, receiver)=>{
|
||||
redoAccessible(Store.jfundo.length);
|
||||
} );
|
||||
|
||||
|
||||
|
||||
createProxy(Store, 'asyncLoad', (target, property, val, receiver)=>{
|
||||
if(property === 'length' && val === 0){
|
||||
method.createHookFunction('workbookCreateAfter', toJson())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
initListener
|
||||
}
|
||||
@@ -1,497 +0,0 @@
|
||||
import { replaceHtml } from '../utils/util';
|
||||
import { getSheetIndex } from '../methods/get';
|
||||
import { isRealNull } from '../global/validate';
|
||||
import { isEditMode } from '../global/validate';
|
||||
import tooltip from '../global/tooltip';
|
||||
import { modelHTML } from './constant';
|
||||
import { selectHightlightShow } from './select';
|
||||
import conditionformat from './conditionformat';
|
||||
import Store from '../store';
|
||||
import locale from '../locale/locale';
|
||||
|
||||
//定位
|
||||
const luckysheetLocationCell = {
|
||||
createDialog: function(){
|
||||
$("#luckysheet-modal-dialog-mask").show();
|
||||
$("#luckysheet-locationCell-dialog").remove();
|
||||
|
||||
const _locale = locale();
|
||||
const locale_location = _locale.findAndReplace;
|
||||
const locale_button = _locale.button;
|
||||
|
||||
let content = '<div class="listbox">'+
|
||||
'<div class="listItem">'+
|
||||
'<input type="radio" name="locationType" checked="checked" id="locationConstant">'+
|
||||
'<label for="locationConstant">'+locale_location.locationConstant+'</label>'+
|
||||
'<div class="subbox">'+
|
||||
'<div class="subItem">'+
|
||||
'<input type="checkbox" checked="checked" class="date" id="locationConstantDate">'+
|
||||
'<label for="locationConstantDate">'+locale_location.locationDate+'</label>'+
|
||||
'</div>'+
|
||||
'<div class="subItem">'+
|
||||
'<input type="checkbox" checked="checked" class="number" id="locationConstantNumber">'+
|
||||
'<label for="locationConstantNumber">'+locale_location.locationDigital+'</label>'+
|
||||
'</div>'+
|
||||
'<div class="subItem">'+
|
||||
'<input type="checkbox" checked="checked" class="string" id="locationConstantString">'+
|
||||
'<label for="locationConstantString">'+locale_location.locationString+'</label>'+
|
||||
'</div>'+
|
||||
'<div class="subItem">'+
|
||||
'<input type="checkbox" checked="checked" class="boolean" id="locationConstantBoolean">'+
|
||||
'<label for="locationConstantBoolean">'+locale_location.locationBool+'</label>'+
|
||||
'</div>'+
|
||||
'<div class="subItem">'+
|
||||
'<input type="checkbox" checked="checked" class="error" id="locationConstantError">'+
|
||||
'<label for="locationConstantError">'+locale_location.locationBool+'</label>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div class="listItem">'+
|
||||
'<input type="radio" name="locationType" id="locationFormula">'+
|
||||
'<label for="locationFormula">'+locale_location.locationFormula+'</label>'+
|
||||
'<div class="subbox">'+
|
||||
'<div class="subItem">'+
|
||||
'<input type="checkbox" checked="checked" class="date" id="locationFormulaDate" disabled="true">'+
|
||||
'<label for="locationFormulaDate" style="color: #666">'+locale_location.locationDate+'</label>'+
|
||||
'</div>'+
|
||||
'<div class="subItem">'+
|
||||
'<input type="checkbox" checked="checked" class="number" id="locationFormulaNumber" disabled="true">'+
|
||||
'<label for="locationFormulaNumber" style="color: #666">'+locale_location.locationDigital+'</label>'+
|
||||
'</div>'+
|
||||
'<div class="subItem">'+
|
||||
'<input type="checkbox" checked="checked" class="string" id="locationFormulaString" disabled="true">'+
|
||||
'<label for="locationFormulaString" style="color: #666">'+locale_location.locationString+'</label>'+
|
||||
'</div>'+
|
||||
'<div class="subItem">'+
|
||||
'<input type="checkbox" checked="checked" class="boolean" id="locationFormulaBoolean" disabled="true">'+
|
||||
'<label for="locationFormulaBoolean" style="color: #666">'+locale_location.locationBool+'</label>'+
|
||||
'</div>'+
|
||||
'<div class="subItem">'+
|
||||
'<input type="checkbox" checked="checked" class="error" id="locationFormulaError" disabled="true">'+
|
||||
'<label for="locationFormulaError" style="color: #666">'+locale_location.locationError+'</label>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div class="listItem">'+
|
||||
'<input type="radio" name="locationType" id="locationNull">'+
|
||||
'<label for="locationNull">'+locale_location.locationNull+'</label>'+
|
||||
'</div>'+
|
||||
'<div class="listItem">'+
|
||||
'<input type="radio" name="locationType" id="locationCF">'+
|
||||
'<label for="locationCF">'+locale_location.locationCondition+'</label>'+
|
||||
'</div>'+
|
||||
'<div class="listItem">'+
|
||||
'<input type="radio" name="locationType" id="locationStepRow">'+
|
||||
'<label for="locationStepRow">'+locale_location.locationRowSpan+'</label>'+
|
||||
'</div>'+
|
||||
'<div class="listItem">'+
|
||||
'<input type="radio" name="locationType" id="locationStepColumn">'+
|
||||
'<label for="locationStepColumn">'+locale_location.locationColumnSpan+'</label>'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
|
||||
$("body").append(replaceHtml(modelHTML, {
|
||||
"id": "luckysheet-locationCell-dialog",
|
||||
"addclass": "luckysheet-locationCell-dialog",
|
||||
"title": locale_location.location,
|
||||
"content": content,
|
||||
"botton": '<button id="luckysheet-locationCell-dialog-confirm" class="btn btn-primary">'+locale_button.confirm+'</button><button class="btn btn-default luckysheet-model-close-btn">'+locale_button.cancel+'</button>',
|
||||
"style": "z-index:100003"
|
||||
}));
|
||||
let $t = $("#luckysheet-locationCell-dialog").find(".luckysheet-modal-dialog-content").css("min-width", 400).end(),
|
||||
myh = $t.outerHeight(),
|
||||
myw = $t.outerWidth();
|
||||
let winw = $(window).width(), winh = $(window).height();
|
||||
let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop();
|
||||
$("#luckysheet-locationCell-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 3 }).show();
|
||||
},
|
||||
init: function(){
|
||||
let _this = this;
|
||||
|
||||
const locale_location = locale().findAndReplace;
|
||||
|
||||
$(document).on("click", "#luckysheet-locationCell-dialog .listItem input:radio", function(e){
|
||||
$("#luckysheet-locationCell-dialog .listItem input:checkbox").prop("disabled", true);
|
||||
$("#luckysheet-locationCell-dialog .listItem .subbox label").css("color", "#666");
|
||||
|
||||
$(this).siblings(".subbox").find("input:checkbox").removeAttr("disabled");
|
||||
$(this).siblings(".subbox").find("label").css("color", "#000");
|
||||
});
|
||||
|
||||
$(document).off("click.locationCellConfirm").on("click.locationCellConfirm", "#luckysheet-locationCell-dialog #luckysheet-locationCell-dialog-confirm", function(){
|
||||
$("#luckysheet-modal-dialog-mask").hide();
|
||||
$("#luckysheet-locationCell-dialog").hide();
|
||||
|
||||
let $radio = $("#luckysheet-locationCell-dialog .listItem input:radio:checked");
|
||||
let id = $radio.attr("id");
|
||||
|
||||
if(id == "locationConstant" || id == "locationFormula"){
|
||||
let $checkbox = $radio.siblings(".subbox").find("input:checkbox:checked");
|
||||
|
||||
let value;
|
||||
if($checkbox.length == 0){
|
||||
return;
|
||||
}
|
||||
else if($checkbox.length == 5){
|
||||
value = "all";
|
||||
}
|
||||
else{
|
||||
let arr = [];
|
||||
|
||||
for(let i = 0; i < $checkbox.length; i++){
|
||||
if($($checkbox[i]).hasClass("date")){
|
||||
arr.push("d");
|
||||
}
|
||||
else if($($checkbox[i]).hasClass("number")){
|
||||
arr.push("n");
|
||||
}
|
||||
else if($($checkbox[i]).hasClass("string")){
|
||||
arr.push("s,g");
|
||||
}
|
||||
else if($($checkbox[i]).hasClass("boolean")){
|
||||
arr.push("b");
|
||||
}
|
||||
else if($($checkbox[i]).hasClass("error")){
|
||||
arr.push("e");
|
||||
}
|
||||
}
|
||||
|
||||
value = arr.join(",");
|
||||
}
|
||||
|
||||
let range;
|
||||
if(Store.luckysheet_select_save.length == 0 || (Store.luckysheet_select_save.length == 1 && Store.luckysheet_select_save[0].row[0] == Store.luckysheet_select_save[0].row[1] && Store.luckysheet_select_save[0].column[0] == Store.luckysheet_select_save[0].column[1])){
|
||||
//单个单元格
|
||||
range = [{"row": [0, Store.flowdata.length - 1], "column": [0, Store.flowdata[0].length - 1]}];
|
||||
}
|
||||
else{
|
||||
range = $.extend(true, [], Store.luckysheet_select_save);
|
||||
}
|
||||
|
||||
_this.apply(range, id, value);
|
||||
}
|
||||
else if(id == "locationStepRow"){
|
||||
if(Store.luckysheet_select_save.length == 0 || (Store.luckysheet_select_save.length == 1 && Store.luckysheet_select_save[0].row[0] == Store.luckysheet_select_save[0].row[1])){
|
||||
if(isEditMode()){
|
||||
alert(locale_location.locationTiplessTwoRow);
|
||||
}
|
||||
else{
|
||||
tooltip.info("", locale_location.locationTiplessTwoRow);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
let range = $.extend(true, [], Store.luckysheet_select_save);
|
||||
|
||||
_this.apply(range, "locationStepRow");
|
||||
}
|
||||
else if(id == "locationStepColumn"){
|
||||
if(Store.luckysheet_select_save.length == 0 || (Store.luckysheet_select_save.length == 1 && Store.luckysheet_select_save[0].column[0] == Store.luckysheet_select_save[0].column[1])){
|
||||
if(isEditMode()){
|
||||
alert(locale_location.locationTiplessTwoColumn);
|
||||
}
|
||||
else{
|
||||
tooltip.info("", locale_location.locationTiplessTwoColumn);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
let range = $.extend(true, [], Store.luckysheet_select_save);
|
||||
|
||||
_this.apply(range, "locationStepColumn");
|
||||
}
|
||||
else{
|
||||
let range;
|
||||
if(Store.luckysheet_select_save.length == 0 || (Store.luckysheet_select_save.length == 1 && Store.luckysheet_select_save[0].row[0] == Store.luckysheet_select_save[0].row[1] && Store.luckysheet_select_save[0].column[0] == Store.luckysheet_select_save[0].column[1])){
|
||||
//单个单元格
|
||||
range = [{"row": [0, Store.flowdata.length - 1], "column": [0, Store.flowdata[0].length - 1]}];
|
||||
}
|
||||
else{
|
||||
range = $.extend(true, [], Store.luckysheet_select_save);
|
||||
}
|
||||
|
||||
_this.apply(range, id);
|
||||
}
|
||||
});
|
||||
},
|
||||
apply: function(range, type, value){
|
||||
const locale_location = locale().findAndReplace;
|
||||
let rangeArr = [];
|
||||
|
||||
if(type == "locationFormula" || type == "locationConstant" || type == "locationNull"){ //公式 常量 空值
|
||||
let minR = null, maxR = null, minC = null, maxC = null, cellSave = {};
|
||||
|
||||
for(let s = 0; s < range.length; s++){
|
||||
let st_r = range[s].row[0],
|
||||
ed_r = range[s].row[1],
|
||||
st_c = range[s].column[0],
|
||||
ed_c = range[s].column[1];
|
||||
|
||||
if(minR == null || minR < st_r){
|
||||
minR = st_r;
|
||||
}
|
||||
if(maxR == null || maxR > ed_r){
|
||||
maxR = ed_r;
|
||||
}
|
||||
if(minC == null || minC < st_c){
|
||||
minC = st_c;
|
||||
}
|
||||
if(maxC == null || maxC > ed_c){
|
||||
maxC = ed_c;
|
||||
}
|
||||
|
||||
for(let r = st_r; r <= ed_r; r++){
|
||||
for(let c = st_c; c <= ed_c; c++){
|
||||
let cell = Store.flowdata[r][c];
|
||||
|
||||
if(cell != null && cell.mc != null){
|
||||
cell = Store.flowdata[cell.mc.r][cell.mc.c];
|
||||
}
|
||||
|
||||
if(type == 'locationFormula' && cell != null && !isRealNull(cell.v) && cell.f != null && (value == 'all' || (cell.ct != null && value.indexOf(cell.ct.t) > -1))){
|
||||
cellSave[r + '_' + c] = 0;
|
||||
}
|
||||
else if(type == 'locationConstant' && cell != null && !isRealNull(cell.v) && (value == 'all' || (cell.ct != null && value.indexOf(cell.ct.t) > -1))){
|
||||
cellSave[r + '_' + c] = 0;
|
||||
}
|
||||
else if(type == 'locationNull' && (cell == null || isRealNull(cell.v))){
|
||||
cellSave[r + '_' + c] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rangeArr = this.getRangeArr(minR, maxR, minC, maxC, cellSave, rangeArr);
|
||||
}
|
||||
else if(type == "locationCF"){ //条件格式
|
||||
let index = getSheetIndex(Store.currentSheetIndex);
|
||||
let ruleArr = Store.luckysheetfile[index]["luckysheet_conditionformat_save"];
|
||||
let data = Store.luckysheetfile[index]["data"];
|
||||
|
||||
if(ruleArr == null || ruleArr.length == 0){
|
||||
if(isEditMode()){
|
||||
alert(locale_location.locationTipNotFindCell);
|
||||
}
|
||||
else{
|
||||
tooltip.info("", locale_location.locationTipNotFindCell);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
computeMap = conditionformat.compute(ruleArr, data);
|
||||
|
||||
if(Object.keys(computeMap).length == 0){
|
||||
if(isEditMode()){
|
||||
alert(locale_location.locationTipNotFindCell);
|
||||
}
|
||||
else{
|
||||
tooltip.info("", locale_location.locationTipNotFindCell);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
let minR = null, maxR = null, minC = null, maxC = null, cellSave = {};
|
||||
|
||||
for(let s = 0; s < range.length; s++){
|
||||
let st_r = range[s].row[0],
|
||||
ed_r = range[s].row[1],
|
||||
st_c = range[s].column[0],
|
||||
ed_c = range[s].column[1];
|
||||
|
||||
if(minR == null || minR < st_r){
|
||||
minR = st_r;
|
||||
}
|
||||
if(maxR == null || maxR > ed_r){
|
||||
maxR = ed_r;
|
||||
}
|
||||
if(minC == null || minC < st_c){
|
||||
minC = st_c;
|
||||
}
|
||||
if(maxC == null || maxC > ed_c){
|
||||
maxC = ed_c;
|
||||
}
|
||||
|
||||
for(let r = st_r; r <= ed_r; r++){
|
||||
for(let c = st_c; c <= ed_c; c++){
|
||||
if((r + '_' + c) in computeMap){
|
||||
cellSave[r + '_' + c] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rangeArr = this.getRangeArr(minR, maxR, minC, maxC, cellSave, rangeArr);
|
||||
}
|
||||
else if(type == "locationStepRow"){ //间隔行
|
||||
for(let s = 0; s < range.length; s++){
|
||||
if(range[s].row[0] == range[s].row[1]){
|
||||
continue;
|
||||
}
|
||||
|
||||
let st_r = range[s].row[0], ed_r = range[s].row[1];
|
||||
let st_c = range[s].column[0], ed_c = range[s].column[1];
|
||||
|
||||
for(let r = st_r; r <= ed_r; r++){
|
||||
if((r - st_r) % 2 == 0){
|
||||
rangeArr.push({"row": [r, r], "column": [st_c, ed_c]});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(type == "locationStepColumn"){ //间隔列
|
||||
for(let s = 0; s < range.length; s++){
|
||||
if(range[s].column[0] == range[s].column[1]){
|
||||
continue;
|
||||
}
|
||||
|
||||
let st_r = range[s].row[0], ed_r = range[s].row[1];
|
||||
let st_c = range[s].column[0], ed_c = range[s].column[1];
|
||||
|
||||
for(let c = st_c; c <= ed_c; c++){
|
||||
if((c - st_c) % 2 == 0){
|
||||
rangeArr.push({"row": [st_r, ed_r], "column": [c, c]});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(rangeArr.length == 0){
|
||||
if(isEditMode()){
|
||||
alert(locale_location.locationTipNotFindCell);
|
||||
}
|
||||
else{
|
||||
tooltip.info("", locale_location.locationTipNotFindCell);
|
||||
}
|
||||
}
|
||||
else{
|
||||
Store.luckysheet_select_save = rangeArr;
|
||||
selectHightlightShow();
|
||||
|
||||
let scrollLeft = $("#luckysheet-cell-main").scrollLeft(),
|
||||
scrollTop = $("#luckysheet-cell-main").scrollTop();
|
||||
let winH = $("#luckysheet-cell-main").height(),
|
||||
winW = $("#luckysheet-cell-main").width();
|
||||
|
||||
let r1 = Store.luckysheet_select_save[0]["row"][0],
|
||||
r2 = Store.luckysheet_select_save[0]["row"][1],
|
||||
c1 = Store.luckysheet_select_save[0]["column"][0],
|
||||
c2 = Store.luckysheet_select_save[0]["column"][1];
|
||||
|
||||
let row = Store.visibledatarow[r2],
|
||||
row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1];
|
||||
let col = Store.visibledatacolumn[c2],
|
||||
col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1];
|
||||
|
||||
if (col - scrollLeft - winW + 20 > 0) {
|
||||
$("#luckysheet-scrollbar-x").scrollLeft(col - winW + 20);
|
||||
}
|
||||
else if (col_pre - scrollLeft - 20 < 0) {
|
||||
$("#luckysheet-scrollbar-x").scrollLeft(col_pre - 20);
|
||||
}
|
||||
|
||||
if (row - scrollTop - winH + 20 > 0) {
|
||||
$("#luckysheet-scrollbar-y").scrollTop(row - winH + 20);
|
||||
}
|
||||
else if (row_pre - scrollTop - 20 < 0) {
|
||||
$("#luckysheet-scrollbar-y").scrollTop(row_pre - 20);
|
||||
}
|
||||
}
|
||||
},
|
||||
getRangeArr(minR, maxR, minC, maxC, cellSave, rangeArr){
|
||||
if(Object.keys(cellSave).length == 0){
|
||||
return rangeArr;
|
||||
}
|
||||
|
||||
let _this = this;
|
||||
|
||||
let stack_str = null,
|
||||
stack_edr = null,
|
||||
stack_stc = null,
|
||||
stack_edc = null;
|
||||
|
||||
for(let r = minR; r <= maxR; r++){
|
||||
for(let c = minC; c <= maxC; c++){
|
||||
let cell = Store.flowdata[r][c];
|
||||
|
||||
if((r + '_' + c) in cellSave){
|
||||
if(cell != null && cell.mc != null){
|
||||
if(stack_stc == null){
|
||||
let range = {
|
||||
'row': [cell.mc.r, cell.mc.r + cell.mc.rs - 1],
|
||||
'column': [cell.mc.c, cell.mc.c + cell.mc.cs - 1]
|
||||
};
|
||||
rangeArr.push(range);
|
||||
cellSave = _this.deleteCellInSave(cellSave, range);
|
||||
return _this.getRangeArr(minR, maxR, minC, maxC, cellSave, rangeArr);
|
||||
}
|
||||
else if(c < stack_edc){
|
||||
let range = {
|
||||
'row': [stack_str, stack_edr],
|
||||
'column': [stack_stc, stack_edc]
|
||||
}
|
||||
rangeArr.push(range);
|
||||
cellSave = _this.deleteCellInSave(cellSave, range);
|
||||
return _this.getRangeArr(minR, maxR, minC, maxC, cellSave, rangeArr);
|
||||
}
|
||||
else{
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(stack_stc == null){
|
||||
stack_stc = c;
|
||||
stack_edc = c;
|
||||
|
||||
stack_str = r;
|
||||
stack_edr = r;
|
||||
}
|
||||
else if(c > stack_edc){
|
||||
stack_edc = c;
|
||||
}
|
||||
}
|
||||
else if(stack_stc != null){
|
||||
if(cell != null && cell.mc != null){
|
||||
break;
|
||||
}
|
||||
else if(c < stack_stc){
|
||||
|
||||
}
|
||||
else if(c <= stack_edc){
|
||||
let range = {
|
||||
'row': [stack_str, stack_edr],
|
||||
'column': [stack_stc, stack_edc]
|
||||
}
|
||||
rangeArr.push(range);
|
||||
cellSave = _this.deleteCellInSave(cellSave, range);
|
||||
return _this.getRangeArr(minR, maxR, minC, maxC, cellSave, rangeArr);
|
||||
}
|
||||
else{
|
||||
stack_edr = r;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(stack_stc != null){
|
||||
let range = {
|
||||
'row': [stack_str, stack_edr],
|
||||
'column': [stack_stc, stack_edc]
|
||||
}
|
||||
rangeArr.push(range);
|
||||
cellSave = _this.deleteCellInSave(cellSave, range);
|
||||
return _this.getRangeArr(minR, maxR, minC, maxC, cellSave, rangeArr);
|
||||
}
|
||||
},
|
||||
deleteCellInSave(cellSave, range){
|
||||
for(let r = range.row[0]; r <= range.row[1]; r++){
|
||||
for(let c = range.column[0]; c <= range.column[1]; c++){
|
||||
delete cellSave[r + '_' + c];
|
||||
}
|
||||
}
|
||||
|
||||
return cellSave;
|
||||
}
|
||||
}
|
||||
|
||||
export default luckysheetLocationCell;
|
||||
@@ -1,44 +0,0 @@
|
||||
const luckysheetConfigsetting = {
|
||||
autoFormatw: false,
|
||||
accuracy: undefined,
|
||||
total: 0,
|
||||
|
||||
allowCopy: true,
|
||||
showtoolbar: true,
|
||||
showinfobar: true,
|
||||
showsheetbar: true,
|
||||
showstatisticBar: true,
|
||||
pointEdit: false,
|
||||
pointEditUpdate: null,
|
||||
pointEditZoom: 1,
|
||||
|
||||
userInfo: false,
|
||||
userMenuItem: [],
|
||||
myFolderUrl: null,
|
||||
functionButton: null,
|
||||
|
||||
showConfigWindowResize: true,
|
||||
enableAddRow: true,
|
||||
addRowCount: 100,
|
||||
enableAddBackTop: true,
|
||||
enablePage: true,
|
||||
pageInfo: null,
|
||||
|
||||
|
||||
editMode: false,
|
||||
beforeCreateDom: null,
|
||||
workbookCreateBefore: null,
|
||||
workbookCreateAfter: null,
|
||||
remoteFunction: null,
|
||||
fireMousedown: null,
|
||||
plugins:[],
|
||||
forceCalculation:false,//强制刷新公式,公式较多会有性能问题,慎用
|
||||
|
||||
defaultColWidth:73,
|
||||
defaultRowHeight:19,
|
||||
|
||||
defaultTextColor: '#000',
|
||||
defaultCellColor: '#fff',
|
||||
}
|
||||
|
||||
export default luckysheetConfigsetting;
|
||||
@@ -1,233 +0,0 @@
|
||||
import { rowLocation, colLocation, mouseposition } from '../global/location';
|
||||
import { selectHightlightShow } from './select';
|
||||
import menuButton from './menuButton';
|
||||
import luckysheetFreezen from './freezen';
|
||||
import Store from '../store';
|
||||
|
||||
//设备是移动端
|
||||
export default function mobileinit(){
|
||||
//去除滚动条
|
||||
Store.cellMainSrollBarSize = 0;
|
||||
|
||||
//滑动滚动表格
|
||||
let luckysheet_touchmove_status = false,
|
||||
luckysheet_touchmove_startPos = {},
|
||||
luckysheet_touchhandle_status = false,
|
||||
_scrollTimer = null;
|
||||
$(document).on("touchstart", "#luckysheet-grid-window-1", function(event){
|
||||
clearInterval(_scrollTimer);//clear timer
|
||||
luckysheet_touchmove_status = true;
|
||||
|
||||
let touch = event.originalEvent.targetTouches[0];
|
||||
luckysheet_touchmove_startPos = {
|
||||
x: touch.pageX,
|
||||
y: touch.pageY,
|
||||
vy:0, //vy可以理解为滑动的力度
|
||||
moveType:"y",
|
||||
}
|
||||
})
|
||||
$(document).on("touchmove", "#luckysheet-grid-window-1", function(event){
|
||||
if(event.originalEvent.targetTouches.length > 1 || (event.scale && event.scale !== 1)){
|
||||
return;
|
||||
}
|
||||
|
||||
let touch = event.originalEvent.targetTouches[0];
|
||||
|
||||
if(luckysheet_touchmove_status){//滚动
|
||||
let slideX = touch.pageX - luckysheet_touchmove_startPos.x;
|
||||
let slideY = touch.pageY - luckysheet_touchmove_startPos.y;
|
||||
|
||||
luckysheet_touchmove_startPos.x = touch.pageX;
|
||||
luckysheet_touchmove_startPos.y = touch.pageY;
|
||||
|
||||
let scrollLeft = $("#luckysheet-scrollbar-x").scrollLeft();
|
||||
let scrollTop = $("#luckysheet-scrollbar-y").scrollTop();
|
||||
|
||||
// console.log("start",scrollTop, slideY,touch.pageY);
|
||||
|
||||
scrollLeft -= slideX;
|
||||
scrollTop -= slideY;
|
||||
|
||||
// console.log(touch,touch.pageY, luckysheet_touchmove_startPos.y, slideY);
|
||||
|
||||
if(scrollLeft < 0){
|
||||
scrollLeft = 0;
|
||||
}
|
||||
|
||||
if(scrollTop < 0){
|
||||
scrollTop = 0;
|
||||
}
|
||||
|
||||
$("#luckysheet-scrollbar-y").scrollTop(scrollTop);
|
||||
|
||||
luckysheet_touchmove_startPos.vy_y = slideY;
|
||||
luckysheet_touchmove_startPos.scrollTop = scrollTop;
|
||||
|
||||
$("#luckysheet-scrollbar-x").scrollLeft(scrollLeft);
|
||||
|
||||
luckysheet_touchmove_startPos.vy_x = slideX;
|
||||
|
||||
luckysheet_touchmove_startPos.scrollLeft = scrollLeft;
|
||||
|
||||
|
||||
}
|
||||
else if(luckysheet_touchhandle_status){//选区
|
||||
let mouse = mouseposition(touch.pageX, touch.pageY);
|
||||
let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft();
|
||||
let y = mouse[1] + $("#luckysheet-cell-main").scrollTop();
|
||||
|
||||
let row_location = rowLocation(y),
|
||||
row = row_location[1],
|
||||
row_pre = row_location[0],
|
||||
row_index = row_location[2];
|
||||
let col_location = colLocation(x),
|
||||
col = col_location[1],
|
||||
col_pre = col_location[0],
|
||||
col_index = col_location[2];
|
||||
|
||||
let last = $.extend(true, {}, Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]);
|
||||
|
||||
let top = 0, height = 0, rowseleted = [];
|
||||
if (last.top > row_pre) {
|
||||
top = row_pre;
|
||||
height = last.top + last.height - row_pre;
|
||||
|
||||
if(last.row[1] > last.row_focus){
|
||||
last.row[1] = last.row_focus;
|
||||
}
|
||||
|
||||
rowseleted = [row_index, last.row[1]];
|
||||
}
|
||||
else if (last.top == row_pre) {
|
||||
top = row_pre;
|
||||
height = last.top + last.height - row_pre;
|
||||
rowseleted = [row_index, last.row[0]];
|
||||
}
|
||||
else {
|
||||
top = last.top;
|
||||
height = row - last.top - 1;
|
||||
|
||||
if(last.row[0] < last.row_focus){
|
||||
last.row[0] = last.row_focus;
|
||||
}
|
||||
|
||||
rowseleted = [last.row[0], row_index];
|
||||
}
|
||||
|
||||
let left = 0, width = 0, columnseleted = [];
|
||||
if (last.left > col_pre) {
|
||||
left = col_pre;
|
||||
width = last.left + last.width - col_pre;
|
||||
|
||||
if(last.column[1] > last.column_focus){
|
||||
last.column[1] = last.column_focus;
|
||||
}
|
||||
|
||||
columnseleted = [col_index, last.column[1]];
|
||||
}
|
||||
else if (last.left == col_pre) {
|
||||
left = col_pre;
|
||||
width = last.left + last.width - col_pre;
|
||||
columnseleted = [col_index, last.column[0]];
|
||||
}
|
||||
else {
|
||||
left = last.left;
|
||||
width = col - last.left - 1;
|
||||
|
||||
if(last.column[0] < last.column_focus){
|
||||
last.column[0] = last.column_focus;
|
||||
}
|
||||
|
||||
columnseleted = [last.column[0], col_index];
|
||||
}
|
||||
|
||||
let changeparam = menuButton.mergeMoveMain(columnseleted, rowseleted, last, top, height, left, width);
|
||||
if(changeparam != null){
|
||||
columnseleted = changeparam[0];
|
||||
rowseleted= changeparam[1];
|
||||
top = changeparam[2];
|
||||
height = changeparam[3];
|
||||
left = changeparam[4];
|
||||
width = changeparam[5];
|
||||
}
|
||||
|
||||
last["row"] = rowseleted;
|
||||
last["column"] = columnseleted;
|
||||
|
||||
last["left_move"] = left;
|
||||
last["width_move"] = width;
|
||||
last["top_move"] = top;
|
||||
last["height_move"] = height;
|
||||
|
||||
Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1] = last;
|
||||
|
||||
selectHightlightShow();
|
||||
|
||||
luckysheetFreezen.scrollFreezen();
|
||||
}
|
||||
|
||||
event.stopPropagation();
|
||||
})
|
||||
$(document).on("touchend", function(event){
|
||||
if(luckysheet_touchmove_status){
|
||||
let vy_x = Math.abs(luckysheet_touchmove_startPos.vy_x), friction_x = ((vy_x >> 31) * 2 + 1) * 0.25;
|
||||
|
||||
let vy_y = Math.abs(luckysheet_touchmove_startPos.vy_y), friction_y = ((vy_y >> 31) * 2 + 1) * 0.25;
|
||||
if(vy_x>0 || vy_y>0){
|
||||
_scrollTimer = setInterval(function () {//
|
||||
vy_x -= friction_x;//力度按 惯性的大小递减
|
||||
vy_y -= friction_y;//力度按 惯性的大小递减
|
||||
|
||||
if(vy_x<=0){
|
||||
vy_x = 0;
|
||||
}
|
||||
if(vy_y<=0){
|
||||
vy_y = 0;
|
||||
}
|
||||
|
||||
if(luckysheet_touchmove_startPos.vy_y>0){
|
||||
luckysheet_touchmove_startPos.scrollTop -= vy_y;
|
||||
}
|
||||
else{
|
||||
luckysheet_touchmove_startPos.scrollTop += vy_y;
|
||||
}
|
||||
|
||||
$("#luckysheet-scrollbar-y").scrollTop(luckysheet_touchmove_startPos.scrollTop);
|
||||
|
||||
if(luckysheet_touchmove_startPos.vy_x>0){
|
||||
luckysheet_touchmove_startPos.scrollLeft -= vy_x;
|
||||
}
|
||||
else{
|
||||
luckysheet_touchmove_startPos.scrollLeft += vy_x;
|
||||
}
|
||||
|
||||
$("#luckysheet-scrollbar-x").scrollLeft(luckysheet_touchmove_startPos.scrollLeft);
|
||||
|
||||
if(vy_x<=0 && vy_y<=0){
|
||||
clearInterval(_scrollTimer);
|
||||
}
|
||||
}, 20);
|
||||
}
|
||||
|
||||
}
|
||||
luckysheet_touchmove_status = false;
|
||||
// luckysheet_touchmove_startPos = {};
|
||||
|
||||
luckysheet_touchhandle_status = false;
|
||||
})
|
||||
|
||||
//滑动选择选区
|
||||
$(document).on("touchstart", ".luckysheet-cs-touchhandle", function(event){
|
||||
luckysheet_touchhandle_status = true;
|
||||
luckysheet_touchmove_status = false;
|
||||
// console.log(1111111111);
|
||||
event.stopPropagation();
|
||||
})
|
||||
|
||||
//禁止微信下拉拖出微信背景
|
||||
document.addEventListener("touchmove", function(event){
|
||||
event.preventDefault();
|
||||
}, {
|
||||
passive: false
|
||||
})
|
||||
}
|
||||
@@ -1,281 +0,0 @@
|
||||
|
||||
import { modelHTML } from './constant';
|
||||
|
||||
import { selectHightlightShow } from './select';
|
||||
import {checkProtectionAuthorityNormal} from './protection';
|
||||
import {
|
||||
replaceHtml,
|
||||
chatatABC,
|
||||
} from '../utils/util';
|
||||
import { rowlenByRange } from '../global/getRowlen';
|
||||
import { isEditMode } from '../global/validate';
|
||||
import cleargridelement from '../global/cleargridelement';
|
||||
import {
|
||||
jfrefreshgrid,
|
||||
} from '../global/refresh';
|
||||
import { getcellvalue } from '../global/getdata';
|
||||
import { orderbydata, sortColumnSeletion } from '../global/sort';
|
||||
import tooltip from '../global/tooltip';
|
||||
import editor from '../global/editor';
|
||||
import { isdatatype } from '../global/datecontroll';
|
||||
import Store from '../store';
|
||||
import locale from '../locale/locale';
|
||||
|
||||
|
||||
export function orderByInitial(){
|
||||
const _locale = locale();
|
||||
//菜单栏 排序按钮
|
||||
$("#luckysheetorderbyasc, #luckysheetorderbyasc_t").mousedown(function (event) {
|
||||
cleargridelement(event);
|
||||
sortColumnSeletion(Store.orderbyindex, true);
|
||||
selectHightlightShow();
|
||||
});
|
||||
|
||||
$("#luckysheetorderbydesc, #luckysheetorderbydesc_t").click(function (event) {
|
||||
cleargridelement(event);
|
||||
sortColumnSeletion(Store.orderbyindex, false);
|
||||
selectHightlightShow();
|
||||
});
|
||||
|
||||
//排序事件
|
||||
let luckysheet_sort_initial = true;
|
||||
$("#luckysheetorderby").click(function () {
|
||||
|
||||
if(!checkProtectionAuthorityNormal(Store.currentSheetIndex, "sort")){
|
||||
return;
|
||||
}
|
||||
|
||||
$("body .luckysheet-cols-menu").hide();
|
||||
const locale_sort = _locale.sort;
|
||||
if(Store.luckysheet_select_save.length > 1){
|
||||
if(isEditMode()){
|
||||
alert(locale_sort.noRangeError);
|
||||
}
|
||||
else{
|
||||
tooltip.info(locale_sort.noRangeError, "");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
let last = Store.luckysheet_select_save[0];
|
||||
let r1 = last["row"][0], r2 = last["row"][1];
|
||||
let c1 = last["column"][0], c2 = last["column"][1];
|
||||
|
||||
if (luckysheet_sort_initial) {
|
||||
luckysheet_sort_initial = false;
|
||||
|
||||
let content = `<div style="overflow: hidden;" class="luckysheet-sort-modal"><div><label><input type="checkbox" id="luckysheet-sort-haveheader"/><span>${locale_sort.hasTitle}</span></label></div><div style="overflow-y:auto;" id="luckysheet-sort-dialog-tablec"><table data-itemcount="0" cellspacing="0"> <tr><td>${locale_sort.hasTitle} <select name="sort_0"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select> </td> <td> <div><label><input value="asc" type="radio" checked="checked" name="sort_0"><span>${locale_sort.asc}A-Z</span></label></div> <div><label><input value="desc" type="radio" name="sort_0"><span>${locale_sort.desc}Z-A</span></label></div></td></tr></table></div><div style="background: #e5e5e5;border-top: 1px solid #f5f5f5; height: 1px; width: 100%;margin:2px 0px;margin-bottom:10px;"></div> <div> <span style="font-weight: bold; text-decoration: underline;text-align:center;color: blue;cursor: pointer;" class="luckysheet-sort-dialog-additem">+ ${locale_sort.addOthers}</span> </div> </div>`;
|
||||
|
||||
$("body").append(replaceHtml(modelHTML, { "id": "luckysheet-sort-dialog", "addclass": "", "title": _locale.sort.sortTitle, "content": content, "botton": `<button id="luckysheet-sort-modal-confirm" class="btn btn-primary">${locale_sort.confirm}</button><button class="btn btn-default luckysheet-model-close-btn">${locale_sort.close}</button>`}));
|
||||
|
||||
$("#luckysheet-sort-dialog .luckysheet-sort-dialog-additem").click(function () {
|
||||
let last = Store.luckysheet_select_save[0];
|
||||
let r1 = last["row"][0], r2 = last["row"][1];
|
||||
let c1 = last["column"][0], c2 = last["column"][1];
|
||||
|
||||
let option = "", i = $("#luckysheet-sort-dialog table").data("itemcount") + 1;
|
||||
let t = $("#luckysheet-sort-haveheader").is(':checked');
|
||||
|
||||
for (let c = c1; c <= c2; c++) {
|
||||
if (t) {
|
||||
let v = getcellvalue(r1, c, Store.flowdata, "m");
|
||||
|
||||
if(v == null){
|
||||
v = locale_sort.columnOperation + (c - c1 + 1);
|
||||
}
|
||||
|
||||
option += '<option value="' + c + '">' + v + '</option>';
|
||||
}
|
||||
else {
|
||||
option += '<option value="' + c + '">' + chatatABC(c) + '</option>';
|
||||
}
|
||||
}
|
||||
|
||||
$("#luckysheet-sort-dialog table").append(`
|
||||
<tr class="luckysheet-sort-dialog-tr">
|
||||
<td><span class="luckysheet-sort-item-close" onclick="$(this).parent().parent().remove();"><i class="fa fa-times"
|
||||
aria-hidden="true"></i></span>${locale_sort.secondaryTitle} <select
|
||||
name="sort_${i}">${option}</select> </td>
|
||||
<td>
|
||||
<div><label><input value="asc" type="radio" checked="checked"
|
||||
name="sort_${i}"><span>${locale_sort.asc}A-Z</span></label></div>
|
||||
<div><label><input value="desc" type="radio" name="sort_${i}"><span>${locale_sort.desc}Z-A</span></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
`);
|
||||
$("#luckysheet-sort-dialog table").data("itemcount", i);
|
||||
});
|
||||
|
||||
$("#luckysheet-sort-haveheader").change(function () {
|
||||
let last = Store.luckysheet_select_save[0];
|
||||
let r1 = last["row"][0], r2 = last["row"][1];
|
||||
let c1 = last["column"][0], c2 = last["column"][1];
|
||||
|
||||
let t = $(this).is(':checked');
|
||||
let option = "";
|
||||
|
||||
for (let c = c1; c <= c2; c++) {
|
||||
if (t) {
|
||||
let v = getcellvalue(r1, c, Store.flowdata, "m");
|
||||
|
||||
if(v == null){
|
||||
v = locale_sort.columnOperation + (c - c1 + 1);
|
||||
}
|
||||
|
||||
option += '<option value="' + c + '">' + v + '</option>';
|
||||
}
|
||||
else {
|
||||
option += '<option value="' + c + '">' + chatatABC(c) + '</option>';
|
||||
}
|
||||
}
|
||||
|
||||
$("#luckysheet-sort-dialog tr select").each(function () {
|
||||
$(this).html(option);
|
||||
});
|
||||
});
|
||||
|
||||
//Custom sort
|
||||
$("#luckysheet-sort-modal-confirm").click(function () {
|
||||
if(Store.luckysheet_select_save.length > 1){
|
||||
if(isEditMode()){
|
||||
alert(locale_sort.noRangeError);
|
||||
}
|
||||
else{
|
||||
tooltip.info(locale_sort.noRangeError, "");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
let d = editor.deepCopyFlowData(Store.flowdata);
|
||||
|
||||
let last = Store.luckysheet_select_save[0];
|
||||
let r1 = last["row"][0], r2 = last["row"][1];
|
||||
let c1 = last["column"][0], c2 = last["column"][1];
|
||||
|
||||
//Data has header row
|
||||
let t = $("#luckysheet-sort-haveheader").is(':checked');
|
||||
|
||||
let str;
|
||||
if(t){
|
||||
str = r1 + 1;
|
||||
}
|
||||
else{
|
||||
str = r1;
|
||||
}
|
||||
|
||||
let hasMc = false; //Whether the sort selection has merged cells
|
||||
|
||||
let data = [];
|
||||
|
||||
for(let r = str; r <= r2; r++){
|
||||
let data_row = [];
|
||||
|
||||
for(let c = c1; c <= c2; c++){
|
||||
if(d[r][c] != null && d[r][c].mc != null){
|
||||
hasMc = true;
|
||||
break;
|
||||
}
|
||||
|
||||
data_row.push(d[r][c]);
|
||||
}
|
||||
|
||||
data.push(data_row);
|
||||
}
|
||||
|
||||
if(hasMc){
|
||||
if(isEditMode()){
|
||||
alert(locale_sort.mergeError);
|
||||
}
|
||||
else{
|
||||
tooltip.info(locale_sort.mergeError, "");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$($("#luckysheet-sort-dialog table tr").toArray().reverse()).each(function () {
|
||||
let i = $(this).find("select").val(),
|
||||
asc = $(this).find('input:radio:checked').val();
|
||||
|
||||
i -= c1;
|
||||
|
||||
if (asc == "asc") {
|
||||
asc = true;
|
||||
}
|
||||
else {
|
||||
asc = false;
|
||||
}
|
||||
|
||||
data = orderbydata([].concat(data), i, asc);
|
||||
});
|
||||
|
||||
for(let r = str; r <= r2; r++){
|
||||
for(let c = c1; c <= c2; c++){
|
||||
d[r][c] = data[r - str][c - c1];
|
||||
}
|
||||
}
|
||||
|
||||
let allParam = {};
|
||||
if(Store.config["rowlen"] != null){
|
||||
let cfg = $.extend(true, {}, Store.config);
|
||||
cfg = rowlenByRange(d, str, r2, cfg);
|
||||
|
||||
allParam = {
|
||||
"cfg": cfg,
|
||||
"RowlChange": true
|
||||
}
|
||||
}
|
||||
|
||||
jfrefreshgrid(d, [{ "row": [str, r2], "column": [c1, c2] }], allParam);
|
||||
|
||||
$("#luckysheet-sort-dialog").hide();
|
||||
$("#luckysheet-modal-dialog-mask").hide();
|
||||
});
|
||||
}
|
||||
|
||||
let option = "";
|
||||
for (let c = c1; c <= c2; c++) {
|
||||
option += '<option value="' + c + '">' + chatatABC(c) + '</option>';
|
||||
}
|
||||
|
||||
$("#luckysheet-sort-dialog select").html(option);
|
||||
|
||||
$("#luckysheet-sort-dialog .luckysheet-sort-dialog-tr").remove();
|
||||
|
||||
$("#luckysheet-sort-haveheader").prop("checked", false);
|
||||
$("#luckysheet-sort-dialog input:radio:first").prop("checked", "checked");
|
||||
|
||||
$("#luckysheet-sort-dialog .luckysheet-modal-dialog-title-text").html(locale_sort.sortRangeTitle+"<span>" + chatatABC(c1) + (r1 + 1) + "</span>"+ locale_sort.sortRangeTitleTo +"<span>" + chatatABC(c2) + (r2 + 1) + "</span>");
|
||||
|
||||
let $t = $("#luckysheet-sort-dialog"), myh = $t.outerHeight(), myw = $t.outerWidth();
|
||||
let winw = $(window).width(), winh = $(window).height();
|
||||
let scrollLeft = $(document).scrollLeft(), scrollTop = $(document).scrollTop();
|
||||
|
||||
$("#luckysheet-sort-dialog-tablec").css("max-height", (winh - myh) / 2);
|
||||
$("#luckysheet-sort-dialog").css({ "left": (winw + scrollLeft - myw) / 2, "top": (winh + scrollTop - myh) / 2 }).show();
|
||||
$("#luckysheet-modal-dialog-mask").show();
|
||||
|
||||
if (r1 < r2) {
|
||||
setTimeout(function () {
|
||||
let flowrowdata1 = Store.flowdata[r1],
|
||||
flowrowdata2 = Store.flowdata[r1 + 1],
|
||||
hastitle = false;
|
||||
|
||||
for (let i = c1; i <= c2; i++) {
|
||||
let isdatatype_r1 = isdatatype(flowrowdata1[i]),
|
||||
isdatatype_r2 = isdatatype(flowrowdata2[i]);
|
||||
|
||||
if (isdatatype_r1 != isdatatype_r2) {
|
||||
hastitle = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (hastitle) {
|
||||
$("#luckysheet-sort-haveheader").prop("checked", true).change();
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1,980 +0,0 @@
|
||||
import { rowLocation, colLocation, mouseposition } from '../global/location';
|
||||
import editor from '../global/editor';
|
||||
import formula from '../global/formula';
|
||||
import { luckysheetRangeLast } from '../global/cursorPos';
|
||||
import { luckysheetrefreshgrid } from '../global/refresh';
|
||||
import { setluckysheet_scroll_status } from '../methods/set';
|
||||
import { getSheetIndex } from '../methods/get';
|
||||
import { getObjType } from '../utils/util';
|
||||
import luckysheetFreezen from './freezen';
|
||||
import menuButton from './menuButton';
|
||||
import {checkProtectionAuthorityNormal} from './protection';
|
||||
import server from './server';
|
||||
import Store from '../store';
|
||||
import method from '../global/method';
|
||||
|
||||
//批注
|
||||
const luckysheetPostil = {
|
||||
defaultWidth: 144,
|
||||
defaultHeight: 84,
|
||||
currentObj: null,
|
||||
currentWinW: null,
|
||||
currentWinH: null,
|
||||
resize: null,
|
||||
resizeXY: null,
|
||||
move: false,
|
||||
moveXY: null,
|
||||
init: function(){
|
||||
let _this = this;
|
||||
|
||||
//点击批注框 聚焦
|
||||
$("#luckysheet-postil-showBoxs").off("mousedown.showPs").on("mousedown.showPs", ".luckysheet-postil-show", function(event){
|
||||
if(!checkProtectionAuthorityNormal(Store.currentSheetIndex, "editObjects",false)){
|
||||
return;
|
||||
}
|
||||
|
||||
_this.currentObj = $(this).find(".luckysheet-postil-show-main");
|
||||
|
||||
if($(this).hasClass("luckysheet-postil-show-active")){
|
||||
event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
|
||||
_this.removeActivePs();
|
||||
|
||||
$(this).addClass("luckysheet-postil-show-active");
|
||||
$(this).find(".luckysheet-postil-dialog-resize").show();
|
||||
$(this).find(".arrowCanvas").css("z-index", 200);
|
||||
$(this).find(".luckysheet-postil-show-main").css("z-index", 200);
|
||||
|
||||
event.stopPropagation();
|
||||
});
|
||||
$("#luckysheet-postil-showBoxs").off("mouseup.showPs").on("mouseup.showPs", ".luckysheet-postil-show", function(event){
|
||||
if(event.which == "3"){
|
||||
event.stopPropagation();
|
||||
}
|
||||
});
|
||||
|
||||
//批注框 改变大小
|
||||
$("#luckysheet-postil-showBoxs").off("mousedown.resize").on("mousedown.resize", ".luckysheet-postil-show .luckysheet-postil-dialog-resize .luckysheet-postil-dialog-resize-item", function(event){
|
||||
if(!checkProtectionAuthorityNormal(Store.currentSheetIndex, "editObjects",false)){
|
||||
return;
|
||||
}
|
||||
|
||||
_this.currentObj = $(this).closest(".luckysheet-postil-show-main");
|
||||
_this.currentWinW = $("#luckysheet-cell-main")[0].scrollWidth;
|
||||
_this.currentWinH = $("#luckysheet-cell-main")[0].scrollHeight;
|
||||
|
||||
_this.resize = $(this).data("type");
|
||||
|
||||
let scrollTop = $("#luckysheet-cell-main").scrollTop(),
|
||||
scrollLeft = $("#luckysheet-cell-main").scrollLeft();
|
||||
let mouse = mouseposition(event.pageX, event.pageY);
|
||||
let x = mouse[0] + scrollLeft;
|
||||
let y = mouse[1] + scrollTop;
|
||||
|
||||
let position = _this.currentObj.position();
|
||||
let width = _this.currentObj.width();
|
||||
let height = _this.currentObj.height();
|
||||
|
||||
_this.resizeXY = [
|
||||
x,
|
||||
y,
|
||||
width,
|
||||
height,
|
||||
position.left + scrollLeft,
|
||||
position.top + scrollTop,
|
||||
scrollLeft,
|
||||
scrollTop
|
||||
];
|
||||
|
||||
setluckysheet_scroll_status(true);
|
||||
|
||||
if($(this).closest(".luckysheet-postil-show").hasClass("luckysheet-postil-show-active")){
|
||||
event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
|
||||
_this.removeActivePs();
|
||||
|
||||
$(this).closest(".luckysheet-postil-show").addClass("luckysheet-postil-show-active");
|
||||
$(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-dialog-resize").show();
|
||||
$(this).closest(".luckysheet-postil-show").find(".arrowCanvas").css("z-index", 200);
|
||||
$(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-show-main").css("z-index", 200);
|
||||
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
//批注框 移动
|
||||
$("#luckysheet-postil-showBoxs").off("mousedown.move").on("mousedown.move", ".luckysheet-postil-show .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item", function(event){
|
||||
if(!checkProtectionAuthorityNormal(Store.currentSheetIndex, "editObjects",false)){
|
||||
return;
|
||||
}
|
||||
|
||||
_this.currentObj = $(this).closest(".luckysheet-postil-show-main");
|
||||
_this.currentWinW = $("#luckysheet-cell-main")[0].scrollWidth;
|
||||
_this.currentWinH = $("#luckysheet-cell-main")[0].scrollHeight;
|
||||
|
||||
_this.move = true;
|
||||
|
||||
let scrollTop = $("#luckysheet-cell-main").scrollTop(),
|
||||
scrollLeft = $("#luckysheet-cell-main").scrollLeft();
|
||||
|
||||
let offset = _this.currentObj.offset();
|
||||
let position = _this.currentObj.position();
|
||||
|
||||
_this.moveXY = [
|
||||
event.pageX - offset.left,
|
||||
event.pageY - offset.top,
|
||||
position.left,
|
||||
position.top,
|
||||
scrollLeft,
|
||||
scrollTop
|
||||
];
|
||||
|
||||
setluckysheet_scroll_status(true);
|
||||
|
||||
if($(this).closest(".luckysheet-postil-show").hasClass("luckysheet-postil-show-active")){
|
||||
event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
|
||||
_this.removeActivePs();
|
||||
|
||||
$(this).closest(".luckysheet-postil-show").addClass("luckysheet-postil-show-active");
|
||||
$(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-dialog-resize").show();
|
||||
$(this).closest(".luckysheet-postil-show").find(".arrowCanvas").css("z-index", 200);
|
||||
$(this).closest(".luckysheet-postil-show").find(".luckysheet-postil-show-main").css("z-index", 200);
|
||||
|
||||
event.stopPropagation();
|
||||
});
|
||||
},
|
||||
overshow: function(event){
|
||||
let _this = this;
|
||||
|
||||
$("#luckysheet-postil-overshow").remove();
|
||||
|
||||
if($(event.target).closest("#luckysheet-cell-main").length == 0){
|
||||
return;
|
||||
}
|
||||
|
||||
let mouse = mouseposition(event.pageX, event.pageY);
|
||||
let scrollLeft = $("#luckysheet-cell-main").scrollLeft();
|
||||
let scrollTop = $("#luckysheet-cell-main").scrollTop();
|
||||
let x = mouse[0];
|
||||
let y = mouse[1];
|
||||
let offsetX = 0;
|
||||
let offsetY = 0;
|
||||
|
||||
if(luckysheetFreezen.freezenverticaldata != null && mouse[0] < (luckysheetFreezen.freezenverticaldata[0] - luckysheetFreezen.freezenverticaldata[2])){
|
||||
offsetX = scrollLeft;
|
||||
} else {
|
||||
x += scrollLeft;
|
||||
}
|
||||
|
||||
if(luckysheetFreezen.freezenhorizontaldata != null && mouse[1] < (luckysheetFreezen.freezenhorizontaldata[0] - luckysheetFreezen.freezenhorizontaldata[2])){
|
||||
offsetY = scrollTop;
|
||||
} else {
|
||||
y += scrollTop;
|
||||
}
|
||||
|
||||
let row_index = rowLocation(y)[2];
|
||||
let col_index = colLocation(x)[2];
|
||||
|
||||
let margeset = menuButton.mergeborer(Store.flowdata, row_index, col_index);
|
||||
if(!!margeset){
|
||||
row_index = margeset.row[2];
|
||||
col_index = margeset.column[2];
|
||||
}
|
||||
|
||||
if(Store.flowdata[row_index] == null || Store.flowdata[row_index][col_index] == null || Store.flowdata[row_index][col_index].ps == null){
|
||||
return;
|
||||
}
|
||||
|
||||
let postil = Store.flowdata[row_index][col_index].ps;
|
||||
|
||||
if(postil["isshow"] || $("#luckysheet-postil-show_"+ row_index +"_"+ col_index).length > 0){
|
||||
return;
|
||||
}
|
||||
|
||||
let value = postil["value"] == null ? "" : postil["value"];
|
||||
|
||||
let row = Store.visibledatarow[row_index],
|
||||
row_pre = row_index - 1 == -1 ? 0 : Store.visibledatarow[row_index - 1];
|
||||
let col = Store.visibledatacolumn[col_index],
|
||||
col_pre = col_index - 1 == -1 ? 0 : Store.visibledatacolumn[col_index - 1];
|
||||
|
||||
if(!!margeset){
|
||||
row = margeset.row[1];
|
||||
row_pre = margeset.row[0];
|
||||
|
||||
col = margeset.column[1];
|
||||
col_pre = margeset.column[0];
|
||||
}
|
||||
|
||||
let toX = col + offsetX;
|
||||
let toY = row_pre + offsetY;
|
||||
|
||||
let fromX = toX + 18 * Store.zoomRatio;
|
||||
let fromY = toY - 18 * Store.zoomRatio;
|
||||
|
||||
if(fromY < 0){
|
||||
fromY = 2;
|
||||
}
|
||||
|
||||
let width = postil["width"] == null ? _this.defaultWidth * Store.zoomRatio : postil["width"] * Store.zoomRatio;
|
||||
let height = postil["height"] == null ? _this.defaultHeight * Store.zoomRatio : postil["height"] * Store.zoomRatio;
|
||||
|
||||
let size = _this.getArrowCanvasSize(fromX, fromY, toX, toY);
|
||||
|
||||
let commentDivs = '';
|
||||
let valueLines = value.split('\n');
|
||||
for (let line of valueLines) {
|
||||
commentDivs += '<div>' + _this.htmlEscape(line) + '</div>';
|
||||
}
|
||||
|
||||
let html = '<div id="luckysheet-postil-overshow">' +
|
||||
'<canvas class="arrowCanvas" width="'+ size[2] +'" height="'+ size[3] +'" style="position:absolute;left:'+ size[0] +'px;top:'+ size[1] +'px;z-index:100;pointer-events:none;"></canvas>' +
|
||||
'<div style="width:'+ (width - 12) +'px;min-height:'+ (height - 12) +'px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:'+ fromX +'px;top:'+ fromY +'px;z-index:100;">'+ commentDivs +'</div>' +
|
||||
'</div>';
|
||||
|
||||
$(html).appendTo($("#luckysheet-cell-main"));
|
||||
|
||||
let ctx = $("#luckysheet-postil-overshow .arrowCanvas").get(0).getContext("2d");
|
||||
|
||||
_this.drawArrow(ctx, size[4], size[5], size[6], size[7]);
|
||||
},
|
||||
getArrowCanvasSize: function(fromX, fromY, toX, toY){
|
||||
let left = toX - 5;
|
||||
|
||||
if(fromX < toX){
|
||||
left = fromX - 5;
|
||||
}
|
||||
|
||||
let top = toY - 5;
|
||||
|
||||
if(fromY < toY){
|
||||
top = fromY - 5;
|
||||
}
|
||||
|
||||
let width = Math.abs(fromX - toX) + 10;
|
||||
let height = Math.abs(fromY - toY) + 10;
|
||||
|
||||
let x1 = width - 5;
|
||||
let x2 = 5;
|
||||
|
||||
if(fromX < toX){
|
||||
x1 = 5;
|
||||
x2 = width - 5;
|
||||
}
|
||||
|
||||
let y1 = height - 5;
|
||||
let y2 = 5;
|
||||
|
||||
if(fromY < toY){
|
||||
y1 = 5;
|
||||
y2 = height - 5;
|
||||
}
|
||||
|
||||
return [left, top, width, height, x1, y1, x2, y2];
|
||||
},
|
||||
drawArrow: function(ctx, fromX, fromY, toX, toY, theta, headlen, width, color){
|
||||
theta = getObjType(theta) == "undefined" ? 30 : theta;
|
||||
headlen = getObjType(headlen) == "undefined" ? 6 : headlen;
|
||||
width = getObjType(width) == "undefined" ? 1 : width;
|
||||
color = getObjType(color) == "undefined" ? "#000" : color;
|
||||
|
||||
// 计算各角度和对应的P2,P3坐标
|
||||
let angle = Math.atan2(fromY - toY, fromX - toX) * 180 / Math.PI,
|
||||
angle1 = (angle + theta) * Math.PI / 180,
|
||||
angle2 = (angle - theta) * Math.PI / 180,
|
||||
topX = headlen * Math.cos(angle1),
|
||||
topY = headlen * Math.sin(angle1),
|
||||
botX = headlen * Math.cos(angle2),
|
||||
botY = headlen * Math.sin(angle2);
|
||||
|
||||
ctx.save();
|
||||
ctx.beginPath();
|
||||
|
||||
let arrowX = fromX - topX,
|
||||
arrowY = fromY - topY;
|
||||
|
||||
ctx.moveTo(arrowX, arrowY);
|
||||
ctx.moveTo(fromX, fromY);
|
||||
ctx.lineTo(toX, toY);
|
||||
|
||||
ctx.lineWidth = width;
|
||||
ctx.strokeStyle = color;
|
||||
ctx.stroke();
|
||||
|
||||
arrowX = toX + topX;
|
||||
arrowY = toY + topY;
|
||||
ctx.moveTo(arrowX, arrowY);
|
||||
ctx.lineTo(toX, toY);
|
||||
arrowX = toX + botX;
|
||||
arrowY = toY + botY;
|
||||
ctx.lineTo(arrowX, arrowY);
|
||||
|
||||
ctx.fillStyle = color;
|
||||
ctx.fill();
|
||||
ctx.restore();
|
||||
},
|
||||
buildAllPs: function(data){
|
||||
let _this = this;
|
||||
|
||||
$("#luckysheet-cell-main #luckysheet-postil-showBoxs").empty();
|
||||
|
||||
for(let r = 0; r < data.length; r++){
|
||||
for(let c = 0; c < data[0].length; c++){
|
||||
if(data[r][c] != null && data[r][c].ps != null){
|
||||
let postil = data[r][c].ps;
|
||||
_this.buildPs(r, c, postil);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_this.init();
|
||||
},
|
||||
buildPs: function(r, c, postil){
|
||||
if($("#luckysheet-postil-show_"+ r +"_"+ c).length > 0){
|
||||
$("#luckysheet-postil-show_"+ r +"_"+ c).remove();
|
||||
}
|
||||
|
||||
if(postil == null){
|
||||
return;
|
||||
}
|
||||
|
||||
let _this = this;
|
||||
let isshow = postil["isshow"] == null ? false : postil["isshow"];
|
||||
|
||||
if(isshow){
|
||||
let row = Store.visibledatarow[r],
|
||||
row_pre = r - 1 == -1 ? 0 : Store.visibledatarow[r - 1];
|
||||
let col = Store.visibledatacolumn[c],
|
||||
col_pre = c - 1 == -1 ? 0 : Store.visibledatacolumn[c - 1];
|
||||
|
||||
let margeset = menuButton.mergeborer(Store.flowdata, r, c);
|
||||
if(!!margeset){
|
||||
row = margeset.row[1];
|
||||
row_pre = margeset.row[0];
|
||||
|
||||
col = margeset.column[1];
|
||||
col_pre = margeset.column[0];
|
||||
}
|
||||
|
||||
let toX = col;
|
||||
let toY = row_pre;
|
||||
|
||||
let left = postil["left"] == null ? toX + 18 * Store.zoomRatio : postil["left"] * Store.zoomRatio;
|
||||
let top = postil["top"] == null ? toY - 18 * Store.zoomRatio : postil["top"] * Store.zoomRatio;
|
||||
let width = postil["width"] == null ? _this.defaultWidth * Store.zoomRatio : postil["width"] * Store.zoomRatio;
|
||||
let height = postil["height"] == null ? _this.defaultHeight * Store.zoomRatio : postil["height"] * Store.zoomRatio;
|
||||
let value = postil["value"] == null ? "" : postil["value"];
|
||||
|
||||
if(top < 0){
|
||||
top = 2;
|
||||
}
|
||||
|
||||
let size = _this.getArrowCanvasSize(left, top, toX, toY);
|
||||
|
||||
let commentDivs = '';
|
||||
let valueLines = value.split('\n');
|
||||
for (let line of valueLines) {
|
||||
commentDivs += '<div>' + _this.htmlEscape(line) + '</div>';
|
||||
}
|
||||
|
||||
let html = '<div id="luckysheet-postil-show_'+ r +'_'+ c +'" class="luckysheet-postil-show">' +
|
||||
'<canvas class="arrowCanvas" width="'+ size[2] +'" height="'+ size[3] +'" style="position:absolute;left:'+ size[0] +'px;top:'+ size[1] +'px;z-index:100;pointer-events:none;"></canvas>' +
|
||||
'<div class="luckysheet-postil-show-main" style="width:'+ width +'px;height:'+ height +'px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:'+ left +'px;top:'+ top +'px;box-sizing:border-box;z-index:100;">' +
|
||||
'<div class="luckysheet-postil-dialog-move">' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-t" data-type="t"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-r" data-type="r"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-b" data-type="b"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-l" data-type="l"></div>' +
|
||||
'</div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize" style="display:none;">' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lt" data-type="lt"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mt" data-type="mt"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lm" data-type="lm"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rm" data-type="rm"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rt" data-type="rt"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lb" data-type="lb"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mb" data-type="mb"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rb" data-type="rb"></div>' +
|
||||
'</div>' +
|
||||
'<div style="width:100%;height:100%;overflow:hidden;">' +
|
||||
'<div class="formulaInputFocus" style="width:'+ (width - 12) +'px;height:'+ (height - 12) +'px;line-height:20px;box-sizing:border-box;text-align: center;;word-break:break-all;" spellcheck="false" contenteditable="true">' +
|
||||
commentDivs +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
$(html).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs"));
|
||||
|
||||
let ctx = $("#luckysheet-postil-show_"+ r +"_"+ c +" .arrowCanvas").get(0).getContext("2d");
|
||||
|
||||
_this.drawArrow(ctx, size[4], size[5], size[6], size[7]);
|
||||
}
|
||||
},
|
||||
newPs: function(r, c){
|
||||
if(!checkProtectionAuthorityNormal(Store.currentSheetIndex, "editObjects")){
|
||||
return;
|
||||
}
|
||||
|
||||
// Hook function
|
||||
if(!method.createHookFunction('commentInsertBefore',r,c, )){
|
||||
return;
|
||||
}
|
||||
|
||||
let _this = this;
|
||||
|
||||
let row = Store.visibledatarow[r],
|
||||
row_pre = r - 1 == -1 ? 0 : Store.visibledatarow[r - 1];
|
||||
let col = Store.visibledatacolumn[c],
|
||||
col_pre = c - 1 == -1 ? 0 : Store.visibledatacolumn[c - 1];
|
||||
|
||||
let margeset = menuButton.mergeborer(Store.flowdata, r, c);
|
||||
if(!!margeset){
|
||||
row = margeset.row[1];
|
||||
row_pre = margeset.row[0];
|
||||
|
||||
col = margeset.column[1];
|
||||
col_pre = margeset.column[0];
|
||||
}
|
||||
|
||||
let toX = col;
|
||||
let toY = row_pre;
|
||||
|
||||
let fromX = toX + 18 * Store.zoomRatio;
|
||||
let fromY = toY - 18 * Store.zoomRatio;
|
||||
|
||||
if(fromY < 0){
|
||||
fromY = 2;
|
||||
}
|
||||
|
||||
let width = _this.defaultWidth * Store.zoomRatio;
|
||||
let height = _this.defaultHeight * Store.zoomRatio;
|
||||
|
||||
let size = _this.getArrowCanvasSize(fromX, fromY, toX, toY);
|
||||
|
||||
let html = '<div id="luckysheet-postil-show_'+ r +'_'+ c +'" class="luckysheet-postil-show luckysheet-postil-show-active">' +
|
||||
'<canvas class="arrowCanvas" width="'+ size[2] +'" height="'+ size[3] +'" style="position:absolute;left:'+ size[0] +'px;top:'+ size[1] +'px;z-index:100;pointer-events:none;"></canvas>' +
|
||||
'<div class="luckysheet-postil-show-main" style="width:'+ width +'px;height:'+ height +'px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:'+ fromX +'px;top:'+ fromY +'px;box-sizing:border-box;z-index:100;">' +
|
||||
'<div class="luckysheet-postil-dialog-move">' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-t" data-type="t"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-r" data-type="r"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-b" data-type="b"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-l" data-type="l"></div>' +
|
||||
'</div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize">' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lt" data-type="lt"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mt" data-type="mt"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lm" data-type="lm"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rm" data-type="rm"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rt" data-type="rt"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lb" data-type="lb"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mb" data-type="mb"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rb" data-type="rb"></div>' +
|
||||
'</div>' +
|
||||
'<div style="width:100%;height:100%;overflow:hidden;">' +
|
||||
'<div class="formulaInputFocus" style="width:132px;height:72px;line-height:20px;box-sizing:border-box;text-align: center;word-break:break-all;" spellcheck="false" contenteditable="true">' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
$(html).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs"));
|
||||
|
||||
let ctx = $("#luckysheet-postil-show_"+ r +"_"+ c +" .arrowCanvas").get(0).getContext("2d");
|
||||
|
||||
_this.drawArrow(ctx, size[4], size[5], size[6], size[7]);
|
||||
|
||||
$("#luckysheet-postil-show_"+ r +"_"+ c +" .formulaInputFocus").focus();
|
||||
|
||||
_this.init();
|
||||
|
||||
let d = editor.deepCopyFlowData(Store.flowdata);
|
||||
let rc = [];
|
||||
|
||||
if(d[r][c] == null){
|
||||
d[r][c] = {};
|
||||
}
|
||||
|
||||
d[r][c].ps = { "left": null, "top": null, "width": null, "height": null, "value": "", "isshow": false };
|
||||
rc.push(r + "_" + c);
|
||||
|
||||
_this.ref(d, rc);
|
||||
|
||||
// Hook function
|
||||
setTimeout(() => {
|
||||
method.createHookFunction('commentInsertAfter',r,c, d[r][c])
|
||||
}, 0);
|
||||
},
|
||||
editPs: function(r, c){
|
||||
let _this = this;
|
||||
|
||||
if(!checkProtectionAuthorityNormal(Store.currentSheetIndex, "editObjects")){
|
||||
return;
|
||||
}
|
||||
|
||||
if($("#luckysheet-postil-show_"+ r +"_"+ c).length > 0){
|
||||
$("#luckysheet-postil-show_"+ r +"_"+ c).show();
|
||||
$("#luckysheet-postil-show_"+ r +"_"+ c).addClass("luckysheet-postil-show-active");
|
||||
$("#luckysheet-postil-show_"+ r +"_"+ c).find(".luckysheet-postil-dialog-resize").show();
|
||||
}
|
||||
else{
|
||||
let postil = Store.flowdata[r][c].ps;
|
||||
|
||||
let row = Store.visibledatarow[r],
|
||||
row_pre = r - 1 == -1 ? 0 : Store.visibledatarow[r - 1];
|
||||
let col = Store.visibledatacolumn[c],
|
||||
col_pre = c - 1 == -1 ? 0 : Store.visibledatacolumn[c - 1];
|
||||
|
||||
let margeset = menuButton.mergeborer(Store.flowdata, r, c);
|
||||
if(!!margeset){
|
||||
row = margeset.row[1];
|
||||
row_pre = margeset.row[0];
|
||||
|
||||
col = margeset.column[1];
|
||||
col_pre = margeset.column[0];
|
||||
}
|
||||
|
||||
let toX = col;
|
||||
let toY = row_pre;
|
||||
|
||||
let left = postil["left"] == null ? toX + 18 * Store.zoomRatio : postil["left"] * Store.zoomRatio;
|
||||
let top = postil["top"] == null ? toY - 18 * Store.zoomRatio : postil["top"] * Store.zoomRatio;
|
||||
let width = postil["width"] == null ? _this.defaultWidth * Store.zoomRatio : postil["width"] * Store.zoomRatio;
|
||||
let height = postil["height"] == null ? _this.defaultHeight * Store.zoomRatio : postil["height"] * Store.zoomRatio;
|
||||
let value = postil["value"] == null ? "" : postil["value"];
|
||||
|
||||
if(top < 0){
|
||||
top = 2;
|
||||
}
|
||||
|
||||
let size = _this.getArrowCanvasSize(left, top, toX, toY);
|
||||
|
||||
let commentDivs = '';
|
||||
let valueLines = value.split('\n');
|
||||
for (let line of valueLines) {
|
||||
commentDivs += '<div>' + _this.htmlEscape(line) + '</div>';
|
||||
}
|
||||
|
||||
let html = '<div id="luckysheet-postil-show_'+ r +'_'+ c +'" class="luckysheet-postil-show luckysheet-postil-show-active">' +
|
||||
'<canvas class="arrowCanvas" width="'+ size[2] +'" height="'+ size[3] +'" style="position:absolute;left:'+ size[0] +'px;top:'+ size[1] +'px;z-index:100;pointer-events:none;"></canvas>' +
|
||||
'<div class="luckysheet-postil-show-main" style="width:'+ width +'px;height:'+ height +'px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:'+ left +'px;top:'+ top +'px;box-sizing:border-box;z-index:100;">' +
|
||||
'<div class="luckysheet-postil-dialog-move">' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-t" data-type="t"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-r" data-type="r"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-b" data-type="b"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-l" data-type="l"></div>' +
|
||||
'</div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize">' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lt" data-type="lt"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mt" data-type="mt"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lm" data-type="lm"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rm" data-type="rm"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rt" data-type="rt"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lb" data-type="lb"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mb" data-type="mb"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rb" data-type="rb"></div>' +
|
||||
'</div>' +
|
||||
'<div style="width:100%;height:100%;overflow:hidden;">' +
|
||||
'<div class="formulaInputFocus" style="width:'+ (width - 12) +'px;height:'+ (height - 12) +'px;line-height:20px;box-sizing:border-box;text-align: center;;word-break:break-all;" spellcheck="false" contenteditable="true">' +
|
||||
commentDivs +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
$(html).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs"));
|
||||
|
||||
let ctx = $("#luckysheet-postil-show_"+ r +"_"+ c +" .arrowCanvas").get(0).getContext("2d");
|
||||
|
||||
_this.drawArrow(ctx, size[4], size[5], size[6], size[7]);
|
||||
}
|
||||
|
||||
$("#luckysheet-postil-show_"+ r +"_"+ c +" .formulaInputFocus").focus();
|
||||
luckysheetRangeLast($("#luckysheet-postil-show_"+ r +"_"+ c +" .formulaInputFocus").get(0));
|
||||
|
||||
_this.init();
|
||||
},
|
||||
delPs: function(r, c){
|
||||
if(!checkProtectionAuthorityNormal(Store.currentSheetIndex, "editObjects")){
|
||||
return;
|
||||
}
|
||||
|
||||
// Hook function
|
||||
if(!method.createHookFunction('commentDeleteBefore',r,c,Store.flowdata[r][c])){
|
||||
return;
|
||||
}
|
||||
|
||||
if($("#luckysheet-postil-show_"+ r +"_"+ c).length > 0){
|
||||
$("#luckysheet-postil-show_"+ r +"_"+ c).remove();
|
||||
}
|
||||
|
||||
let d = editor.deepCopyFlowData(Store.flowdata);
|
||||
let rc = [];
|
||||
|
||||
delete d[r][c].ps;
|
||||
rc.push(r + "_" + c);
|
||||
|
||||
this.ref(d, rc);
|
||||
|
||||
// Hook function
|
||||
setTimeout(() => {
|
||||
method.createHookFunction('commentDeleteAfter',r,c, Store.flowdata[r][c])
|
||||
}, 0);
|
||||
},
|
||||
showHidePs: function(r, c){
|
||||
let _this = this;
|
||||
|
||||
let postil = Store.flowdata[r][c].ps;
|
||||
let isshow = postil["isshow"];
|
||||
|
||||
let d = editor.deepCopyFlowData(Store.flowdata);
|
||||
let rc = [];
|
||||
|
||||
if(isshow){
|
||||
d[r][c].ps.isshow = false;
|
||||
|
||||
$("#luckysheet-postil-show_"+ r +"_"+ c).remove();
|
||||
}
|
||||
else{
|
||||
d[r][c].ps.isshow = true;
|
||||
|
||||
let row = Store.visibledatarow[r],
|
||||
row_pre = r - 1 == -1 ? 0 : Store.visibledatarow[r - 1];
|
||||
let col = Store.visibledatacolumn[c],
|
||||
col_pre = c - 1 == -1 ? 0 : Store.visibledatacolumn[c - 1];
|
||||
|
||||
let margeset = menuButton.mergeborer(Store.flowdata, r, c);
|
||||
if(!!margeset){
|
||||
row = margeset.row[1];
|
||||
row_pre = margeset.row[0];
|
||||
|
||||
col = margeset.column[1];
|
||||
col_pre = margeset.column[0];
|
||||
}
|
||||
|
||||
let scrollLeft = $("#luckysheet-cell-main").scrollLeft();
|
||||
let scrollTop = $("#luckysheet-cell-main").scrollTop();
|
||||
|
||||
let toX = col;
|
||||
let toY = row_pre;
|
||||
|
||||
if(luckysheetFreezen.freezenverticaldata != null && toX < (luckysheetFreezen.freezenverticaldata[0] - luckysheetFreezen.freezenverticaldata[2])){
|
||||
toX += scrollLeft;
|
||||
}
|
||||
if(luckysheetFreezen.freezenhorizontaldata != null && toY < (luckysheetFreezen.freezenhorizontaldata[0] - luckysheetFreezen.freezenhorizontaldata[2])){
|
||||
toY += scrollTop;
|
||||
}
|
||||
|
||||
let left = postil["left"] == null ? toX + 18 * Store.zoomRatio : postil["left"] * Store.zoomRatio;
|
||||
let top = postil["top"] == null ? toY - 18 * Store.zoomRatio : postil["top"] * Store.zoomRatio;
|
||||
let width = postil["width"] == null ? _this.defaultWidth * Store.zoomRatio : postil["width"] * Store.zoomRatio;
|
||||
let height = postil["height"] == null ? _this.defaultHeight * Store.zoomRatio : postil["height"] * Store.zoomRatio;
|
||||
let value = postil["value"] == null ? "" : postil["value"];
|
||||
|
||||
if(top < 0){
|
||||
top = 2;
|
||||
}
|
||||
|
||||
let size = _this.getArrowCanvasSize(left, top, toX, toY);
|
||||
let commentDivs = '';
|
||||
let valueLines = value.split('\n');
|
||||
for (let line of valueLines) {
|
||||
commentDivs += '<div>' + _this.htmlEscape(line) + '</div>';
|
||||
}
|
||||
let html = '<div id="luckysheet-postil-show_'+ r +'_'+ c +'" class="luckysheet-postil-show">' +
|
||||
'<canvas class="arrowCanvas" width="'+ size[2] +'" height="'+ size[3] +'" style="position:absolute;left:'+ size[0] +'px;top:'+ size[1] +'px;z-index:100;pointer-events:none;"></canvas>' +
|
||||
'<div class="luckysheet-postil-show-main" style="width:'+ width +'px;height:'+ height +'px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:'+ left +'px;top:'+ top +'px;box-sizing:border-box;z-index:100;">' +
|
||||
'<div class="luckysheet-postil-dialog-move">' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-t" data-type="t"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-r" data-type="r"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-b" data-type="b"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-l" data-type="l"></div>' +
|
||||
'</div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize" style="display:none;">' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lt" data-type="lt"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mt" data-type="mt"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lm" data-type="lm"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rm" data-type="rm"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rt" data-type="rt"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lb" data-type="lb"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mb" data-type="mb"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rb" data-type="rb"></div>' +
|
||||
'</div>' +
|
||||
'<div style="width:100%;height:100%;overflow:hidden;">' +
|
||||
'<div class="formulaInputFocus" style="width:'+ (width - 12) +'px;height:'+ (height - 12) +'px;line-height:20px;box-sizing:border-box;text-align: center;;word-break:break-all;" spellcheck="false" contenteditable="true">' +
|
||||
commentDivs +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
$(html).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs"));
|
||||
|
||||
let ctx = $("#luckysheet-postil-show_"+ r +"_"+ c +" .arrowCanvas").get(0).getContext("2d");
|
||||
|
||||
_this.drawArrow(ctx, size[4], size[5], size[6], size[7]);
|
||||
|
||||
_this.init();
|
||||
}
|
||||
|
||||
rc.push(r + "_" + c);
|
||||
|
||||
_this.ref(d, rc);
|
||||
},
|
||||
showHideAllPs: function(){
|
||||
let _this = this;
|
||||
|
||||
let d = editor.deepCopyFlowData(Store.flowdata);
|
||||
|
||||
let isAllShow = true;
|
||||
let allPs = [];
|
||||
|
||||
for(let r = 0; r < d.length; r++){
|
||||
for(let c = 0; c < d[0].length; c++){
|
||||
if(d[r] != null && d[r][c] != null && d[r][c].ps != null){
|
||||
allPs.push(r + "_" + c);
|
||||
|
||||
if(!d[r][c].ps.isshow){
|
||||
isAllShow = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let rc = [];
|
||||
if(allPs.length > 0){
|
||||
if(isAllShow){ //全部显示,操作为隐藏所有批注
|
||||
$("#luckysheet-cell-main #luckysheet-postil-showBoxs").empty();
|
||||
|
||||
for(let i = 0; i < allPs.length; i++){
|
||||
let rowIndex = allPs[i].split("_")[0];
|
||||
let colIndex = allPs[i].split("_")[1];
|
||||
|
||||
let postil = d[rowIndex][colIndex].ps;
|
||||
|
||||
if(postil["isshow"]){
|
||||
d[rowIndex][colIndex].ps.isshow = false;
|
||||
rc.push(allPs[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else{ //部分显示或全部隐藏,操作位显示所有批注
|
||||
for(let i = 0; i < allPs.length; i++){
|
||||
let rowIndex = allPs[i].split("_")[0];
|
||||
let colIndex = allPs[i].split("_")[1];
|
||||
|
||||
let postil = d[rowIndex][colIndex].ps;
|
||||
|
||||
if(!postil["isshow"]){
|
||||
let row = Store.visibledatarow[rowIndex],
|
||||
row_pre = rowIndex - 1 == -1 ? 0 : Store.visibledatarow[rowIndex - 1];
|
||||
let col = Store.visibledatacolumn[colIndex],
|
||||
col_pre = colIndex - 1 == -1 ? 0 : Store.visibledatacolumn[colIndex - 1];
|
||||
|
||||
let margeset = menuButton.mergeborer(Store.flowdata, rowIndex, colIndex);
|
||||
if(!!margeset){
|
||||
row = margeset.row[1];
|
||||
row_pre = margeset.row[0];
|
||||
|
||||
col = margeset.column[1];
|
||||
col_pre = margeset.column[0];
|
||||
}
|
||||
|
||||
let scrollLeft = $("#luckysheet-cell-main").scrollLeft();
|
||||
let scrollTop = $("#luckysheet-cell-main").scrollTop();
|
||||
|
||||
let toX = col;
|
||||
let toY = row_pre;
|
||||
|
||||
if(luckysheetFreezen.freezenverticaldata != null && toX < (luckysheetFreezen.freezenverticaldata[0] - luckysheetFreezen.freezenverticaldata[2])){
|
||||
toX += scrollLeft;
|
||||
}
|
||||
if(luckysheetFreezen.freezenhorizontaldata != null && toY < (luckysheetFreezen.freezenhorizontaldata[0] - luckysheetFreezen.freezenhorizontaldata[2])){
|
||||
toY += scrollTop;
|
||||
}
|
||||
|
||||
let left = postil["left"] == null ? toX + 18 * Store.zoomRatio : postil["left"] * Store.zoomRatio;
|
||||
let top = postil["top"] == null ? toY - 18 * Store.zoomRatio : postil["top"] * Store.zoomRatio;
|
||||
let width = postil["width"] == null ? _this.defaultWidth * Store.zoomRatio : postil["width"] * Store.zoomRatio;
|
||||
let height = postil["height"] == null ? _this.defaultHeight * Store.zoomRatio : postil["height"] * Store.zoomRatio;
|
||||
let value = postil["value"] == null ? "" : postil["value"];
|
||||
|
||||
if(top < 0){
|
||||
top = 2;
|
||||
}
|
||||
|
||||
let size = _this.getArrowCanvasSize(left, top, toX, toY);
|
||||
|
||||
let commentDivs = '';
|
||||
let valueLines = value.split('\n');
|
||||
for (let line of valueLines) {
|
||||
commentDivs += '<div>' + _this.htmlEscape(line) + '</div>';
|
||||
}
|
||||
|
||||
let html = '<div id="luckysheet-postil-show_'+ rowIndex +'_'+ colIndex +'" class="luckysheet-postil-show">' +
|
||||
'<canvas class="arrowCanvas" width="'+ size[2] +'" height="'+ size[3] +'" style="position:absolute;left:'+ size[0] +'px;top:'+ size[1] +'px;z-index:100;pointer-events:none;"></canvas>' +
|
||||
'<div class="luckysheet-postil-show-main" style="width:'+ width +'px;height:'+ height +'px;color:#000;padding:5px;border:1px solid #000;background-color:rgb(255,255,225);position:absolute;left:'+ left +'px;top:'+ top +'px;box-sizing:border-box;z-index:100;">' +
|
||||
'<div class="luckysheet-postil-dialog-move">' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-t" data-type="t"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-r" data-type="r"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-b" data-type="b"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-l" data-type="l"></div>' +
|
||||
'</div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize" style="display:none;">' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lt" data-type="lt"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mt" data-type="mt"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lm" data-type="lm"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rm" data-type="rm"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rt" data-type="rt"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-lb" data-type="lb"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-mb" data-type="mb"></div>' +
|
||||
'<div class="luckysheet-postil-dialog-resize-item luckysheet-postil-dialog-resize-item-rb" data-type="rb"></div>' +
|
||||
'</div>' +
|
||||
'<div style="width:100%;height:100%;overflow:hidden;">' +
|
||||
'<div class="formulaInputFocus" style="width:'+ (width - 12) +'px;height:'+ (height - 12) +'px;line-height:20px;box-sizing:border-box;text-align: center;;word-break:break-all;" spellcheck="false" contenteditable="true">' +
|
||||
commentDivs +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
$(html).appendTo($("#luckysheet-cell-main #luckysheet-postil-showBoxs"));
|
||||
|
||||
let ctx = $("#luckysheet-postil-show_"+ rowIndex +"_"+ colIndex +" .arrowCanvas").get(0).getContext("2d");
|
||||
|
||||
_this.drawArrow(ctx, size[4], size[5], size[6], size[7]);
|
||||
|
||||
d[rowIndex][colIndex].ps.isshow = true;
|
||||
rc.push(allPs[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_this.ref(d, rc);
|
||||
_this.init();
|
||||
},
|
||||
removeActivePs: function(){
|
||||
if($("#luckysheet-postil-showBoxs .luckysheet-postil-show-active").length > 0){
|
||||
|
||||
|
||||
let id = $("#luckysheet-postil-showBoxs .luckysheet-postil-show-active").attr("id");
|
||||
let r = id.split("luckysheet-postil-show_")[1].split("_")[0];
|
||||
let c = id.split("luckysheet-postil-show_")[1].split("_")[1];
|
||||
|
||||
// interpret <div> as new line
|
||||
let value = $("#" + id).find(".formulaInputFocus").html().replaceAll('<div>', '\n').replaceAll(/<(.*)>.*?|<(.*) \/>/g, '').trim();
|
||||
// Hook function
|
||||
if(!method.createHookFunction('commentUpdateBefore',r,c,value)){
|
||||
if (!Store.flowdata[r][c].ps.isshow) {
|
||||
$("#" + id).remove();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const previousCell = $.extend(true,{},Store.flowdata[r][c]);
|
||||
|
||||
$("#" + id).removeClass("luckysheet-postil-show-active");
|
||||
$("#" + id).find(".luckysheet-postil-dialog-resize").hide();
|
||||
$("#" + id).find(".arrowCanvas").css("z-index", 100);
|
||||
$("#" + id).find(".luckysheet-postil-show-main").css("z-index", 100);
|
||||
|
||||
let d = editor.deepCopyFlowData(Store.flowdata);
|
||||
let rc = [];
|
||||
|
||||
d[r][c].ps.value = value;
|
||||
rc.push(r + "_" + c);
|
||||
|
||||
this.ref(d, rc);
|
||||
|
||||
if(!d[r][c].ps.isshow){
|
||||
$("#" + id).remove();
|
||||
}
|
||||
// Hook function
|
||||
setTimeout(() => {
|
||||
method.createHookFunction('commentUpdateAfter',r,c, previousCell, d[r][c])
|
||||
}, 0);
|
||||
}
|
||||
},
|
||||
ref: function(data, rc){
|
||||
if (Store.clearjfundo) {
|
||||
Store.jfundo.length = 0;
|
||||
|
||||
Store.jfredo.push({
|
||||
"type": "postil",
|
||||
"data": Store.flowdata,
|
||||
"curdata": data,
|
||||
"sheetIndex": Store.currentSheetIndex,
|
||||
"rc": rc
|
||||
});
|
||||
}
|
||||
|
||||
//flowdata
|
||||
Store.flowdata = data;
|
||||
editor.webWorkerFlowDataCache(Store.flowdata);//worker存数据
|
||||
|
||||
Store.luckysheetfile[getSheetIndex(Store.currentSheetIndex)].data = Store.flowdata;
|
||||
// formula.execFunctionGroupData = Store.flowdata;
|
||||
|
||||
//共享编辑模式
|
||||
if(server.allowUpdate){
|
||||
for(let i = 0; i < rc.length; i++){
|
||||
let r = rc[i].split("_")[0];
|
||||
let c = rc[i].split("_")[1];
|
||||
|
||||
server.saveParam("v", Store.currentSheetIndex, Store.flowdata[r][c], { "r": r, "c": c });
|
||||
}
|
||||
}
|
||||
|
||||
//刷新表格
|
||||
setTimeout(function () {
|
||||
luckysheetrefreshgrid();
|
||||
}, 1);
|
||||
},
|
||||
positionSync: function(){
|
||||
let _this = this;
|
||||
|
||||
$("#luckysheet-postil-showBoxs .luckysheet-postil-show").each(function(i, e){
|
||||
let id = $(e).attr("id");
|
||||
|
||||
let r = id.split("luckysheet-postil-show_")[1].split("_")[0];
|
||||
let c = id.split("luckysheet-postil-show_")[1].split("_")[1];
|
||||
|
||||
let cell = Store.flowdata[r][c];
|
||||
|
||||
if(cell != null && cell.ps != null){
|
||||
_this.buildPs(r, c, cell.ps);
|
||||
}
|
||||
else{
|
||||
$("#" + id).hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
htmlEscape: function(text){
|
||||
return text.replace(/[<>"&]/g, function(match, pos, originalText){
|
||||
console.log(match, pos, originalText)
|
||||
switch(match){
|
||||
case '<': {
|
||||
return '<';
|
||||
}
|
||||
case '>': {
|
||||
return '>';
|
||||
}
|
||||
case '&': {
|
||||
return '&';
|
||||
}
|
||||
case '\"': {
|
||||
return '"';
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default luckysheetPostil;
|
||||