Skip to content

Commit

Permalink
fix: 手动更新画布key导致表格渲染出错 (opentiny#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
gene9831 authored Dec 13, 2023
1 parent 699dc7b commit 8474ddb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/canvas/src/components/container/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,8 @@ export const setState = (state) => {
getRenderer().setState(state)
}

export const setUtils = (utils) => {
getRenderer().setUtils(utils)
export const setUtils = (utils, clear, isForceRefresh) => {
getRenderer().setUtils(utils, clear, isForceRefresh)
}

export const deleteState = (variable) => {
Expand Down
6 changes: 5 additions & 1 deletion packages/canvas/src/components/render/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,15 @@ const create = () => {

document.body.remove()
document.body = document.createElement('body')
const app = document.createElement('div')
app.setAttribute('id', 'app')
document.body.appendChild(app)

dispatch('canvasReady', { detail: renderer })

App = Vue.createApp(Main).use(TinyI18nHost).provide(I18nInjectionKey, TinyI18nHost)
App.config.globalProperties.lowcodeConfig = window.parent.TinyGlobalConfig
App.mount(document.body)
App.mount(document.querySelector('#app'))

new ResizeObserver(() => {
dispatch('canvasResize')
Expand Down

0 comments on commit 8474ddb

Please sign in to comment.