dolphin-weex-ui 2.4.13 → 2.4.14
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/dist/index.web.js
CHANGED
|
@@ -9270,7 +9270,7 @@ exports = module.exports = __webpack_require__(0)(true);
|
|
|
9270
9270
|
|
|
9271
9271
|
|
|
9272
9272
|
// module
|
|
9273
|
-
exports.push([module.i, "\n.indicator[data-v-7ecb2930] {\n position: absolute;\n item-color: rgba(255, 195, 0, .5);\n item-selected-color: #ffc300;\n item-size: 0.26667rem;\n height: 0.26667rem;\n bottom: 0.32rem;\n}\n.indicator .weex-indicator-item[data-v-7ecb2930] {\n width: 0.26667rem;\n height: 0.26667rem;\n}\n.indicator .weex-indicator-item.weex-indicator-item-active[data-v-7ecb2930] {\n background-color: #ffc300;\n}\n.indicator .weex-indicator-item[data-v-7ecb2930] {\n background-color: rgba(255, 195, 0, .5);\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-lightbox/index.vue?25abe080","/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-lightbox/<input css
|
|
9273
|
+
exports.push([module.i, "\n.indicator[data-v-7ecb2930] {\n position: absolute;\n item-color: rgba(255, 195, 0, .5);\n item-selected-color: #ffc300;\n item-size: 0.26667rem;\n height: 0.26667rem;\n bottom: 0.32rem;\n}\n.indicator .weex-indicator-item[data-v-7ecb2930] {\n width: 0.26667rem;\n height: 0.26667rem;\n}\n.indicator .weex-indicator-item.weex-indicator-item-active[data-v-7ecb2930] {\n background-color: #ffc300;\n}\n.indicator .weex-indicator-item[data-v-7ecb2930] {\n background-color: rgba(255, 195, 0, .5);\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-lightbox/index.vue?25abe080","/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-lightbox/<input css 17>","/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-lightbox/<input css 16>","/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-lightbox/<input css 15>"],"names":[],"mappings":";AA6BA;EACA,mBAAA;EACA,kCAAA;EACA,6BAAA;EACA,sBAAA;EACA,mBAAA;EACA,gBAAA;CACA;ACnCA;EACE,kBAAY;EACZ,mBAAa;CACd;ACHD;EACE,0BAA0B;CAC3B;ACFD;EACE,wCAAwC;CACzC","file":"index.vue","sourcesContent":["<template>\n <dof-mask :width=\"width\"\n :height=\"height\"\n aria-hidden=\"true\"\n mask-bg-color=\"transparent\"\n overlay-opacity=\"0.8\"\n :show=\"show\"\n :opacity='opacity'\n :show-close=\"false\"\n @dofMaskSetHidden=\"maskOverlayClick\">\n <slider auto-play=\"false\"\n v-if=\"show\"\n :index=\"index\"\n :interval=\"interval\"\n :style=\"{ height: height + 'px'}\">\n <div v-for=\"(v,index) in imageList\"\n :style=\"{ height: height + 'px'}\"\n :key=\"index\">\n <image resize=\"cover\"\n :src=\"v.src\"\n :style=\"{ height: height + 'px', width: width + 'px'}\"></image>\n </div>\n <indicator class=\"indicator\"\n :style=\"indicatorStyle\"></indicator>\n </slider>\n </dof-mask>\n</template>\n\n<style scoped>\n .indicator {\n position: absolute;\n item-color: rgba(255, 195, 0, .5);\n item-selected-color: #ffc300;\n item-size: 20px;\n height: 20px;\n bottom: 24px;\n }\n</style>\n\n<script>\n import DofMask from '../dof-mask';\n\n export default {\n components: {\n DofMask\n },\n props: {\n width: {\n type: [Number, String],\n default: 750\n },\n height: {\n type: [Number, String],\n default: 750\n },\n show: {\n type: Boolean,\n default: false\n },\n imageList: Array,\n indicatorColor: {\n type: Object,\n default: () => ({\n 'item-color': 'rgba(255, 195, 0, .5)',\n 'item-selected-color': '#ffc300',\n 'item-size': '20px'\n })\n },\n index: {\n type: [Number, String],\n default: 0\n },\n interval: {\n type: [Number, String],\n default: 3000\n },\n opacity: {\n type: [Number, String],\n default: 0.6\n }\n },\n computed: {\n indicatorStyle () {\n return {\n width: this.width + 'px',\n ...this.indicatorColor\n };\n }\n },\n methods: {\n maskOverlayClick () {\n this.$emit('dofLightboxOverlayClicked', {});\n }\n }\n };\n</script>\n","\n.indicator .weex-indicator-item {\n width: 20px;\n height: 20px;\n}","\n.indicator .weex-indicator-item.weex-indicator-item-active {\n background-color: #ffc300;\n}","\n.indicator .weex-indicator-item {\n background-color: rgba(255, 195, 0, .5);\n}"],"sourceRoot":""}]);
|
|
9274
9274
|
|
|
9275
9275
|
// exports
|
|
9276
9276
|
|
|
@@ -9368,7 +9368,7 @@ exports = module.exports = __webpack_require__(0)(true);
|
|
|
9368
9368
|
|
|
9369
9369
|
|
|
9370
9370
|
// module
|
|
9371
|
-
exports.push([module.i, "\n.container[data-v-89145938] {\n /* background-color: #ffffff; */\n overflow: hidden;\n}\n.dof-skid[data-v-89145938] {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n /* background-color: #ffffff; */\n overflow: hidden;\n}\n\n/* \n.swipe-action-right {\n flex-direction: row;\n align-items: center;\n overflow: hidden;\n}\n\n.swipeItem{\n display: flex;\n justify-content: center;\n align-items: center;\n flex: 1;\n}\n.swipeText{\n flex: 1;\n color: #FFFFFF;\n text-align: center;\n align-items: center;\n lines:1;\n text-overflow: ellipsis;\n overflow: hidden;\n} */\n\n/* android */\n.itemWrap[data-v-89145938] {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-pack: start;\n -webkit-justify-content: flex-start;\n justify-content: flex-start;\n -webkit-box-align: stretch;\n -webkit-align-items: stretch;\n align-items: stretch;\n}\n.swipe-action-right[data-v-89145938] {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-pack: start;\n -webkit-justify-content: flex-start;\n justify-content: flex-start;\n -webkit-box-align: stretch;\n -webkit-align-items: stretch;\n align-items: stretch;\n overflow: hidden;\n}\n.swipeItem[data-v-89145938] {\n /* width: 160px; */\n /* height: 160px; */\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 -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n position: relative;\n}\n.mask[data-v-89145938] {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(255, 255, 255, 0);\n}\n.mask[data-v-89145938]:active {\n background-color: rgba(255, 255, 255, 0.1);\n}\n.swipeText[data-v-89145938] {\n font-size: 0.42667rem;\n color: #ffffff;\n text-align: center;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n lines: 2;\n /* line-height: 48px; */\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: 2;\n}\n.cellBox[data-v-89145938] {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-swipe-action/index.vue?ab80dc36","/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-swipe-action/<no source>"],"names":[],"mappings":";AAmGA;EACA,gCAAA;EACA,iBAAA;CACA;AACA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,gCAAA;EACA,iBAAA;CACA;;AAEA;;;;;;;;;;;;;;;;;;;;;IAqBA;;AAEA,aAAA;AAEA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,wBAAA;EAAA,oCAAA;UAAA,4BAAA;EACA,2BAAA;EAAA,6BAAA;UAAA,qBAAA;CACA;AAEA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,wBAAA;EAAA,oCAAA;UAAA,4BAAA;EACA,2BAAA;EAAA,6BAAA;UAAA,qBAAA;EACA,iBAAA;CACA;AACA;EACA,mBAAA;EACA,oBAAA;EACA,yBAAA;EAAA,gCAAA;UAAA,wBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;EACA,mBAAA;CACA;AACA;EACA,mBAAA;EACA,OAAA;EACA,QAAA;EACA,SAAA;EACA,UAAA;EACA,yCAAA;CACA;AACA;EACA,2CAAA;CACA;AAEA;EACA,sBAAA;EACA,eAAA;EACA,mBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,SAAA;EACA,wBAAA;EACA,wBAAA;EACA,iBAAA;EC9KA,iBAAA;EAAA,wBAAA;EAAA,sBAAA;CD+KA;AACA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;CACA","file":"index.vue","sourcesContent":["<template>\n <div>\n <div v-if=\"!isIOS\" class=\"container\" :style=\"{ width: _cellWidth + 'px', 'padding-right': padding + 'px' }\">\n <div\n class=\"itemWrap\"\n ref=\"menuItem\"\n :style=\"{ width: _cellWidth + rightWidth(item) + 'px' }\"\n v-for=\"(item, index) in listData\"\n :key=\"index\"\n @swipe=\"slideMenu($event, index, item)\"\n @touchend=\"touchend\"\n >\n <div v-if=\"padding\" :style=\"{ width: padding + 'px' }\"></div>\n <div class=\"cellBox\">\n <dof-cell\n ref=\"cell\"\n v-bind=\"item\"\n :isHighlight=\"isHighlight\"\n :click-activied=\"false\"\n @dofCellClicked=\"cellCanClick ? dofCellClicked(index) : ''\"\n >\n <dof-switch\n v-if=\"item.switchVal !== undefined\"\n slot=\"switch\"\n :checked=\"item.switchVal\"\n @dof-change=\"handleSwitchChange(item)\"\n ></dof-switch>\n </dof-cell>\n </div>\n <div\n class=\"swipe-action-right\"\n v-if=\"item.rightItem && item.rightItem.length > 0\"\n :style=\"{ width: rightWidth(item) + 'px', paddingLeft: padding ? '16px' : '0px' }\"\n >\n <div\n :class=\"['swipeItem']\"\n v-for=\"(rightCon, i) in item.rightItem\"\n :key=\"i\"\n :style=\"{ backgroundColor: rightCon.bgColor }\"\n >\n <text class=\"swipeText\">{{ rightCon.text }}</text>\n <text class=\"swipeText\">{{ rightCon.text1 }}</text>\n <text class=\"swipeText\">{{ rightCon.text2 }}</text>\n <div class=\"mask\" @click=\"onRightNode(index, i, rightCon.text)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div v-else class=\"container\" :style=\"{ width: _cellWidth + 'px', 'padding-right': padding + 'px' }\">\n <div\n ref=\"skid\"\n v-for=\"(item, index) of listData\"\n :key=\"'skid-' + index\"\n class=\"dof-skid\"\n :style=\"{ width: _cellWidth + rightWidth(item) + 'px' }\"\n @horizontalpan=\"handleHorizontalpan(event, item, index)\"\n @panend=\"handlePanEnd(event, item, index)\"\n >\n <div v-if=\"padding\" :style=\"{ width: padding + 'px' }\"></div>\n <div class=\"cellBox\">\n <dof-cell\n ref=\"cell\"\n v-bind=\"item\"\n :isHighlight=\"isHighlight\"\n :click-activied=\"false\"\n @dofCellClicked.stop=\"dofCellClicked(index)\"\n >\n <dof-switch\n v-if=\"item.switchVal !== undefined\"\n slot=\"switch\"\n :checked=\"item.switchVal\"\n @dof-change=\"handleSwitchChange(item)\"\n ></dof-switch>\n </dof-cell>\n </div>\n\n <div\n class=\"swipe-action-right\"\n v-if=\"item.rightItem && item.rightItem.length > 0\"\n :style=\"{ width: rightWidth(item) + 'px', paddingLeft: padding ? '16px' : '0px' }\"\n >\n <div\n :class=\"['swipeItem']\"\n v-for=\"(rightCon, i) in item.rightItem\"\n :key=\"i\"\n :style=\"{ backgroundColor: rightCon.bgColor }\"\n >\n <text class=\"swipeText\">{{ rightCon.text }}</text>\n <text class=\"swipeText\">{{ rightCon.text1 }}</text>\n <text class=\"swipeText\">{{ rightCon.text2 }}</text>\n <div class=\"mask\" @click=\"onRightNode(index, i, rightCon.text)\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.container {\n /* background-color: #ffffff; */\n overflow: hidden;\n}\n.dof-skid {\n flex-direction: row;\n /* background-color: #ffffff; */\n overflow: hidden;\n}\n\n/* \n.swipe-action-right {\n flex-direction: row;\n align-items: center;\n overflow: hidden;\n}\n\n.swipeItem{\n display: flex;\n justify-content: center;\n align-items: center;\n flex: 1;\n}\n.swipeText{\n flex: 1;\n color: #FFFFFF;\n text-align: center;\n align-items: center;\n lines:1;\n text-overflow: ellipsis;\n overflow: hidden;\n} */\n\n/* android */\n\n.itemWrap {\n flex-direction: row;\n justify-content: flex-start;\n align-items: stretch;\n}\n\n.swipe-action-right {\n flex-direction: row;\n justify-content: flex-start;\n align-items: stretch;\n overflow: hidden;\n}\n.swipeItem {\n /* width: 160px; */\n /* height: 160px; */\n justify-content: center;\n align-items: center;\n flex: 1;\n position: relative;\n}\n.mask {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(255, 255, 255, 0);\n}\n.mask:active {\n background-color: rgba(255, 255, 255, 0.1);\n}\n\n.swipeText {\n font-size: 32px;\n color: #ffffff;\n text-align: center;\n align-items: center;\n lines: 2;\n /* line-height: 48px; */\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.cellBox {\n flex: 1;\n}\n</style>\n<style scoped src=\"./colmo.css\"></style>\n\n<script>\nimport Binding from 'weex-bindingx/lib/index.weex.js'\nconst animation = weex.requireModule('animation')\nimport Utils from '../utils'\nconst modal = weex.requireModule('modal')\nconst dom = weex.requireModule('dom')\nimport DofCell from '../dof-cell'\nimport DofSwitch from '../dof-switch'\n\nexport default {\n props: {\n listData: {\n type: Array,\n default: () => []\n },\n // styles: {\n // type: Object,\n // default: ()=>({})\n // }\n cellWidth: {\n type: Number,\n default: 0\n },\n padding: {\n type: Number,\n default: 0\n }\n },\n computed: {\n _cellWidth() {\n if (this.cellWidth) return this.cellWidth\n if (this.padding) return 750 - this.padding\n return 750\n }\n },\n components: {\n DofCell,\n DofSwitch\n },\n data() {\n return {\n mobileX: 0,\n webStarX: 0,\n saveIdx: null,\n isAndroid: Utils.env.isAndroid(),\n isIOS: Utils.env.isIOS(),\n\n cellCanClick: true, //android\n isHighlight: false\n }\n },\n\n mounted() {},\n\n methods: {\n dofCellClicked(index) {\n //点击触发滑动恢复初始化\n if (this.isAndroid) {\n this.rightSlide() // 列表初始化\n this.cellCanClick && this.$emit('dofCellClicked', { index })\n } else {\n for (let index = 0; index < this.listData.length; index++) {\n this.special(this.$refs.skid[index], {\n transform: 'translate(0, 0)'\n })\n }\n this.$emit('dofCellClicked', { index })\n }\n },\n\n special(dom, styles) {\n animation.transition(dom, {\n styles,\n duration: 150, // ms\n timingFunction: 'ease',\n delay: 0 // ms\n })\n },\n onRightNode(index, i, text) {\n if (!this.isIOS) {\n this.rightSlide()\n this.$emit('dofRightClicked', { index, i, text })\n } else {\n this.special(this.$refs.skid[this.saveIdx], {\n transform: 'translate(0, 0)'\n })\n this.$emit('dofRightClicked', { index, i, text })\n }\n },\n\n onPanEnd(e, node, i) {\n if (Utils.env.isWeb()) {\n const webEndX = e.changedTouches[0].pageX\n this.movingDistance(webEndX - this.webStarX, node, this.$refs.skid[i])\n }\n },\n\n handleHorizontalpan(e, item, index) {\n !this.isAndroid && this.onPanStart(e, item, index, item.rightItem ? item.rightItem.length : 0)\n },\n handlePanEnd(e, item, index) {\n this.onPanEnd(e, item, index)\n },\n // 使用官方的pan事件解决某些ios设备使用@swipe不能滑动的问题\n onPanStart: function(e, node, i, len) {\n const { saveIdx } = this\n if (saveIdx !== i && saveIdx !== null && this.$refs.skid[saveIdx]) {\n this.special(this.$refs.skid[saveIdx], {\n transform: 'translate(0, 0)'\n })\n this.mobileX = 0\n }\n this.saveIdx = i\n this.mobile(e, node, i, len)\n // !Utils.env.isWeb() ? this.mobile(e, node, i, len) : this.web(e, node, i)\n // e.stopPropagation()\n },\n web(e, node, i) {\n this.webStarX = e.changedTouches[0].pageX\n },\n mobile(e, node, i, len) {\n var el = this.$refs['skid'][i]\n Binding.bind(\n {\n anchor: el.ref,\n eventType: 'pan',\n props: [\n {\n element: el.ref,\n property: 'transform.translateX',\n // expression: `x+${this.isAndroid ? 0 : this.mobileX}`\n expression: this.rightWidth(node) //处理ios设备左滑移动距离,防止闪烁\n }\n ]\n },\n e => {\n const { state, deltaX } = e\n if (state === 'end') {\n this.mobileX = deltaX\n // this.movingDistance(this.mobileX, node, el);\n this.movingDistance(e.deltaX, node, el) //add by lau\n }\n }\n )\n },\n movingDistance(scope, node, el) {\n const len = node.rightItem ? node.rightItem.length : 0\n const distance = -this.rightWidth(node)\n // if (scope < -80*len) {\n // this.special(el, {\n // transform: `translate(${distance}px, 0)`\n // });\n // this.mobileX = distance;\n // } else {\n // this.special(el, {\n // transform: 'translate(0, 0)'\n // });\n // this.mobileX = 0;\n // }\n\n //modify by lau\n if (scope < 0) {\n this.special(el, {\n transform: `translate(${distance}px, 0)`\n })\n } else if (scope > 0) {\n this.special(el, {\n transform: 'translate(0, 0)'\n })\n } else {\n return\n }\n },\n\n // 适配Android\n // 经n次尝试和测试后,发现weex的click事件和touchend事件冲突, 防止滑动后触发click事件\n // 这里异步处理,touchend事件结束后才激活向上传递的click事件\n touchend() {\n setTimeout(() => {\n this.cellCanClick = true\n }, 100)\n },\n\n slideMenu(e, index, item) {\n let length = item.rightItem.length\n this.cellCanClick = false\n let listItems = this.$refs.menuItem\n let ele = this.$refs.menuItem[index]\n let direction = e.direction\n if (direction == 'left') {\n this.leftSlide(e, ele, length, this.listData[index])\n } else if (direction == 'right') {\n this.rightSlide(ele)\n }\n e.stopPropagation()\n },\n\n // @params ele 要执行动画的元素\n leftSlide(e, ele, length, item) {\n this.rightSlide()\n animation.transition(ele, {\n styles: {\n transform: `translateX(-${this.rightWidth(item)}px)`\n },\n duration: 150, //ms\n timingFunction: 'ease',\n // needLayout: false, //变化后是否刷新页面\n delay: 0 //ms\n })\n e.stopPropagation()\n },\n\n rightSlide() {\n let listItems = this.$refs.menuItem\n for (let i = 0; i < listItems.length; i++) {\n animation.transition(\n listItems[i],\n {\n styles: {\n transform: 'translateX(0px)'\n },\n duration: 100, //ms\n timingFunction: 'ease-in',\n needLayout: true,\n delay: 0 //ms\n },\n function() {}\n )\n }\n return false\n },\n\n rightWidth(item) {\n if (item.rightItem && item.rightItem.length) {\n return item.rightItem.reduce((pre, cur) => pre + (cur.width || 160), 0)\n }\n return 0\n },\n handleSwitchChange(item) {\n item.switchVal = !item.switchVal\n this.$emit('switchChange', item)\n }\n }\n}\n</script>\n",null],"sourceRoot":""}]);
|
|
9371
|
+
exports.push([module.i, "\n.container[data-v-89145938] {\n /* background-color: #ffffff; */\n overflow: hidden;\n}\n.dof-skid[data-v-89145938] {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n /* background-color: #ffffff; */\n overflow: hidden;\n}\n\n/* \n.swipe-action-right {\n flex-direction: row;\n align-items: center;\n overflow: hidden;\n}\n\n.swipeItem{\n display: flex;\n justify-content: center;\n align-items: center;\n flex: 1;\n}\n.swipeText{\n flex: 1;\n color: #FFFFFF;\n text-align: center;\n align-items: center;\n lines:1;\n text-overflow: ellipsis;\n overflow: hidden;\n} */\n\n/* android */\n.itemWrap[data-v-89145938] {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-pack: start;\n -webkit-justify-content: flex-start;\n justify-content: flex-start;\n -webkit-box-align: stretch;\n -webkit-align-items: stretch;\n align-items: stretch;\n}\n.swipe-action-right[data-v-89145938] {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-pack: start;\n -webkit-justify-content: flex-start;\n justify-content: flex-start;\n -webkit-box-align: stretch;\n -webkit-align-items: stretch;\n align-items: stretch;\n overflow: hidden;\n}\n.swipeItem[data-v-89145938] {\n /* width: 160px; */\n /* height: 160px; */\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 -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n position: relative;\n}\n.mask[data-v-89145938] {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(255, 255, 255, 0);\n}\n.mask[data-v-89145938]:active {\n background-color: rgba(255, 255, 255, 0.1);\n}\n.swipeText[data-v-89145938] {\n font-size: 0.42667rem;\n color: #ffffff;\n text-align: center;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n lines: 2;\n /* line-height: 48px; */\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: 2;\n}\n.cellBox[data-v-89145938] {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-swipe-action/index.vue?385f8d7c","/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-swipe-action/<no source>"],"names":[],"mappings":";AAmGA;EACA,gCAAA;EACA,iBAAA;CACA;AACA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,gCAAA;EACA,iBAAA;CACA;;AAEA;;;;;;;;;;;;;;;;;;;;;IAqBA;;AAEA,aAAA;AAEA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,wBAAA;EAAA,oCAAA;UAAA,4BAAA;EACA,2BAAA;EAAA,6BAAA;UAAA,qBAAA;CACA;AAEA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,wBAAA;EAAA,oCAAA;UAAA,4BAAA;EACA,2BAAA;EAAA,6BAAA;UAAA,qBAAA;EACA,iBAAA;CACA;AACA;EACA,mBAAA;EACA,oBAAA;EACA,yBAAA;EAAA,gCAAA;UAAA,wBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;EACA,mBAAA;CACA;AACA;EACA,mBAAA;EACA,OAAA;EACA,QAAA;EACA,SAAA;EACA,UAAA;EACA,yCAAA;CACA;AACA;EACA,2CAAA;CACA;AAEA;EACA,sBAAA;EACA,eAAA;EACA,mBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,SAAA;EACA,wBAAA;EACA,wBAAA;EACA,iBAAA;EC9KA,iBAAA;EAAA,wBAAA;EAAA,sBAAA;CD+KA;AACA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;CACA","file":"index.vue","sourcesContent":["<template>\n <div>\n <div v-if=\"!isIOS\" class=\"container\" :style=\"{ width: _cellWidth + 'px', 'padding-right': padding + 'px' }\">\n <div\n class=\"itemWrap\"\n ref=\"menuItem\"\n :style=\"{ width: _cellWidth + rightWidth(item) + 'px' }\"\n v-for=\"(item, index) in listData\"\n :key=\"index\"\n @swipe=\"slideMenu($event, index, item)\"\n @touchend=\"touchend\"\n >\n <div v-if=\"padding\" :style=\"{ width: padding + 'px' }\"></div>\n <div class=\"cellBox\">\n <dof-cell\n ref=\"cell\"\n v-bind=\"item\"\n :isHighlight=\"isHighlight\"\n :click-activied=\"false\"\n @dofCellClicked=\"cellCanClick ? dofCellClicked(index) : ''\"\n >\n <dof-switch\n v-if=\"item.switchVal !== undefined\"\n slot=\"switch\"\n :checked=\"item.switchVal\"\n @dof-change=\"handleSwitchChange(item)\"\n ></dof-switch>\n </dof-cell>\n </div>\n <div\n class=\"swipe-action-right\"\n v-if=\"item.rightItem && item.rightItem.length > 0\"\n :style=\"{ width: rightWidth(item) + 'px', paddingLeft: padding ? '16px' : '0px' }\"\n >\n <div\n :class=\"['swipeItem']\"\n v-for=\"(rightCon, i) in item.rightItem\"\n :key=\"i\"\n :style=\"{ backgroundColor: rightCon.bgColor }\"\n >\n <text class=\"swipeText\">{{ rightCon.text }}</text>\n <text class=\"swipeText\">{{ rightCon.text1 }}</text>\n <text class=\"swipeText\">{{ rightCon.text2 }}</text>\n <div class=\"mask\" @click=\"onRightNode(index, i, rightCon.text)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div v-else class=\"container\" :style=\"{ width: _cellWidth + 'px', 'padding-right': padding + 'px' }\">\n <div\n ref=\"skid\"\n v-for=\"(item, index) of listData\"\n :key=\"'skid-' + index\"\n class=\"dof-skid\"\n :style=\"{ width: _cellWidth + rightWidth(item) + 'px' }\"\n @horizontalpan=\"handleHorizontalpan(event, item, index)\"\n @panend=\"handlePanEnd(event, item, index)\"\n >\n <div v-if=\"padding\" :style=\"{ width: padding + 'px' }\"></div>\n <div class=\"cellBox\">\n <dof-cell\n ref=\"cell\"\n v-bind=\"item\"\n :isHighlight=\"isHighlight\"\n :click-activied=\"false\"\n @dofCellClicked.stop=\"dofCellClicked(index)\"\n >\n <dof-switch\n v-if=\"item.switchVal !== undefined\"\n slot=\"switch\"\n :checked=\"item.switchVal\"\n @dof-change=\"handleSwitchChange(item)\"\n ></dof-switch>\n </dof-cell>\n </div>\n\n <div\n class=\"swipe-action-right\"\n v-if=\"item.rightItem && item.rightItem.length > 0\"\n :style=\"{ width: rightWidth(item) + 'px', paddingLeft: padding ? '16px' : '0px' }\"\n >\n <div\n :class=\"['swipeItem']\"\n v-for=\"(rightCon, i) in item.rightItem\"\n :key=\"i\"\n :style=\"{ backgroundColor: rightCon.bgColor }\"\n >\n <text class=\"swipeText\">{{ rightCon.text }}</text>\n <text class=\"swipeText\">{{ rightCon.text1 }}</text>\n <text class=\"swipeText\">{{ rightCon.text2 }}</text>\n <div class=\"mask\" @click=\"onRightNode(index, i, rightCon.text)\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.container {\n /* background-color: #ffffff; */\n overflow: hidden;\n}\n.dof-skid {\n flex-direction: row;\n /* background-color: #ffffff; */\n overflow: hidden;\n}\n\n/* \n.swipe-action-right {\n flex-direction: row;\n align-items: center;\n overflow: hidden;\n}\n\n.swipeItem{\n display: flex;\n justify-content: center;\n align-items: center;\n flex: 1;\n}\n.swipeText{\n flex: 1;\n color: #FFFFFF;\n text-align: center;\n align-items: center;\n lines:1;\n text-overflow: ellipsis;\n overflow: hidden;\n} */\n\n/* android */\n\n.itemWrap {\n flex-direction: row;\n justify-content: flex-start;\n align-items: stretch;\n}\n\n.swipe-action-right {\n flex-direction: row;\n justify-content: flex-start;\n align-items: stretch;\n overflow: hidden;\n}\n.swipeItem {\n /* width: 160px; */\n /* height: 160px; */\n justify-content: center;\n align-items: center;\n flex: 1;\n position: relative;\n}\n.mask {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(255, 255, 255, 0);\n}\n.mask:active {\n background-color: rgba(255, 255, 255, 0.1);\n}\n\n.swipeText {\n font-size: 32px;\n color: #ffffff;\n text-align: center;\n align-items: center;\n lines: 2;\n /* line-height: 48px; */\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.cellBox {\n flex: 1;\n}\n</style>\n<style scoped src=\"./colmo.css\"></style>\n\n<script>\nimport Binding from 'weex-bindingx/lib/index.weex.js'\nconst animation = weex.requireModule('animation')\nimport Utils from '../utils'\nconst modal = weex.requireModule('modal')\nconst dom = weex.requireModule('dom')\nimport DofCell from '../dof-cell'\nimport DofSwitch from '../dof-switch'\n\nexport default {\n props: {\n listData: {\n type: Array,\n default: () => []\n },\n // styles: {\n // type: Object,\n // default: ()=>({})\n // }\n cellWidth: {\n type: Number,\n default: 0\n },\n padding: {\n type: Number,\n default: 0\n }\n },\n computed: {\n _cellWidth() {\n if (this.cellWidth) return this.cellWidth\n if (this.padding) return 750 - this.padding\n return 750\n }\n },\n components: {\n DofCell,\n DofSwitch\n },\n data() {\n return {\n mobileX: 0,\n webStarX: 0,\n saveIdx: null,\n isAndroid: Utils.env.isAndroid(),\n isIOS: Utils.env.isIOS(),\n\n cellCanClick: true, //android\n isHighlight: false\n }\n },\n\n mounted() {},\n\n methods: {\n dofCellClicked(index) {\n //点击触发滑动恢复初始化\n if (!this.isIOS) {\n this.rightSlide() // 列表初始化\n this.cellCanClick && this.$emit('dofCellClicked', { index })\n } else {\n for (let index = 0; index < this.listData.length; index++) {\n this.special(this.$refs.skid[index], {\n transform: 'translate(0, 0)'\n })\n }\n this.$emit('dofCellClicked', { index })\n }\n },\n\n special(dom, styles) {\n animation.transition(dom, {\n styles,\n duration: 150, // ms\n timingFunction: 'ease',\n delay: 0 // ms\n })\n },\n onRightNode(index, i, text) {\n if (!this.isIOS) {\n this.rightSlide()\n this.$emit('dofRightClicked', { index, i, text })\n } else {\n this.special(this.$refs.skid[this.saveIdx], {\n transform: 'translate(0, 0)'\n })\n this.$emit('dofRightClicked', { index, i, text })\n }\n },\n\n onPanEnd(e, node, i) {\n if (Utils.env.isWeb()) {\n const webEndX = e.changedTouches[0].pageX\n this.movingDistance(webEndX - this.webStarX, node, this.$refs.skid[i])\n }\n },\n\n handleHorizontalpan(e, item, index) {\n !this.isAndroid && this.onPanStart(e, item, index, item.rightItem ? item.rightItem.length : 0)\n },\n handlePanEnd(e, item, index) {\n this.onPanEnd(e, item, index)\n },\n // 使用官方的pan事件解决某些ios设备使用@swipe不能滑动的问题\n onPanStart: function(e, node, i, len) {\n const { saveIdx } = this\n if (saveIdx !== i && saveIdx !== null && this.$refs.skid[saveIdx]) {\n this.special(this.$refs.skid[saveIdx], {\n transform: 'translate(0, 0)'\n })\n this.mobileX = 0\n }\n this.saveIdx = i\n this.mobile(e, node, i, len)\n // !Utils.env.isWeb() ? this.mobile(e, node, i, len) : this.web(e, node, i)\n // e.stopPropagation()\n },\n web(e, node, i) {\n this.webStarX = e.changedTouches[0].pageX\n },\n mobile(e, node, i, len) {\n var el = this.$refs['skid'][i]\n Binding.bind(\n {\n anchor: el.ref,\n eventType: 'pan',\n props: [\n {\n element: el.ref,\n property: 'transform.translateX',\n // expression: `x+${this.isAndroid ? 0 : this.mobileX}`\n expression: this.rightWidth(node) //处理ios设备左滑移动距离,防止闪烁\n }\n ]\n },\n e => {\n const { state, deltaX } = e\n if (state === 'end') {\n this.mobileX = deltaX\n // this.movingDistance(this.mobileX, node, el);\n this.movingDistance(e.deltaX, node, el) //add by lau\n }\n }\n )\n },\n movingDistance(scope, node, el) {\n const len = node.rightItem ? node.rightItem.length : 0\n const distance = -this.rightWidth(node)\n // if (scope < -80*len) {\n // this.special(el, {\n // transform: `translate(${distance}px, 0)`\n // });\n // this.mobileX = distance;\n // } else {\n // this.special(el, {\n // transform: 'translate(0, 0)'\n // });\n // this.mobileX = 0;\n // }\n\n //modify by lau\n if (scope < 0) {\n this.special(el, {\n transform: `translate(${distance}px, 0)`\n })\n } else if (scope > 0) {\n this.special(el, {\n transform: 'translate(0, 0)'\n })\n } else {\n return\n }\n },\n\n // 适配Android\n // 经n次尝试和测试后,发现weex的click事件和touchend事件冲突, 防止滑动后触发click事件\n // 这里异步处理,touchend事件结束后才激活向上传递的click事件\n touchend() {\n setTimeout(() => {\n this.cellCanClick = true\n }, 100)\n },\n\n slideMenu(e, index, item) {\n let length = item.rightItem.length\n this.cellCanClick = false\n let listItems = this.$refs.menuItem\n let ele = this.$refs.menuItem[index]\n let direction = e.direction\n if (direction == 'left') {\n this.leftSlide(e, ele, length, this.listData[index])\n } else if (direction == 'right') {\n this.rightSlide(ele)\n }\n e.stopPropagation()\n },\n\n // @params ele 要执行动画的元素\n leftSlide(e, ele, length, item) {\n this.rightSlide()\n animation.transition(ele, {\n styles: {\n transform: `translateX(-${this.rightWidth(item)}px)`\n },\n duration: 150, //ms\n timingFunction: 'ease',\n // needLayout: false, //变化后是否刷新页面\n delay: 0 //ms\n })\n e.stopPropagation()\n },\n\n rightSlide() {\n let listItems = this.$refs.menuItem\n for (let i = 0; i < listItems.length; i++) {\n animation.transition(\n listItems[i],\n {\n styles: {\n transform: 'translateX(0px)'\n },\n duration: 100, //ms\n timingFunction: 'ease-in',\n needLayout: true,\n delay: 0 //ms\n },\n function() {}\n )\n }\n return false\n },\n\n rightWidth(item) {\n if (item.rightItem && item.rightItem.length) {\n return item.rightItem.reduce((pre, cur) => pre + (cur.width || 160), 0)\n }\n return 0\n },\n handleSwitchChange(item) {\n item.switchVal = !item.switchVal\n this.$emit('switchChange', item)\n }\n }\n}\n</script>\n",null],"sourceRoot":""}]);
|
|
9372
9372
|
|
|
9373
9373
|
// exports
|
|
9374
9374
|
|
|
@@ -9648,7 +9648,7 @@ exports = module.exports = __webpack_require__(0)(true);
|
|
|
9648
9648
|
|
|
9649
9649
|
|
|
9650
9650
|
// module
|
|
9651
|
-
exports.push([module.i, "\n.indicator {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 0.66667rem;\n item-color: rgba(255, 255, 255, 0.5);\n item-selectedcolor: rgba(255, 255, 255, 1);\n item-size: 0.18667rem;\n}\n.indicator .weex-indicator-item {\n width: 0.18667rem;\n height: 0.18667rem;\n}\n.indicator .weex-indicator-item {\n background-color: rgba(255, 255, 255, 0.5);\n}\n.slider {\n /* background-color: #f2f2f2; */\n /* margin-left: 32px; */\n border-radius: 0.21333rem;\n}\n.image {\n border-radius: 0.21333rem;\n /* background-color: #f2f2f2; */\n}\n.div_out {\n border-radius: 0.21333rem;\n position: relative;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-swiper/index.vue?3b03a1f1","/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-swiper/<input css
|
|
9651
|
+
exports.push([module.i, "\n.indicator {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 0.66667rem;\n item-color: rgba(255, 255, 255, 0.5);\n item-selectedcolor: rgba(255, 255, 255, 1);\n item-size: 0.18667rem;\n}\n.indicator .weex-indicator-item {\n width: 0.18667rem;\n height: 0.18667rem;\n}\n.indicator .weex-indicator-item {\n background-color: rgba(255, 255, 255, 0.5);\n}\n.slider {\n /* background-color: #f2f2f2; */\n /* margin-left: 32px; */\n border-radius: 0.21333rem;\n}\n.image {\n border-radius: 0.21333rem;\n /* background-color: #f2f2f2; */\n}\n.div_out {\n border-radius: 0.21333rem;\n position: relative;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-swiper/index.vue?3b03a1f1","/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-swiper/<input css 14>","/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-swiper/<input css 13>"],"names":[],"mappings":";AAiCA;EACA,mBAAA;EACA,UAAA;EACA,QAAA;EACA,SAAA;EACA,mBAAA;EACA,qCAAA;EACA,2CAAA;EACA,sBAAA;CACA;ACzCA;EACE,kBAAY;EACZ,mBAAa;CACd;ACHD;EACE,2CAA2C;CAC5C;AFwCD;EACA,gCAAA;EACA,wBAAA;EACA,0BAAA;CACA;AACA;EACA,0BAAA;EACA,gCAAA;CACA;AACA;EACA,0BAAA;EACA,mBAAA;CACA","file":"index.vue","sourcesContent":["<template>\n <div :style=\"{ marginLeft: divLeft, width: imgWidth }\" class=\"div_out\">\n <slider\n class=\"slider\"\n :style=\"sliderStyle\"\n :interval=\"interval\"\n @change=\"change\"\n :auto-play=\"autoplay\"\n :infinite=\"infinite\"\n >\n <div v-for=\"(item, index) in slItems\" :key=\"index\" @click=\"imgClicked(item, index)\">\n <image\n :resize=\"imgResize\"\n :style=\"{ width: imgWidth, height: imgHeight, backgroundColor: imageBgColor }\"\n :src=\"item.url\"\n :placeholder=\"phImgUrl\"\n class=\"image\"\n >\n </image>\n </div>\n <indicator class=\"indicator\" :style=\"indicatorStyle\" v-if=\"showIndicator && !_isColmo\"></indicator>\n </slider>\n <div class=\"indicator-box\" v-if=\"showIndicator && _isColmo\">\n <div\n :class=\"['indicator-item', i === slItems.length - 1 && 'isLast', i == active && 'active']\"\n v-for=\"(item, i) in slItems\"\n :key=\"i\"\n ></div>\n </div>\n </div>\n</template>\n\n<style>\n.indicator {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 50px;\n item-color: rgba(255, 255, 255, 0.5);\n item-selectedcolor: rgba(255, 255, 255, 1);\n item-size: 14px;\n}\n.slider {\n /* background-color: #f2f2f2; */\n /* margin-left: 32px; */\n border-radius: 16px;\n}\n.image {\n border-radius: 16px;\n /* background-color: #f2f2f2; */\n}\n.div_out {\n border-radius: 16px;\n position: relative;\n}\n</style>\n<style scoped src=\"./colmo.css\"></style>\n\n<script>\nconst icon = require('../setting/icon.base64')\nvar PLACEHOLDERIMAGE = icon['ic_img_null@2x']\nconst modal = weex.requireModule('modal')\nimport ColmoMixin from '../../mixins/colmo'\n\nexport default {\n mixins: [ColmoMixin],\n props: {\n sliderStyle: {\n type: Object,\n default: () => ({\n width: '686px',\n height: '280px',\n position: 'relative'\n })\n },\n indicatorStyle: {\n type: Object,\n default: () => ({})\n },\n items: {\n type: Array,\n default: () => []\n },\n interval: {\n type: Number,\n default: 3000\n },\n autoplay: {\n type: Boolean,\n default: true\n },\n infinite: {\n type: Boolean,\n default: true\n },\n imgResize: {\n type: String,\n default: 'cover'\n },\n imgWidth: {\n type: String,\n default: '686px'\n },\n divLeft: {\n type: String,\n default: '32px'\n },\n imgHeight: {\n type: String,\n default: '280px'\n },\n showIndicator: {\n type: Boolean,\n default: true\n },\n phImgUrl: {\n type: String,\n default: PLACEHOLDERIMAGE\n },\n imageBgColor: {\n type: String,\n default: '#f2f2f2'\n }\n },\n data: function() {\n return {\n slItems: [],\n active: 0\n }\n },\n created() {\n if (this.items.length > 10) {\n this.slItems.splice(0)\n this.slItems = this.items.slice(0, 10)\n } else if (this.items.length <= 10) {\n this.slItems.splice(0)\n this.slItems = this.items.slice(0)\n }\n },\n methods: {\n imgClicked(target, index) {\n this.$emit('dofSwiperClicked', { target, index })\n },\n change(val) {\n this.active = val.index\n }\n }\n}\n</script>\n","\n.indicator .weex-indicator-item {\n width: 14px;\n height: 14px;\n}","\n.indicator .weex-indicator-item {\n background-color: rgba(255, 255, 255, 0.5);\n}"],"sourceRoot":""}]);
|
|
9652
9652
|
|
|
9653
9653
|
// exports
|
|
9654
9654
|
|
|
@@ -31437,7 +31437,7 @@ exports.default = {
|
|
|
31437
31437
|
methods: {
|
|
31438
31438
|
dofCellClicked: function dofCellClicked(index) {
|
|
31439
31439
|
//点击触发滑动恢复初始化
|
|
31440
|
-
if (this.
|
|
31440
|
+
if (!this.isIOS) {
|
|
31441
31441
|
this.rightSlide(); // 列表初始化
|
|
31442
31442
|
this.cellCanClick && this.$emit('dofCellClicked', { index: index });
|
|
31443
31443
|
} else {
|