bug修复
This commit is contained in:
parent
e6cbf356e6
commit
46bbea3fe5
13
src/App.vue
13
src/App.vue
@ -70,19 +70,18 @@ const getGlobalI18n = computed(() => {
|
|||||||
return messages.value[locale.value];
|
return messages.value[locale.value];
|
||||||
});
|
});
|
||||||
|
|
||||||
// 动态设置网站图标
|
|
||||||
let link: any = document.querySelector("link[rel*='icon']") || document.createElement("link");
|
|
||||||
link.type = "image/x-icon";
|
|
||||||
link.rel = "shortcut icon";
|
|
||||||
link.href = themeConfig.logoMini||logoMini;
|
|
||||||
document.getElementsByTagName("head")[0].appendChild(link);
|
|
||||||
|
|
||||||
// 设置初始化,防止刷新时恢复默认
|
// 设置初始化,防止刷新时恢复默认
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
// 设置批量第三方 icon 图标
|
// 设置批量第三方 icon 图标
|
||||||
setIntroduction.cssCdn();
|
setIntroduction.cssCdn();
|
||||||
// 设置批量第三方 js
|
// 设置批量第三方 js
|
||||||
setIntroduction.jsCdn();
|
setIntroduction.jsCdn();
|
||||||
|
// 动态设置网站图标
|
||||||
|
let link: any = document.querySelector("link[rel*='icon']") || document.createElement("link");
|
||||||
|
link.type = "image/x-icon";
|
||||||
|
link.rel = "shortcut icon";
|
||||||
|
link.href = themeConfig.logoMini||logoMini;
|
||||||
|
document.getElementsByTagName("head")[0].appendChild(link);
|
||||||
});
|
});
|
||||||
// 页面加载时
|
// 页面加载时
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -2,6 +2,18 @@ import axios from "axios";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
const downloadPhoto = (imgSrc:any) => {
|
const downloadPhoto = (imgSrc:any) => {
|
||||||
|
// 这个直接虚拟dom点击,不然会有跨域问题
|
||||||
|
if(imgSrc.includes('guojunjie.oss-cn-hangzhou.aliyuncs.com')){
|
||||||
|
const a = document.createElement('a');
|
||||||
|
a.href = imgSrc;
|
||||||
|
a.download = '下载图片.'+ imgSrc.substr(imgSrc.lastIndexOf('.')+1) || 'jpg';
|
||||||
|
document.body.appendChild(a);
|
||||||
|
a.click();
|
||||||
|
document.body.removeChild(a);
|
||||||
|
ElMessage({message: '图片下载成功!',type: 'success',});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
axios({
|
axios({
|
||||||
url: imgSrc,
|
url: imgSrc,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="login-container flex">
|
<div class="login-container flex">
|
||||||
<div class="login-left">
|
<div class="login-left">
|
||||||
<div class="login-left-logo">
|
<div class="login-left-logo">
|
||||||
<img :src="logoMini" />
|
<img :src="getThemeConfig.logoMini" />
|
||||||
<div class="login-left-logo-text">
|
<div class="login-left-logo-text">
|
||||||
<span>{{ getThemeConfig.globalTitle }}</span>
|
<span>{{ getThemeConfig.globalTitle }}</span>
|
||||||
<!-- <span class="login-left-logo-text-msg">{{ getThemeConfig.globalViceTitleMsg }}</span> -->
|
<!-- <span class="login-left-logo-text-msg">{{ getThemeConfig.globalViceTitleMsg }}</span> -->
|
||||||
|
Loading…
Reference in New Issue
Block a user