Переглянути джерело

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

bianjiang 1 рік тому
батько
коміт
1847ba5028

+ 1 - 1
src/modules/editor/components/CompUI/defines/align.tsx

@@ -30,7 +30,7 @@ export default defineComponent({
                   })
             }
             </div>
-            <div class="row ml-12px">
+            <div class="row ml-10px">
             {
                 CompAlignTools.right.map((item) => {
                     return item.getVisible.call(editor, comp) ? (

+ 8 - 1
src/modules/editor/components/CompUI/formItems/Size.tsx

@@ -7,6 +7,7 @@ import { AnyFun } from "queenjs/typing";
 import { defineComponent, reactive } from "vue";
 import { any } from "vue-types";
 import { TipIcons } from "../../TipIcons";
+import { useEditor } from "@/modules/editor";
 
 const selectOptions = [
   { value: "px", label: "PX", options: { step: 1 } },
@@ -23,6 +24,7 @@ export const Size = defineComponent({
     const state = reactive({
       relateRatio: 0,
     });
+    const editor = useEditor();
 
     function changeVal(index: number, v: any) {
       const { value } = props;
@@ -82,6 +84,7 @@ export const Size = defineComponent({
             icon={IconWidth}
             value={fmtVal(0)}
             onChange={(v) => changeVal(0, v)}
+            onIconClick={()=>{ editor.actions.setSameSize(true) }}
           />
           <TipIcons.Relate
             class={[relateIconCls, state.relateRatio && "active"]}
@@ -94,6 +97,7 @@ export const Size = defineComponent({
             icon={IconHeight}
             value={fmtVal(1)}
             onChange={(v) => changeVal(1, v)}
+            onIconClick={()=>{ editor.actions.setSameSize(false) }}
           />
           <Select
             class={selUnitCls}
@@ -116,13 +120,15 @@ const SizeInput = (props: {
   icon: any;
   value: string;
   onChange: AnyFun;
+  onIconClick:AnyFun;
+
 }) => {
   const { label, icon, ...inputProps } = props;
   return (
     <div class={numberInputCls}>
       <span class="pl-14px pr-1px text-14px">{label}</span>
       <InputNumber class="flex-1" bordered={false} {...inputProps} />
-      <icon class="tipIcon" />
+      <icon class="tipIcon" onClick={()=>{ props.onIconClick() }} />
     </div>
   );
 };
@@ -137,6 +143,7 @@ const numberInputCls = css`
     font-size: 24px;
     padding: 3px 5px;
     background-color: #373737;
+    cursor: pointer;
   }
 `;
 

+ 3 - 2
src/modules/editor/module/actions/edit.tsx

@@ -317,9 +317,10 @@ export const editActions = EditorModule.action({
     const selectCtrl = this.controls.selectCtrl;
     const objc = selectCtrl.objContainer as ObjsContainer;
     if (this.store.selected.length == 1) {
-      this.store.currComp.layout.size[0] = 750;
-      objc.updateSize();
+      if (isWidth) this.store.currComp.layout.size[0] = 750;
+      else this.store.currComp.layout.size[1] = this.store.currStreamCard.layout.size[1];
 
+      objc.updateSize();
       selectCtrl.upgateGizmoStyle();
       return;
     }