WXL
4 天以前 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1
node_modules/uview-plus/libs/util/gcanvas/env/image.js
@@ -1,5 +1,6 @@
let incId = 1;
import GBridge from '../bridge/bridge-weex.js'
const noop = function () { };
class GImage {
@@ -42,11 +43,15 @@
        }
        this._src = v;
        GImage.GBridge.perloadImage([this._src, this._id], (data) => {
      try {
         GBridge.perloadImage([this._src, this._id], (data) => {
            if (process.env.NODE_ENV === 'development') {
               console.log('****GBridge.perloadImage****')
            }
            if (typeof data === 'string') {
                data = JSON.parse(data);
            }
            if (data.error) {
                var evt = { type: 'error', target: this };
                this.onerror(evt);
@@ -58,6 +63,9 @@
                this.onload(evt);
            }
        });
      } catch (error) {
         console.log('perloadImage fail', error)
      }
    }
    addEventListener(name, listener) {