You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
huazhiyu/unpackage/dist/dev/.sourcemap/mp-weixin/components/mescroll-uni/mescroll-uni.js.map

1 lines
32 KiB

{"version":3,"sources":["webpack:////Users/seep/Documents/liuqingProject/hezhiying/components/mescroll-uni/mescroll-uni.vue?6303","webpack:////Users/seep/Documents/liuqingProject/hezhiying/components/mescroll-uni/mescroll-uni.vue?203d","webpack:////Users/seep/Documents/liuqingProject/hezhiying/components/mescroll-uni/mescroll-uni.vue?fd8a","webpack:////Users/seep/Documents/liuqingProject/hezhiying/components/mescroll-uni/mescroll-uni.vue?8199","uni-app:///components/mescroll-uni/mescroll-uni.vue","webpack:////Users/seep/Documents/liuqingProject/hezhiying/components/mescroll-uni/mescroll-uni.vue?8d0e","webpack:////Users/seep/Documents/liuqingProject/hezhiying/components/mescroll-uni/mescroll-uni.vue?20c6","webpack:////Users/seep/Documents/liuqingProject/hezhiying/components/mescroll-uni/wxs/wxs.wxs?60c3","webpack:////Users/seep/Documents/liuqingProject/hezhiying/components/mescroll-uni/wxs/wxs.wxs?899a"],"names":["mixins","components","MescrollEmpty","MescrollTop","data","mescroll","optDown","optUp","viewId","downHight","downRate","downLoadType","upLoadType","isShowEmpty","isShowToTop","scrollTop","scrollAnim","windowTop","windowBottom","windowHeight","statusBarHeight","props","down","up","top","topbar","bottom","safearea","fixed","type","default","height","bottombar","computed","isFixed","scrollHeight","numTop","fixedTop","padTop","numBottom","fixedBottom","padBottom","isDownReset","transition","translateY","scrollable","isDownLoading","downRotate","downText","methods","toPx","num","scroll","emptyClick","toTopClick","setClientHeight","setTimeout","getClientInfo","query","view","success","created","inOffset","vm","outOffset","onMoving","showLoading","beforeEndDownScroll","endDownScroll","callback","showNoMore","hideUpScroll","empty","onShow","toTop","MeScroll","selector","uni","console","mounted"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAyc;AACzc;AACgE;AACL;AACa;;;AAGxE;AACgN;AAChN,gBAAgB,iNAAU;AAC1B,EAAE,kFAAM;AACR,EAAE,uaAAM;AACR,EAAE,gbAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,2aAAU;AACZ;AACA;;AAEA;AACqN;AACrN,WAAW,sOAAM,iBAAiB,8OAAM;;AAExC;AACe,gF;;;;;;;;;;;;AC3Bf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAA00B,CAAgB,0yBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;AC+E91B;AAEA;AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AATA;AAEA;AAAA;EAAA;IAAA;EAAA;AAAA;AAAA;EAAA;IAAA;EAAA;AAAA;AAAA,eASA;EACAA;EACAC;IACAC;IACAC;EACA;EACAC;IACA;MACAC;QAAAC;QAAAC;MAAA;MAAA;MACAC;MAAA;MACAC;MAAA;MACAC;MAAA;MACAC;MAAA;MACAC;MAAA;MACAC;MAAA;MACAC;MAAA;MACAC;MAAA;MACAC;MAAA;MACAC;MAAA;MACAC;MAAA;MACAC;MAAA;MACAC;IACA;EACA;;EACAC;IACAC;IAAA;IACAC;IAAA;IACAC;IAAA;IACAC;IAAA;IACAC;IAAA;IACAC;IAAA;IACAC;MAAA;MACAC;MACAC;IACA;IACAC;IAAA;IACAC;MAAA;MACAH;MACAC;IACA;EACA;EACAG;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;QACA;MACA;QACA;MACA;QACA;MACA;IACA;IACA;IACAC;MACA;IACA;IACAC;MACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;IACA;IACAC;MACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;MACA;QACA;UAAA;QACA;UAAA;QACA;UAAA;QACA;UAAA;QACA;UAAA;MAAA;IAEA;EACA;EACAC;IACA;IACAC;MACA;QACA;UACA;YAAA;YACAC;UACA;YAAA;YACAA;UACA;YAAA;YACA;UACA;QACA;UACA;UACA;UACA;QACA;MACA;MACA;IACA;IACA;IACAC;MAAA;MACA;QACA;MACA;IACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;MACA;IACA;IACA;IACAC;MAAA;MACA;QACA;QACA;UAAA;UACA;YACA;YACA;cACA;YACA;cAAA;cACA;cACAC;gBACA;cACA;YACA;UACA;QACA;MACA;IACA;IACA;IACAC;MACA;MAEAC;;MAEA;MACAC;QACAC;MACA;IACA;EACA;EACA;EACAC;IACA;IAEA;MACA;MACAvC;QACAwC;UACAC;QACA;QACAC;UACAD;QACA;QACAE;UACA;UACAF;UACAA;QACA;QACAG;UACAH;UACAA;QACA;QACAI;UACAJ;UACA;QACA;QACAK;UACAL;UACAA;UACAA;UACAA;YAAA;YACA;UACA;QACA;QACA;QACAM;UACAN;QACA;MACA;MACA;MACAxC;QACA;QACA2C;UACAH;QACA;QACA;QACAO;UACAP;QACA;QACA;QACAQ;UACAR;QACA;QACA;QACAS;UACAC;YAAA;YACAV;UACA;QACA;QACA;QACAW;UACAD;YAAA;YACAV;UACA;QACA;QACA;QACAM;UACAN;UACA;UACAA;QACA;MACA;IACA;IAEAY;IACA;MAAA;MAAA;IAAA;IACAA;;IAEA;IACAZ;IACAA;IACA;IACAA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACAA;;IAEA;IACAA;MACAA;MACA;QACA;QACAA;UACA;UACA;UACA;YACAa;UACA;YACAA;UAMA;UACAC;YACA;cACA;cACA;cACArD;cACA;cACAuC;cACAA;gBACAA;cACA;YACA;cACAe;YACA;UACA;QACA;QACA;MACA;MACA;MACA;QAAA;QACAf;QACAA;UACAA;QACA;MACA;QACAA;UAAA;UACAA;QACA;MACA;IACA;;IAEA;IACA;MACAA;IACA;EACA;EACAgB;IACA;IACA;EACA;AACA;AAAA,2B;;;;;;;;;;;;;AChaA;AAAA;AAAA;AAAA;AAAurC,CAAgB,umCAAG,EAAC,C;;;;;;;;;;;ACA3sC;AACA,OAAO,KAAU,EAAE,kBAKd;;;;;;;;;;;;;ACNL;AAAA;AAAA,wCAAgY,CAAgB,ubAAG,EAAC,C;;;;;;;;;;;;ACApZ;AAAe;AACf;AACA;AACA;AACA;AACA,M","file":"components/mescroll-uni/mescroll-uni.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./mescroll-uni.vue?vue&type=template&id=8f18eaf8&filter-modules=eyJ3eHNCaXoiOnsidHlwZSI6InNjcmlwdCIsImNvbnRlbnQiOiIiLCJzdGFydCI6MzUwMywiYXR0cnMiOnsic3JjIjoiLi93eHMvd3hzLnd4cyIsIm1vZHVsZSI6Ind4c0JpeiIsImxhbmciOiJ3eHMifSwiZW5kIjozNTAzfSwicmVuZGVyQml6Ijp7InR5cGUiOiJyZW5kZXJqcyIsImNvbnRlbnQiOiIiLCJzdGFydCI6MzYzMSwiYXR0cnMiOnsibW9kdWxlIjoicmVuZGVyQml6IiwibGFuZyI6ImpzIn0sImVuZCI6MzcxOH19&\"\nvar renderjs\nimport script from \"./mescroll-uni.vue?vue&type=script&lang=js&\"\nexport * from \"./mescroll-uni.vue?vue&type=script&lang=js&\"\nimport style0 from \"./mescroll-uni.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\n/* custom blocks */\nimport block0 from \"./wxs/wxs.wxs?vue&type=custom&index=0&blockType=script&issuerPath=%2FUsers%2Fseep%2FDocuments%2FliuqingProject%2Fhezhiying%2Fcomponents%2Fmescroll-uni%2Fmescroll-uni.vue&module=wxsBiz&lang=wxs\"\nif (typeof block0 === 'function') block0(component)\n\ncomponent.options.__file = \"components/mescroll-uni/mescroll-uni.vue\"\nexport default component.exports","export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./mescroll-uni.vue?vue&type=template&id=8f18eaf8&filter-modules=eyJ3eHNCaXoiOnsidHlwZSI6InNjcmlwdCIsImNvbnRlbnQiOiIiLCJzdGFydCI6MzUwMywiYXR0cnMiOnsic3JjIjoiLi93eHMvd3hzLnd4cyIsIm1vZHVsZSI6Ind4c0JpeiIsImxhbmciOiJ3eHMifSwiZW5kIjozNTAzfSwicmVuZGVyQml6Ijp7InR5cGUiOiJyZW5kZXJqcyIsImNvbnRlbnQiOiIiLCJzdGFydCI6MzYzMSwiYXR0cnMiOnsibW9kdWxlIjoicmVuZGVyQml6IiwibGFuZyI6ImpzIn0sImVuZCI6MzcxOH19&\"","var components\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./mescroll-uni.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./mescroll-uni.vue?vue&type=script&lang=js&\"","<template>\n\t<view class=\"mescroll-uni-warp\">\n\t\t<scroll-view :id=\"viewId\" class=\"mescroll-uni\" :class=\"{'mescroll-uni-fixed':isFixed}\" :style=\"{'height':scrollHeight,'padding-top':padTop,'padding-bottom':padBottom,'top':fixedTop,'bottom':fixedBottom}\" :scroll-top=\"scrollTop\" :scroll-with-animation=\"scrollAnim\" @scroll=\"scroll\" :scroll-y='scrollable' :enable-back-to-top=\"true\" :throttle=\"false\">\n\t\t\t<view class=\"mescroll-uni-content mescroll-render-touch\"\n\t\t\t@touchstart=\"wxsBiz.touchstartEvent\" \n\t\t\t@touchmove=\"wxsBiz.touchmoveEvent\" \n\t\t\t@touchend=\"wxsBiz.touchendEvent\" \n\t\t\t@touchcancel=\"wxsBiz.touchendEvent\"\n\t\t\t:change:prop=\"wxsBiz.propObserver\"\n\t\t\t:prop=\"wxsProp\">\n\t\t\t\t<!-- 状态栏 -->\n\t\t\t\t<view v-if=\"topbar&&statusBarHeight\" class=\"mescroll-topbar\" :style=\"{height: statusBarHeight+'px', background: topbar}\"></view>\n\t\t\n\t\t\t\t<view class=\"mescroll-wxs-content\" :style=\"{'transform': translateY, 'transition': transition}\" :change:prop=\"wxsBiz.callObserver\" :prop=\"callProp\">\n\t\t\t\t\t<!-- 下拉加载区域 (支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-down组件实现)-->\n\t\t\t\t\t<!-- <mescroll-down :option=\"mescroll.optDown\" :type=\"downLoadType\" :rate=\"downRate\"></mescroll-down> -->\n\t\t\t\t\t<view v-if=\"mescroll.optDown.use\" class=\"mescroll-downwarp\" :style=\"{'background':mescroll.optDown.bgColor,'color':mescroll.optDown.textColor}\">\n\t\t\t\t\t\t<view class=\"downwarp-content\">\n\t\t\t\t\t\t\t<view class=\"downwarp-progress mescroll-wxs-progress\" :class=\"{'mescroll-rotate': isDownLoading}\" :style=\"{'border-color':mescroll.optDown.textColor, 'transform': downRotate}\"></view>\n\t\t\t\t\t\t\t<view class=\"downwarp-tip\">{{downText}}</view>\n\t\t\t\t\t\t</view>\n\t\t\t\t\t</view>\n\n\t\t\t\t\t<!-- 列表内容 -->\n\t\t\t\t\t<slot></slot>\n\n\t\t\t\t\t<!-- 空布局 -->\n\t\t\t\t\t<mescroll-empty v-if=\"isShowEmpty\" :option=\"mescroll.optUp.empty\" @emptyclick=\"emptyClick\"></mescroll-empty>\n\n\t\t\t\t\t<!-- 上拉加载区域 (下拉刷新时不显示, 支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-up组件实现)-->\n\t\t\t\t\t<!-- <mescroll-up v-if=\"mescroll.optUp.use && !isDownLoading && upLoadType!==3\" :option=\"mescroll.optUp\" :type=\"upLoadType\"></mescroll-up> -->\n\t\t\t\t\t<view v-if=\"mescroll.optUp.use && !isDownLoading && upLoadType!==3\" class=\"mescroll-upwarp\" :style=\"{'background':mescroll.optUp.bgColor,'color':mescroll.optUp.textColor}\">\n\t\t\t\t\t\t<!-- 加载中 (此处不能用v-if,否则android小程序快速上拉可能会不断触发上拉回调) -->\n\t\t\t\t\t\t<view v-show=\"upLoadType===1\">\n\t\t\t\t\t\t\t<view class=\"upwarp-progress mescroll-rotate\" :style=\"{'border-color':mescroll.optUp.textColor}\"></view>\n\t\t\t\t\t\t\t<view class=\"upwarp-tip\">{{ mescroll.optUp.textLoading }}</view>\n\t\t\t\t\t\t</view>\n\t\t\t\t\t\t<!-- 无数据 -->\n\t\t\t\t\t\t<view v-if=\"upLoadType===2\" class=\"upwarp-nodata\">{{ mescroll.optUp.textNoMore }}</view>\n\t\t\t\t\t</view>\n\t\t\t\t</view>\n\t\t\t\n\t\t\t\t<!-- 底部是否偏移TabBar的高度(默认仅在H5端的tab页生效) -->\n\t\t\t\t<!-- #ifdef H5 -->\n\t\t\t\t<view v-if=\"bottombar && windowBottom>0\" class=\"mescroll-bottombar\" :style=\"{height: windowBottom+'px'}\"></view>\n\t\t\t\t<!-- #endif -->\n\t\t\t\t\n\t\t\t\t<!-- 适配iPhoneX -->\n\t\t\t\t<view v-if=\"safearea\" class=\"mescroll-safearea\"></view>\n\t\t\t</view>\n\t\t</scroll-view>\n\n\t\t<!-- 回到顶部按钮 (fixed元素,需写在scroll-view外面,防止滚动的时候抖动)-->\n\t\t<mescroll-top v-model=\"isShowToTop\" :option=\"mescroll.optUp.toTop\" @click=\"toTopClick\"></mescroll-top>\n\t\t\n\t\t<!-- #ifdef MP-WEIXIN || MP-QQ || APP-PLUS || H5 -->\n\t\t<!-- renderjs的数据载体,不可写在mescroll-downwarp内部,避免use为false时,载体丢失,无法更新数据 -->\n\t\t<view :change:prop=\"renderBiz.propObserver\" :prop=\"wxsProp\"></view>\n\t\t<!-- #endif -->\n\t</view>\n</template>\n\n<!-- 微信小程序, QQ小程序, app, h5使用wxs -->\n<!-- #ifdef MP-WEIXIN || MP-QQ || APP-PLUS || H5 -->\n<script src=\"./wxs/wxs.wxs\" module=\"wxsBiz\" lang=\"wxs\"></script>\n<!-- #endif -->\n\n<!-- app, h5使用renderjs -->\n<!-- #ifdef APP-PLUS || H5 -->\n<script module=\"renderBiz\" lang=\"renderjs\">\n\timport renderBiz from './wxs/renderjs.js';\n\texport default {\n\t\tmixins:[renderBiz]\n\t}\n</script>\n<!-- #endif -->\n\n<script>\n\t// 引入mescroll-uni.js,处理核心逻辑\n\timport MeScroll from './mescroll-uni.js';\n\t// 引入全局配置\n\timport GlobalOption from './mescroll-uni-option.js';\n\t// 引入空布局组件\n\timport MescrollEmpty from './components/mescroll-empty.vue';\n\t// 引入回到顶部组件\n\timport MescrollTop from './components/mescroll-top.vue';\n\t// 引入兼容wxs(含renderjs)写法的mixins\n\timport WxsMixin from './wxs/mixins.js';\n\t\n\texport default {\n\t\tmixins: [WxsMixin],\n\t\tcomponents: {\n\t\t\tMescrollEmpty,\n\t\t\tMescrollTop\n\t\t},\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tmescroll: {optDown:{},optUp:{}}, // mescroll实例\n\t\t\t\tviewId: 'id_' + Math.random().toString(36).substr(2,16), // 随机生成mescroll的id(不能数字开头,否则找不到元素)\n\t\t\t\tdownHight: 0, //下拉刷新: 容器高度\n\t\t\t\tdownRate: 0, // 下拉比率(inOffset: rate<1; outOffset: rate>=1)\n\t\t\t\tdownLoadType: 0, // 下拉刷新状态: 0(loading前), 1(inOffset), 2(outOffset), 3(showLoading), 4(endDownScroll)\n\t\t\t\tupLoadType: 0, // 上拉加载状态: 0(loading前), 1loading中, 2没有更多了,显示END文本提示, 3(没有更多了,不显示END文本提示)\n\t\t\t\tisShowEmpty: false, // 是否显示空布局\n\t\t\t\tisShowToTop: false, // 是否显示回到顶部按钮\n\t\t\t\tscrollTop: 0, // 滚动条的位置\n\t\t\t\tscrollAnim: false, // 是否开启滚动动画\n\t\t\t\twindowTop: 0, // 可使用窗口的顶部位置\n\t\t\t\twindowBottom: 0, // 可使用窗口的底部位置\n\t\t\t\twindowHeight: 0, // 可使用窗口的高度\n\t\t\t\tstatusBarHeight: 0 // 状态栏高度\n\t\t\t}\n\t\t},\n\t\tprops: {\n\t\t\tdown: Object, // 下拉刷新的参数配置\n\t\t\tup: Object, // 上拉加载的参数配置\n\t\t\ttop: [String, Number], // 下拉布局往下的偏移量 (支持20, \"20rpx\", \"20px\", \"20%\"格式的值, 其中纯数字则默认单位rpx, 百分比则相对于windowHeight)\n\t\t\ttopbar: [Boolean, String], // top的偏移量是否加上状态栏高度, 默认false (使用场景:取消原生导航栏时,配置此项可留出状态栏的占位, 支持传入字符串背景,如色值,背景图,渐变)\n\t\t\tbottom: [String, Number], // 上拉布局往上的偏移量 (支持20, \"20rpx\", \"20px\", \"20%\"格式的值, 其中纯数字则默认单位rpx, 百分比则相对于windowHeight)\n\t\t\tsafearea: Boolean, // bottom的偏移量是否加上底部安全区的距离, 默认false (需要适配iPhoneX时使用)\n\t\t\tfixed: { // 是否通过fixed固定mescroll的高度, 默认true\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: true\n\t\t\t},\n\t\t\theight: [String, Number], // 指定mescroll的高度, 此项有值,则不使用fixed. (支持20, \"20rpx\", \"20px\", \"20%\"格式的值, 其中纯数字则默认单位rpx, 百分比则相对于windowHeight)\n\t\t\tbottombar:{ // 底部是否偏移TabBar的高度(默认仅在H5端的tab页生效)\n\t\t\t\ttype: Boolean,\n\t\t\t\tdefault: true\n\t\t\t}\n\t\t},\n\t\tcomputed: {\n\t\t\t// 是否使用fixed定位 (当height有值,则不使用)\n\t\t\tisFixed(){\n\t\t\t\treturn !this.height && this.fixed\n\t\t\t},\n\t\t\t// mescroll的高度\n\t\t\tscrollHeight(){\n\t\t\t\tif (this.isFixed) {\n\t\t\t\t\treturn \"auto\"\n\t\t\t\t} else if(this.height){\n\t\t\t\t\treturn this.toPx(this.height) + 'px'\n\t\t\t\t}else{\n\t\t\t\t\treturn \"100%\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t// 下拉布局往下偏移的距离 (px)\n\t\t\tnumTop() {\n\t\t\t\treturn this.toPx(this.top)\n\t\t\t},\n\t\t\tfixedTop() {\n\t\t\t\treturn this.isFixed ? (this.numTop + this.windowTop) + 'px' : 0\n\t\t\t},\n\t\t\tpadTop() {\n\t\t\t\treturn !this.isFixed ? this.numTop + 'px' : 0\n\t\t\t},\n\t\t\t// 上拉布局往上偏移 (px)\n\t\t\tnumBottom() {\n\t\t\t\treturn this.toPx(this.bottom)\n\t\t\t},\n\t\t\tfixedBottom() {\n\t\t\t\treturn this.isFixed ? (this.numBottom + this.windowBottom) + 'px' : 0\n\t\t\t},\n\t\t\tpadBottom() {\n\t\t\t\treturn !this.isFixed ? this.numBottom + 'px' : 0\n\t\t\t},\n\t\t\t// 是否为重置下拉的状态\n\t\t\tisDownReset(){\n\t\t\t\treturn this.downLoadType===3 || this.downLoadType===4\n\t\t\t},\n\t\t\t// 过渡\n\t\t\ttransition() {\n\t\t\t\treturn this.isDownReset ? 'transform 300ms' : '';\n\t\t\t},\n\t\t\ttranslateY() {\n\t\t\t\treturn this.downHight > 0 ? 'translateY(' + this.downHight + 'px)' : ''; // transform会使fixed失效,需注意把fixed元素写在mescroll之外\n\t\t\t},\n\t\t\t// 列表是否可滑动\n\t\t\tscrollable(){\n\t\t\t\treturn this.downLoadType===0 || this.isDownReset\n\t\t\t},\n\t\t\t// 是否在加载中\n\t\t\tisDownLoading(){\n\t\t\t\treturn this.downLoadType === 3\n\t\t\t},\n\t\t\t// 旋转的角度\n\t\t\tdownRotate(){\n\t\t\t\treturn 'rotate(' + 360 * this.downRate + 'deg)'\n\t\t\t},\n\t\t\t// 文本提示\n\t\t\tdownText(){\n\t\t\t\tif(!this.mescroll) return \"\"; // 避免头条小程序初始化时报错\n\t\t\t\tswitch (this.downLoadType){\n\t\t\t\t\tcase 1: return this.mescroll.optDown.textInOffset;\n\t\t\t\t\tcase 2: return this.mescroll.optDown.textOutOffset;\n\t\t\t\t\tcase 3: return this.mescroll.optDown.textLoading;\n\t\t\t\t\tcase 4: return this.mescroll.isDownEndSuccess ? this.mescroll.optDown.textSuccess : this.mescroll.isDownEndSuccess==false ? this.mescroll.optDown.textErr : this.mescroll.optDown.textInOffset;\n\t\t\t\t\tdefault: return this.mescroll.optDown.textInOffset;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\t//number,rpx,upx,px,% --> px的数值\n\t\t\ttoPx(num){\n\t\t\t\tif(typeof num === \"string\"){\n\t\t\t\t\tif (num.indexOf('px') !== -1) {\n\t\t\t\t\t\tif(num.indexOf('rpx') !== -1) { // \"10rpx\"\n\t\t\t\t\t\t\tnum = num.replace('rpx', '');\n\t\t\t\t\t\t} else if(num.indexOf('upx') !== -1) { // \"10upx\"\n\t\t\t\t\t\t\tnum = num.replace('upx', '');\n\t\t\t\t\t\t} else { // \"10px\"\n\t\t\t\t\t\t\treturn Number(num.replace('px', ''))\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if (num.indexOf('%') !== -1){\n\t\t\t\t\t\t// 传百分比,则相对于windowHeight,传\"10%\"则等于windowHeight的10%\n\t\t\t\t\t\tlet rate = Number(num.replace(\"%\",\"\")) / 100\n\t\t\t\t\t\treturn this.windowHeight * rate\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn num ? uni.upx2px(Number(num)) : 0\n\t\t\t},\n\t\t\t//注册列表滚动事件,用于下拉刷新和上拉加载\n\t\t\tscroll(e) {\n\t\t\t\tthis.mescroll.scroll(e.detail, () => {\n\t\t\t\t\tthis.$emit('scroll', this.mescroll) // 此时可直接通过 this.mescroll.scrollTop获取滚动条位置; this.mescroll.isScrollUp获取是否向上滑动\n\t\t\t\t})\n\t\t\t},\n\t\t\t// 点击空布局的按钮回调\n\t\t\temptyClick() {\n\t\t\t\tthis.$emit('emptyclick', this.mescroll)\n\t\t\t},\n\t\t\t// 点击回到顶部的按钮回调\n\t\t\ttoTopClick() {\n\t\t\t\tthis.mescroll.scrollTo(0, this.mescroll.optUp.toTop.duration); // 执行回到顶部\n\t\t\t\tthis.$emit('topclick', this.mescroll); // 派发点击回到顶部按钮的回调\n\t\t\t},\n\t\t\t// 更新滚动区域的高度 (使内容不满屏和到底,都可继续翻页)\n\t\t\tsetClientHeight() {\n\t\t\t\tif (this.mescroll.getClientHeight(true) === 0 && !this.isExec) {\n\t\t\t\t\tthis.isExec = true; // 避免多次获取\n\t\t\t\t\tthis.$nextTick(() => { // 确保dom已渲染\n\t\t\t\t\t\tthis.getClientInfo(data=>{\n\t\t\t\t\t\t\tthis.isExec = false;\n\t\t\t\t\t\t\tif (data) {\n\t\t\t\t\t\t\t\tthis.mescroll.setClientHeight(data.height);\n\t\t\t\t\t\t\t} else if (this.clientNum != 3) { // 极少部分情况,可能dom还未渲染完毕,递归获取,最多重试3次\n\t\t\t\t\t\t\t\tthis.clientNum = this.clientNum == null ? 1 : this.clientNum + 1;\n\t\t\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\t\t\tthis.setClientHeight()\n\t\t\t\t\t\t\t\t}, this.clientNum * 100)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t},\n\t\t\t// 获取滚动区域的信息\n\t\t\tgetClientInfo(success){\n\t\t\t\tlet query = uni.createSelectorQuery();\n\t\t\t\t// #ifndef MP-ALIPAY || MP-DINGTALK\n\t\t\t\tquery = query.in(this) // 支付宝小程序不支持in(this),而字节跳动小程序必须写in(this), 否则都取不到值\n\t\t\t\t// #endif\n\t\t\t\tlet view = query.select('#' + this.viewId);\n\t\t\t\tview.boundingClientRect(data => {\n\t\t\t\t\tsuccess(data)\n\t\t\t\t}).exec();\n\t\t\t}\n\t\t},\n\t\t// 使用created初始化mescroll对象; 如果用mounted部分css样式编译到H5会失效\n\t\tcreated() {\n\t\t\tlet vm = this;\n\n\t\t\tlet diyOption = {\n\t\t\t\t// 下拉刷新的配置\n\t\t\t\tdown: {\n\t\t\t\t\tinOffset() {\n\t\t\t\t\t\tvm.downLoadType = 1; // 下拉的距离进入offset范围内那一刻的回调 (自定义mescroll组件时,此行不可删)\n\t\t\t\t\t},\n\t\t\t\t\toutOffset() {\n\t\t\t\t\t\tvm.downLoadType = 2; // 下拉的距离大于offset那一刻的回调 (自定义mescroll组件时,此行不可删)\n\t\t\t\t\t},\n\t\t\t\t\tonMoving(mescroll, rate, downHight) {\n\t\t\t\t\t\t// 下拉过程中的回调,滑动过程一直在执行;\n\t\t\t\t\t\tvm.downHight = downHight; // 设置下拉区域的高度 (自定义mescroll组件时,此行不可删)\n\t\t\t\t\t\tvm.downRate = rate; //下拉比率 (inOffset: rate<1; outOffset: rate>=1)\n\t\t\t\t\t},\n\t\t\t\t\tshowLoading(mescroll, downHight) {\n\t\t\t\t\t\tvm.downLoadType = 3; // 显示下拉刷新进度的回调 (自定义mescroll组件时,此行不可删)\n\t\t\t\t\t\tvm.downHight = downHight; // 设置下拉区域的高度 (自定义mescroll组件时,此行不可删)\n\t\t\t\t\t},\n\t\t\t\t\tbeforeEndDownScroll(mescroll){\n\t\t\t\t\t\tvm.downLoadType = 4; \n\t\t\t\t\t\treturn mescroll.optDown.beforeEndDelay // 延时结束的时长\n\t\t\t\t\t},\n\t\t\t\t\tendDownScroll() {\n\t\t\t\t\t\tvm.downLoadType = 4; // 结束下拉 (自定义mescroll组件时,此行不可删)\n\t\t\t\t\t\tvm.downHight = 0; // 设置下拉区域的高度 (自定义mescroll组件时,此行不可删)\n\t\t\t\t\t\tvm.downResetTimer && clearTimeout(vm.downResetTimer)\n\t\t\t\t\t\tvm.downResetTimer = setTimeout(()=>{ // 过渡动画执行完毕后,需重置为0的状态,以便置空this.transition,避免iOS小程序列表渲染不完整\n\t\t\t\t\t\t\tif(vm.downLoadType===4) vm.downLoadType = 0\n\t\t\t\t\t\t},300)\n\t\t\t\t\t},\n\t\t\t\t\t// 派发下拉刷新的回调\n\t\t\t\t\tcallback: function(mescroll) {\n\t\t\t\t\t\tvm.$emit('down', mescroll)\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t// 上拉加载的配置\n\t\t\t\tup: {\n\t\t\t\t\t// 显示加载中的回调\n\t\t\t\t\tshowLoading() {\n\t\t\t\t\t\tvm.upLoadType = 1;\n\t\t\t\t\t},\n\t\t\t\t\t// 显示无更多数据的回调\n\t\t\t\t\tshowNoMore() {\n\t\t\t\t\t\tvm.upLoadType = 2;\n\t\t\t\t\t},\n\t\t\t\t\t// 隐藏上拉加载的回调\n\t\t\t\t\thideUpScroll(mescroll) {\n\t\t\t\t\t\tvm.upLoadType = mescroll.optUp.hasNext ? 0 : 3;\n\t\t\t\t\t},\n\t\t\t\t\t// 空布局\n\t\t\t\t\tempty: {\n\t\t\t\t\t\tonShow(isShow) { // 显示隐藏的回调\n\t\t\t\t\t\t\tvm.isShowEmpty = isShow;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t// 回到顶部\n\t\t\t\t\ttoTop: {\n\t\t\t\t\t\tonShow(isShow) { // 显示隐藏的回调\n\t\t\t\t\t\t\tvm.isShowToTop = isShow;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t// 派发上拉加载的回调\n\t\t\t\t\tcallback: function(mescroll) {\n\t\t\t\t\t\tvm.$emit('up', mescroll);\n\t\t\t\t\t\t// 更新容器的高度 (多mescroll的情况)\n\t\t\t\t\t\tvm.setClientHeight()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tMeScroll.extend(diyOption, GlobalOption); // 混入全局的配置\n\t\t\tlet myOption = JSON.parse(JSON.stringify({'down': vm.down,'up': vm.up})) // 深拷贝,避免对props的影响\n\t\t\tMeScroll.extend(myOption, diyOption); // 混入具体界面的配置\n\n\t\t\t// 初始化MeScroll对象\n\t\t\tvm.mescroll = new MeScroll(myOption);\n\t\t\tvm.mescroll.viewId = vm.viewId; // 附带id\n\t\t\t// init回调mescroll对象\n\t\t\tvm.$emit('init', vm.mescroll);\n\t\t\t\n\t\t\t// 设置高度\n\t\t\tconst sys = uni.getSystemInfoSync();\n\t\t\tif(sys.windowTop) vm.windowTop = sys.windowTop;\n\t\t\tif(sys.windowBottom) vm.windowBottom = sys.windowBottom;\n\t\t\tif(sys.windowHeight) vm.windowHeight = sys.windowHeight;\n\t\t\tif(sys.statusBarHeight) vm.statusBarHeight = sys.statusBarHeight;\n\t\t\t// 使down的bottomOffset生效\n\t\t\tvm.mescroll.setBodyHeight(sys.windowHeight);\n\n\t\t\t// 因为使用的是scrollview,这里需自定义scrollTo\n\t\t\tvm.mescroll.resetScrollTo((y, t) => {\n\t\t\t\tvm.scrollAnim = (t !== 0); // t为0,则不使用动画过渡\n\t\t\t\tif(typeof y === 'string'){\n\t\t\t\t\t// 小程序不支持slot里面的scroll-into-view, 统一使用计算的方式实现\n\t\t\t\t\tvm.getClientInfo(function(rect){\n\t\t\t\t\t\tlet mescrollTop = rect.top // mescroll到顶部的距离\n\t\t\t\t\t\tlet selector;\n\t\t\t\t\t\tif(y.indexOf('#')==-1 && y.indexOf('.')==-1){\n\t\t\t\t\t\t\tselector = '#'+y // 不带#和. 则默认为id选择器\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tselector = y\n\t\t\t\t\t\t\t// #ifdef APP-PLUS || H5 || MP-ALIPAY || MP-DINGTALK\n\t\t\t\t\t\t\tif(y.indexOf('>>>')!=-1){ // 不支持跨自定义组件的后代选择器 (转为普通的选择器即可跨组件查询)\n\t\t\t\t\t\t\t\tselector = y.split('>>>')[1].trim()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// #endif\n\t\t\t\t\t\t}\n\t\t\t\t\t\tuni.createSelectorQuery().select(selector).boundingClientRect(function(rect){\n\t\t\t\t\t\t\tif (rect) {\n\t\t\t\t\t\t\t\tlet curY = vm.mescroll.getScrollTop()\n\t\t\t\t\t\t\t\tlet top = rect.top - mescrollTop\n\t\t\t\t\t\t\t\ttop += curY\n\t\t\t\t\t\t\t\tif(!vm.isFixed) top -= vm.numTop\n\t\t\t\t\t\t\t\tvm.scrollTop = curY;\n\t\t\t\t\t\t\t\tvm.$nextTick(function() {\n\t\t\t\t\t\t\t\t\tvm.scrollTop = top\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t} else{\n\t\t\t\t\t\t\t\tconsole.error(selector + ' does not exist');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).exec()\n\t\t\t\t\t})\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlet curY = vm.mescroll.getScrollTop()\n\t\t\t\tif (t === 0 || t === 300) { // 当t使用默认配置的300时,则使用系统自带的动画过渡\n\t\t\t\t\tvm.scrollTop = curY;\n\t\t\t\t\tvm.$nextTick(function() {\n\t\t\t\t\t\tvm.scrollTop = y\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tvm.mescroll.getStep(curY, y, step => { // 此写法可支持配置t\n\t\t\t\t\t\tvm.scrollTop = step\n\t\t\t\t\t}, t)\n\t\t\t\t}\n\t\t\t})\n\t\t\t\n\t\t\t// 具体的界面如果不配置up.toTop.safearea,则取本vue的safearea值\n\t\t\tif (vm.up && vm.up.toTop && vm.up.toTop.safearea != null) {} else {\n\t\t\t\tvm.mescroll.optUp.toTop.safearea = vm.safearea;\n\t\t\t}\n\t\t},\n\t\tmounted() {\n\t\t\t// 设置容器的高度\n\t\t\tthis.setClientHeight()\n\t\t}\n\t}\n</script>\n\n<style>\n\t@import \"./mescroll-uni.css\";\n\t@import \"./components/mescroll-down.css\";\n\t@import './components/mescroll-up.css';\n</style>\n","import mod from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./mescroll-uni.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./mescroll-uni.vue?vue&type=style&index=0&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1697873048150\n var cssReload = require(\"/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n ","import mod from \"-!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-filter-loader/index.js!./wxs.wxs?vue&type=custom&index=0&blockType=script&issuerPath=%2FUsers%2Fseep%2FDocuments%2FliuqingProject%2Fhezhiying%2Fcomponents%2Fmescroll-uni%2Fmescroll-uni.vue&module=wxsBiz&lang=wxs\"; export default mod; export * from \"-!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-filter-loader/index.js!./wxs.wxs?vue&type=custom&index=0&blockType=script&issuerPath=%2FUsers%2Fseep%2FDocuments%2FliuqingProject%2Fhezhiying%2Fcomponents%2Fmescroll-uni%2Fmescroll-uni.vue&module=wxsBiz&lang=wxs\"","export default function (Component) {\n if(!Component.options.wxsCallMethods){\n Component.options.wxsCallMethods = []\n }\n Component.options.wxsCallMethods.push('wxsCall')\n }"],"sourceRoot":""}