forked from opentiny/tiny-engine
fix: canvas api error (#338)
This commit is contained in:
parent
38c89a856c
commit
68637db8db
|
@ -119,7 +119,7 @@ export default {
|
|||
iframeMonitoring()
|
||||
|
||||
initCanvas({ emit, renderer: detail, iframe: iframe.value, controller: props.controller })
|
||||
useCanvas().renderer.value = window.api
|
||||
useCanvas().renderer.value = { ...detail, ...window.canvasApi }
|
||||
|
||||
const doc = iframe.value.contentDocument
|
||||
const win = iframe.value.contentWindow
|
||||
|
|
|
@ -424,15 +424,19 @@ export const api = {
|
|||
getGlobalState,
|
||||
getDataSourceMap,
|
||||
setDataSourceMap,
|
||||
setGlobalState,
|
||||
getCurrent,
|
||||
setGlobalState
|
||||
}
|
||||
|
||||
const canvasApi = {
|
||||
getCurrent,
|
||||
setLocales,
|
||||
getNodeById: getNode,
|
||||
updateRect,
|
||||
addStyle,
|
||||
addScript,
|
||||
addStyle,
|
||||
addScript,
|
||||
canvasDispatch
|
||||
}
|
||||
|
||||
window.api = api
|
||||
window.Builtin = Builtin
|
||||
window.canvasApi = canvasApi
|
||||
window.Builtin = Builtin
|
||||
|
|
Loading…
Reference in New Issue