dolphin-weex-ui 2.3.7 → 2.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/index.native.js +19 -12
- package/dist/index.native.js.map +1 -1
- package/dist/index.web.js +12 -8
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
- package/packages/dof-mask/index.vue +1 -3
- package/packages/dof-refresher/index.vue +11 -7
package/dist/index.web.js
CHANGED
|
@@ -8224,7 +8224,7 @@ exports = module.exports = __webpack_require__(0)(true);
|
|
|
8224
8224
|
|
|
8225
8225
|
|
|
8226
8226
|
// module
|
|
8227
|
-
exports.push([module.i, "\n.container[data-v-2bc0ee67] {\n position: fixed;\n /* width: 750px; */\n /*兼容H5异常*/\n z-index: 99999;\n}\n.dof-mask[data-v-2bc0ee67] {\n position: fixed;\n z-index: 1003;\n}\n.mask-bottom[data-v-2bc0ee67] {\n margin-top: 1.22667rem;\n background-color: transparent;\n /* background-color: #00A4F2; */\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n.closeIcon[data-v-2bc0ee67] {\n width: 0.93333rem;\n height: 0.93333rem;\n z-index: 999;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-mask/index.vue?
|
|
8227
|
+
exports.push([module.i, "\n.container[data-v-2bc0ee67] {\n position: fixed;\n /* width: 750px; */\n /*兼容H5异常*/\n z-index: 99999;\n}\n.dof-mask[data-v-2bc0ee67] {\n position: fixed;\n z-index: 1003;\n}\n.mask-bottom[data-v-2bc0ee67] {\n margin-top: 1.22667rem;\n background-color: transparent;\n /* background-color: #00A4F2; */\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n.closeIcon[data-v-2bc0ee67] {\n width: 0.93333rem;\n height: 0.93333rem;\n z-index: 999;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-mask/index.vue?5aa0cdb6"],"names":[],"mappings":";AAsBA;EACA,gBAAA;EACA,mBAAA;EACA,UAAA;EACA,eAAA;CACA;AAEA;EACA,gBAAA;EACA,cAAA;CACA;AAEA;EACA,uBAAA;EACA,8BAAA;EACA,gCAAA;EACA,yBAAA;EAAA,gCAAA;UAAA,wBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;CACA;AAEA;EACA,kBAAA;EACA,mBAAA;EACA,aAAA;CACA","file":"index.vue","sourcesContent":["<template>\n <div class=\"container\">\n <dof-overlay\n :show=\"show && hasOverlay\"\n v-if=\"show\"\n v-bind=\"mergeOverlayCfg\"\n :opacity=\"opacity\"\n @dofOverlayBodyClicked=\"dofOverlayBodyClicked\"\n ></dof-overlay>\n <div ref=\"dof-mask\" class=\"dof-mask\" v-if=\"show\" :hack=\"shouldShow\" :style=\"maskStyle\">\n <div :style=\"contentStyle\">\n <slot></slot>\n </div>\n <div class=\"mask-bottom\" :style=\"{ width: width + 'px' }\" v-if=\"showClose\">\n <!-- <dof-image :src=\"closeIcon\" :placeholder='closeIcon' @click=\"cancel\" class=\"closeIcon\"></dof-image> -->\n <image class=\"closeIcon\" @click=\"cancel\" :placeholder=\"localCloseIcon\" :src=\"closeIcon\"></image>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.container {\n position: fixed;\n /* width: 750px; */\n /*兼容H5异常*/\n z-index: 99999;\n}\n\n.dof-mask {\n position: fixed;\n z-index: 1003;\n}\n\n.mask-bottom {\n margin-top: 92px;\n background-color: transparent;\n /* background-color: #00A4F2; */\n justify-content: center;\n align-items: center;\n}\n\n.closeIcon {\n width: 70px;\n height: 70px;\n z-index: 999;\n}\n</style>\n\n<script>\nconst animation = weex.requireModule('animation')\nimport DofOverlay from '../dof-overlay'\nimport DofImage from '../dof-image'\nimport Icon from '../setting/icon.base64'\nconst modal = weex.requireModule('modal')\n\nexport default {\n components: { DofOverlay, DofImage },\n props: {\n height: {\n type: [String, Number],\n default: 800\n },\n width: {\n type: [String, Number],\n default: 540\n },\n top: {\n type: Number,\n default: 0\n },\n show: {\n type: Boolean,\n default: false\n },\n showClose: {\n type: Boolean,\n default: true\n },\n duration: {\n type: [String, Number],\n default: 300\n },\n hasOverlay: {\n type: Boolean,\n default: true\n },\n hasAnimation: {\n type: Boolean,\n default: true\n },\n timingFunction: {\n type: Array,\n default: () => ['ease-in', 'ease-out']\n },\n overlayCfg: {\n type: Object,\n default: () => ({\n hasAnimation: true,\n // timingFunction: ['ease-in', 'ease-out'],\n timingFunction: 'cubic-bezier(0.25, 0.1, 0.25, 1.0)',\n canAutoClose: false,\n duration: 300,\n opacity: 0.3\n })\n },\n borderRadius: {\n type: [String, Number],\n default: 32\n },\n // overlayCanClose: {\n // type: Boolean,\n // default: true\n // },\n maskBgColor: {\n type: String,\n // default: '#ffffff'\n default: 'transparent'\n },\n opacity: {\n type: [Number, String],\n default: 0.3\n },\n screenWidth: {\n type: Number,\n default: 750\n }\n },\n data: () => ({\n localCloseIcon: '/assets/img/check/home_ic_closepop@3x.png',\n closeIcon: Icon.closeIcon,\n maskTop: 264,\n opened: false\n }),\n computed: {\n mergeOverlayCfg() {\n return {\n ...this.overlayCfg,\n hasAnimation: this.hasAnimation\n }\n },\n maskStyle() {\n const { width, height, showClose, hasAnimation, opened, top, screenWidth } = this\n const newHeight = showClose ? height - 0 + 180 : height\n const { deviceHeight, deviceWidth, platform } = weex.config.env\n const _deviceHeight = deviceHeight || 1334\n const isWeb = typeof window === 'object' && platform.toLowerCase() === 'web'\n const navHeight = isWeb ? 0 : 130\n const pageHeight = (_deviceHeight / deviceWidth) * screenWidth - navHeight\n return {\n width: width + 'px',\n height: newHeight + 'px',\n left: (screenWidth - width) / 2 + 'px',\n top: (top || (pageHeight - height) / 2) + 'px',\n opacity: hasAnimation && !opened ? 0 : 1\n }\n },\n contentStyle() {\n return {\n width: this.width + 'px',\n backgroundColor: this.maskBgColor,\n height: this.height + 'px',\n borderRadius: this.borderRadius + 'px',\n overflow: 'hidden'\n }\n },\n shouldShow() {\n const { show, hasAnimation } = this\n hasAnimation &&\n setTimeout(() => {\n this.appearMask(show)\n }, 50)\n return show\n }\n },\n methods: {\n // bottombar click to close\n closeIconClicked() {\n console.log('closeIconClicked...')\n this.appearMask(false)\n },\n\n onImageLoad(event) {\n modal.toast({\n message: `event:${JSON.stringify(event)}`\n })\n if (event.success) {\n // Do something to hanlde success\n }\n },\n\n cancel() {\n this.appearMask(false)\n },\n\n dofOverlayBodyClicked() {\n // console.log(\"mergeOverlayCfg\",this.mergeOverlayCfg)\n console.log('this.overlayCfg.overlayCanClose', this.mergeOverlayCfg.canAutoClose)\n if (this.mergeOverlayCfg.canAutoClose) {\n this.show && this.appearMask(false)\n }\n },\n needEmit(bool = false) {\n this.opened = bool\n !bool && this.$emit('dofMaskSetHidden', {})\n },\n appearMask(bool, duration = this.duration) {\n const { hasAnimation, timingFunction } = this\n const maskEl = this.$refs['dof-mask']\n if (hasAnimation && maskEl) {\n animation.transition(\n maskEl,\n {\n styles: {\n opacity: bool ? 1 : 0\n },\n duration,\n timingFunction: timingFunction[bool ? 0 : 1],\n delay: 0\n },\n () => {\n this.needEmit(bool)\n }\n )\n } else {\n this.needEmit(bool)\n }\n }\n }\n}\n</script>\n"],"sourceRoot":""}]);
|
|
8228
8228
|
|
|
8229
8229
|
// exports
|
|
8230
8230
|
|
|
@@ -9274,7 +9274,7 @@ exports = module.exports = __webpack_require__(0)(true);
|
|
|
9274
9274
|
|
|
9275
9275
|
|
|
9276
9276
|
// module
|
|
9277
|
-
exports.push([module.i, "\n.dof-refresher[data-v-967e72fa] {\n height: 1.86667rem;\n width: 10rem;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n /* flex-wrap: nowrap; */\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n padding-top: 0.66667rem;\n}\n.cycle-container[data-v-967e72fa] {\n position: relative;\n width: 0.8rem;\n height: 0.8rem;\n}\n.u-cover[data-v-967e72fa] {\n position: absolute;\n width: 0.4rem;\n height: 0.8rem;\n top: 0;\n background-color: #ffffff;\n overflow: hidden;\n right: 0;\n}\n.c1[data-v-967e72fa] {\n z-index: 1;\n}\n.c2[data-v-967e72fa] {\n z-index: 2;\n -webkit-transform-origin: left center;\n transform-origin: left center;\n -webkit-transform: rotateZ(0deg);\n transform: rotateZ(0deg);\n}\n.u-cover-cycle[data-v-967e72fa] {\n position: absolute;\n width: 0.8rem;\n height: 0.8rem;\n right: 0;\n top: 0;\n /* box-sizing: border-box; */\n border-width: 0.02667rem;\n border-color: #616C73;\n border-style: solid;\n border-radius: 0.4rem;\n opacity: 0;\n}\n.cover1[data-v-967e72fa] {\n opacity: 1;\n}\n.indicator[data-v-967e72fa] {\n /* margin-right: 20px; */\n height: 0.8rem;\n width: 0.8rem;\n color: #616C73;\n}\n.arrow-down[data-v-967e72fa] {\n position: relative;\n top: 0.2rem;\n left: -0.6rem;\n width: 0.4rem;\n height: 0.4rem;\n border-width: 1px;\n}\n.u-txt[data-v-967e72fa] {\n font-size: 0.32rem;\n line-height: 0.53333rem;\n color: #8E969B;\n margin-top: 0.13333rem;\n margin-left: 0.13333rem;\n height: 0.53333rem;\n lines: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: 1;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-refresher/index.vue?6f3e2e6f","/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-refresher/<no source>"],"names":[],"mappings":";AAmOA;EACA,mBAAA;EACA,aAAA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,wBAAA;EACA,yBAAA;EAAA,gCAAA;UAAA,wBAAA;EACA,wBAAA;CACA;AAEA;EACA,mBAAA;EACA,cAAA;EACA,eAAA;CACA;AAEA;EACA,mBAAA;EACA,cAAA;EACA,eAAA;EACA,OAAA;EACA,0BAAA;EACA,iBAAA;EACA,SAAA;CACA;AAEA;EACA,WAAA;CACA;AAEA;EACA,WAAA;EACA,sCAAA;UAAA,8BAAA;EACA,iCAAA;UAAA,yBAAA;CACA;AAEA;EACA,mBAAA;EACA,cAAA;EACA,eAAA;EACA,SAAA;EACA,OAAA;EACA,6BAAA;EACA,yBAAA;EACA,sBAAA;EACA,oBAAA;EACA,sBAAA;EACA,WAAA;CACA;AAEA;EACA,WAAA;CACA;AAEA;EACA,yBAAA;EACA,eAAA;EACA,cAAA;EACA,eAAA;CACA;AAEA;EACA,mBAAA;EACA,YAAA;EACA,cAAA;EACA,cAAA;EACA,eAAA;EACA,kBAAA;CACA;AAEA;EACA,mBAAA;EACA,wBAAA;EACA,eAAA;EACA,uBAAA;EACA,wBAAA;EACA,mBAAA;EACA,SAAA;EC/SA,iBAAA;EAAA,wBAAA;EAAA,sBAAA;CDgTA","file":"index.vue","sourcesContent":["<template>\n <refresh\n class=\"dof-refresher\"\n @refresh=\"onRefresh\"\n @pullingdown=\"onPullingDown\"\n :display=\"refreshing ? 'show' : 'hide'\"\n >\n <!-- <div v-if=\"false\" class=\"cycle-container\" ref=\"cycle\">\n <div class=\"u-cover c1\" ref=\"cover1\">\n <div class=\"u-cover-cycle cover1\"></div>\n </div>\n <div class=\"u-cover c2\" ref=\"cover2\">\n <div class=\"u-cover-cycle\" ref=\"cover-cycle\"></div>\n </div>\n </div> -->\n <!-- <image\n v-if=\"newStyleFlag\"\n class=\"arrow-down\"\n ref=\"arrow\"\n :src=\"ICON_ARROW_DOWN\"\n resize=\"contain\"\n ></image> -->\n <loading-indicator class=\"indicator\"></loading-indicator>\n <text class=\"u-txt\" v-if=\"refresherText\">{{ refresherText }}</text>\n </refresh>\n</template>\n<script>\nconst animation = weex.requireModule('animation')\n\n// 减少打包体积\nimport bindingx from 'weex-bindingx/lib/index.weex'\nimport BindEnv from '../utils/bind-env'\nimport Utils from '../utils'\n\nconst ICON_ARROW_DOWN = 'https://img.alicdn.com/tfs/TB1A8faeTtYBeNjy1XdXXXXyVXa-48-48.png'\n\nexport default {\n props: {\n scrollerRef: String,\n maxTime: {\n type: Number,\n default: 0\n },\n mainText: {\n type: String,\n default: ''\n },\n pullingText: {\n type: String,\n default: ''\n },\n refreshingText: {\n type: String,\n default: ''\n },\n textWidth: {\n type: Number,\n default: 200\n }\n },\n data() {\n return {\n ICON_ARROW_DOWN,\n refreshing: false,\n couldUnLash: false\n }\n },\n computed: {\n newStyleFlag() {\n return this.scrollerRef && BindEnv.supportsEBForIos()\n },\n refresherText() {\n return this.refreshing ? this.refreshingText : this.pText\n },\n pText() {\n return this.couldUnLash ? this.pullingText : this.mainText\n }\n },\n created() {\n this.newStyleFlag && this.animationBinding()\n },\n beforeDestroy() {\n this.bindingsDestroy()\n },\n methods: {\n onRefresh(event) {\n this.$emit('dofRefresh', event)\n this.refreshing = true\n this.newStyleFlag && this.cycleGoRound()\n if (this.maxTime <= 0) return\n this.timeoutSto && clearTimeout(this.timeoutSto)\n this.timeoutSto = setTimeout(() => {\n this.$emit('dofTimeout')\n this.dofCancel()\n }, this.maxTime)\n },\n /**\n * 取消 refreshing\n */\n dofCancel() {\n this.refreshing = false\n this.timeoutSto && clearTimeout(this.timeoutSto)\n this.roundingDestroy()\n },\n /**\n * 下拉事件\n */\n onPullingDown(event) {\n this.$emit('dofPullingDown', event)\n const pd = event.pullingDistance * (Utils.env.isIOS() ? -1 : 1)\n pd > (Utils.env.isAndroid() ? 200 : 140) ? (this.couldUnLash = true) : (this.couldUnLash = false)\n if (this.refreshing && pd < 20) {\n this.timeoutSto && clearTimeout(this.timeoutSto)\n this.refreshing = false\n this.roundingDestroy()\n }\n },\n /**\n * 注册 bindingx\n */\n animationBinding() {\n setTimeout(() => {\n if (!this.$refs['cover2'] || !this.$refs['cover-cycle']) return\n // 降级版本取不到,需要注意\n const scroller = this.$parent.$refs[this.scrollerRef].ref\n const cover2 = this.$refs['cover2'].ref\n const coverCycle = this.$refs['cover-cycle'].ref\n\n const bindingResult = bindingx.bind(\n {\n eventType: 'scroll',\n anchor: scroller,\n props: [\n {\n element: cover2,\n property: 'transform.rotateZ',\n expression: 'y>-140?(y%75/150*-360):156'\n },\n {\n element: coverCycle,\n property: 'opacity',\n expression: 'y<-75 ?1:0'\n }\n ]\n },\n e => {}\n )\n this.bindingToken = bindingResult.token\n }, 300)\n },\n /**\n * 旋转动作\n */\n cycleGoRound() {\n if (Utils.env.isAndroid()) return\n if (!this.$refs['cycle']) return\n const cycle = this.$refs['cycle'].ref\n this.arrowShow(false)\n if (!cycle) {\n return\n }\n const roundingResult = bindingx.bind(\n {\n eventType: 'timing',\n props: [\n {\n element: cycle,\n property: 'transform.rotateZ',\n expression: 't*0.72'\n }\n ]\n },\n e => {}\n )\n this.roundingToken = roundingResult.token\n },\n /**\n * 箭头显隐控制\n */\n arrowShow(_show = true) {\n const arrow = this.$refs['arrow']\n arrow &&\n animation.transition(\n arrow,\n {\n styles: {\n opacity: _show ? 1 : 0,\n transform: _show ? 'scale(1)' : 'scale(0.5)'\n },\n duration: 300,\n delay: 0\n },\n () => {}\n )\n },\n /**\n * 完整 bindingx 销毁\n */\n bindingsDestroy() {\n if (this.bindingToken !== 0) {\n bindingx &&\n bindingx.unbind({\n eventType: 'scroll',\n token: this.bindingToken\n })\n this.bindingToken = 0\n }\n this.roundingDestroy()\n },\n /**\n * 旋转 bindingx 销毁\n */\n roundingDestroy() {\n if (this.roundingToken !== 0) {\n bindingx &&\n bindingx.unbind({\n eventType: 'timing',\n token: this.roundingToken\n })\n this.roundingToken = 0\n }\n this.arrowShow(true)\n }\n }\n}\n</script>\n<style scoped>\n.dof-refresher {\n height: 140px;\n width: 750px;\n flex-direction: row;\n /* flex-wrap: nowrap; */\n justify-content: center;\n padding-top: 50px;\n}\n\n.cycle-container {\n position: relative;\n width: 60px;\n height: 60px;\n}\n\n.u-cover {\n position: absolute;\n width: 30px;\n height: 60px;\n top: 0;\n background-color: #ffffff;\n overflow: hidden;\n right: 0;\n}\n\n.c1 {\n z-index: 1;\n}\n\n.c2 {\n z-index: 2;\n transform-origin: left center;\n transform: rotateZ(0deg);\n}\n\n.u-cover-cycle {\n position: absolute;\n width: 60px;\n height: 60px;\n right: 0;\n top: 0;\n /* box-sizing: border-box; */\n border-width: 2px;\n border-color: #616C73;\n border-style: solid;\n border-radius: 30px;\n opacity: 0;\n}\n\n.cover1 {\n opacity: 1;\n}\n\n.indicator {\n /* margin-right: 20px; */\n height: 60px;\n width: 60px;\n color: #616C73;\n}\n\n.arrow-down {\n position: relative;\n top: 15px;\n left: -45px;\n width: 30px;\n height: 30px;\n border-width: 1px;\n}\n\n.u-txt {\n font-size: 24px;\n line-height: 40px;\n color: #8E969B;\n margin-top: 10px;\n margin-left: 10px;\n height: 40px;\n lines: 1;\n}\n</style>\n",null],"sourceRoot":""}]);
|
|
9277
|
+
exports.push([module.i, "\n.dof-refresher[data-v-967e72fa] {\n height: 1.86667rem;\n width: 10rem;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n /* flex-wrap: nowrap; */\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n padding-top: 0.66667rem;\n}\n.cycle-container[data-v-967e72fa] {\n position: relative;\n width: 0.8rem;\n height: 0.8rem;\n}\n.u-cover[data-v-967e72fa] {\n position: absolute;\n width: 0.4rem;\n height: 0.8rem;\n top: 0;\n background-color: #ffffff;\n overflow: hidden;\n right: 0;\n}\n.c1[data-v-967e72fa] {\n z-index: 1;\n}\n.c2[data-v-967e72fa] {\n z-index: 2;\n -webkit-transform-origin: left center;\n transform-origin: left center;\n -webkit-transform: rotateZ(0deg);\n transform: rotateZ(0deg);\n}\n.u-cover-cycle[data-v-967e72fa] {\n position: absolute;\n width: 0.8rem;\n height: 0.8rem;\n right: 0;\n top: 0;\n /* box-sizing: border-box; */\n border-width: 0.02667rem;\n border-color: #616c73;\n border-style: solid;\n border-radius: 0.4rem;\n opacity: 0;\n}\n.cover1[data-v-967e72fa] {\n opacity: 1;\n}\n.indicator[data-v-967e72fa] {\n /* margin-right: 20px; */\n height: 0.46667rem;\n width: 0.46667rem;\n color: #616c73;\n}\n.arrow-down[data-v-967e72fa] {\n position: relative;\n top: 0.2rem;\n left: -0.6rem;\n width: 0.4rem;\n height: 0.4rem;\n border-width: 1px;\n}\n.u-txt[data-v-967e72fa] {\n font-size: 0.32rem;\n line-height: 0.53333rem;\n color: #8e969b;\n margin-top: 0.13333rem;\n margin-left: 0.13333rem;\n height: 0.53333rem;\n lines: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: 1;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-refresher/index.vue?6730c10f","/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-refresher/<no source>"],"names":[],"mappings":";AAqOA;EACA,mBAAA;EACA,aAAA;EACA,qBAAA;EAAA,sBAAA;EAAA,cAAA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,wBAAA;EACA,yBAAA;EAAA,gCAAA;UAAA,wBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,wBAAA;CACA;AAEA;EACA,mBAAA;EACA,cAAA;EACA,eAAA;CACA;AAEA;EACA,mBAAA;EACA,cAAA;EACA,eAAA;EACA,OAAA;EACA,0BAAA;EACA,iBAAA;EACA,SAAA;CACA;AAEA;EACA,WAAA;CACA;AAEA;EACA,WAAA;EACA,sCAAA;UAAA,8BAAA;EACA,iCAAA;UAAA,yBAAA;CACA;AAEA;EACA,mBAAA;EACA,cAAA;EACA,eAAA;EACA,SAAA;EACA,OAAA;EACA,6BAAA;EACA,yBAAA;EACA,sBAAA;EACA,oBAAA;EACA,sBAAA;EACA,WAAA;CACA;AAEA;EACA,WAAA;CACA;AAEA;EACA,yBAAA;EACA,mBAAA;EACA,kBAAA;EACA,eAAA;CACA;AAEA;EACA,mBAAA;EACA,YAAA;EACA,cAAA;EACA,cAAA;EACA,eAAA;EACA,kBAAA;CACA;AAEA;EACA,mBAAA;EACA,wBAAA;EACA,eAAA;EACA,uBAAA;EACA,wBAAA;EACA,mBAAA;EACA,SAAA;ECnTA,iBAAA;EAAA,wBAAA;EAAA,sBAAA;CDoTA","file":"index.vue","sourcesContent":["<template>\n <refresh\n class=\"dof-refresher\"\n @refresh=\"onRefresh\"\n @pullingdown=\"onPullingDown\"\n :display=\"refreshing ? 'show' : 'hide'\"\n >\n <!-- <div v-if=\"false\" class=\"cycle-container\" ref=\"cycle\">\n <div class=\"u-cover c1\" ref=\"cover1\">\n <div class=\"u-cover-cycle cover1\"></div>\n </div>\n <div class=\"u-cover c2\" ref=\"cover2\">\n <div class=\"u-cover-cycle\" ref=\"cover-cycle\"></div>\n </div>\n </div> -->\n <!-- <image\n v-if=\"newStyleFlag\"\n class=\"arrow-down\"\n ref=\"arrow\"\n :src=\"ICON_ARROW_DOWN\"\n resize=\"contain\"\n ></image> -->\n <!-- <loading-indicator class=\"indicator\"></loading-indicator> -->\n <midea-apng-view v-if=\"refreshing\" :loop=\"true\" :auto=\"true\" :src=\"loadingIcon\" class=\"indicator\"></midea-apng-view>\n <text class=\"u-txt\" v-if=\"refresherText\">{{ refresherText }}</text>\n </refresh>\n</template>\n<script>\nconst animation = weex.requireModule('animation')\n\n// 减少打包体积\nimport bindingx from 'weex-bindingx/lib/index.weex'\nimport BindEnv from '../utils/bind-env'\nimport Utils from '../utils'\n\nconst ICON_ARROW_DOWN = 'https://img.alicdn.com/tfs/TB1A8faeTtYBeNjy1XdXXXXyVXa-48-48.png'\n\nexport default {\n props: {\n scrollerRef: String,\n maxTime: {\n type: Number,\n default: 0\n },\n mainText: {\n type: String,\n default: ''\n },\n pullingText: {\n type: String,\n default: ''\n },\n refreshingText: {\n type: String,\n default: ''\n },\n textWidth: {\n type: Number,\n default: 200\n }\n },\n data() {\n return {\n ICON_ARROW_DOWN,\n refreshing: false,\n couldUnLash: false,\n loadingIcon: 'http://dolphin-weex-dev.msmartlife.cn/cdn/images/common/loading_gray.png'\n }\n },\n computed: {\n newStyleFlag() {\n return this.scrollerRef && BindEnv.supportsEBForIos()\n },\n refresherText() {\n return this.refreshing ? this.refreshingText : this.pText\n },\n pText() {\n return this.couldUnLash ? this.pullingText : this.mainText\n }\n },\n created() {\n this.newStyleFlag && this.animationBinding()\n },\n beforeDestroy() {\n this.bindingsDestroy()\n },\n methods: {\n onRefresh(event) {\n this.$emit('dofRefresh', event)\n this.refreshing = true\n this.newStyleFlag && this.cycleGoRound()\n if (this.maxTime <= 0) return\n this.timeoutSto && clearTimeout(this.timeoutSto)\n this.timeoutSto = setTimeout(() => {\n this.$emit('dofTimeout')\n this.dofCancel()\n }, this.maxTime)\n },\n /**\n * 取消 refreshing\n */\n dofCancel() {\n this.refreshing = false\n this.timeoutSto && clearTimeout(this.timeoutSto)\n this.roundingDestroy()\n },\n /**\n * 下拉事件\n */\n onPullingDown(event) {\n this.$emit('dofPullingDown', event)\n const pd = event.pullingDistance * (Utils.env.isIOS() ? -1 : 1)\n pd > (Utils.env.isAndroid() ? 200 : 140) ? (this.couldUnLash = true) : (this.couldUnLash = false)\n if (this.refreshing && pd < 20) {\n this.timeoutSto && clearTimeout(this.timeoutSto)\n this.refreshing = false\n this.roundingDestroy()\n }\n },\n /**\n * 注册 bindingx\n */\n animationBinding() {\n setTimeout(() => {\n if (!this.$refs['cover2'] || !this.$refs['cover-cycle']) return\n // 降级版本取不到,需要注意\n const scroller = this.$parent.$refs[this.scrollerRef].ref\n const cover2 = this.$refs['cover2'].ref\n const coverCycle = this.$refs['cover-cycle'].ref\n\n const bindingResult = bindingx.bind(\n {\n eventType: 'scroll',\n anchor: scroller,\n props: [\n {\n element: cover2,\n property: 'transform.rotateZ',\n expression: 'y>-140?(y%75/150*-360):156'\n },\n {\n element: coverCycle,\n property: 'opacity',\n expression: 'y<-75 ?1:0'\n }\n ]\n },\n e => {}\n )\n this.bindingToken = bindingResult.token\n }, 300)\n },\n /**\n * 旋转动作\n */\n cycleGoRound() {\n if (Utils.env.isAndroid()) return\n if (!this.$refs['cycle']) return\n const cycle = this.$refs['cycle'].ref\n this.arrowShow(false)\n if (!cycle) {\n return\n }\n const roundingResult = bindingx.bind(\n {\n eventType: 'timing',\n props: [\n {\n element: cycle,\n property: 'transform.rotateZ',\n expression: 't*0.72'\n }\n ]\n },\n e => {}\n )\n this.roundingToken = roundingResult.token\n },\n /**\n * 箭头显隐控制\n */\n arrowShow(_show = true) {\n const arrow = this.$refs['arrow']\n arrow &&\n animation.transition(\n arrow,\n {\n styles: {\n opacity: _show ? 1 : 0,\n transform: _show ? 'scale(1)' : 'scale(0.5)'\n },\n duration: 300,\n delay: 0\n },\n () => {}\n )\n },\n /**\n * 完整 bindingx 销毁\n */\n bindingsDestroy() {\n if (this.bindingToken !== 0) {\n bindingx &&\n bindingx.unbind({\n eventType: 'scroll',\n token: this.bindingToken\n })\n this.bindingToken = 0\n }\n this.roundingDestroy()\n },\n /**\n * 旋转 bindingx 销毁\n */\n roundingDestroy() {\n if (this.roundingToken !== 0) {\n bindingx &&\n bindingx.unbind({\n eventType: 'timing',\n token: this.roundingToken\n })\n this.roundingToken = 0\n }\n this.arrowShow(true)\n }\n }\n}\n</script>\n<style scoped>\n.dof-refresher {\n height: 140px;\n width: 750px;\n display: flex;\n flex-direction: row;\n /* flex-wrap: nowrap; */\n justify-content: center;\n align-items: center;\n padding-top: 50px;\n}\n\n.cycle-container {\n position: relative;\n width: 60px;\n height: 60px;\n}\n\n.u-cover {\n position: absolute;\n width: 30px;\n height: 60px;\n top: 0;\n background-color: #ffffff;\n overflow: hidden;\n right: 0;\n}\n\n.c1 {\n z-index: 1;\n}\n\n.c2 {\n z-index: 2;\n transform-origin: left center;\n transform: rotateZ(0deg);\n}\n\n.u-cover-cycle {\n position: absolute;\n width: 60px;\n height: 60px;\n right: 0;\n top: 0;\n /* box-sizing: border-box; */\n border-width: 2px;\n border-color: #616c73;\n border-style: solid;\n border-radius: 30px;\n opacity: 0;\n}\n\n.cover1 {\n opacity: 1;\n}\n\n.indicator {\n /* margin-right: 20px; */\n height: 35px;\n width: 35px;\n color: #616c73;\n}\n\n.arrow-down {\n position: relative;\n top: 15px;\n left: -45px;\n width: 30px;\n height: 30px;\n border-width: 1px;\n}\n\n.u-txt {\n font-size: 24px;\n line-height: 40px;\n color: #8e969b;\n margin-top: 10px;\n margin-left: 10px;\n height: 40px;\n lines: 1;\n}\n</style>\n",null],"sourceRoot":""}]);
|
|
9278
9278
|
|
|
9279
9279
|
// exports
|
|
9280
9280
|
|
|
@@ -19638,8 +19638,6 @@ exports.default = {
|
|
|
19638
19638
|
height: this.height + 'px',
|
|
19639
19639
|
borderRadius: this.borderRadius + 'px',
|
|
19640
19640
|
overflow: 'hidden'
|
|
19641
|
-
// backgroundImage: "../../assets/img/image/activity.png",
|
|
19642
|
-
// backgroundRepeat: "no-repeat",
|
|
19643
19641
|
};
|
|
19644
19642
|
},
|
|
19645
19643
|
shouldShow: function shouldShow() {
|
|
@@ -25102,6 +25100,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
25102
25100
|
//
|
|
25103
25101
|
//
|
|
25104
25102
|
//
|
|
25103
|
+
//
|
|
25105
25104
|
|
|
25106
25105
|
var animation = weex.requireModule('animation');
|
|
25107
25106
|
|
|
@@ -25138,7 +25137,8 @@ exports.default = {
|
|
|
25138
25137
|
return {
|
|
25139
25138
|
ICON_ARROW_DOWN: ICON_ARROW_DOWN,
|
|
25140
25139
|
refreshing: false,
|
|
25141
|
-
couldUnLash: false
|
|
25140
|
+
couldUnLash: false,
|
|
25141
|
+
loadingIcon: 'http://dolphin-weex-dev.msmartlife.cn/cdn/images/common/loading_gray.png'
|
|
25142
25142
|
};
|
|
25143
25143
|
},
|
|
25144
25144
|
|
|
@@ -50971,10 +50971,14 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
|
|
|
50971
50971
|
return _vm.onPullingDown($event)
|
|
50972
50972
|
}
|
|
50973
50973
|
}
|
|
50974
|
-
}, [_c('
|
|
50974
|
+
}, [(_vm.refreshing) ? _c('midea-apng-view', {
|
|
50975
50975
|
staticClass: "indicator",
|
|
50976
|
-
attrs: {
|
|
50977
|
-
|
|
50976
|
+
attrs: {
|
|
50977
|
+
"loop": true,
|
|
50978
|
+
"auto": true,
|
|
50979
|
+
"src": _vm.loadingIcon
|
|
50980
|
+
}
|
|
50981
|
+
}) : _vm._e(), _vm._v(" "), (_vm.refresherText) ? _c('p', {
|
|
50978
50982
|
staticClass: "u-txt weex-el weex-text",
|
|
50979
50983
|
attrs: {
|
|
50980
50984
|
"weex-type": "text"
|