Browse Source

Merge branch 'master' of http://124.70.149.18:10880/lianghj/queenshow

qinyan 1 year ago
parent
commit
8e15a74b87

BIN
src/assets/comps/card4/thumbnail.png


BIN
src/assets/comps/card5/thumbnail.png


BIN
src/assets/imgs/2.png


BIN
src/assets/imgs/shoe.png


+ 1 - 1
src/modules/editor/components/CompUI/basicUI/Text/component.tsx

@@ -34,7 +34,7 @@ export const Component = createUIComp({
         Alignment,
       ],
       fontSize: {
-        options: [12, 14, 16, 18, 20, 24, 28, 32, 38, 42, 46],
+        options: [12, 14, 16, 18, 20, 24, 28, 32, 38, 42, 46, 52, 60],
       },
       toolbar: {
         items: [

+ 41 - 0
src/modules/editor/components/CompUI/customUI/Cards/Card4/component.tsx

@@ -0,0 +1,41 @@
+import { string } from "vue-types";
+import { useCompData } from ".";
+import { Image, Text } from "../../../basicUI";
+import { useEditor } from "../../../../..";
+import { createUIComp } from "../../../defines/createUIComp";
+import { css } from "@linaria/core";
+import * as Title3 from "../../Titles/Title3";
+
+export const Component = createUIComp({
+  props: {
+    compId: string().isRequired,
+  },
+  setup(props) {
+    const { designToNaturalSize } = useEditor().helper;
+    const { value, children } = useCompData(props.compId);
+
+    return () => (
+    <div>
+      <Title3.Component   compId={children.title.id} />
+      <div class="flex">
+        <div class="">
+            <Image.Component class="overflow-hidden"
+                        style={{
+                            width: designToNaturalSize(250),
+                            height: designToNaturalSize(278),
+                        }}
+                        compId={children.bgImg.id}
+            />
+        </div>
+        <div class="flex flex-col justify-center" style={{marginLeft: designToNaturalSize(49)}}>
+           <Text.Component compId={children.text1.id} />
+        </div>
+        </div>
+        </div>
+    );
+  },
+});
+const upStyle = css`
+  position:relative;
+  
+`

+ 51 - 0
src/modules/editor/components/CompUI/customUI/Cards/Card4/index.ts

@@ -0,0 +1,51 @@
+import { createAttrsForm } from "../../../defines/createAttrsForm";
+import { createOptions } from "../../../defines/createOptions";
+import { GroupNumber } from "../../../formItems/GroupNumber";
+
+export { Component } from "./component";
+
+const thumbnail = "https://sku3d-test.obs.cn-east-3.myhuaweicloud.com/queenshow/1685592084017_Wu5DW5_thumbnail.png"
+export const { options, useCompData } = createOptions({
+  name: "卡片4",
+  thumbnail:thumbnail,
+  value: {
+  },
+  layout: {
+    padding: "0.2rem",
+  },
+  children: {
+    bgImg: {
+      compKey: "Image",
+      value: { url: thumbnail, x: 27.50, y:-6.50, s: 3.50 },
+    },
+    title: {
+        compKey: "Title3",
+        layout: {
+            margin: "0 0 0.4rem 0"
+        },
+        children: {
+            title: {
+              value: `<p style="text-align:center;"><span style="color:#333;font-size:20px;font-weight: bold;">产品详情</span></p>`,
+            },
+            subtitle: {
+                value: `<p style="text-align:center;">/ Product Details /</p>`,
+            },
+        },
+    },
+    text1: {
+        compKey: "Text",
+        value:  `<p><span style="color:hsl(0, 0%, 60%);font-size:14px;"><strong>名称: &nbsp; P190(注塑)</strong></span></p><p><span style="color:hsl(0, 0%, 60%);font-size:14px;"><strong>规格: &nbsp; 52英寸</strong></span><br><span style="color:hsl(0, 0%, 60%);font-size:14px;"><strong>厚度: &nbsp; 1.0mm+0.05mm</strong></span></p><p><span style="color:hsl(0, 0%, 60%);font-size:14px;"><strong>底材: &nbsp; 鹿皮绒</strong></span></p><p><span style="color:hsl(0, 0%, 60%);font-size:14px;"><strong>用途: &nbsp; 凉鞋、跟鞋、高更鞋、</strong></span><br><span style="color:hsl(0, 0%, 60%);font-size:14px;"><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;时尚休闲鞋等</strong></span></p>`,
+    }
+  },
+});
+
+export const Form = createAttrsForm([
+  {
+    label: "图片尺寸",
+    dataIndex: "value.imgSize",
+    component: GroupNumber,
+    props: {
+      labels: ["宽", "高"],
+    },
+  },
+]);

+ 35 - 0
src/modules/editor/components/CompUI/customUI/Cards/Card5/component.tsx

@@ -0,0 +1,35 @@
+import { string } from "vue-types";
+import { useCompData } from ".";
+import { Image, Text } from "../../../basicUI";
+import { useEditor } from "../../../../..";
+import { createUIComp } from "../../../defines/createUIComp";
+import { css } from "@linaria/core";
+
+export const Component = createUIComp({
+  props: {
+    compId: string().isRequired,
+  },
+  setup(props) {
+    const { designToNaturalSize } = useEditor().helper;
+    const { value, children } = useCompData(props.compId);
+
+    return () => (
+        <div class="relative w-full">
+            <div class="!absolute w-full h-full flex justify-center items-center">
+                <Text.Component class="!absolute w-full" compId={children.text1.id} />
+            </div>
+            <div class="flex justify-center">
+                <Image.Component 
+                            style={{
+                                width: designToNaturalSize(368),
+                                height: designToNaturalSize(275),
+                            }}
+                            compId={children.bgImg.id}  />
+            </div>
+        </div>
+    );
+  },
+});
+const upStyle = css`
+  position:relative;
+`

+ 40 - 0
src/modules/editor/components/CompUI/customUI/Cards/Card5/index.ts

@@ -0,0 +1,40 @@
+
+
+import { createAttrsForm } from "../../../defines/createAttrsForm";
+import { createOptions } from "../../../defines/createOptions";
+import { GroupNumber } from "../../../formItems/GroupNumber";
+
+export { Component } from "./component";
+
+const thumbnail = "https://sku3d-test.obs.cn-east-3.myhuaweicloud.com/queenshow/1685607488598_3mmBXh_thumbnail.png"
+
+export const { options, useCompData } = createOptions({
+  name: "卡片5",
+  thumbnail:thumbnail,
+  value: {
+  },
+  layout: {
+
+  },
+  children: {
+    bgImg: {
+      compKey: "Image",
+      value: { url: "https://sku3d-test.obs.cn-east-3.myhuaweicloud.com/queenshow/1685609522134_nGPo9k_2.png" },
+    },
+    text1: {
+        compKey: "Text",
+        value:  `<p style="text-align:center;"><span style="color:hsl(0,0%,90%);font-size:52px;">F A SH I O N</span></p>`,
+    }
+  },
+});
+
+export const Form = createAttrsForm([
+  {
+    label: "图片尺寸",
+    dataIndex: "value.imgSize",
+    component: GroupNumber,
+    props: {
+      labels: ["宽", "高"],
+    },
+  },
+]);

+ 1 - 24
src/modules/editor/components/CompUI/customUI/Titles/Title3/component.tsx

@@ -24,27 +24,4 @@ export const Component = createUIComp({
       </div>
     );
   },
-});
-
-const border = css`
-  position: relative;
-  color: #999;
-  &::after {
-    content: "";
-    position: absolute;
-    bottom: 50%;
-    width: 100%;
-    height: 1px;
-    background-color: currentColor;
-  }
-  &.left {
-    &::after {
-      left: 0.06rem;
-    }
-  }
-  &.right {
-    &::after {
-      left: -0.06rem;
-    }
-  }
-`;
+});

+ 2 - 0
src/modules/editor/components/CompUI/customUI/index.ts

@@ -2,6 +2,8 @@ export * as Card from "./Cards/Card";
 export * as Card2 from "./Cards/Card2";
 export * as Card3 from "./Cards/Card3";
 export * as CardList from "./Cards/CardList";
+export * as Card4 from "./Cards/Card4";
+export * as Card5 from "./Cards/Card5";
 
 export * as Cover from "./Covers/Cover";
 export * as Cover2 from "./Covers/Cover2";