Skip to content

Commit

Permalink
feat(toolbar): 修改部分review意见
Browse files Browse the repository at this point in the history
  • Loading branch information
betterdancing committed Sep 29, 2024
1 parent acd0934 commit 3a638cc
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<tiny-button v-bind="extendAttrs" class="toolbar-button">
<span class="svg-wrap">
<svg-icon :name="icon"></svg-icon>
<svg-icon v-if="icon" :name="icon"></svg-icon>
<span v-if="options?.showDots" class="dots"></span>
</span>
<span class="save-title">{{ content }}</span>
Expand Down
4 changes: 2 additions & 2 deletions packages/design-core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ export { default as Styles } from '@opentiny/tiny-engine-setting-styles'
export { default as Layout, LayoutService } from '@opentiny/tiny-engine-layout'
export { default as Canvas } from '@opentiny/tiny-engine-canvas'
export { initPreview } from './src/preview/src/main'
export { GenerateCodeService, PluginPanel } from '@opentiny/tiny-engine-common'
export { PluginPanel, ToolbarBase } from '@opentiny/tiny-engine-common'

export { default as defaultRegistry } from './registry'

export * from '@opentiny/tiny-engine-meta-register'

export { EditorInfoService, AppService } from '@opentiny/tiny-engine-common'
export { EditorInfoService, AppService, GenerateCodeService } from '@opentiny/tiny-engine-common'
6 changes: 3 additions & 3 deletions packages/toolbars/breadcrumb/src/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
@click="publishBlock()"
type="primary"
size="small"
>发布区块</tiny-button
>
>发布区块
</tiny-button>
</div>
<block-deploy-dialog v-model:visible="state.showDeployBlock" :nextVersion="nextVersion"></block-deploy-dialog>
</template>
Expand All @@ -47,7 +47,7 @@ export default {
props: {
options: {
type: Object,
default: () => {}
default: () => ({})
}
},
setup() {
Expand Down
3 changes: 2 additions & 1 deletion packages/toolbars/clean/src/Main.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<div class="toolbar-itm-clean">
<toolbar-base content="清除屏幕" :icon="options.icon.default" :options="options" @click-api="clean"> </toolbar-base>
<toolbar-base content="清除屏幕" :icon="options.icon.default || options.icon" :options="options" @click-api="clean">
</toolbar-base>
</div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion packages/toolbars/collaboration/src/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<template #reference>
<span class="icon collaboration-wrap">
<span class="icon-hides">
<svg-icon v-if="state.url" :name="options.icon.default"></svg-icon>
<svg-icon v-if="state.url" :name="options.icon.default || options.icon"></svg-icon>
</span>
<span v-if="options?.collapsed">多人协作</span>
</span>
Expand Down
2 changes: 1 addition & 1 deletion packages/toolbars/generate-code/src/Main.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<toolbar-base content="出码" :icon="options.icon.default" :options="options" @click-api="generate">
<toolbar-base content="出码" :icon="options.icon.default || options.icon" :options="options" @click-api="generate">
<template #default>
<generate-file-selector
:visible="state.showDialogbox"
Expand Down
2 changes: 1 addition & 1 deletion packages/toolbars/logo/src/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="top-panel-logo">
<h1 class="logo-wrap" @click.stop="handleTitleClick">
<div class="menu-icon-wrapper">
<svg-icon :name="options.icon.default"></svg-icon>
<svg-icon :name="options.icon.default || options.icon"></svg-icon>
</div>
</h1>
<div v-if="state.showMenu" class="main-menu">
Expand Down
7 changes: 6 additions & 1 deletion packages/toolbars/preview/src/Main.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<template>
<div class="toolbar-save">
<toolbar-base content="预览页面" :icon="options.icon.default" :options="options" @click-api="preview">
<toolbar-base
content="预览页面"
:icon="options.icon.default || options.icon"
:options="options"
@click-api="preview"
>
</toolbar-base>
</div>
</template>
Expand Down
3 changes: 2 additions & 1 deletion packages/toolbars/refresh/src/Main.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<toolbar-base content="刷新画布" :icon="options.icon.default" :options="options" @click-api="refresh"> </toolbar-base>
<toolbar-base content="刷新画布" :icon="options.icon.default || options.icon" :options="options" @click-api="refresh">
</toolbar-base>
</template>

<script>
Expand Down
2 changes: 1 addition & 1 deletion packages/toolbars/save/src/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="toolbar-save">
<toolbar-base
:content="isLoading ? '保存中' : '保存'"
:icon="options.icon.default"
:icon="options.icon.default || options.icon"
:options="{ ...options, showDots: !isSaved() }"
@click-api="openApi"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/toolbars/setting/src/Main.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<toolbar-base
:content="isBlock() ? '区块设置' : '页面设置'"
:icon="options.icon.default"
:icon="options.icon.default || options.icon"
:options="options"
@click-api="openSetting"
>
Expand Down

0 comments on commit 3a638cc

Please sign in to comment.