maramlee-waterfalls-flow.js.map
14.2 KB
{"version":3,"sources":["webpack:///C:/Users/15121/Desktop/44444/components/maramlee-waterfalls-flow/maramlee-waterfalls-flow.vue?f73c","webpack:///C:/Users/15121/Desktop/44444/components/maramlee-waterfalls-flow/maramlee-waterfalls-flow.vue?97ca","webpack:///C:/Users/15121/Desktop/44444/components/maramlee-waterfalls-flow/maramlee-waterfalls-flow.vue?93b9","webpack:///C:/Users/15121/Desktop/44444/components/maramlee-waterfalls-flow/maramlee-waterfalls-flow.vue?c830","uni-app:///components/maramlee-waterfalls-flow/maramlee-waterfalls-flow.vue","webpack:///C:/Users/15121/Desktop/44444/components/maramlee-waterfalls-flow/maramlee-waterfalls-flow.vue?a24a","webpack:///C:/Users/15121/Desktop/44444/components/maramlee-waterfalls-flow/maramlee-waterfalls-flow.vue?79e9"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAiJ;AACjJ;AAC4E;AACL;AACsC;;;AAG7G;AACuL;AACvL,gBAAgB,2LAAU;AAC1B,EAAE,8FAAM;AACR,EAAE,+GAAM;AACR,EAAE,wHAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,mHAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;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;AAAytB,CAAgB,wsBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC8D7uB;AACA;AACA,yCADA;AAEA;AACA,yCAHA;AAIA;AACA,0CALA;AAMA;AACA,uDAPA;AAQA;AACA,6FATA;AAUA,gCAVA;;AAYA;AACA,6CAbA,EADA;;;;;;AAoBA,MApBA,kBAoBA;AACA;AACA,gBADA,EACA;AACA,wBAFA,EAEA;AACA,sBAHA,EAGA;AACA,eAJA,EAIA;AACA,eALA;AAMA,YANA;;AAQA,GA7BA;AA8BA,SA9BA,qBA8BA;AACA;AACA,GAhCA;AAiCA;AACA,mBADA,2BACA,KADA,EACA;AACA;AACA,gDADA;AAEA;AACA,YADA,CACA,QADA;AAEA,YAFA,CAEA,cAFA,EAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DADA;AAEA,uCAFA;AAGA,yEAHA;AAIA,mDAJA;;AAMA,aARA,CADA;;AAWA,0BAXA,CAWA,YAXA,iBAWA,YAXA,CAWA,YAXA,iBAWA,YAXA;AAYA;AACA,sCADA;AAEA,qEAFA;;AAIA;AACA;AACA,+DADA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OA/BA;AAgCA,UAhCA;AAiCA,KArCA;AAsCA,WAtCA,qBAsCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KA/CA,EAjCA,E;;;;;;;;;;;;;AC9DA;AAAA;AAAA;AAAA;AAA42C,CAAgB,uwCAAG,EAAC,C;;;;;;;;;;;ACAh4C;AACA,OAAO,KAAU,EAAE,kBAKd","file":"components/maramlee-waterfalls-flow/maramlee-waterfalls-flow.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./maramlee-waterfalls-flow.vue?vue&type=template&id=b7348238&scoped=true&\"\nvar renderjs\nimport script from \"./maramlee-waterfalls-flow.vue?vue&type=script&lang=js&\"\nexport * from \"./maramlee-waterfalls-flow.vue?vue&type=script&lang=js&\"\nimport style0 from \"./maramlee-waterfalls-flow.vue?vue&type=style&index=0&id=b7348238&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../Program Files/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 \"b7348238\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"components/maramlee-waterfalls-flow/maramlee-waterfalls-flow.vue\"\nexport default component.exports","export * from \"-!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./maramlee-waterfalls-flow.vue?vue&type=template&id=b7348238&scoped=true&\"","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 \"-!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./maramlee-waterfalls-flow.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./maramlee-waterfalls-flow.vue?vue&type=script&lang=js&\"","<template>\n <view class=\"waterfalls-box\" :style=\"{ height: height + 'px' }\">\n <!-- #ifdef MP-WEIXIN -->\n <view\n v-for=\"(item, index) of list\"\n class=\"waterfalls-list\"\n :key=\"item[idKey]\"\n :id=\"'waterfalls-list-id-' + item[idKey]\"\n :ref=\"'waterfalls-list-id-' + item[idKey]\"\n :style=\"{\n '--offset': offset + 'px',\n '--cols': cols,\n top: allPositionArr[index].top || 0,\n left: allPositionArr[index].left || 0,\n }\"\n @click=\"$emit('wapper-lick', item)\"\n >\n <image\n class=\"waterfalls-list-image\"\n mode=\"widthFix\"\n :class=\"{ single }\"\n :style=\"imageStyle\"\n :src=\"item[imageSrcKey] || ' '\"\n @load=\"imageLoadHandle(index)\"\n @error=\"imageLoadHandle(index)\"\n @click=\"$emit('image-click', item)\"\n />\n <slot name=\"slot{{index}}\" />\n </view>\n <!-- #endif -->\n\n <!-- #ifndef MP-WEIXIN -->\n <view\n v-for=\"(item, index) of list\"\n class=\"waterfalls-list\"\n :key=\"item[idKey]\"\n :id=\"'waterfalls-list-id-' + item[idKey]\"\n :ref=\"'waterfalls-list-id-' + item[idKey]\"\n :style=\"{\n '--offset': offset + 'px',\n '--cols': cols,\n ...listStyle,\n ...(allPositionArr[index] || {}),\n }\"\n @click=\"$emit('wapper-lick', item)\"\n >\n <image\n class=\"waterfalls-list-image\"\n :class=\"{ single }\"\n mode=\"widthFix\"\n :style=\"imageStyle\"\n :src=\"item[imageSrcKey] || ' '\"\n @load=\"imageLoadHandle(index)\"\n @error=\"imageLoadHandle(index)\"\n @click=\"$emit('image-click', item)\"\n />\n <slot v-bind=\"item\" />\n </view>\n <!-- #endif -->\n </view>\n</template>\n<script>\nexport default {\n props: {\n list: { type: Array, required: true },\n // offset 间距,单位为 px\n offset: { type: Number, default: 10 },\n // 列表渲染的 key 的键名,值必须唯一,默认为 id\n idKey: { type: String, default: \"id\" },\n // 图片 src 的键名\n imageSrcKey: { type: String, default: \"image_url\" },\n // 列数\n cols: { type: Number, default: 2, validator: (num) => num >= 2 },\n imageStyle: { type: Object },\n\n // 是否是单独的渲染图片的样子,只控制图片圆角而已\n single: { type: Boolean, default: false },\n\n // #ifndef MP-WEIXIN\n listStyle: { type: Object },\n // #endif\n },\n data() {\n return {\n topArr: [], // left, right 多个时依次表示第几列的数据\n allPositionArr: [], // 保存所有的位置信息\n allHeightArr: [], // 保存所有的 height 信息\n height: 0, // 外层包裹高度\n oldNum: 0,\n num: 0,\n };\n },\n created() {\n this.refresh();\n },\n methods: {\n imageLoadHandle(index) {\n const id = \"waterfalls-list-id-\" + this.list[index][this.idKey],\n query = uni.createSelectorQuery().in(this);\n query\n .select(\"#\" + id)\n .fields({ size: true }, (data) => {\n this.num++;\n this.$set(this.allHeightArr, index, data.height);\n if (this.num === this.list.length) {\n for (let i = this.oldNum; i < this.num; i++) {\n const getTopArrMsg = () => {\n let arrtmp = [...this.topArr].sort((a, b) => a - b);\n return {\n shorterIndex: this.topArr.indexOf(arrtmp[0]),\n shorterValue: arrtmp[0],\n longerIndex: this.topArr.indexOf(arrtmp[this.cols - 1]),\n longerValue: arrtmp[this.cols - 1],\n };\n };\n\n const { shorterIndex, shorterValue } = getTopArrMsg();\n const position = {\n top: shorterValue + \"px\",\n left: (data.width + this.offset) * shorterIndex + \"px\",\n };\n this.$set(this.allPositionArr, i, position);\n this.topArr[shorterIndex] =\n shorterValue + this.allHeightArr[i] + this.offset;\n this.height = getTopArrMsg().longerValue - this.offset;\n }\n this.oldNum = this.num;\n // 完成渲染 emit `image-load` 事件\n this.$emit(\"image-load\");\n }\n })\n .exec();\n },\n refresh() {\n let arr = [];\n for (let i = 0; i < this.cols; i++) {\n arr.push(0);\n }\n this.topArr = arr;\n this.num = 0;\n this.oldNum = 0;\n this.height = 0;\n },\n },\n};\n</script>\n<style lang=\"scss\" scoped>\n// 这里可以自行配置\n$border-radius: 6px;\n\n.waterfalls-box {\n position: relative;\n width: 100%;\n overflow: hidden;\n .waterfalls-list {\n width: calc((100% - var(--offset) * (var(--cols) - 1)) / var(--cols));\n position: absolute;\n background-color: #fff;\n border-radius: $border-radius;\n // 防止刚开始渲染时堆叠在第一幅图的地方\n left: calc(-50% - var(--offset));\n .waterfalls-list-image {\n width: 100%;\n will-change: transform;\n border-radius: $border-radius $border-radius 0 0;\n display: block;\n &.single {\n border-radius: $border-radius;\n }\n }\n }\n}\n</style>\n","import mod from \"-!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./maramlee-waterfalls-flow.vue?vue&type=style&index=0&id=b7348238&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Program Files/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./maramlee-waterfalls-flow.vue?vue&type=style&index=0&id=b7348238&lang=scss&scoped=true&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1669298397448\n var cssReload = require(\"C:/Program Files/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 "],"sourceRoot":""}