1 |
- {"version":3,"sources":["webpack:///D:/Code2024/sulibao-mini/tuniao-ui/components/tn-grid/tn-grid.vue?792d","webpack:///D:/Code2024/sulibao-mini/tuniao-ui/components/tn-grid/tn-grid.vue?22b7","webpack:///D:/Code2024/sulibao-mini/tuniao-ui/components/tn-grid/tn-grid.vue?0369","webpack:///D:/Code2024/sulibao-mini/tuniao-ui/components/tn-grid/tn-grid.vue?706e","uni-app:///tuniao-ui/components/tn-grid/tn-grid.vue","webpack:///D:/Code2024/sulibao-mini/tuniao-ui/components/tn-grid/tn-grid.vue?08bb"],"names":["renderjs","component","options","__file","components","render","_vm","this","_h","$createElement","_self","_c","recyclableRender","staticRenderFns","_withStripped","name","props","col","type","default","align","hoverClass","data","watch","parentData","created","computed","gridAlignStyle","methods","click"],"mappings":"qIAAA,oIACIA,EADJ,QASIC,EAAY,qBACd,aACA,YACA,sBACA,EACA,KACA,WACA,MACA,EACA,gBACAD,GAGFC,EAAUC,QAAQC,OAAS,2CACZ,aAAAF,E,0CCvBf,uQ,iCCAA,IAAIG,EAAJ,0LACA,IAAIC,EAAS,WACX,IAAIC,EAAMC,KACNC,EAAKF,EAAIG,eACJH,EAAII,MAAMC,IAEjBC,GAAmB,EACnBC,EAAkB,GACtBR,EAAOS,eAAgB,G,iCCRvB,yHAA20B,eAAG,G,yGCY90B,CACAC,eACAC,OAEAC,KACAC,qBACAC,WAIAC,OACAF,YACAC,gBAGAE,YACAH,YACAC,qBAGAG,gBACA,UAIAC,OAEAC,sBACA,sBACA,+BAEA,kEAKAC,mBAEA,kBAEAC,UAEAF,sBACA,8CAGAG,0BACA,mBACA,WACA,mBACA,aACA,eACA,YACA,iBACA,QACA,sBAIAC,SACAC,kBACA,yBAGA,a,iCC5EA,yHAA0jD,eAAG,G","file":"tuniao-ui/components/tn-grid/tn-grid.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./tn-grid.vue?vue&type=template&id=7a8d5220&scoped=true&\"\nvar renderjs\nimport script from \"./tn-grid.vue?vue&type=script&lang=js&\"\nexport * from \"./tn-grid.vue?vue&type=script&lang=js&\"\nimport style0 from \"./tn-grid.vue?vue&type=style&index=0&id=7a8d5220&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../self software/HBuilderX.3.99.2023122611/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 \"7a8d5220\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"tuniao-ui/components/tn-grid/tn-grid.vue\"\nexport default component.exports","export * from \"-!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./tn-grid.vue?vue&type=template&id=7a8d5220&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 \"-!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./tn-grid.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./tn-grid.vue?vue&type=script&lang=js&\"","<template>\r\n <view\r\n class=\"tn-grid-class tn-grid\"\r\n :style=\"{\r\n justifyContent: gridAlignStyle\r\n }\"\r\n >\r\n <slot></slot>\r\n </view>\r\n</template>\r\n\r\n<script>\r\n export default {\r\n name: 'tn-grid',\r\n props: {\r\n // 分成几列\r\n col: {\r\n type: [Number, String],\r\n default: 3\r\n },\r\n // 宫格对齐方式 \r\n // left 左对齐 center 居中对齐 right 右对齐\r\n align: {\r\n type: String,\r\n default: 'left'\r\n },\r\n // 点击时的效果,none没有效果\r\n hoverClass: {\r\n type: String,\r\n default: 'tn-hover'\r\n }\r\n },\r\n data() {\r\n return {\r\n \r\n }\r\n },\r\n watch: {\r\n // 当父组件和子组件需要共享参数变化,通知子组件\r\n parentData() {\r\n if (this.children.length) {\r\n this.children.map(child => {\r\n // 判断子组件是否有updateParentData方式,有才执行\r\n typeof(child.updateParentData) === 'function' && child.updateParentData()\r\n })\r\n }\r\n }\r\n },\r\n created() {\r\n // 如果将children定义在data中,在微信小程序会造成循环引用而报错\r\n this.children = []\r\n },\r\n computed: {\r\n // 计算父组件的值是否发生变化\r\n parentData() {\r\n return [this.hoverClass, this.col, this.border]\r\n },\r\n // 宫格对齐方式\r\n gridAlignStyle() {\r\n switch(this.align) {\r\n case 'left':\r\n return 'flex-start'\r\n case 'center':\r\n return 'center'\r\n case 'right':\r\n return 'flex-end'\r\n default:\r\n return 'flex-start'\r\n }\r\n }\r\n },\r\n methods: {\r\n click(index) {\r\n this.$emit('click', index)\r\n }\r\n }\r\n }\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n \r\n // 组件中兼容小程序的方式,不过不能使用对齐方式\r\n // .tn-grid {\r\n // width: 100%;\r\n // /* #ifdef MP */\r\n // position: relative;\r\n // box-sizing: border-box;\r\n // overflow: hidden;\r\n // /* #endif */\r\n \r\n // /* #ifndef MP */\r\n // /* #ifndef APP-NVUE */\r\n // display: flex;\r\n // flex-direction: row;\r\n // /* #endif */\r\n // flex-wrap: wrap;\r\n // align-items: center;\r\n // /* #endif */\r\n // }\r\n \r\n // 在使用组件时兼容小程序\r\n .tn-grid {\r\n width: 100%;\r\n \r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: wrap;\r\n align-items: center;\r\n }\r\n \r\n</style>\r\n","import mod from \"-!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./tn-grid.vue?vue&type=style&index=0&id=7a8d5220&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../self software/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./tn-grid.vue?vue&type=style&index=0&id=7a8d5220&lang=scss&scoped=true&\""],"sourceRoot":""}
|