bill 12 giờ trước cách đây
mục cha
commit
f7c2896907
5 tập tin đã thay đổi với 868 bổ sung1146 xóa
  1. 836 1135
      pnpm-lock.yaml
  2. BIN
      public/images/download.png
  3. 18 8
      src/below.vue
  4. 1 0
      src/layout/edit/scene-select.vue
  5. 13 3
      src/utils/index.ts

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 836 - 1135
pnpm-lock.yaml


BIN
public/images/download.png


+ 18 - 8
src/below.vue

@@ -1,15 +1,13 @@
 <template>
   <div class="below-layout">
     <div class="content">
-      <img src="/images/err.png" alt="" />
+      <img :src="a" alt="" />
       <p>无法打开页面,请升级或更换浏览器后重新打开</p>
       <span>建议使用以下浏览器</span>
       <div class="list">
         <div v-for="item in items">
           <img :src="item.icon" />
-          <p>
-            <a :href="item.link"><ui-icon type="close" /> {{ item.name }}</a>
-          </p>
+          <p @click="useClickHandler(item.link)"><img :src="b" /> {{ item.name }}</p>
         </div>
       </div>
     </div>
@@ -17,6 +15,8 @@
 </template>
 
 <script lang="ts" setup>
+const a = "images/err.png";
+const b = "images/download.png";
 const items = [
   {
     name: "Firefox",
@@ -38,6 +38,11 @@ const items = [
     link: "https://www.google.com/chrome/",
   },
 ];
+
+const useClickHandler = (link: string) => {
+  console.log(link);
+  window.open(link);
+};
 </script>
 
 <style lang="scss" scoped>
@@ -52,7 +57,7 @@ const items = [
   .content {
     color: #999;
     text-align: center;
-    img {
+    > img {
       width: 200px;
     }
 
@@ -73,13 +78,18 @@ const items = [
   justify-content: center;
   margin-top: 20px;
 
-  a {
+  p {
     color: #999;
-    text-decoration: none;
+    cursor: pointer;
+    display: flex;
+    align-items: center;
+    img {
+      width: 16px;
+    }
   }
   > div {
     margin: 0 20px;
-    img {
+    > img {
       width: 70px !important;
     }
   }

+ 1 - 0
src/layout/edit/scene-select.vue

@@ -198,6 +198,7 @@ const cloumns = [
 ];
 
 const addModelHandler = createLoadPack(async (attachs: any[]) => {
+  await save();
   const items = attachs.map((attach) => {
     return {
       data: createFuseModels(),

+ 13 - 3
src/utils/index.ts

@@ -297,10 +297,20 @@ export function isFirefoxBelow(targetVersion = "115.9") {
   const navigator = window.navigator as any
   if (navigator.userAgentData && Array.isArray(navigator.userAgentData.brands)) {
     // brands 形如 [{brand: "Chromium", version: "116"}, ...] 或可能被 UA 凭空
+
+    const is360 = navigator.userAgentData.brands.some(item => /Not\(A:Brand/i.test(item.brand))
+    const isQax = navigator.userAgentData.brands.some(item => / Not A;Brand/i.test(item.brand))
+
     for (const b of navigator.userAgentData.brands) {
-      if (typeof b.brand === "string" && /firefox/i.test(b.brand)) {
-        const ver = b.version || "";
-        return compareVersionStrings(ver, targetVersion) < 0;
+      if (typeof b.brand !== "string") continue;
+
+      const ver = b.version || "";
+      if (/firefox/i.test(b.brand)) {
+        return compareVersionStrings(ver, '115.9') < 0;
+      } else if (/Chromium/i.test(b.brand)) {
+        const v = is360 ? '108' : isQax ? '108' : '128'
+        console.log('360?', is360, 'qax?', isQax, b.brand, '要求:', v)
+        return compareVersionStrings(ver, v) < 0;
       }
     }
   }