Commit d0d1cfc1 authored by wangtao's avatar wangtao

多语言图片

parent 75ea1be6
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* 这是一个图片展示的指令,用于在ios14及以下展示png类型的图片,ios14以上使用webp类型的图片, 安卓一律使用webp类型的图片 * 这是一个图片展示的指令,用于在ios14及以下展示png类型的图片,ios14以上使用webp类型的图片, 安卓一律使用webp类型的图片
*/ */
import { Directive, DirectiveBinding } from "vue"; import { Directive, DirectiveBinding } from "vue";
import handleApp from "@/utils/HandleApp"; // import handleApp from "@/utils/HandleApp";
import { getLocale } from "@/locales/locale"; import { getLocale } from "@/locales/locale";
const ENV = import.meta.env; const ENV = import.meta.env;
...@@ -44,12 +44,12 @@ const handleImg = ({ ele, src, onError }: HandleImg) => { ...@@ -44,12 +44,12 @@ const handleImg = ({ ele, src, onError }: HandleImg) => {
ele.src = `${baseDir}/${dirPath}/enpng/${fileName}.png`; ele.src = `${baseDir}/${dirPath}/enpng/${fileName}.png`;
}else{ }else{
if (handleApp.agent === "ios" && handleApp.iosVersion.minorVersion < 14) {
ele.src = `${baseDir}/${dirPath}/png/${fileName}.png`; ele.src = `${baseDir}/${dirPath}/png/${fileName}.png`;
} else { // if (handleApp.agent === "ios" && handleApp.iosVersion.minorVersion < 14) {
ele.src = `${baseDir}/${dirPath}/webp/${fileName}.webp`; // ele.src = `${baseDir}/${dirPath}/png/${fileName}.png`;
} // } else {
// ele.src = `${baseDir}/${dirPath}/webp/${fileName}.webp`;
// }
} }
ele.onerror = onError; ele.onerror = onError;
......
...@@ -37,7 +37,7 @@ import HandleApp from "@/utils/HandleApp"; ...@@ -37,7 +37,7 @@ import HandleApp from "@/utils/HandleApp";
> .shell > .shell
width 100% width 100%
height 75% height 100%
> .boost > .boost
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment