qinyan 1 jaar geleden
bovenliggende
commit
b9f03a3764

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

@@ -1,3 +1,4 @@
+import { Dict_Imgs } from "@/dict";
 import { useEditor } from "@/modules/editor";
 import { defineComponent, watch } from "vue";
 import { string } from "vue-types";
@@ -21,6 +22,7 @@ export const Component = defineComponent({
       temImg.onload = function () {
         comp.setH(comp.getW() / (temImg.width / temImg.height));
         actions.onCompLayoutUpdated(comp);
+        helper.extendStreamCard(store.currStreamCardId);
       };
     }
 
@@ -40,7 +42,10 @@ export const Component = defineComponent({
 
     watch(
       () => comp.value.url,
-      () => setImageSize(comp.value.url)
+      (value, oldValue) => {
+        if (oldValue !== Dict_Imgs.Default) return;
+        setImageSize(value);
+      }
     );
 
     return () => {

+ 12 - 49
src/modules/editor/components/Viewport/Slider/SliderLeft/MySources.tsx

@@ -16,9 +16,7 @@ export const MySources = defineComponent({
 
     function getCurrCtrl() {
       return resource.controls[
-        state.sourceType === "Image"
-          ? "materialImageListCtrl"
-          : "materialVideoListCtrl"
+        state.sourceType === "Image" ? "matImageListCtrl" : "matVideoListCtrl"
       ];
     }
 
@@ -38,12 +36,7 @@ export const MySources = defineComponent({
     switchSource("Image");
 
     return () => {
-      const control =
-        resource.controls[
-          state.sourceType === "Image"
-            ? "materialImageListCtrl"
-            : "materialVideoListCtrl"
-        ];
+      const control = getCurrCtrl();
       return (
         <div class="space-y-20px -mt-10px flex flex-col overflow-hidden">
           <Radio.Group
@@ -57,7 +50,7 @@ export const MySources = defineComponent({
           </Radio.Group>
           <div class="flex-1 -mr-15px pr-15px overflow-x-hidden overflow-y-auto scrollbar">
             <Container
-              class="grid grid-cols-2 gap-20px"
+              class="grid grid-cols-2 gap-15px"
               behaviour="copy"
               group-name="canvas"
               animation-duration={0}
@@ -75,48 +68,18 @@ export const MySources = defineComponent({
                     style={{ aspectRatio: 1 }}
                     onClick={() => clickToDesign(item.file.url)}
                   >
-                    <Image
-                      class="w-full h-full"
-                      src={item.file.url}
-                      size={240}
-                    />
+                    {item.fileType == "video" ? (
+                      <video src={item.file.url} class="w-full h-full object-cover" />
+                    ) : (
+                      <Image
+                        class="w-full h-full"
+                        src={item.file.url}
+                        size={240}
+                      />
+                    )}
                   </div>
                 </Draggable>
               ))}
-
-              {/* <List
-              data={control.state.list}
-              columns={2}
-              gap="20px"
-              class="h-1/1 pr-15px scrollbar"
-            >
-              {{
-                item(item: any) {
-                  return (
-                      <div
-                        style={{ aspectRatio: 1 }}
-                        onClick={() => clickToDesign(item.file.url)}
-                      >
-                        <Image
-                          class="w-full h-full"
-                          src={item.file.url}
-                          size={240}
-                        />
-                      </div>
-                  );
-                },
-                loadmore() {
-                  return (
-                    <Loadmore
-                      class="mt-20px"
-                      loading={control.state.loading}
-                      canLoad={control.state.canLoadNext}
-                      onChange={control.loadNextPage}
-                    />
-                  );
-                },
-              }}
-            </List> */}
             </Container>
             <Loadmore
               class="mt-20px"

+ 16 - 5
src/modules/resource/index.ts

@@ -36,6 +36,9 @@ export class ResourceModule extends ModuleRoot {
 
     materialImageListCtrl: new PageListController(this.config?.httpConfig),
     materialVideoListCtrl: new PageListController(this.config?.httpConfig),
+
+    matImageListCtrl: new PageListController(this.config?.httpConfig),
+    matVideoListCtrl: new PageListController(this.config?.httpConfig),
   };
   natsBus = new BusController();
   treeController = new TreeController(this.natsBus);
@@ -50,15 +53,23 @@ export class ResourceModule extends ModuleRoot {
     this.controls.matTempListCtrl.setCrudPrefix("/tpls");
     this.controls.matTempListCtrl.state.size = 20;
 
-    this.controls.materialImageListCtrl.setCrudPrefix("/source")
+    this.controls.materialImageListCtrl.setCrudPrefix("/source");
     this.controls.materialImageListCtrl.state.size = 18;
-    this.controls.materialImageListCtrl.state.query = {fileType:"image"}
+    this.controls.materialImageListCtrl.state.query = { fileType: "image" };
 
-    this.controls.materialVideoListCtrl.setCrudPrefix("/source")
+    this.controls.materialVideoListCtrl.setCrudPrefix("/source");
     this.controls.materialVideoListCtrl.state.size = 18;
-    this.controls.materialVideoListCtrl.state.query = {fileType:"video"}
+    this.controls.materialVideoListCtrl.state.query = { fileType: "video" };
+
+    this.controls.matImageListCtrl.setCrudPrefix("/source");
+    this.controls.matImageListCtrl.state.size = 20;
+    this.controls.matImageListCtrl.state.query = { fileType: "image" };
+
+    this.controls.matVideoListCtrl.setCrudPrefix("/source");
+    this.controls.matVideoListCtrl.state.size = 20;
+    this.controls.matVideoListCtrl.state.query = { fileType: "video" };
 
-    this.natsBus.init()
+    this.natsBus.init();
   }
 }
 

+ 15 - 21
src/pages/website/Login/index.tsx

@@ -1,12 +1,21 @@
-import { css } from "@linaria/core";
-import Login from "@queenjs-modules/auth/components/Login";
+import LoginForm from "@queenjs-modules/auth/components/components/LoginForm";
 import { defineComponent } from "vue";
+
 export default defineComponent(() => {
   return () => (
-    <div class={LoginStyle}>
-      <Login class="!h-auto flex-1" />
-      <div class="footer_copy">
-        <a href="https://beian.miit.gov.cn" target="_blank">
+    <div class="h-100vh flex flex-col">
+      <div class="flex-1 flex flex-col items-center justify-center">
+        <div class="pointer-events-none">
+          <img class="h-40px" src={require("@/assets/imgs/Logo.png")} alt="" />
+        </div>
+        <LoginForm />
+      </div>
+      <div class="py-10px text-center text-gray">
+        <a
+          href="https://beian.miit.gov.cn"
+          target="_blank"
+          class="mr-5px text-light-50 opacity-80 hover:(text-light-50 opacity-80 underline)"
+        >
           蜀ICP备18008991号-3
         </a>
         版权所有:3Dqueen
@@ -14,18 +23,3 @@ export default defineComponent(() => {
     </div>
   );
 });
-const LoginStyle = css`
-  height: 100vh;
-  display: flex;
-  flex-direction: column;
-  .footer_copy {
-    padding: 10px 0;
-    text-align: center;
-    color: #999;
-  }
-
-  .footer_copy a {
-    margin-right: 5px;
-    color: #fff;
-  }
-`;

+ 1 - 1
src/pages/website/Promotion2/components/ShareModal.tsx

@@ -34,7 +34,7 @@ export default defineComponent({
       return (
         <div class="flex items-start">
           <div>
-            <div class="scrollbar h-600px pr-10px overflow-y-auto">
+            <div class="scrollbar h-600px overflow-y-auto border-1px border-solid border-dark-50">
               {slots.preview?.()}
             </div>
             <div class="mt-20px text-center">