Commit 4e7e409c authored by haiyoucuv's avatar haiyoucuv

new 模板

parent dc30c192
......@@ -2,16 +2,15 @@
* Created by rockyl on 2019-12-10.
*/
export let queryParams: any = {};
export const queryParams: any = {};
let search = window.location.search;
try {
search = top.location.search; //尝试获取顶层的链接
} catch (e) {
}
} catch (e) { /* empty */ }
for (let item of search.replace('?', '').split('&')) {
let arr = item.split('=');
for (const item of search.replace('?', '').split('&')) {
const arr = item.split('=');
queryParams[arr[0]] = arr.length === 1 ? true : decodeURIComponent(arr[1]);
}
......@@ -26,7 +25,7 @@ export function appendScript(script, parent = document.body) {
}
if (script.indexOf('<script') === 0) {
let temp = document.createElement('div');
const temp = document.createElement('div');
temp.innerHTML = script;
for (let i = 0, li = temp.children.length; i < li; i++) {
......@@ -46,7 +45,7 @@ export function appendScript(script, parent = document.body) {
}
function _appendScript(scriptContent, parent) {
let scriptEl = document.createElement('script');
const scriptEl = document.createElement('script');
scriptEl.innerHTML = scriptContent;
parent.appendChild(scriptEl);
}
......
......@@ -41,6 +41,9 @@ export default defineConfig(({ mode }): UserConfig => {
}
},
assetsInclude: [/\.(svga)$/],
build:{
cssTarget: 'chrome61',
},
plugins: [
react({
babel: {
......
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