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

1 line
7.0 KiB
JSON

{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { createNamespace } from '../utils';\nimport { TouchMixin } from '../mixins/touch';\nvar _createNamespace = createNamespace('tabs'),\n createComponent = _createNamespace[0],\n bem = _createNamespace[1];\nvar MIN_SWIPE_DISTANCE = 50;\nexport default createComponent({\n mixins: [TouchMixin],\n props: {\n count: Number,\n duration: [Number, String],\n animated: Boolean,\n swipeable: Boolean,\n currentIndex: Number\n },\n computed: {\n style: function style() {\n if (this.animated) {\n return {\n transform: \"translate3d(\" + -1 * this.currentIndex * 100 + \"%, 0, 0)\",\n transitionDuration: this.duration + \"s\"\n };\n }\n },\n listeners: function listeners() {\n if (this.swipeable) {\n return {\n touchstart: this.touchStart,\n touchmove: this.touchMove,\n touchend: this.onTouchEnd,\n touchcancel: this.onTouchEnd\n };\n }\n }\n },\n methods: {\n // watch swipe touch end\n onTouchEnd: function onTouchEnd() {\n var direction = this.direction,\n deltaX = this.deltaX,\n currentIndex = this.currentIndex;\n /* istanbul ignore else */\n\n if (direction === 'horizontal' && this.offsetX >= MIN_SWIPE_DISTANCE) {\n /* istanbul ignore else */\n if (deltaX > 0 && currentIndex !== 0) {\n this.$emit('change', currentIndex - 1);\n } else if (deltaX < 0 && currentIndex !== this.count - 1) {\n this.$emit('change', currentIndex + 1);\n }\n }\n },\n genChildren: function genChildren() {\n var h = this.$createElement;\n if (this.animated) {\n return h(\"div\", {\n \"class\": bem('track'),\n \"style\": this.style\n }, [this.slots()]);\n }\n return this.slots();\n }\n },\n render: function render() {\n var h = arguments[0];\n return h(\"div\", {\n \"class\": bem('content', {\n animated: this.animated\n }),\n \"on\": _extends({}, this.listeners)\n }, [this.genChildren()]);\n }\n});","map":{"version":3,"names":["_extends","createNamespace","TouchMixin","_createNamespace","createComponent","bem","MIN_SWIPE_DISTANCE","mixins","props","count","Number","duration","String","animated","Boolean","swipeable","currentIndex","computed","style","transform","transitionDuration","listeners","touchstart","touchStart","touchmove","touchMove","touchend","onTouchEnd","touchcancel","methods","direction","deltaX","offsetX","$emit","genChildren","h","$createElement","slots","render","arguments"],"sources":["E:/work/sino/sino-h5/node_modules/vant/es/tabs/Content.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { createNamespace } from '../utils';\nimport { TouchMixin } from '../mixins/touch';\n\nvar _createNamespace = createNamespace('tabs'),\n createComponent = _createNamespace[0],\n bem = _createNamespace[1];\n\nvar MIN_SWIPE_DISTANCE = 50;\nexport default createComponent({\n mixins: [TouchMixin],\n props: {\n count: Number,\n duration: [Number, String],\n animated: Boolean,\n swipeable: Boolean,\n currentIndex: Number\n },\n computed: {\n style: function style() {\n if (this.animated) {\n return {\n transform: \"translate3d(\" + -1 * this.currentIndex * 100 + \"%, 0, 0)\",\n transitionDuration: this.duration + \"s\"\n };\n }\n },\n listeners: function listeners() {\n if (this.swipeable) {\n return {\n touchstart: this.touchStart,\n touchmove: this.touchMove,\n touchend: this.onTouchEnd,\n touchcancel: this.onTouchEnd\n };\n }\n }\n },\n methods: {\n // watch swipe touch end\n onTouchEnd: function onTouchEnd() {\n var direction = this.direction,\n deltaX = this.deltaX,\n currentIndex = this.currentIndex;\n /* istanbul ignore else */\n\n if (direction === 'horizontal' && this.offsetX >= MIN_SWIPE_DISTANCE) {\n /* istanbul ignore else */\n if (deltaX > 0 && currentIndex !== 0) {\n this.$emit('change', currentIndex - 1);\n } else if (deltaX < 0 && currentIndex !== this.count - 1) {\n this.$emit('change', currentIndex + 1);\n }\n }\n },\n genChildren: function genChildren() {\n var h = this.$createElement;\n\n if (this.animated) {\n return h(\"div\", {\n \"class\": bem('track'),\n \"style\": this.style\n }, [this.slots()]);\n }\n\n return this.slots();\n }\n },\n render: function render() {\n var h = arguments[0];\n return h(\"div\", {\n \"class\": bem('content', {\n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