mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-06-22 18:00:14 +08:00
提交 all-in-one H5 本地适配
This commit is contained in:
@@ -241,10 +241,7 @@
|
||||
uuid._whatwgRNG = _whatwgRNG;
|
||||
|
||||
|
||||
if (('undefined' !== typeof module) && module.exports) {
|
||||
// Publish as node.js module
|
||||
module.exports = uuid;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// Publish as AMD module
|
||||
define(function() { return uuid; });
|
||||
} else {
|
||||
@@ -259,4 +256,7 @@
|
||||
|
||||
_window.uuid = uuid;
|
||||
}
|
||||
})('undefined' !== typeof window ? window : null);
|
||||
})('undefined' !== typeof window ? window : ('undefined' !== typeof globalThis ? globalThis : {}));
|
||||
|
||||
// uni-app H5 的 webpack 包装会把 CommonJS exports 标记为只读,避免使用 module.exports 重新赋值。
|
||||
export default ('undefined' !== typeof globalThis ? globalThis.uuid : undefined);
|
||||
|
||||
Reference in New Issue
Block a user