Skip to content

Commit

Permalink
fix: Modify review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanlid committed Jan 10, 2025
1 parent 8a26c6e commit d9940b1
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 58 deletions.
8 changes: 4 additions & 4 deletions packages/common/component/BlockHistoryList.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<tiny-grid :data="history" height="300" v-if="history.length">
<tiny-grid v-if="history.length" :data="history" height="300">
<tiny-grid-column v-if="isBlockManage" field="version" title="版本号">
<template v-slot="data">
{{ data.row.version }}
Expand All @@ -14,8 +14,8 @@
<tiny-grid-column field="message" title="描述"></tiny-grid-column>
<tiny-grid-column width="90" field="operation" title="操作">
<template v-slot="data">
<span @click="$emit('preview', data.row)" class="operation-text">预览</span>
<span v-if="!isBlockManage" @click="$emit('restore', data.row)" class="operation-text">还原</span>
<span class="operation-text" @click="$emit('preview', data.row)">预览</span>
<span v-if="!isBlockManage" class="operation-text" @click="$emit('restore', data.row)">还原</span>
</template>
</tiny-grid-column>
</tiny-grid>
Expand All @@ -38,7 +38,7 @@ defineProps({
},
lastVersion: {
type: Object,
default: () => {}
default: () => ({})
}
})
Expand Down
8 changes: 1 addition & 7 deletions packages/common/component/MetaListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,9 @@ export default {
}
.add-options {
overflow-y: auto;
max-height: calc(100vh - 94px);
max-height: calc(100vh - 94px); // 94为头部高度和底部高度
&.top {
margin-bottom: 0;
}
&::-webkit-scrollbar-track-piece {
background: var(--te-common-bg-container-weaken);
}
&::-webkit-scrollbar {
width: 5px;
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
</div>
</div>
<div class="bottom lowcode-scrollbar-thin">
<span class="bottom__title">用法</span>
<span class="bottom-title">用法</span>
<div class="bottom-demo">
<p>
你可以通过点击左侧区域绑定变量或处理函数,或者点击右边的铅笔按钮切换到输入模式,输入复杂的表达式。
Expand Down Expand Up @@ -702,7 +702,7 @@ export default {
pre {
font-family: consolas;
}
.bottom__title {
.bottom-title {
font-weight: var(--te-base-font-weight-6);
color: var(--te-common-text-primary);
}
Expand Down
1 change: 0 additions & 1 deletion packages/design-core/assets/add-folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/layout/src/DesignSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default {
const activating = computed(() => layoutState.settings.activating)
const showMask = ref(true)
const isCollapsed = ref(false)
const settingIcon = computed(() => (isCollapsed.value ? 'retract_all' : 'expand_all'))
const settingIcon = computed(() => (isCollapsed.value ? 'collapse_all' : 'expand_all'))
provide('isCollapsed', isCollapsed)
Expand Down
4 changes: 1 addition & 3 deletions packages/plugins/block/src/BlockConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,10 @@ export default {
}
const validateForm = () => {
return new Promise((resolve, reject) => {
return new Promise((resolve) => {
blockForm.value.validate((valid) => {
if (valid) {
resolve()
} else {
reject(new Error('校验失败'))
}
})
})
Expand Down
6 changes: 0 additions & 6 deletions packages/plugins/block/src/BlockEventList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,4 @@ export default {
stroke: var(--te-common-text-weaken);
}
}
.opt-button {
width: auto;
&:last-child {
margin-right: var(--te-base-space-3x);
}
}
</style>
2 changes: 1 addition & 1 deletion packages/plugins/page/src/PageSetting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</div>
</tiny-collapse-item>

<tiny-collapse-item class="history-source" title="版本列表" :name="PAGE_SETTING_SESSION.history">
<tiny-collapse-item class="history-source" title="历史备份" :name="PAGE_SETTING_SESSION.history">
<page-history @restorePage="restorePage"></page-history>
</tiny-collapse-item>
</tiny-collapse>
Expand Down
4 changes: 1 addition & 3 deletions packages/plugins/state/src/CreateStore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,10 @@ export default {
const storeDataForm = ref(null)
const validateForm = () => {
return new Promise((resolve, reject) => {
return new Promise((resolve) => {
storeDataForm.value.validate((valid) => {
if (valid) {
resolve()
} else {
reject(new Error('校验失败'))
}
})
})
Expand Down
4 changes: 1 addition & 3 deletions packages/plugins/state/src/CreateVariable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,10 @@ export default {
const createDataForm = ref(null)
const validateForm = () => {
return new Promise((resolve, reject) => {
return new Promise((resolve) => {
createDataForm.value.validate((valid) => {
if (valid) {
resolve()
} else {
reject(new Error('校验失败'))
}
})
})
Expand Down
3 changes: 2 additions & 1 deletion packages/plugins/state/src/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ export default {
updateSchema({ state: { ...(schema.state || {}), [name]: variable } })
useHistory().addHistory()
openCommon()
})
} else {
storeRef.value.validateForm().then(() => {
Expand Down Expand Up @@ -241,9 +242,9 @@ export default {
isPanelShow.value = false
useResource().appSchemaState.globalState = res.global_state || []
})
openCommon()
})
}
openCommon()
}
const search = (value) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
<template>
<div class="background-row line">
<label class="image-label">背景图</label>
<!-- <div class="image-content">
<div class="image-wrap">
<div class="image-inner"></div>
</div>
<div class="text-wrap">
<span class="size">background-image.svg</span>
<span class="size">250 * 250 3.4 KB</span>
<span>
<tiny-checkbox v-model="state.checked" @change="imageSizeChange">@2x</tiny-checkbox>
</span>
</div>
<div class="choose-image">
<span>选择图片</span>
</div>
</div> -->
<tiny-input v-model="state.imgUrl" placeholder="请输入图片URL" @change="handleChangeImg"></tiny-input>
</div>
<div class="background-row line">
Expand Down Expand Up @@ -74,7 +59,6 @@

<script setup>
import { reactive, defineProps, defineEmits, onMounted } from 'vue'
// import { Checkbox as TinyCheckbox } from '@opentiny/vue'
import { Input as TinyInput } from '@opentiny/vue'
import { TabsGroupConfigurator } from '@opentiny/tiny-engine-configurator'
import PositionOrigin from './PositionOrigin.vue'
Expand Down Expand Up @@ -125,16 +109,6 @@ const handleChangeImg = (value) => {
updateStyle({ [BACKGROUND_PROPERTY.BackgroundImage]: `url(${value})` })
}
// const imageSizeChange = (val) => {
// state.width = val ? '125' : 'Auto'
// state.widthSuffix = val ? 'px' : 'auto'
// state.height = 'Auto'
// state.heightSuffix = 'auto'
// val
// ? updateStyle({ [BACKGROUND_PROPERTY.BackgroundSize]: '125px' })
// : updateStyle({ [BACKGROUND_PROPERTY.BackgroundSize]: null })
// }
const selectSize = (value) => {
if (value !== 'auto') {
state.width = 'Auto'
Expand Down

0 comments on commit d9940b1

Please sign in to comment.