qinyan há 1 ano atrás
pai
commit
fe1004a210

+ 1 - 5
src/components/Thumbnail.tsx

@@ -17,12 +17,8 @@ const ThumbnailImage = defineComponent({
       return (
         <div class={cardStyles} onClick={() => emit("click")}>
           <Image
-            class={cx(
-              objectContain
-                ? "max-w-full max-h-full !object-contain"
-                : "w-full h-full"
-            )}
             {...props}
+            class={cx("w-full h-full", objectContain && "!object-contain")}
           />
         </div>
       );

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

@@ -1,6 +1,5 @@
 import { cx } from "@linaria/core";
 import { Tag } from "ant-design-vue";
-import dayjs from "dayjs";
 import { upperFirst } from "lodash";
 import { Container, Draggable } from "vue-dndrop";
 import { number, string } from "vue-types";
@@ -11,9 +10,9 @@ import { useResource } from "@/modules/resource";
 import { useAuth } from "@queenjs-modules/auth";
 import { Image, Loadmore } from "@queenjs/ui";
 import { defineUI, queenApi } from "queenjs";
-import Menu from "./Menu";
-import ListFilter from "./ListFilter";
 import { onMounted, watch } from "vue";
+import ListFilter from "./ListFilter";
+import Menu from "./Menu";
 
 export default defineUI({
   props: {
@@ -86,7 +85,7 @@ export default defineUI({
             }}
           >
             {dataSource.map((item: compType) => {
-              const items = ["删除", "编辑"];
+              const items = ["编辑", "删除"];
 
               if (isSys) {
                 item.published
@@ -129,7 +128,7 @@ export default defineUI({
                       <Menu
                         items={items}
                         onMenu={async (name) => {
-                          console.log("name", name);
+                          // console.log("name", name);
                           if (name == "删除") {
                             const title = {
                               comp: "组合",

+ 2 - 2
src/modules/editor/components/Viewport/Slider/SliderLeft/Sources/SourceItem.tsx

@@ -146,10 +146,10 @@ export default defineUI({
                 overlay={
                   <Menu class="w-90px">
                     <Menu.Item>
-                      <div onClick={() => emit("menu", "delete")}>删除</div>
+                      <div onClick={() => emit("menu", "edit")}>编辑</div>
                     </Menu.Item>
                     <Menu.Item>
-                      <div onClick={() => emit("menu", "edit")}>编辑</div>
+                      <div onClick={() => emit("menu", "delete")}>删除</div>
                     </Menu.Item>
                     {isSys && !record.published && (
                       <Menu.Item>

+ 1 - 1
src/modules/resource/components/SouceModal.tsx

@@ -126,7 +126,7 @@ export default defineComponent({
                   <Thumbnail
                     src={thumbnail}
                     class="h-1/1 w-1/1"
-                    objectContain={props.sourceType == "image" ? true : false}
+                    objectContain={true}
                   />
                 </div>
               </Form.Item>