소스 검색

添加structureClone的polyfill以兼容支付宝浏览器

任一存 2 년 전
부모
커밋
c06375bb77
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      src/sdk/QJKanKan/modules/hotspot.js

+ 5 - 0
src/sdk/QJKanKan/modules/hotspot.js

@@ -4,6 +4,11 @@
  * 
  *  */
 // import config from '../config'
+if (!window.structuredClone) {
+  window.structuredClone = function(origin) {
+    return JSON.parse(JSON.stringify(origin))
+  }
+}
 
 const initState = {
     id: "",