Skip to content

Commit

Permalink
fix: preview error (#862)
Browse files Browse the repository at this point in the history
  • Loading branch information
yy-wow authored Oct 18, 2024
1 parent 87c6dd1 commit 2dfda14
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/design-core/src/preview/src/Toolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
</div>
<div class="toolbar-right">
<span><tiny-switch v-model="debugSwitch"></tiny-switch><span class="toolbar-button-text">调试模式</span></span>
<component :is="ChangeLang" :langChannel="previewLangChannel"></component>
<component :is="ChangeLang" :langChannel="previewLangChannel" :options="langOptions"></component>
</div>
</div>
</template>

<script lang="jsx">
import { useBreadcrumb, getMergeRegistry } from '@opentiny/tiny-engine-meta-register'
import { useBreadcrumb, getMergeRegistry, getMergeMeta } from '@opentiny/tiny-engine-meta-register'
import { Switch as TinySwitch } from '@opentiny/vue'
import { getSearchParams } from './preview/http'
import { BROADCAST_CHANNEL } from '../src/preview/srcFiles/constant'
Expand All @@ -28,6 +28,7 @@ export default {
const debugSwitch = injectDebugSwitch()
const Breadcrumb = getMergeRegistry('toolbars', 'engine.toolbars.breadcrumb')?.entry
const ChangeLang = getMergeRegistry('toolbars', 'engine.toolbars.lang')?.entry
const langOptions = getMergeMeta('engine.toolbars.lang').options
const ToolbarMedia = null // TODO: Media plugin rely on layout/canvas. Further processing is required.
const { setBreadcrumbPage } = useBreadcrumb()
Expand All @@ -49,6 +50,7 @@ export default {
previewLangChannel: BROADCAST_CHANNEL.PreviewLang,
Breadcrumb,
ChangeLang,
langOptions,
ToolbarMedia,
setViewPort,
debugSwitch
Expand Down

0 comments on commit 2dfda14

Please sign in to comment.