From bf831386566d4253d27b746424950844afcc6405 Mon Sep 17 00:00:00 2001 From: lrz <1414556676@qq.com> Date: Mon, 14 Sep 2020 17:44:03 +0800 Subject: [PATCH] docs(readme): readme cdn --- README-zh.md | 18 ++++++++---------- README.md | 19 ++++++++----------- docs/guide/README.md | 24 +++++++++++++++++++----- docs/zh/guide/README.md | 25 ++++++++++++++++++++----- docs/zh/guide/cell.md | 11 +++++++++-- src/global/api.js | 1 + 6 files changed, 65 insertions(+), 33 deletions(-) diff --git a/README-zh.md b/README-zh.md index e3de471..4803cc8 100644 --- a/README-zh.md +++ b/README-zh.md @@ -124,23 +124,21 @@ npm run build ## 用法 #### 第一步 -`npm run build`后`dist`文件夹下的所有文件复制到项目目录 +通过CDN引入依赖 -#### 第二步 -引入依赖 ``` - - - - - + + + + + ``` -#### 第三步 +#### 第二步 指定一个表格容器 ```
``` -#### 第四步 +#### 第三步 创建一个表格 ``` - + + + + + ``` -#### Third step +#### Second step Specify a table container ```
``` -#### Fourth step +#### Third step Create a table ``` + +``` + +Note that `https://cdn.jsdelivr.net/npm/luckysheet/dist/luckysheet.umd.js` will pull the latest luckysheet code. If you want to specify the luckysheet version, please add the version number after the luckysheet , Such as: `https://cdn.jsdelivr.net/npm/luckysheet@2.0.0/dist/luckysheet.umd.js` + +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 @@ -124,12 +138,12 @@ Introduce dependencies ``` -### Third step +### Second step Specify a table container ```html
``` -### Fourth step +### Third step Create a table ```javascript + +``` + +注意,`https://cdn.jsdelivr.net/npm/luckysheet/dist/luckysheet.umd.js`这个路径会拉取到最新的luckysheet代码,想要指定luckysheet版本,请在luckysheet后面加上版本号,如:`https://cdn.jsdelivr.net/npm/luckysheet@2.0.0/dist/luckysheet.umd.js` + +如果不方便访问 jsdelivr.net,还可以采用本地方式引入 + +#### 本地引入 + +`npm run build`后`dist`文件夹下的所有文件复制到项目目录,然后通过相对路径引入 -### 第二步 -引入依赖 ```html @@ -124,12 +139,12 @@ npm run build ``` -### 第三步 +### 第二步 指定一个表格容器 ```html
``` -### 第四步 +### 第三步 创建一个表格 ```javascript