tn-modal.js.map 18 KB

1
  1. {"version":3,"sources":["webpack:///D:/Code2024/sulibao-mini/tuniao-ui/components/tn-modal/tn-modal.vue?dba4","webpack:///D:/Code2024/sulibao-mini/tuniao-ui/components/tn-modal/tn-modal.vue?4e9e","webpack:///D:/Code2024/sulibao-mini/tuniao-ui/components/tn-modal/tn-modal.vue?cfcc","webpack:///D:/Code2024/sulibao-mini/tuniao-ui/components/tn-modal/tn-modal.vue?e98b","uni-app:///tuniao-ui/components/tn-modal/tn-modal.vue","webpack:///D:/Code2024/sulibao-mini/tuniao-ui/components/tn-modal/tn-modal.vue?aff1"],"names":["renderjs","component","options","__file","components","tnPopup","tnButton","e","message","indexOf","console","error","render","_vm","this","_h","$createElement","s0","_self","_c","value","__get_style","boxStyle","g0","custom","button","length","g1","l0","__map","item","index","$orig","__get_orig","g2","g3","$mp","data","Object","assign","$root","recyclableRender","staticRenderFns","_withStripped","mixins","name","props","type","default","width","padding","radius","title","content","safeAreaInsetBottom","maskCloseable","showCloseBtn","zoom","zIndex","computed","style","contentClass","clazz","contentStyle","methods","handleClick","close"],"mappings":"uIAAA,oIACIA,EADJ,QASIC,EAAY,qBACd,aACA,YACA,sBACA,EACA,KACA,WACA,MACA,EACA,gBACAD,GAGFC,EAAUC,QAAQC,OAAS,6CACZ,aAAAF,E,0CCvBf,uQ,iCCAA,IAAIG,EAAJ,0LACA,IACEA,EAAa,CACXC,QAAS,WACP,OAAO,0GAITC,SAAU,WACR,OAAO,6GAKX,MAAOC,GACP,IAC+C,IAA7CA,EAAEC,QAAQC,QAAQ,wBACa,IAA/BF,EAAEC,QAAQC,QAAQ,QAWlB,MAAMF,EATNG,QAAQC,MAAMJ,EAAEC,SAChBE,QAAQC,MAAM,mBACdD,QAAQC,MACN,uFAEFD,QAAQC,MACN,mDAMN,IAAIC,EAAS,WACX,IAAIC,EAAMC,KACNC,EAAKF,EAAIG,eAETC,GADKJ,EAAIK,MAAMC,GACVN,EAAIO,MAAQP,EAAIQ,YAAY,CAACR,EAAIS,WAAa,MACnDC,EAAKV,EAAIO,QAAUP,EAAIW,OAASX,EAAIY,QAAUZ,EAAIY,OAAOC,OAAS,KAClEC,EAAKd,EAAIO,QAAUP,EAAIW,QAAUD,EAAKV,EAAIY,OAAOC,OAAS,KAC1DE,EACFf,EAAIO,QAAUP,EAAIW,QAAUD,EACxBV,EAAIgB,MAAMhB,EAAIY,QAAQ,SAAUK,EAAMC,GACpC,IAAIC,EAAQnB,EAAIoB,WAAWH,GACvBI,EAAKrB,EAAIY,OAAOC,OAChBS,EAAKtB,EAAIY,OAAOC,OACpB,MAAO,CACLM,MAAOA,EACPE,GAAIA,EACJC,GAAIA,MAGR,KACNtB,EAAIuB,IAAIC,KAAOC,OAAOC,OACpB,GACA,CACEC,MAAO,CACLvB,GAAIA,EACJM,GAAIA,EACJI,GAAIA,EACJC,GAAIA,MAKRa,GAAmB,EACnBC,EAAkB,GACtB9B,EAAO+B,eAAgB,G,iCCjEvB,yHAA40B,eAAG,G,8GCkE/0B,gB,EACA,CACAC,mBACAC,gBACAC,OAEA1B,OACA2B,aACAC,YAGAC,OACAF,YACAC,eAGAE,SACAH,YACAC,YAGAG,QACAJ,YACAC,YAGAI,OACAL,YACAC,YAGAK,SACAN,YACAC,YAUAvB,QACAsB,WACAC,mBACA,WAGAM,qBACAP,aACAC,YAGAO,eACAR,aACAC,YAGAQ,cACAT,aACAC,YAGAS,MACAV,aACAC,YAGAxB,QACAuB,aACAC,YAGAU,QACAX,YACAC,YAGAW,UACArC,oBACA,SASA,OAPA,eACAsC,wBAEA,4BACAA,6CAGA,GAEAC,wBACA,SAOA,OANA,WACAC,oBAEAA,uCAGA,GAEAC,wBACA,SASA,OAPA,gBACAH,wCAEA,sBACAA,6BAGA,IAGAvB,gBACA,UAIA2B,SAEAC,wBACA,YACA,oBACAlC,mBAIAmC,iBACA,qBACA,0BAGA,a,iCCxMA,yHAA2jD,eAAG,G","file":"tuniao-ui/components/tn-modal/tn-modal.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./tn-modal.vue?vue&type=template&id=3a2c8cbc&scoped=true&\"\nvar renderjs\nimport script from \"./tn-modal.vue?vue&type=script&lang=js&\"\nexport * from \"./tn-modal.vue?vue&type=script&lang=js&\"\nimport style0 from \"./tn-modal.vue?vue&type=style&index=0&id=3a2c8cbc&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 \"3a2c8cbc\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"tuniao-ui/components/tn-modal/tn-modal.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-modal.vue?vue&type=template&id=3a2c8cbc&scoped=true&\"","var components\ntry {\n components = {\n tnPopup: function () {\n return import(\n /* webpackChunkName: \"tuniao-ui/components/tn-popup/tn-popup\" */ \"@/tuniao-ui/components/tn-popup/tn-popup.vue\"\n )\n },\n tnButton: function () {\n return import(\n /* webpackChunkName: \"tuniao-ui/components/tn-button/tn-button\" */ \"@/tuniao-ui/components/tn-button/tn-button.vue\"\n )\n },\n }\n} catch (e) {\n if (\n e.message.indexOf(\"Cannot find module\") !== -1 &&\n e.message.indexOf(\".vue\") !== -1\n ) {\n console.error(e.message)\n console.error(\"1. 排查组件名称拼写是否正确\")\n console.error(\n \"2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom\"\n )\n console.error(\n \"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件\"\n )\n } else {\n throw e\n }\n}\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n var s0 = _vm.value ? _vm.__get_style([_vm.boxStyle]) : null\n var g0 = _vm.value && !_vm.custom ? _vm.button && _vm.button.length : null\n var g1 = _vm.value && !_vm.custom && g0 ? _vm.button.length : null\n var l0 =\n _vm.value && !_vm.custom && g0\n ? _vm.__map(_vm.button, function (item, index) {\n var $orig = _vm.__get_orig(item)\n var g2 = _vm.button.length\n var g3 = _vm.button.length\n return {\n $orig: $orig,\n g2: g2,\n g3: g3,\n }\n })\n : null\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n s0: s0,\n g0: g0,\n g1: g1,\n l0: l0,\n },\n }\n )\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-modal.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-modal.vue?vue&type=script&lang=js&\"","<template>\r\n <view v-if=\"value\" class=\"tn-modal-class tn-modal\">\r\n <tn-popup\r\n v-model=\"value\"\r\n mode=\"center\"\r\n :popup=\"false\"\r\n :borderRadius=\"radius\"\r\n :width=\"width\"\r\n :zoom=\"zoom\"\r\n :safeAreaInsetBottom=\"safeAreaInsetBottom\"\r\n :maskCloseable=\"maskCloseable\"\r\n :zIndex=\"zIndex\"\r\n :closeBtn=\"showCloseBtn\"\r\n @close=\"close\"\r\n >\r\n <!-- 内容 -->\r\n <view\r\n class=\"tn-modal__box\"\r\n :class=\"[\r\n backgroundColorClass\r\n ]\"\r\n :style=\"[boxStyle]\"\r\n >\r\n <!-- 不是自定义弹框内容 -->\r\n <view v-if=\"!custom\">\r\n <view class=\"tn-modal__box__title\" v-if=\"title && title !== ''\">{{ title }}</view>\r\n <view\r\n class=\"tn-modal__box__content\"\r\n :class=\"[\r\n fontColorClass,\r\n contentClass\r\n ]\"\r\n :style=\"contentStyle\"\r\n >{{ content }}</view>\r\n <view v-if=\"button && button.length\" class=\"tn-modal__box__btn-box\" :class=\"[button.length != 2 ? 'tn-flex-direction-column' : '']\">\r\n <block v-for=\"(item, index) in button\" :key=\"index\">\r\n <tn-button\r\n width=\"100%\"\r\n height=\"68rpx\"\r\n :fontSize=\"26\"\r\n :backgroundColor=\"item.backgroundColor || ''\"\r\n :fontColor=\"item.fontColor || ''\"\r\n :plain=\"item.plain || false\"\r\n :shape=\"item.shape || 'round'\"\r\n :class=\"[\r\n button.length > 2 ? 'tn-margin-bottom' : ''\r\n ]\"\r\n @click=\"handleClick(index)\"\r\n :style=\"{\r\n width: button.length != 2 ? '80%' : '46%'\r\n }\"\r\n >\r\n {{ item.text }}\r\n </tn-button>\r\n </block>\r\n </view>\r\n </view>\r\n <view v-else>\r\n <slot></slot>\r\n </view>\r\n </view>\r\n </tn-popup>\r\n </view>\n</template>\n\n<script>\r\n import componentsColorMixin from '../../libs/mixin/components_color.js'\r\n export default {\r\n mixins: [componentsColorMixin],\r\n name: 'tn-modal',\r\n props: {\r\n // 显示控制\r\n value: {\r\n type: Boolean,\r\n default: false\r\n },\r\n // 弹框宽度\r\n width: {\r\n type: String,\r\n default: '84%'\r\n },\r\n // 内边距\r\n padding: {\r\n type: String,\r\n default: ''\r\n },\r\n // 圆角\r\n radius: {\r\n type: Number,\r\n default: 12\r\n },\r\n // 标题\r\n title: {\r\n type: String,\r\n default: ''\r\n },\r\n // 内容\r\n content: {\r\n type: String,\r\n default: ''\r\n },\r\n // 按钮内容 设置参数与button组件的参数一致\r\n // {\r\n // text: '确定',\r\n // backgroundColor: 'red',\r\n // fontColor: 'white',\r\n // plain: true,\r\n // shape: ''\r\n // }\r\n button: {\r\n type: Array,\r\n default: () => {\r\n return []\r\n }\r\n },\r\n safeAreaInsetBottom: {\r\n \ttype: Boolean,\r\n \tdefault: false\r\n },\r\n // 点击遮罩是否可以关闭\r\n maskCloseable: {\r\n type: Boolean,\r\n default: true\r\n },\r\n // 是否显示右上角关闭按钮\r\n showCloseBtn: {\r\n type: Boolean,\r\n default: false\r\n },\r\n // 放大动画\r\n zoom: {\r\n type: Boolean,\r\n default: true\r\n },\r\n // 自定义弹框内容\r\n custom: {\r\n type: Boolean,\r\n default: false\r\n },\r\n // 弹框的z-index\r\n zIndex: {\r\n type: Number,\r\n default: 0\r\n }\r\n },\r\n computed: {\r\n boxStyle() {\r\n let style = {}\r\n \r\n if (this.padding) {\r\n style.padding = this.padding\r\n }\r\n if (this.backgroundColorStyle) {\r\n style.backgroundColor = this.backgroundColorStyle\r\n }\r\n \r\n return style\r\n },\r\n contentClass() {\r\n let clazz = ''\r\n if (this.title) {\r\n clazz += ' tn-margin-top'\r\n } else {\r\n clazz += ' tn-modal__box__content--no-title'\r\n }\r\n \r\n return clazz\r\n },\r\n contentStyle() {\r\n let style = {}\r\n \r\n if (this.fontSize) {\r\n style.fontSize = this.fontSize + this.fontUnit\r\n }\r\n if (this.fontColorStyle) {\r\n style.color = this.fontColorStyle\r\n }\r\n \r\n return style\r\n },\r\n },\r\n data() {\r\n return {\r\n \r\n }\r\n },\r\n methods: {\r\n // 处理按钮点击事件\r\n handleClick(index) {\r\n if (!this.value) return\r\n this.$emit(\"click\", {\r\n index: Number(index)\r\n })\r\n },\r\n // 处理关闭事件\r\n close() {\r\n this.$emit(\"cancel\")\r\n this.$emit('input', false)\r\n }\r\n }\r\n }\n</script>\n\n<style lang=\"scss\" scoped>\r\n \r\n .tn-modal {\r\n \r\n &__box {\r\n position: relative;\r\n box-sizing: border-box;\r\n background-color: #FFFFFF;\r\n padding: 40rpx 64rpx;\r\n \r\n &__title {\r\n text-align: center;\r\n font-size: 34rpx;\r\n color: #333;\r\n padding-top: 20rpx;\r\n font-weight: bold;\r\n }\r\n \r\n &__content {\r\n text-align: center;\r\n padding-bottom: 30rpx;\r\n color: $tn-font-color;\r\n font-size: 28rpx;\r\n \r\n &--no-title {\r\n padding-bottom: 0rpx !important;\r\n }\r\n }\r\n \r\n &__btn-box {\r\n width: 100%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n }\r\n \r\n &__content ~ &__btn-box {\r\n margin-top: 30rpx;\r\n }\r\n }\r\n }\r\n \n</style>\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-modal.vue?vue&type=style&index=0&id=3a2c8cbc&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-modal.vue?vue&type=style&index=0&id=3a2c8cbc&lang=scss&scoped=true&\""],"sourceRoot":""}