2 Commity 37ca2588b4 ... a1180b9f57

Autor SHA1 Wiadomość Data
  qinyan a1180b9f57 Merge branch 'dev' of http://124.70.149.18:10880/lianghj/queenshow into dev 1 rok temu
  qinyan 02f18e6a27 Text 1 rok temu

+ 26 - 25
src/modules/editor/components/CompUI/basicUI/Text/component2.tsx

@@ -65,38 +65,39 @@ export const Component = defineComponent({
             }
           }}
         >
-          <div
+          {/* <div
             style={{
               width: width,
               transform: `${m.getMatrixStr()}`,
               transformOrigin: "0 0",
             }}
+          > */}
+          <div
+            style={{
+              width: textWidthSize,
+              transform: `scale(${t.scale.y})`,
+              transformOrigin: "0 0",
+              // backgroundColor: "#fc9",
+            }}
           >
-            <div
-              style={{
-                width: textWidthSize,
-                transform: `scale(${t.scale.y})`,
-                transformOrigin: "0 0",
-              }}
-            >
-              {state.editableId ? (
-                <EditorComp
-                  compId={props.compId}
-                  key={state.editableId}
-                  onLost={() => {
-                    state.editableId = "";
-                    controls.textEditorCtrl.setCurrEditor(null);
-                  }}
-                />
-              ) : (
-                <div
-                  innerHTML={comp.value.text}
-                  id={`editor_${props.compId}`}
-                  class={[textStyle, store.isEditMode && `pointer-events-none`]}
-                />
-              )}
-            </div>
+            {state.editableId ? (
+              <EditorComp
+                compId={props.compId}
+                key={state.editableId}
+                onLost={() => {
+                  state.editableId = "";
+                  controls.textEditorCtrl.setCurrEditor(null);
+                }}
+              />
+            ) : (
+              <div
+                innerHTML={comp.value.text}
+                id={`editor_${props.compId}`}
+                class={[textStyle, store.isEditMode && `pointer-events-none`]}
+              />
+            )}
           </div>
+          {/* </div> */}
         </View>
       );
     };

+ 3 - 0
src/modules/editor/components/CompUI/basicUI/View.tsx

@@ -109,6 +109,9 @@ export const View = defineComponent({
         bgStyles.background = cardStyles.background;
         delete cardStyles.background;
       }
+      if (comp.compKey == "Text") {
+        cardStyles["overflow"] = "visible";
+      }
 
       if (isStreamCard) {
         style.overflow = "unset";

+ 3 - 3
src/modules/editor/objects/DesignTemp/creates/createCompStyle.ts

@@ -22,11 +22,11 @@ export function createViewStyles(
     style["border-width"] = (layout.border.width || 0) + "px";
     style["border-color"] = layout.border.color || "#000";
 
-    if (layout.border.radius) {
+    if (layout.border.radius && layout.border.radius !== 0) {
       style["border-radius"] = layout.border.radius / 2 + "%";
       style["overflow"] = "hidden";
     }
-    if (layout.border.radius2 !== undefined) {
+    if (layout.border.radius2 !== undefined && layout.border.radius2 !== 0) {
       if (!layout.size) return;
       style["border-radius"] =
         (designSizeToPx(Math.min(layout.size[0], layout.size[1])) *
@@ -105,7 +105,7 @@ export function createCompStyle(
   //   console.log(comp.value.text, comp.layout.transformMatrix)
   // }
 
-  if (comp.compKey == "Text" || comp.compKey == "Group") {
+  if (comp.compKey == "Group") {
     if (layout.transformMatrix) {
       style.transform = layout.transformMatrix;
       style.transformOrigin = "0 0";