Skip to content

Commit

Permalink
fix: 修改layout格式
Browse files Browse the repository at this point in the history
  • Loading branch information
lichunn committed May 25, 2024
1 parent e95ced9 commit 9c0a071
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/layout/src/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
display: flex;
flex-flow: column;
}
.tiny-engine-layout__header {
.tiny-engine-layout-header {
height: 48px;
border-bottom: 1px solid #dfe1e6;
text-align: center;
Expand All @@ -15,7 +15,7 @@
margin: 0 10px;
}
}
.tiny-engine-layout__content {
.tiny-engine-layout-content {
display: flex;
max-width: 100vw;
flex: 1;
Expand Down Expand Up @@ -45,7 +45,7 @@
background: #fff;
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}
.left-panel--top {
.left-panel-top {
padding-top: 20px;
.panel-item {
text-align: center;
Expand Down
9 changes: 5 additions & 4 deletions packages/layout/src/index.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<template>
<div class="tiny-engine-layout">
<div class="tiny-engine-layout__header">
<div class="tiny-engine-layout-header">
<div v-for="(item, index) in state.toolbars" :key="index" class="toolbar-item">
<component :is="item.component"></component>
</div>
</div>
</div>
<div class="tiny-engine-layout__content">
<div class="tiny-engine-layout-content">
<div class="left-panel">
<div class="left-panel--top">
<div class="left-panel-top">
<div
v-for="(item, index) in state.plugins"
:key="index"
Expand Down Expand Up @@ -76,7 +76,8 @@ export default {
} else {
showDrawer.value = true
showComponent.value = item.component
;(state.drawerWidth = item.span ? (item.span * 100) / 24 + '%' : null), (active.value = index)
state.drawerWidth = item.span ? (item.span * 100) / 24 + '%' : null
active.value = index
if (item.click) {
item.click()
}
Expand Down

0 comments on commit 9c0a071

Please sign in to comment.