Dushusir
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
24 additions and
0 deletions
-
docs/guide/config.md
-
docs/zh/guide/config.md
-
src/controllers/server.js
|
|
@ -1169,6 +1169,16 @@ The hook functions are uniformly configured under ʻoptions.hook`, and configura |
|
|
|
|
|
|
|
------------ |
|
|
|
|
|
|
|
## Cooperative |
|
|
|
|
|
|
|
### cooperativeMessage |
|
|
|
|
|
|
|
- Type:Function |
|
|
|
- Default:null |
|
|
|
- Usage:Receive the cooperation message, secondary development. Expanding cooperative message instruction set |
|
|
|
- Params: |
|
|
|
- {Object} : Receives the entire collaboration message body object sent by the server |
|
|
|
|
|
|
|
## Image |
|
|
|
|
|
|
|
### imageInsertBefore |
|
|
|
|
|
@ -1470,6 +1470,18 @@ Luckysheet开放了更细致的自定义配置选项,分别有 |
|
|
|
- {Number} [canvasHeight]: 滚动容器的高度 |
|
|
|
|
|
|
|
------------ |
|
|
|
|
|
|
|
|
|
|
|
## 协作消息 |
|
|
|
|
|
|
|
### cooperativeMessage |
|
|
|
|
|
|
|
- 类型:Function |
|
|
|
- 默认值:null |
|
|
|
- 作用:接受协作消息,二次开发。拓展协作消息指令集 |
|
|
|
- 参数: |
|
|
|
- {Object} : 收到服务器发送的整个协作消息体对象 |
|
|
|
|
|
|
|
## 图片 |
|
|
|
|
|
|
|
### imageInsertBefore |
|
|
|
|
|
@ -20,6 +20,7 @@ import dayjs from "dayjs"; |
|
|
|
import json from '../global/json'; |
|
|
|
import luckysheetConfigsetting from './luckysheetConfigsetting'; |
|
|
|
import {customImageUpdate} from './imageUpdateCtrl'; |
|
|
|
import method from '../global/method'; |
|
|
|
|
|
|
|
const server = { |
|
|
|
gridKey: null, |
|
|
@ -199,6 +200,7 @@ const server = { |
|
|
|
_this.websocket.onmessage = function(result){ |
|
|
|
Store.result = result |
|
|
|
let data = new Function("return " + result.data)(); |
|
|
|
method.createHookFunction('cooperativeMessage', data) |
|
|
|
console.info(data); |
|
|
|
let type = data.type; |
|
|
|
let {message,id} = data; |
|
|
|