mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-19 12:04:02 +08:00
update inner check (#16700)
This commit is contained in:
@@ -380,7 +380,7 @@
|
||||
import compoLang from '../i18n/component.json';
|
||||
import Element from 'main/index.js';
|
||||
import themeLoader from './theme/loader';
|
||||
import { getTestEle, getTestAli } from './theme/loader/api.js';
|
||||
import { getTestEle } from './theme/loader/api.js';
|
||||
import bus from '../bus';
|
||||
import { ACTION_USER_CONFIG_UPDATE } from './theme/constant.js';
|
||||
|
||||
@@ -434,15 +434,17 @@
|
||||
ga('send', 'event', 'DocView', 'Ele', 'Outer');
|
||||
console.error(err);
|
||||
});
|
||||
getTestAli()
|
||||
.then(() => {
|
||||
this.$isEle = true;
|
||||
ga('send', 'event', 'DocView', 'Ali', 'Inner');
|
||||
})
|
||||
.catch((err) => {
|
||||
ga('send', 'event', 'DocView', 'Ali', 'Outer');
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
const testInnerImg = new Image();
|
||||
testInnerImg.onload = () => {
|
||||
this.$isEle = true;
|
||||
ga('send', 'event', 'DocView', 'Ali', 'Inner');
|
||||
};
|
||||
testInnerImg.onerror = (err) => {
|
||||
ga('send', 'event', 'DocView', 'Ali', 'Outer');
|
||||
console.error(err);
|
||||
};
|
||||
testInnerImg.src = `https://private-alipayobjects.alipay.com/alipay-rmsdeploy-image/rmsportal/VmvVUItLdPNqKlNGuRHi.png?t=${Date.now()}`;
|
||||
},
|
||||
methods: {
|
||||
switchVersion(version) {
|
||||
|
||||
Reference in New Issue
Block a user