feat: 开放区块管理相关功能 (#206)

This commit is contained in:
Gene 2023-12-29 16:19:35 +08:00 committed by GitHub
parent ec95df7c7d
commit 11767f2b64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 9 deletions

View File

@ -106,7 +106,8 @@ export default {
},
{ name: '删除', code: 'del' },
{ name: '复制', code: 'copy' },
{ name: '绑定事件', code: 'bindEvent' }
{ name: '绑定事件', code: 'bindEvent' },
{ name: '新建区块', code: 'createBlock' }
])
const boxVisibility = ref(false)

View File

@ -446,7 +446,7 @@ export default {
color: var(--ti-lowcode-component-block-list-setting-btn-color);
display: block;
&:hover {
cursor: not-allowed;
cursor: pointer;
color: var(--ti-lowcode-component-block-list-setting-btn-hover-color);
}
}
@ -553,7 +553,7 @@ export default {
.block-detail-icon {
color: var(--ti-lowcode-component-block-list-setting-btn-color);
&:hover {
cursor: not-allowed;
cursor: pointer;
color: var(--ti-lowcode-component-block-list-setting-btn-hover-color);
}
}

View File

@ -2,7 +2,7 @@
<plugin-panel class="block-manage" title="区块管理" :isCloseLeft="false" @close="closePanel">
<template #header>
<link-button :href="docsUrl"></link-button>
<svg-button name="add-page" placement="bottom" tips="新建区块" style="cursor: not-allowed"></svg-button>
<svg-button name="add-page" placement="bottom" tips="新建区块" @click="openBlockAdd"></svg-button>
</template>
<template #content>
<div class="app-manage-search">
@ -78,6 +78,8 @@
:blockStyle="state.layout"
default-icon-tip="查看区块"
:externalBlock="externalBlock"
@click="editBlock"
@iconClick="openSettingPanel"
></plugin-block-list>
<block-setting></block-setting>
<div class="block-footer">

View File

@ -276,7 +276,7 @@ export default {
}
const handleAddGroup = () => {
return
state.showCreateGroupForm = true
}
const handleClickOption = ({ value: { groupId, groupName } }) => {
@ -426,7 +426,6 @@ export default {
}
}
.add-group-btn {
cursor: not-allowed;
font-size: 16px;
width: 32px;
height: 32px;

View File

@ -59,8 +59,9 @@ export default {
const { message, confirm } = useModal()
const appId = useApp().appInfoState.selectedId
const openVersionPanel = async () => {
return
const openVersionPanel = async ({ item }) => {
selectedBlock.value = item
setBlockVersionPanelVisible(true)
}
const state = reactive({

View File

@ -4,7 +4,7 @@
<tiny-search v-model="state.searchValue" placeholder="请输入关键字搜索">
<template #prefix> <tiny-icon-search /> </template>
</tiny-search>
<block-list v-model:blockList="filterBlocks" :show-add-button="false" :show-block-shot="true"></block-list>
<block-list v-model:blockList="filterBlocks" :show-add-button="true" :show-block-shot="true"></block-list>
</div>
</template>