Browse Source

Merge branch 'dev' of http://124.70.149.18:10880/lianghj/queenshow into dev

bianjiang 1 year ago
parent
commit
fc8e1eb5e6

+ 2 - 2
src/modules/editor/components/CompUI/basicUI/Arc/index.ts

@@ -14,10 +14,10 @@ export const options = {
 
 export const { createComp, useCompData } = createCompHooks({
   value: {
-    lineColor: "black",
+    lineColor: "#000000",
     lineWidth: 1,
     isFill: false,
-    fillColor: "black",
+    fillColor: "#000000",
     reverseFill: false,
     start: 0,
     end: 360

+ 2 - 2
src/modules/editor/components/CompUI/basicUI/Curve/index.ts

@@ -13,10 +13,10 @@ export const options = {
 
 export const { createComp, useCompData } = createCompHooks({
   value: {
-    lineColor: "black",
+    lineColor: "#000000",
     lineWidth: 1,
     isFill: false,
-    fillColor: "black",
+    fillColor: "#000000",
     reverseFill: false,
     points: [],
     isClose: true,

+ 2 - 2
src/modules/editor/components/CompUI/basicUI/Ellipse/index.ts

@@ -14,10 +14,10 @@ export const options = {
 
 export const { createComp, useCompData } = createCompHooks({
   value: {
-    lineColor: "black",
+    lineColor: "#000000",
     lineWidth: 1,
     isFill: false,
-    fillColor: "black",
+    fillColor: "#000000",
     reverseFill: false,
     start: 0,
     end: 360

+ 4 - 4
src/modules/editor/components/CompUI/basicUI/Line/component.tsx

@@ -29,10 +29,10 @@ export const Component = defineComponent({
 
         const ctx = canvasRef.value?.getContext("2d") as CanvasRenderingContext2D;
 
-        const width = data.layout.size[0];
-        const height = data.layout.size[1];
-        canvas.width = Math.ceil(Math.max(1, width));
-        canvas.height = Math.ceil(Math.max(1, height));
+        const width =  Math.ceil(Math.max(1, data.layout.size[0] *1.5));
+        const height = Math.ceil(Math.max(1, data.layout.size[1] *1.5));
+        canvas.width = width
+        canvas.height = height
         ctx.clearRect(0, 0, canvas.width, canvas.height);
         ctx.lineWidth = data.value.lineWidth;
         ctx.strokeStyle = data.value.lineColor;

+ 1 - 1
src/modules/editor/components/CompUI/basicUI/Line/index.ts

@@ -14,7 +14,7 @@ export const options = {
 
 export const { createComp, useCompData } = createCompHooks({
   value: {
-    lineColor: "black",
+    lineColor: "#000000",
     lineWidth: 1,
     dashX: 0,
     dashY: 0,

+ 1 - 1
src/modules/editor/components/CompUI/basicUI/Polygon/index.ts

@@ -13,7 +13,7 @@ export const options = {
 
 export const { createComp, useCompData } = createCompHooks({
   value: {
-    lineColor: "black",
+    lineColor: "#000000",
     lineWidth: 0,
     isFill: true,
     fillColor: "#A4A4A4",

+ 1 - 1
src/modules/editor/components/CompUI/basicUI/PolygonNormal/index.ts

@@ -14,7 +14,7 @@ export const options = {
 
 export const { createComp, useCompData } = createCompHooks({
   value: {
-    lineColor: "black",
+    lineColor: "#000000",
     lineWidth: 0,
     isFill: true,
     fillColor: "#A4A4A4",

+ 2 - 2
src/modules/editor/components/CompUI/basicUI/QuadraticCurve/index.ts

@@ -14,10 +14,10 @@ export const options = {
 
 export const { createComp, useCompData } = createCompHooks({
   value: {
-    lineColor: "black",
+    lineColor: "#000000",
     lineWidth: 1,
     isFill: false,
-    fillColor: "black",
+    fillColor: "#000000",
     cp1: 0.5,  //控制点1
     p1: 0,  //顶点1的位置
     p2: 1,  //顶点1的位置

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

@@ -44,7 +44,7 @@ export const Component = defineComponent({
         }
         
         const padding =  data.value.lineWidth / 2.0;
-        ctx.lineJoin = "round";
+        // ctx.lineJoin = "round";
         ctx.beginPath();
         ctx.moveTo(padding, padding);
         ctx.lineTo(width - padding, padding);

+ 1 - 1
src/modules/editor/components/CompUI/basicUI/Rectage/index.ts

@@ -13,7 +13,7 @@ export const options = {
 
 export const { createComp, useCompData } = createCompHooks({
   value: {
-    lineColor: "black",
+    lineColor: "#000000",
     lineWidth: 0,
     isFill: true,
     fillColor: "#A4A4A4",

+ 1 - 1
src/modules/editor/components/CompUI/basicUI/Triangle/index.ts

@@ -13,7 +13,7 @@ export const options = {
 
 export const { createComp, useCompData } = createCompHooks({
   value: {
-    lineColor: "black",
+    lineColor: "#000000",
     lineWidth: 0,
     isFill: true,
     fillColor: "#A4A4A4",

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

@@ -1,4 +1,4 @@
-// export * as Card from "./Cards/Card";
+export * as Card from "./Cards/Card";
 export * as Cards11 from "./Cards/Card11";
 export * as Cards12 from "./Cards/Card12";
 export * as Cards13 from "./Cards/Card13";
@@ -6,7 +6,7 @@ export * as Cards14 from "./Cards/Card14";
 export * as Cards15 from "./Cards/Card15";
 export * as Card2 from "./Cards/Card2";
 export * as Card3 from "./Cards/Card3";
-// export * as Card4 from "./Cards/Card4";
+export * as Card4 from "./Cards/Card4";
 export * as Card5 from "./Cards/Card5";
 export * as CardList from "./Cards/CardList";
 export * as Cover from "./Covers/Cover";

+ 1 - 1
src/modules/editor/components/Viewport/Slider/SliderLeft/CompList.tsx

@@ -46,7 +46,7 @@ export const CompList = defineComponent({
                     onClick={() => {
                       editor.actions.clickCompUserToDesign(comp._id, isSys);
                     }}
-                    size={240}
+                    size={480}
                   />
                 </div>
               </Draggable>

+ 1 - 1
src/modules/editor/components/Viewport/Slider/SliderLeft/CompsUser.tsx

@@ -81,7 +81,7 @@ export default defineUI({
                       onClick={() => {
                         editor.actions.clickCompUserToDesign(item._id, isSys);
                       }}
-                      size={240}
+                      size={480}
                     />
                     {isSys && (
                       <Tag

+ 5 - 5
src/modules/editor/components/Viewport/Slider/SliderLeft/CustomComps.tsx

@@ -18,12 +18,12 @@ const compList = [
   // "Card2",
   // "Card3",
   // "Card5",
-  "CardList",
-  "Cards11",
-  "Cards12",
+  // "CardList",
+  // "Cards11",
+  // "Cards12",
   // "Cards13",
-  "Cards14",
-  "Cards15",
+  // "Cards14",
+  // "Cards15",
   "Cover",
   "Cover2",
   "Text1",

+ 5 - 4
src/modules/editor/components/Viewport/Slider/SliderRight/CompTree.tsx

@@ -27,9 +27,11 @@ export const CompTree = defineComponent({
       treeData() {
         const rootComp = helper.findRootComp();
 
-        function getCompChildren(ids: string[], revert = false): TreeItem[] {
-          if (revert) ids = ids.reverse();
-
+        let deep = 0;
+        function getCompChildren(ids: string[]): TreeItem[] {
+          deep += 1;
+          if (deep >2 ) ids = ids.reverse();
+         
           return ids.map((id) => {
             const comp = helper.findComp(id) as DesignComp;
             return {
@@ -41,7 +43,6 @@ export const CompTree = defineComponent({
               value: comp.id,
               children: getCompChildren(
                 comp.getChildIds(),
-                comp.compKey == "Container" ? true : false
               ),
             };
           });

+ 6 - 1
src/modules/editor/module/actions/edit.tsx

@@ -885,8 +885,12 @@ export const editActions = EditorModule.action({
     const sels = this.store.selected.slice(0);
     const chils = this.store.currStreamCard.children.default || [];
     const newChilds  :any = [];
+    const groupChilds :any = [];
     chils.forEach(c=>{
       if (sels.indexOf(c) == -1) newChilds.push(c);
+      else {
+        groupChilds.push(c);
+      }
     })
 
     newChilds.push(id);
@@ -902,7 +906,8 @@ export const editActions = EditorModule.action({
     //再添加新的节点
     comp.layout.size = [this.helper.pxToDesignSize(Objc.width), this.helper.pxToDesignSize(Objc.height)];
     comp.layout.transformMatrix = selectCtrl.transferStyle.matrix;
-    comp.children.default = sels;
+    
+    comp.children.default = groupChilds;
 
     this.actions.selectObjs([])
     setTimeout(() => {