(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/tui-swipe-action/index"],{"337d":function(t,e,i){"use strict";i.r(e);var a=i("6a38"),n=i("6ab6");for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);i("9128");var s=i("828b"),p=Object(s["a"])(n["default"],a["b"],a["c"],!1,null,"6bb0f840",null,!1,a["a"],void 0);e["default"]=p.exports},"561d":function(t,e,i){},"6a38":function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,i=(t._self._c,t.actions.length),a=i>0?t.__map(t.actions,(function(e,i){var a=t.__get_orig(e),n=e.icon?t.px(e.imgWidth):null,o=e.icon?t.px(e.imgHeight):null,s=t.px(e.fontsize);return{$orig:a,m0:n,m1:o,m2:s}})):null,n=t.actions.length;t.$mp.data=Object.assign({},{$root:{g0:i,l0:a,g1:n}})},n=[]},"6ab6":function(t,e,i){"use strict";i.r(e);var a=i("975a"),n=i.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(o);e["default"]=n.a},9128:function(t,e,i){"use strict";var a=i("561d"),n=i.n(a);n.a},"975a":function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"tuiSwipeAction",emits:["click"],props:{actions:{type:Array,default:function(){return[]}},closable:{type:Boolean,default:!0},showMask:{type:Boolean,default:!0},operateWidth:{type:Number,default:80},params:{type:Object,default:function(){return{}}},forbid:{type:Boolean,default:!1},open:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#fff"}},watch:{actions:function(t,e){this.updateButtonSize()},open:function(t){this.manualSwitch(t)}},data:function(){return{tStart:{pageX:0,pageY:0},limitMove:0,position:{pageX:0,pageY:0},isShowBtn:!1,move:!1}},mounted:function(){this.updateButtonSize()},methods:{swipeDirection:function(t,e,i,a){return Math.abs(t-e)>=Math.abs(i-a)?t-e>0?"Left":"Right":i-a>0?"Up":"Down"},loop:function(){},updateButtonSize:function(){var e=this.actions;if(e.length>0){t.createSelectorQuery().in(this);var i=0;e.forEach((function(t){i+=t.width||0})),this.limitMove=i}else this.limitMove=this.operateWidth},handlerTouchstart:function(t){if(!this.forbid){var e=t.touches;if(!(e&&e.length>1)){this.move=!0,e=e?t.touches[0]:{},(!e||void 0===e.pageX&&void 0===e.pageY)&&(e={pageX:t.pageX,pageY:t.pageY});var i=this.tStart;if(e)for(var a in i)e[a]&&(i[a]=e[a])}}},swipper:function(t){var e=this.tStart,i={pageX:t.pageX-e.pageX,pageY:t.pageY-e.pageY};this.limitMove<Math.abs(i.pageX)&&(i.pageX=-this.limitMove),this.position=i},handlerTouchmove:function(t){if(!this.forbid&&this.move){var e=this.tStart,i=t.touches?t.touches[0]:{};if((!i||void 0===i.pageX&&void 0===i.pageY)&&(i={pageX:t.pageX,pageY:t.pageY}),i){var a=this.swipeDirection(e.pageX,i.pageX,e.pageY,i.pageY);"Left"===a&&Math.abs(this.position.pageX)!==this.limitMove&&this.swipper(i)}}},handlerTouchend:function(t){if(!this.forbid&&this.move){this.move=!1;var e=this.tStart,i=t.changedTouches?t.changedTouches[0]:{};if((!i||void 0===i.pageX&&void 0===i.pageY)&&(i={pageX:t.pageX,pageY:t.pageY}),i){var a=this.swipeDirection(e.pageX,i.pageX,e.pageY,i.pageY),n={pageX:i.pageX-e.pageX,pageY:i.pageY-e.pageY};Math.abs(n.pageX)>=40&&"Left"===a?(n.pageX=n.pageX<0?-this.limitMove:this.limitMove,this.isShowBtn=!0):n.pageX=0,0==n.pageX&&(this.isShowBtn=!1),this.position=n}}},handlerButton:function(t){this.closable&&this.closeButtonGroup();var e=t.currentTarget.dataset;this.$emit("click",{index:Number(e.index),item:this.params})},closeButtonGroup:function(){this.position={pageX:0,pageY:0},this.isShowBtn=!1},handlerParentButton:function(t){this.closable&&this.closeButtonGroup()},manualSwitch:function(t){var e=0;if(t)if(0===this.actions.length)e=this.operateWidth;else{var i=0;this.actions.forEach((function(t){i+=t.width})),e=i}this.position={pageX:-e,pageY:0}},px:function(e){return t.upx2px(e)+"px"}}};e.default=i}).call(this,i("df3c")["default"])}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/tui-swipe-action/index-create-component',
    {
        'components/tui-swipe-action/index-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('df3c')['createComponent'](__webpack_require__("337d"))
        })
    },
    [['components/tui-swipe-action/index-create-component']]
]);
