|
@@ -8,24 +8,25 @@ export default defineUI({
|
|
|
const editor = useEditor();
|
|
|
|
|
|
return () => (
|
|
|
- <div>
|
|
|
+ <div class="h-full flex flex-col">
|
|
|
<div class="p-16px border-bottom !border-2px">资源中心</div>
|
|
|
- <div class="m-16px">
|
|
|
- <Radio.Group>
|
|
|
+ <div class="my-16px flex-1 flex flex-col h-0">
|
|
|
+ <Radio.Group class="!mx-16px">
|
|
|
<Radio.Button>模板</Radio.Button>
|
|
|
<Radio.Button>组件</Radio.Button>
|
|
|
</Radio.Group>
|
|
|
- <div class="py-16px space-y-10px">
|
|
|
+ <div class="p-16px space-y-10px flex-1 scrollbar ">
|
|
|
{Object.entries(editor.config.compUI).map(([compKey, uiOpt], i) => {
|
|
|
return (
|
|
|
<div
|
|
|
- class="text-center leading-50px h-50px bg-dark-50 rounded"
|
|
|
+ class="text-center leading-50px bg-dark-50 rounded"
|
|
|
key={i}
|
|
|
onClick={() =>
|
|
|
editor.actions.addCompToDesign(compKey as ICompKeys)
|
|
|
}
|
|
|
>
|
|
|
- {uiOpt.options.name}
|
|
|
+ <img class="w-full rounded" src={uiOpt.options.thumbnail} alt="封面图" />
|
|
|
+ {/* {uiOpt.options.name} */}
|
|
|
</div>
|
|
|
);
|
|
|
})}
|