liwei 1 год назад
Родитель
Сommit
c5f1f0f569

+ 1 - 0
package.json

@@ -70,6 +70,7 @@
     "scp2": "^0.5.0",
     "swiper": "^8.4.4",
     "three": "^0.146.0",
+    "vconsole": "^3.15.1",
     "vue": "^3.2.45",
     "vue-dndrop": "^1.3.1",
     "vue-router": "^4.0.3",

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

@@ -42,8 +42,8 @@ export default defineUI({
                   >
                     <Image
                       class="w-full rounded pointer-events-none"
-                      src={item.thumbnail}
-                      size={240}
+                      src={item.file.url}
+                      // size={240}
                     />
                   </div>
                 </Draggable>

+ 2 - 0
src/modules/resource/helper.ts

@@ -86,6 +86,7 @@ export const helper = ResourceModule.helper({
 
     queenApi.showLoading("上传中……");
 
+    
     for (const key in blobs) {
       const blob = blobs[key];
       if (blob.type.indexOf("image") !== -1 && blob.size >= 10 * 1024 * 1024) {
@@ -101,6 +102,7 @@ export const helper = ResourceModule.helper({
           file,
           fileType: blob.type.split("/")[0],
           from: "upload",
+          isSvg:  blob.name.toLowerCase().lastIndexOf(".svg") == blob.name.length -4
         };
         result.successRow.push(souceObj);
       }

+ 1 - 1
src/modules/resource/index.ts

@@ -84,7 +84,7 @@ export class ResourceModule extends ModuleRoot {
 
     this.controls.sysSvgListCtrl.setCrudPrefix("/sys/source");
     this.controls.sysSvgListCtrl.state.size = 20;
-    this.controls.sysSvgListCtrl.state.query = { fileType: "svg" };
+    this.controls.sysSvgListCtrl.state.query = { fileType: "image" , isSvg: true};
 
     this.natsBus.init();
   }

+ 3 - 0
src/pages/h5/share/index.ts

@@ -4,6 +4,9 @@ import CKEditor from "@ckeditor/ckeditor5-vue";
 import "./style.less";
 import router from "./router";
 
+// import VConsole from 'vconsole';
+// const vConsole = new VConsole();
+
 document.title = "分享";
 startApp(router, [initViewportSize], (app) => {
   app.use(CKEditor);

+ 4 - 5
src/pages/website/Material2/components/MaterialItem.tsx

@@ -19,8 +19,9 @@ export default defineUI({
   setup(props, { emit }) {
     return () => {
       const { record, use } = props;
-      // console.error("record: ", record);
-
+     
+      const src = record?.thumbnail || record?.thumbnailUrl || record.file?.url;
+      // console.error("record: ", src);
       return (
         <div class={cx(itemStyles, "relative")}>
           <View ratio={1.4} class="overflow-hidden card">
@@ -29,9 +30,7 @@ export default defineUI({
             ) : (
               <Image
                 class="h-1/1 w-1/1"
-                src={
-                  record?.thumbnail || record?.thumbnailUrl || record.file?.url
-                }
+                src={src}
               />
             )}
 

+ 32 - 0
yarn.lock

@@ -956,6 +956,13 @@
   dependencies:
     regenerator-runtime "^0.13.11"
 
+"@babel/runtime@^7.17.2":
+  version "7.22.6"
+  resolved "http://124.70.149.18:4873/@babel%2fruntime/-/runtime-7.22.6.tgz#57d64b9ae3cff1d67eb067ae117dac087f5bd438"
+  integrity sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==
+  dependencies:
+    regenerator-runtime "^0.13.11"
+
 "@babel/template@^7.0.0", "@babel/template@^7.18.10", "@babel/template@^7.20.7":
   version "7.21.9"
   resolved "http://124.70.149.18:4873/@babel%2ftemplate/-/template-7.21.9.tgz#bf8dad2859130ae46088a99c1f265394877446fb"
@@ -3697,6 +3704,11 @@ copy-anything@^2.0.1:
   dependencies:
     is-what "^3.14.1"
 
+copy-text-to-clipboard@^3.0.1:
+  version "3.2.0"
+  resolved "http://124.70.149.18:4873/copy-text-to-clipboard/-/copy-text-to-clipboard-3.2.0.tgz#0202b2d9bdae30a49a53f898626dcc3b49ad960b"
+  integrity sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q==
+
 copy-to@^2.0.1:
   version "2.0.1"
   resolved "http://124.70.149.18:4873/copy-to/-/copy-to-2.0.1.tgz#2680fbb8068a48d08656b6098092bdafc906f4a5"
@@ -3721,6 +3733,11 @@ core-js-compat@^3.25.1, core-js-compat@^3.8.3:
   dependencies:
     browserslist "^4.21.5"
 
+core-js@^3.11.0:
+  version "3.31.1"
+  resolved "http://124.70.149.18:4873/core-js/-/core-js-3.31.1.tgz#f2b0eea9be9da0def2c5fece71064a7e5d687653"
+  integrity sha512-2sKLtfq1eFST7l7v62zaqXacPc7uG8ZAya8ogijLhTtaKNcpzpB4TMoTw2Si+8GYKRwFPMMtUT0263QFWFfqyQ==
+
 core-js@^3.15.1, core-js@^3.8.3:
   version "3.30.2"
   resolved "http://124.70.149.18:4873/core-js/-/core-js-3.30.2.tgz#6528abfda65e5ad728143ea23f7a14f0dcf503fc"
@@ -6262,6 +6279,11 @@ multicast-dns@^7.2.5:
     dns-packet "^5.2.2"
     thunky "^1.0.2"
 
+mutation-observer@^1.0.3:
+  version "1.0.3"
+  resolved "http://124.70.149.18:4873/mutation-observer/-/mutation-observer-1.0.3.tgz#42e9222b101bca82e5ba9d5a7acf4a14c0f263d0"
+  integrity sha512-M/O/4rF2h776hV7qGMZUH3utZLO/jK7p8rnNgGkjKUw8zCGjRQPxB8z6+5l8+VjRUQ3dNYu4vjqXYLr+U8ZVNA==
+
 mz-modules@^2.1.0:
   version "2.1.0"
   resolved "http://124.70.149.18:4873/mz-modules/-/mz-modules-2.1.0.tgz#7f529877afd0d42f409a7463b96986d61cfbcf96"
@@ -8568,6 +8590,16 @@ vary@~1.1.2:
   resolved "http://124.70.149.18:4873/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
   integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
 
+vconsole@^3.15.1:
+  version "3.15.1"
+  resolved "http://124.70.149.18:4873/vconsole/-/vconsole-3.15.1.tgz#569a8ab15f353259527bbcf004f02946b4482cff"
+  integrity sha512-KH8XLdrq9T5YHJO/ixrjivHfmF2PC2CdVoK6RWZB4yftMykYIaXY1mxZYAic70vADM54kpMQF+dYmvl5NRNy1g==
+  dependencies:
+    "@babel/runtime" "^7.17.2"
+    copy-text-to-clipboard "^3.0.1"
+    core-js "^3.11.0"
+    mutation-observer "^1.0.3"
+
 vm2@^3.9.17:
   version "3.9.19"
   resolved "http://124.70.149.18:4873/vm2/-/vm2-3.9.19.tgz#be1e1d7a106122c6c492b4d51c2e8b93d3ed6a4a"