dom.js.map 1.4 KB

1
  1. {"version":3,"sources":["../src/behaviors/dom.ts"],"names":[],"mappings":"AAAA,eAAe,QAAQ,CAAC;IACtB,OAAO,EAAE;QACP,yBAAyB,CAAC,QAAgB,EAAE,GAAY;YACtD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,IAAI;oBACF,EAAE,CAAC,mBAAmB,EAAE;yBACrB,EAAE,CAAC,IAAI,CAAC,CACR,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;yBACvC,kBAAkB,CAAC,CAAC,IAAI,EAAE,EAAE;wBAC3B,IAAI,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE;4BAC7C,OAAO,CAAC,IAAI,CAAC,CAAC;yBACf;6BAAM,IAAI,CAAC,GAAG,IAAI,IAAI,EAAE;4BACvB,OAAO,CAAC,IAAI,CAAC,CAAC;yBACf;6BAAM;4BACL,MAAM,EAAE,CAAC;yBACV;oBACH,CAAC,CAAC;yBACD,IAAI,EAAE,CAAC;iBACX;gBAAC,OAAO,GAAG,EAAE;oBACZ,MAAM,CAAC,GAAG,CAAC,CAAC;iBACb;YACH,CAAC,CAAC,CAAC;QACL,CAAC;KACF;CACF,CAAC,CAAC","file":"dom.js","sourcesContent":["export default Behavior({\n methods: {\n gettingBoundingClientRect(selector: string, all: boolean) {\n return new Promise((resolve, reject) => {\n try {\n wx.createSelectorQuery()\n .in(this)\n [all ? 'selectAll' : 'select'](selector)\n .boundingClientRect((rect) => {\n if (all && Array.isArray(rect) && rect.length) {\n resolve(rect);\n } else if (!all && rect) {\n resolve(rect);\n } else {\n reject();\n }\n })\n .exec();\n } catch (err) {\n reject(err);\n }\n });\n },\n },\n});\n"]}