Files
supplier-dispatch-h5/node_modules/.cache/babel-loader/ec9b11c85658209ef094d4bf55f57347f6af933078fd29a055d8cf6912920133.json
2023-08-11 10:45:20 +08:00

1 line
3.2 KiB
JSON

{"ast":null,"code":"import { on, off } from '../utils/dom/event';\nimport { BindEventMixin } from './bind-event';\nexport var CloseOnPopstateMixin = {\n mixins: [BindEventMixin(function (bind, isBind) {\n this.handlePopstate(isBind && this.closeOnPopstate);\n })],\n props: {\n closeOnPopstate: Boolean\n },\n data: function data() {\n return {\n bindStatus: false\n };\n },\n watch: {\n closeOnPopstate: function closeOnPopstate(val) {\n this.handlePopstate(val);\n }\n },\n methods: {\n onPopstate: function onPopstate() {\n this.close();\n this.shouldReopen = false;\n },\n handlePopstate: function handlePopstate(bind) {\n /* istanbul ignore if */\n if (this.$isServer) {\n return;\n }\n if (this.bindStatus !== bind) {\n this.bindStatus = bind;\n var action = bind ? on : off;\n action(window, 'popstate', this.onPopstate);\n }\n }\n }\n};","map":{"version":3,"names":["on","off","BindEventMixin","CloseOnPopstateMixin","mixins","bind","isBind","handlePopstate","closeOnPopstate","props","Boolean","data","bindStatus","watch","val","methods","onPopstate","close","shouldReopen","$isServer","action","window"],"sources":["E:/work/sino/sino-h5/node_modules/vant/es/mixins/close-on-popstate.js"],"sourcesContent":["import { on, off } from '../utils/dom/event';\nimport { BindEventMixin } from './bind-event';\nexport var CloseOnPopstateMixin = {\n mixins: [BindEventMixin(function (bind, isBind) {\n this.handlePopstate(isBind && this.closeOnPopstate);\n })],\n props: {\n closeOnPopstate: Boolean\n },\n data: function data() {\n return {\n bindStatus: false\n };\n },\n watch: {\n closeOnPopstate: function closeOnPopstate(val) {\n this.handlePopstate(val);\n }\n },\n methods: {\n onPopstate: function onPopstate() {\n this.close();\n this.shouldReopen = false;\n },\n handlePopstate: function handlePopstate(bind) {\n /* istanbul ignore if */\n if (this.$isServer) {\n return;\n }\n\n if (this.bindStatus !== bind) {\n this.bindStatus = bind;\n var action = bind ? on : off;\n action(window, 'popstate', this.onPopstate);\n }\n }\n }\n};"],"mappings":"AAAA,SAASA,EAAE,EAAEC,GAAG,QAAQ,oBAAoB;AAC5C,SAASC,cAAc,QAAQ,cAAc;AAC7C,OAAO,IAAIC,oBAAoB,GAAG;EAChCC,MAAM,EAAE,CAACF,cAAc,CAAC,UAAUG,IAAI,EAAEC,MAAM,EAAE;IAC9C,IAAI,CAACC,cAAc,CAACD,MAAM,IAAI,IAAI,CAACE,eAAe,CAAC;EACrD,CAAC,CAAC,CAAC;EACHC,KAAK,EAAE;IACLD,eAAe,EAAEE;EACnB,CAAC;EACDC,IAAI,EAAE,SAASA,IAAIA,CAAA,EAAG;IACpB,OAAO;MACLC,UAAU,EAAE;IACd,CAAC;EACH,CAAC;EACDC,KAAK,EAAE;IACLL,eAAe,EAAE,SAASA,eAAeA,CAACM,GAAG,EAAE;MAC7C,IAAI,CAACP,cAAc,CAACO,GAAG,CAAC;IAC1B;EACF,CAAC;EACDC,OAAO,EAAE;IACPC,UAAU,EAAE,SAASA,UAAUA,CAAA,EAAG;MAChC,IAAI,CAACC,KAAK,CAAC,CAAC;MACZ,IAAI,CAACC,YAAY,GAAG,KAAK;IAC3B,CAAC;IACDX,cAAc,EAAE,SAASA,cAAcA,CAACF,IAAI,EAAE;MAC5C;MACA,IAAI,IAAI,CAACc,SAAS,EAAE;QAClB;MACF;MAEA,IAAI,IAAI,CAACP,UAAU,KAAKP,IAAI,EAAE;QAC5B,IAAI,CAACO,UAAU,GAAGP,IAAI;QACtB,IAAIe,MAAM,GAAGf,IAAI,GAAGL,EAAE,GAAGC,GAAG;QAC5BmB,MAAM,CAACC,MAAM,EAAE,UAAU,EAAE,IAAI,CAACL,UAAU,CAAC;MAC7C;IACF;EACF;AACF,CAAC"},"metadata":{},"sourceType":"module","externalDependencies":[]}