-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Plugin: Print
EN 【中文文档在下方】
Luckysheet Print Plugin
Online experience address: Luckysheet Export Demo
Print the current worksheet or selected range.
-
Download the print plugin Download the print plug-in compressed package, unzip the file print.js and the temporary License file SecretKey.txt.
Address: Luckysheet Plugin Download
-
Put it in the designated directory of the project
Put print.js in luskysheet/src/expandPlugins/print folder.
-
Configuration
The front end of Luckysheet already supports the print button on the toolbar through configuration,Perform the following configuration during project initialization:
luckysheet. create({
plugins:[{
name: 'print',
config:{
license: 'Your License(content of SecretKey.txt)'
}
}]
})
- Code packaging
After the experience is complete, please contact sales to purchase a permanent license in time. Replace the License file SecretKey.txt.
ZH
Luckysheet打印插件
在线体验地址:Luckysheet Print Demo
打印当前worksheet或者选取的范围
-
下载打印插件
下载打印插件压缩包,解压出js文件 print.js 和 临时 License 文件 SecretKey.txt
-
放到项目指定位置
将print.js放到 luskysheet/src/expandPlugins/print 文件夹下
-
配置
luckysheet前端已经在工具栏配置打印按钮了,项目初始化时进行如下相应配置:
1 options: luckysheet初始化时的配置,具体看文档地址
2 在options中加入plugins, 具体看plugins说明
3 在plugins数组中加入打印配置,说明如下:
4 name: 插件名字,写死为'print',不要变动
5 config: 打印插件初始化配置对象,目前只有一项配置,说明如下:
6 license: 激活打印功能的凭证,下载打印插件压缩包,解压后的解压包中SecretKey.txt文件中的字符串
luckysheet.create({
...options,
plugins:[{
name: 'print',
config:{
license: 'Your License(解压包中SecretKey.txt文件中的字符串)'
}
}]
})
下面是源码中index.html中的项目初始化例子:
5.重新打包
- 体验完成之后,请及时联系销售购买永久License。替换 License 文件 SecretKey.txt。
- 如果遇到打印整个页面的情况,可能是样式文件没有引入正确,请检查下样式文件的引入路径。