Rename customBlocks to availableBlocks
This commit is contained in:
parent
412f26d71d
commit
ceadc8ad80
|
@ -35,7 +35,7 @@ export const SbMain = defineComponent({
|
|||
model,
|
||||
|
||||
props: {
|
||||
customBlocks: {
|
||||
availableBlocks: {
|
||||
type: Array as PropType<IBlockDefinition<any>[]>,
|
||||
default: () => [],
|
||||
},
|
||||
|
@ -69,7 +69,7 @@ export const SbMain = defineComponent({
|
|||
provide(SymBlockTreeUnregister, () => { blockTree.value = null; });
|
||||
|
||||
const blockLibrary: IBlockLibrary = shallowReactive({
|
||||
...props.customBlocks.reduce(
|
||||
...props.availableBlocks.reduce(
|
||||
(blocks: IBlockLibrary, block: IBlockDefinition<any>) => ({ ...blocks, [block.name]: block }),
|
||||
{},
|
||||
),
|
||||
|
|
|
@ -2,4 +2,6 @@
|
|||
position: absolute;
|
||||
width: auto;
|
||||
height: auto;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ export default defineComponent({
|
|||
onUpdate={(newBlock: IBlockData<any>) => {
|
||||
block.data = newBlock.data;
|
||||
}}
|
||||
customBlocks={[
|
||||
availableBlocks={[
|
||||
SbLayout,
|
||||
SbHeading,
|
||||
SbImage,
|
||||
|
@ -54,7 +54,7 @@ export default defineComponent({
|
|||
case SbMode.Display:
|
||||
return <SbMain
|
||||
block={block}
|
||||
customBlocks={[
|
||||
availableBlocks={[
|
||||
SbLayout,
|
||||
SbHeading,
|
||||
SbImage,
|
||||
|
|
Loading…
Reference in a new issue