|
@@ -5,6 +5,7 @@ import { useEditor } from "../../../../..";
|
|
import { Image, Text } from "../../../basicUI";
|
|
import { Image, Text } from "../../../basicUI";
|
|
import { createUIComp } from "../../../defines/createUIComp";
|
|
import { createUIComp } from "../../../defines/createUIComp";
|
|
import { WidthEditlayer } from "../../../basicUI/utils";
|
|
import { WidthEditlayer } from "../../../basicUI/utils";
|
|
|
|
+import { View } from "../../../basicUI/View";
|
|
|
|
|
|
export const Component = createUIComp({
|
|
export const Component = createUIComp({
|
|
props: {
|
|
props: {
|
|
@@ -19,60 +20,48 @@ export const Component = createUIComp({
|
|
{
|
|
{
|
|
const item1Comp = store.compMap[id]
|
|
const item1Comp = store.compMap[id]
|
|
if ( !item1Comp ) return;
|
|
if ( !item1Comp ) return;
|
|
- const isDefault = item1Comp.layout.size[0] == 750 && item1Comp.layout.size[1] == 400
|
|
|
|
- if (isDefault) {
|
|
|
|
- item1Comp.layout.size[0] = w;
|
|
|
|
- item1Comp.layout.size[1] = h;
|
|
|
|
|
|
+
|
|
|
|
+ if (item1Comp.layout.size) {
|
|
|
|
+ const isDefault = item1Comp.layout.size[0] == 750 && item1Comp.layout.size[1] == 400
|
|
|
|
+ if (isDefault) {
|
|
|
|
+ item1Comp.layout.size[0] = w;
|
|
|
|
+ item1Comp.layout.size[1] = h;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
fixedSize(children.item1, 191, 191);
|
|
fixedSize(children.item1, 191, 191);
|
|
fixedSize(children.item2, 191, 191);
|
|
fixedSize(children.item2, 191, 191);
|
|
fixedSize(children.item3, 191, 191);
|
|
fixedSize(children.item3, 191, 191);
|
|
|
|
|
|
|
|
|
|
return () => (
|
|
return () => (
|
|
- <div class="relative">
|
|
|
|
- <div class="relative">
|
|
|
|
|
|
+ <div class="absolute">
|
|
<div class={style}>
|
|
<div class={style}>
|
|
<Image.Component compId={children.bgImg} />
|
|
<Image.Component compId={children.bgImg} />
|
|
</div>
|
|
</div>
|
|
- <div
|
|
|
|
- class="absolute bottom-0 w-1/1 pl-40px pr-10px flex items-end justify-between transform translate-y-1/3"
|
|
|
|
- style={{
|
|
|
|
- height: designToNaturalSize(191),
|
|
|
|
- }}
|
|
|
|
- >
|
|
|
|
-
|
|
|
|
- <Image.Component
|
|
|
|
- class="rounded-1/2 overflow-hidden"
|
|
|
|
- editlayer = {false}
|
|
|
|
- compId={children.item1}
|
|
|
|
- />
|
|
|
|
-
|
|
|
|
- <Image.Component
|
|
|
|
- class="rounded-1/2 overflow-hidden"
|
|
|
|
- style={{
|
|
|
|
- marginBottom: designToNaturalSize(191 / 3),
|
|
|
|
- }}
|
|
|
|
- compId={children.item2}
|
|
|
|
|
|
+
|
|
|
|
+ <Image.Component
|
|
|
|
+ class="rounded-1/2 overflow-hidden top-0"
|
|
editlayer = {false}
|
|
editlayer = {false}
|
|
|
|
+ compId={children.item1}
|
|
/>
|
|
/>
|
|
-
|
|
|
|
- <Image.Component
|
|
|
|
- class="rounded-1/2 overflow-hidden"
|
|
|
|
- style={{
|
|
|
|
- marginBottom: designToNaturalSize((191 / 3) * 2),
|
|
|
|
- }}
|
|
|
|
|
|
+
|
|
|
|
+ <Image.Component
|
|
|
|
+ class="rounded-1/2 overflow-hidden top-0"
|
|
|
|
+ compId={children.item2}
|
|
|
|
+ editlayer = {false}
|
|
|
|
+ />
|
|
|
|
+
|
|
|
|
+ <Image.Component
|
|
|
|
+ class="rounded-1/2 overflow-hidden top-0"
|
|
compId={children.item3}
|
|
compId={children.item3}
|
|
editlayer = {false}
|
|
editlayer = {false}
|
|
/>
|
|
/>
|
|
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="absolute top-50px left-0 z-1">
|
|
|
|
- <Text.Component compId={children.text1} />
|
|
|
|
- </div>
|
|
|
|
- <Text.Component compId={children.text2} class="mt-15px" />
|
|
|
|
|
|
+ <Text.Component compId={children.text1} class={"top-0"} />
|
|
|
|
+
|
|
|
|
+ <Text.Component compId={children.text2} class={"top-0"} />
|
|
</div>
|
|
</div>
|
|
);
|
|
);
|
|
},
|
|
},
|
|
@@ -81,6 +70,4 @@ export const Component = createUIComp({
|
|
const style = css`
|
|
const style = css`
|
|
background: gray;
|
|
background: gray;
|
|
clip-path: polygon(0 0, 100% 0, 100% 57%, 0 100%);
|
|
clip-path: polygon(0 0, 100% 0, 100% 57%, 0 100%);
|
|
- transform-origin: center;
|
|
|
|
- transform: translate(0%, 0%) scale(1);
|
|
|
|
`;
|
|
`;
|